Compare commits
15 Commits
main
...
bump-6.15-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa46ee922a | ||
|
|
ef6aa8f67f | ||
|
|
74a918c94e | ||
|
|
ba312a895c | ||
|
|
c7d3f6b67e | ||
|
|
297fd66a5b | ||
|
|
5fabc7eb85 | ||
|
|
8ad9f8457f | ||
|
|
ef79d9f2eb | ||
|
|
ef04419c0e | ||
|
|
ba08f9e2bd | ||
|
|
cc00c3b41e | ||
|
|
15cca3e1c1 | ||
|
|
f13025d023 | ||
|
|
8df0a1a932 |
@ -27,8 +27,8 @@ enable_extension "grub-with-dtb" # important, puts the whole DTB handling in pla
|
||||
declare -g BOARD_FIRMWARE_INSTALL="-full"
|
||||
|
||||
function post_family_config_branch_sc8280xp__jhovolds_wip_kernel() {
|
||||
declare -g KERNEL_MAJOR_MINOR="6.14" # Major and minor versions of this kernel.
|
||||
declare -g KERNELBRANCH='branch:wip/sc8280xp-6.14' # @TODO: this is down to 31 patches, from hundreds back in the day. Considering merging this with default arm64 uefi kernel
|
||||
declare -g KERNEL_MAJOR_MINOR="6.15" # Major and minor versions of this kernel.
|
||||
declare -g KERNELBRANCH='branch:wip/sc8280xp-6.15-rc1' # @TODO: this is down to 28 patches, from hundreds back in the day. Considering merging this with default arm64 uefi kernel
|
||||
declare -g KERNELSOURCE='https://github.com/jhovold/linux.git'
|
||||
declare -g LINUXCONFIG="linux-${ARCH}-${BRANCH}" # for this board: linux-arm64-sc8280xp
|
||||
display_alert "Set up jhovold's kernel ${KERNELBRANCH} for" "${BOARD}" "info"
|
||||
|
||||
@ -39,7 +39,7 @@ case $BRANCH in
|
||||
declare -g KERNEL_MAJOR_MINOR="6.12"
|
||||
;;
|
||||
edge)
|
||||
declare -g KERNEL_MAJOR_MINOR="6.14"
|
||||
declare -g KERNEL_MAJOR_MINOR="6.15"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
@ -33,7 +33,7 @@ case $BRANCH in
|
||||
;;
|
||||
|
||||
edge)
|
||||
declare -g KERNEL_MAJOR_MINOR="6.14"
|
||||
declare -g KERNEL_MAJOR_MINOR="6.15"
|
||||
declare -g LINUXFAMILY=rockchip64
|
||||
declare -g LINUXCONFIG='linux-rockchip64-'$BRANCH
|
||||
;;
|
||||
|
||||
@ -38,7 +38,7 @@ case "${BRANCH}" in
|
||||
;;
|
||||
|
||||
edge)
|
||||
declare -g KERNEL_MAJOR_MINOR="6.14"
|
||||
declare -g KERNEL_MAJOR_MINOR="6.15"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
@ -272,7 +272,6 @@ function do_main_configuration() {
|
||||
[[ -z $OFFSET ]] && OFFSET=4 # offset to 1st partition (we use 4MiB boundaries by default)
|
||||
[[ -z $ARCH ]] && ARCH=arm64 # makes little sense to default to anything... # @TODO: remove, but check_config_userspace_release_and_desktop requires it
|
||||
ATF_COMPILE=yes # @TODO: move to armhf/arm64
|
||||
[[ -z $EXTRAWIFI ]] && EXTRAWIFI="yes"
|
||||
[[ -z $PLYMOUTH ]] && PLYMOUTH="yes"
|
||||
[[ -z $AUFS ]] && AUFS="yes"
|
||||
[[ -z $IMAGE_PARTITION_TABLE ]] && IMAGE_PARTITION_TABLE="msdos"
|
||||
@ -474,6 +473,17 @@ function do_extra_configuration() {
|
||||
|
||||
declare -r -g IMAGE_FILE_ID="${calculated_image_version}" # Global, readonly.
|
||||
|
||||
if [[ -z $EXTRAWIFI ]]; then
|
||||
display_alert "EXTRAWIFI" "EXTRAWIFI is not set, defaulting to yes, kernel: ${KERNEL_MAJOR_MINOR}" "warn"
|
||||
EXTRAWIFI="yes"
|
||||
if linux-version compare "${KERNEL_MAJOR_MINOR}" ge 6.15; then
|
||||
display_alert "EXTRAWIFI" "EXTRAWIFI is not set, 6.15 disabled" "warn"
|
||||
EXTRAWIFI="no" # 6.15 breakage
|
||||
fi
|
||||
else
|
||||
display_alert "EXTRAWIFI" "EXTRAWIFI is set to ${EXTRAWIFI}" "warn"
|
||||
fi
|
||||
|
||||
display_alert "Done with do_extra_configuration" "do_extra_configuration" "debug"
|
||||
}
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ index 111111111111..222222222222 100644
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
@@ -369,8 +378,7 @@ &uart_A {
|
||||
@@ -365,8 +374,7 @@ &uart_A {
|
||||
|
||||
bluetooth {
|
||||
compatible = "realtek,rtl8822cs-bt";
|
||||
@ -89,7 +89,7 @@ diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi-cm4.dtsi b/arch/arm
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi-cm4.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-bananapi-cm4.dtsi
|
||||
@@ -303,8 +303,10 @@ &sd_emmc_a {
|
||||
@@ -299,8 +299,10 @@ &sd_emmc_a {
|
||||
#size-cells = <0>;
|
||||
|
||||
bus-width = <4>;
|
||||
@ -101,7 +101,7 @@ index 111111111111..222222222222 100644
|
||||
|
||||
non-removable;
|
||||
disable-wp;
|
||||
@@ -312,10 +314,13 @@ &sd_emmc_a {
|
||||
@@ -308,10 +310,13 @@ &sd_emmc_a {
|
||||
/* WiFi firmware requires power in suspend */
|
||||
keep-power-in-suspend;
|
||||
|
||||
@ -22,7 +22,7 @@ index 111111111111..222222222222 100644
|
||||
|
||||
/ {
|
||||
adc-keys {
|
||||
@@ -394,6 +395,8 @@ &sd_emmc_b {
|
||||
@@ -392,6 +393,8 @@ &sd_emmc_b {
|
||||
cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
|
||||
vmmc-supply = <&tflash_vdd>;
|
||||
vqmmc-supply = <&vddio_c>;
|
||||
@ -31,7 +31,7 @@ index 111111111111..222222222222 100644
|
||||
};
|
||||
|
||||
/* eMMC */
|
||||
@@ -413,6 +416,8 @@ &sd_emmc_c {
|
||||
@@ -411,6 +414,8 @@ &sd_emmc_c {
|
||||
mmc-pwrseq = <&emmc_pwrseq>;
|
||||
vmmc-supply = <&vddao_3v3>;
|
||||
vqmmc-supply = <&emmc_1v8>;
|
||||
@ -69,7 +69,7 @@ index 111111111111..222222222222 100644
|
||||
ethernet0 = ðmac;
|
||||
};
|
||||
|
||||
@@ -426,6 +427,12 @@ &uart_AO {
|
||||
@@ -424,6 +425,12 @@ &uart_AO {
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
@ -12,7 +12,7 @@ diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/b
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
||||
@@ -362,7 +362,7 @@ &sd_emmc_b {
|
||||
@@ -360,7 +360,7 @@ &sd_emmc_b {
|
||||
|
||||
/* eMMC */
|
||||
&sd_emmc_c {
|
||||
@ -21,7 +21,7 @@ index 111111111111..222222222222 100644
|
||||
pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
||||
pinctrl-1 = <&emmc_clk_gate_pins>;
|
||||
pinctrl-names = "default", "clk-gate";
|
||||
@@ -372,8 +372,6 @@ &sd_emmc_c {
|
||||
@@ -370,8 +370,6 @@ &sd_emmc_c {
|
||||
non-removable;
|
||||
disable-wp;
|
||||
cap-mmc-highspeed;
|
||||
@ -19,7 +19,7 @@ diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/usb/core/hub.c
|
||||
+++ b/drivers/usb/core/hub.c
|
||||
@@ -5977,7 +5977,7 @@ static const struct usb_device_id hub_id_table[] = {
|
||||
@@ -5975,7 +5975,7 @@ static const struct usb_device_id hub_id_table[] = {
|
||||
| USB_DEVICE_ID_MATCH_INT_CLASS,
|
||||
.idVendor = USB_VENDOR_GENESYS_LOGIC,
|
||||
.bInterfaceClass = USB_CLASS_HUB,
|
||||
@ -87,7 +87,7 @@ index 111111111111..222222222222 100644
|
||||
&pwm_AO_cd {
|
||||
pinctrl-0 = <&pwm_ao_d_e_pins>;
|
||||
pinctrl-names = "default";
|
||||
@@ -417,3 +457,11 @@ &uart_AO {
|
||||
@@ -413,3 +453,11 @@ &uart_AO {
|
||||
&usb {
|
||||
status = "okay";
|
||||
};
|
||||
@ -11,7 +11,7 @@ diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts b/arch/arm64/
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
|
||||
@@ -413,7 +413,7 @@ &sd_emmc_c {
|
||||
@@ -409,7 +409,7 @@ &sd_emmc_c {
|
||||
cap-mmc-highspeed;
|
||||
mmc-ddr-1_8v;
|
||||
mmc-hs200-1_8v;
|
||||
@ -15,7 +15,7 @@ diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts b/arch/arm64/
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
|
||||
@@ -365,7 +365,7 @@ &sd_emmc_a {
|
||||
@@ -361,7 +361,7 @@ &sd_emmc_a {
|
||||
|
||||
bus-width = <4>;
|
||||
cap-sd-highspeed;
|
||||
@ -34,7 +34,7 @@ diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentat
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
||||
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
||||
@@ -1461,6 +1461,8 @@ patternProperties:
|
||||
@@ -1471,6 +1471,8 @@ patternProperties:
|
||||
description: Sundance DSP Inc.
|
||||
"^sunplus,.*":
|
||||
description: Sunplus Technology Co., Ltd.
|
||||
@ -47,8 +47,8 @@ diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/media/rc/keymaps/Makefile
|
||||
+++ b/drivers/media/rc/keymaps/Makefile
|
||||
@@ -108,6 +108,7 @@ obj-$(CONFIG_RC_MAP) += \
|
||||
rc-reddo.o \
|
||||
@@ -109,6 +109,7 @@ obj-$(CONFIG_RC_MAP) += \
|
||||
rc-siemens-gigaset-rc20.o \
|
||||
rc-snapstream-firefly.o \
|
||||
rc-streamzap.o \
|
||||
+ rc-sunvell-t95z-plus.o \
|
||||
@ -140,8 +140,8 @@ diff --git a/include/media/rc-map.h b/include/media/rc-map.h
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/include/media/rc-map.h
|
||||
+++ b/include/media/rc-map.h
|
||||
@@ -315,6 +315,7 @@ struct rc_map *rc_map_get(const char *name);
|
||||
#define RC_MAP_REDDO "rc-reddo"
|
||||
@@ -316,6 +316,7 @@ struct rc_map *rc_map_get(const char *name);
|
||||
#define RC_MAP_SIEMENS_GIGASET_RC20 "rc-siemens-gigaset-rc20"
|
||||
#define RC_MAP_SNAPSTREAM_FIREFLY "rc-snapstream-firefly"
|
||||
#define RC_MAP_STREAMZAP "rc-streamzap"
|
||||
+#define RC_MAP_SUNVELL_T95Z_PLUS "rc-sunvell-t95z-plus"
|
||||
@ -20,7 +20,7 @@ index 111111111111..222222222222 100644
|
||||
{ .name = /* cisco */ "spi-petra" },
|
||||
{ .name = /* dh */ "dhcom-board" },
|
||||
{ .name = /* elgin */ "jg10309-01" },
|
||||
@@ -734,6 +735,7 @@ static int spidev_of_check(struct device *dev)
|
||||
@@ -735,6 +736,7 @@ static int spidev_of_check(struct device *dev)
|
||||
}
|
||||
|
||||
static const struct of_device_id spidev_dt_ids[] = {
|
||||
@ -16,7 +16,7 @@ diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -1483,4 +1483,10 @@
|
||||
@@ -1520,4 +1520,10 @@
|
||||
#define USB_VENDOR_ID_SIGNOTEC 0x2133
|
||||
#define USB_DEVICE_ID_SIGNOTEC_VIEWSONIC_PD1011 0x0018
|
||||
|
||||
@ -31,7 +31,7 @@ diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/hid/hid-quirks.c
|
||||
+++ b/drivers/hid/hid-quirks.c
|
||||
@@ -892,6 +892,9 @@ static const struct hid_device_id hid_ignore_list[] = {
|
||||
@@ -902,6 +902,9 @@ static const struct hid_device_id hid_ignore_list[] = {
|
||||
#endif
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_HP_5MP_CAMERA_5473) },
|
||||
@ -45,7 +45,7 @@ diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconf
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/input/touchscreen/Kconfig
|
||||
+++ b/drivers/input/touchscreen/Kconfig
|
||||
@@ -1390,4 +1390,14 @@ config TOUCHSCREEN_HIMAX_HX83112B
|
||||
@@ -1403,4 +1403,14 @@ config TOUCHSCREEN_HIMAX_HX83112B
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called himax_hx83112b.
|
||||
|
||||
@ -64,7 +64,7 @@ diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Make
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/input/touchscreen/Makefile
|
||||
+++ b/drivers/input/touchscreen/Makefile
|
||||
@@ -116,4 +116,5 @@ obj-$(CONFIG_TOUCHSCREEN_RASPBERRYPI_FW) += raspberrypi-ts.o
|
||||
@@ -117,4 +117,5 @@ obj-$(CONFIG_TOUCHSCREEN_RASPBERRYPI_FW) += raspberrypi-ts.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_IQS5XX) += iqs5xx.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_IQS7211) += iqs7211.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_ZINITIX) += zinitix.o
|
||||
@ -23,7 +23,7 @@ index 111111111111..222222222222 100644
|
||||
|
||||
/ {
|
||||
compatible = "amlogic,meson-axg";
|
||||
@@ -1922,6 +1923,7 @@ sd_emmc_b: mmc@5000 {
|
||||
@@ -1938,6 +1939,7 @@ sd_emmc_b: mmc@5000 {
|
||||
<&clkc CLKID_SD_EMMC_B_CLK0>,
|
||||
<&clkc CLKID_FCLK_DIV2>;
|
||||
clock-names = "core", "clkin0", "clkin1";
|
||||
@ -31,7 +31,7 @@ index 111111111111..222222222222 100644
|
||||
resets = <&reset RESET_SD_EMMC_B>;
|
||||
};
|
||||
|
||||
@@ -1935,6 +1937,7 @@ sd_emmc_c: mmc@7000 {
|
||||
@@ -1951,6 +1953,7 @@ sd_emmc_c: mmc@7000 {
|
||||
<&clkc CLKID_FCLK_DIV2>;
|
||||
clock-names = "core", "clkin0", "clkin1";
|
||||
resets = <&reset RESET_SD_EMMC_C>;
|
||||
@ -12,7 +12,7 @@ diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/scripts/Makefile.lib
|
||||
+++ b/scripts/Makefile.lib
|
||||
@@ -75,6 +75,9 @@ always-y += $(hostprogs-always-y) $(hostprogs-always-m)
|
||||
@@ -70,6 +70,9 @@ always-y += $(hostprogs-always-y) $(hostprogs-always-m)
|
||||
userprogs += $(userprogs-always-y) $(userprogs-always-m)
|
||||
always-y += $(userprogs-always-y) $(userprogs-always-m)
|
||||
|
||||
@ -46,7 +46,7 @@ diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/mtd/spi-nor/core.c
|
||||
+++ b/drivers/mtd/spi-nor/core.c
|
||||
@@ -1981,6 +1981,7 @@ static const struct spi_nor_manufacturer *manufacturers[] = {
|
||||
@@ -1954,6 +1954,7 @@ static const struct spi_nor_manufacturer *manufacturers[] = {
|
||||
&spi_nor_sst,
|
||||
&spi_nor_winbond,
|
||||
&spi_nor_xmc,
|
||||
@ -1,24 +1,40 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Yavitz <pyavitz@xxxxx.com>
|
||||
Date: Tue, 10 Oct 2023 18:54:22 -0400
|
||||
From: Patrick Yavitz <pyavitz@gmail.com>
|
||||
Date: Wed, 9 Apr 2025 04:34:27 -0400
|
||||
Subject: hwmon: emc2305: fixups for driver
|
||||
|
||||
BPI-CM4 fan control
|
||||
|
||||
hwmon: emc2305: fixups for driver
|
||||
The driver had a number of issues, checkpatch warnings/errors,
|
||||
and other limitations, so fix these up to make it usable.
|
||||
hwmon: emc2305: Change OF properties pwm-min & pwm-max to u8
|
||||
hwmon: emc2305: Add calls to initialize cooling maps
|
||||
https://github.com/raspberrypi/linux/commits/233096b8a9023f7e02960543c85447d46af81e81/drivers/hwmon/emc2305.c
|
||||
|
||||
Tested-on: CM4-IO-BASE-B: https://www.waveshare.com/wiki/CM4-IO-BASE-B
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>
|
||||
|
||||
hwmon: emc2305: Add calls to initialise of cooling maps
|
||||
|
||||
Commit 46ef9d4 ("hwmon: emc2305: fixups for driver submitted to
|
||||
mailing lists") missed adding the call to thermal_of_cooling_device_register
|
||||
required to configure any cooling maps for the device, hence stopping it
|
||||
from actually ever changing speed.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
|
||||
hwmon: emc2305: Change OF properties pwm-min & pwm-max to u8
|
||||
|
||||
There is no DT binding for emc2305 as mainline are still
|
||||
discussing how to do a generic fan binding.
|
||||
The 5.15 driver was reading the "emc2305," properties
|
||||
"cooling-levels", "pwm-max", "pwm-min", and "pwm-channel" as u8.
|
||||
The overlay was writing them as u16 (;) so it was working.
|
||||
|
||||
The 6.1 driver was reading as u32, which failed as there is
|
||||
insufficient data.
|
||||
|
||||
As this is all downstream only, revert to u8 to match 5.15.
|
||||
|
||||
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
||||
---
|
||||
drivers/hwmon/emc2305.c | 96 +++++++++-
|
||||
1 file changed, 88 insertions(+), 8 deletions(-)
|
||||
drivers/hwmon/emc2305.c | 110 +++++++++-
|
||||
1 file changed, 104 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/drivers/hwmon/emc2305.c b/drivers/hwmon/emc2305.c
|
||||
index 111111111111..222222222222 100644
|
||||
@ -47,24 +63,7 @@ index 111111111111..222222222222 100644
|
||||
#define EMC2305_REG_FAN_MIN_DRIVE(n) (0x38 + 0x10 * (n))
|
||||
#define EMC2305_REG_FAN_TACH(n) (0x3e + 0x10 * (n))
|
||||
|
||||
@@ -55,6 +57,16 @@ static const struct i2c_device_id emc2305_ids[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, emc2305_ids);
|
||||
|
||||
+static const struct of_device_id emc2305_dt_ids[] = {
|
||||
+ { .compatible = "smsc,emc2305" },
|
||||
+ { .compatible = "microchip,emc2305" },
|
||||
+ { .compatible = "microchip,emc2303" },
|
||||
+ { .compatible = "microchip,emc2302" },
|
||||
+ { .compatible = "microchip,emc2301" },
|
||||
+ { }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, emc2305_dt_ids);
|
||||
+
|
||||
/**
|
||||
* struct emc2305_cdev_data - device-specific cooling device state
|
||||
* @cdev: cooling device
|
||||
@@ -100,6 +112,7 @@ struct emc2305_data {
|
||||
@@ -100,6 +102,7 @@ struct emc2305_data {
|
||||
u8 pwm_num;
|
||||
bool pwm_separate;
|
||||
u8 pwm_min[EMC2305_PWM_MAX];
|
||||
@ -72,7 +71,16 @@ index 111111111111..222222222222 100644
|
||||
struct emc2305_cdev_data cdev_data[EMC2305_PWM_MAX];
|
||||
};
|
||||
|
||||
@@ -272,7 +285,7 @@ static int emc2305_set_pwm(struct device *dev, long val, int channel)
|
||||
@@ -112,6 +115,8 @@ static char *emc2305_fan_name[] = {
|
||||
"emc2305_fan5",
|
||||
};
|
||||
|
||||
+static void emc2305_unset_tz(struct device *dev);
|
||||
+
|
||||
static int emc2305_get_max_channel(const struct emc2305_data *data)
|
||||
{
|
||||
return data->pwm_num;
|
||||
@@ -270,7 +275,7 @@ static int emc2305_set_pwm(struct device *dev, long val, int channel)
|
||||
struct i2c_client *client = data->client;
|
||||
int ret;
|
||||
|
||||
@ -81,7 +89,7 @@ index 111111111111..222222222222 100644
|
||||
return -EINVAL;
|
||||
|
||||
ret = i2c_smbus_write_byte_data(client, EMC2305_REG_FAN_DRIVE(channel), val);
|
||||
@@ -283,6 +296,49 @@ static int emc2305_set_pwm(struct device *dev, long val, int channel)
|
||||
@@ -281,6 +286,49 @@ static int emc2305_set_pwm(struct device *dev, long val, int channel)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -131,13 +139,13 @@ index 111111111111..222222222222 100644
|
||||
static int emc2305_set_single_tz(struct device *dev, int idx)
|
||||
{
|
||||
struct emc2305_data *data = dev_get_drvdata(dev);
|
||||
@@ -292,9 +348,17 @@ static int emc2305_set_single_tz(struct device *dev, int idx)
|
||||
@@ -290,9 +338,16 @@ static int emc2305_set_single_tz(struct device *dev, int idx)
|
||||
cdev_idx = (idx) ? idx - 1 : 0;
|
||||
pwm = data->pwm_min[cdev_idx];
|
||||
|
||||
- data->cdev_data[cdev_idx].cdev =
|
||||
- thermal_cooling_device_register(emc2305_fan_name[idx], data,
|
||||
- &emc2305_cooling_ops);
|
||||
- devm_thermal_of_cooling_device_register(dev, dev->of_node,
|
||||
- emc2305_fan_name[idx], data,
|
||||
+ if (dev->of_node)
|
||||
+ data->cdev_data[cdev_idx].cdev =
|
||||
+ devm_thermal_of_cooling_device_register(dev, dev->of_node,
|
||||
@ -148,17 +156,29 @@ index 111111111111..222222222222 100644
|
||||
+ data->cdev_data[cdev_idx].cdev =
|
||||
+ thermal_cooling_device_register(emc2305_fan_name[idx],
|
||||
+ data,
|
||||
+ &emc2305_cooling_ops);
|
||||
&emc2305_cooling_ops);
|
||||
|
||||
if (IS_ERR(data->cdev_data[cdev_idx].cdev)) {
|
||||
dev_err(dev, "Failed to register cooling device %s\n", emc2305_fan_name[idx]);
|
||||
@@ -347,9 +411,11 @@ static void emc2305_unset_tz(struct device *dev)
|
||||
int i;
|
||||
|
||||
/* Unregister cooling device. */
|
||||
- for (i = 0; i < EMC2305_PWM_MAX; i++)
|
||||
- if (data->cdev_data[i].cdev)
|
||||
- thermal_cooling_device_unregister(data->cdev_data[i].cdev);
|
||||
@@ -331,9 +386,26 @@ static int emc2305_set_tz(struct device *dev)
|
||||
for (i = 0; i < data->pwm_num; i++) {
|
||||
ret = emc2305_set_single_tz(dev, i + 1);
|
||||
if (ret)
|
||||
- return ret;
|
||||
+ goto thermal_cooling_device_register_fail;
|
||||
}
|
||||
return 0;
|
||||
+
|
||||
+thermal_cooling_device_register_fail:
|
||||
+ emc2305_unset_tz(dev);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void emc2305_unset_tz(struct device *dev)
|
||||
+{
|
||||
+ struct emc2305_data *data = dev_get_drvdata(dev);
|
||||
+ int i;
|
||||
+
|
||||
+ /* Unregister cooling device. */
|
||||
+ if (!dev->of_node) {
|
||||
+ for (i = 0; i < EMC2305_PWM_MAX; i++)
|
||||
+ if (data->cdev_data[i].cdev)
|
||||
@ -167,7 +187,7 @@ index 111111111111..222222222222 100644
|
||||
}
|
||||
|
||||
static umode_t
|
||||
@@ -571,11 +637,18 @@ static int emc2305_probe(struct i2c_client *client)
|
||||
@@ -555,11 +627,18 @@ static int emc2305_probe(struct i2c_client *client)
|
||||
data->pwm_separate = pdata->pwm_separate;
|
||||
for (i = 0; i < EMC2305_PWM_MAX; i++)
|
||||
data->pwm_min[i] = pdata->pwm_min[i];
|
||||
@ -186,7 +206,7 @@ index 111111111111..222222222222 100644
|
||||
}
|
||||
|
||||
data->hwmon_dev = devm_hwmon_device_register_with_info(dev, "emc2305", data,
|
||||
@@ -596,6 +669,12 @@ static int emc2305_probe(struct i2c_client *client)
|
||||
@@ -580,21 +659,40 @@ static int emc2305_probe(struct i2c_client *client)
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -199,14 +219,34 @@ index 111111111111..222222222222 100644
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -610,6 +689,7 @@ static void emc2305_remove(struct i2c_client *client)
|
||||
static const struct of_device_id of_emc2305_match_table[] = {
|
||||
+ { .compatible = "smsc,emc2305" },
|
||||
{ .compatible = "microchip,emc2305", },
|
||||
+ { .compatible = "microchip,emc2303", },
|
||||
+ { .compatible = "microchip,emc2302", },
|
||||
+ { .compatible = "microchip,emc2301", },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, of_emc2305_match_table);
|
||||
|
||||
+static void emc2305_remove(struct i2c_client *client)
|
||||
+{
|
||||
+ struct device *dev = &client->dev;
|
||||
+
|
||||
+ if (IS_REACHABLE(CONFIG_THERMAL))
|
||||
+ emc2305_unset_tz(dev);
|
||||
+}
|
||||
+
|
||||
static struct i2c_driver emc2305_driver = {
|
||||
.driver = {
|
||||
.name = "emc2305",
|
||||
+ .of_match_table = emc2305_dt_ids,
|
||||
.of_match_table = of_emc2305_match_table,
|
||||
},
|
||||
.probe = emc2305_probe,
|
||||
.remove = emc2305_remove,
|
||||
+ .remove = emc2305_remove,
|
||||
.id_table = emc2305_ids,
|
||||
};
|
||||
|
||||
--
|
||||
Armbian
|
||||
|
||||
@ -90,7 +90,7 @@ diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi b/arch/arm64/bo
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
||||
@@ -260,7 +260,11 @@ &sd_emmc_a {
|
||||
@@ -258,7 +258,11 @@ &sd_emmc_a {
|
||||
|
||||
bus-width = <4>;
|
||||
cap-sd-highspeed;
|
||||
@ -107,7 +107,7 @@ diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi b/arch/arm64/
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi
|
||||
@@ -121,7 +121,11 @@ &sd_emmc_a {
|
||||
@@ -119,7 +119,11 @@ &sd_emmc_a {
|
||||
|
||||
bus-width = <4>;
|
||||
cap-sd-highspeed;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user