[source] kernel: add hwmon for W83627EHF and family

LEDE Commits lede-commits at lists.infradead.org
Tue May 16 15:10:56 PDT 2017


dangole pushed a commit to source.git, branch master:
https://git.lede-project.org/0dcc36fc7ddecf23b915621c6652dacf75006511

commit 0dcc36fc7ddecf23b915621c6652dacf75006511
Author: Philip Prindeville <philipp at redfish-solutions.com>
AuthorDate: Wed May 10 16:32:05 2017 -0600

    kernel: add hwmon for W83627EHF and family
    
    Remove support for NCT6775/6 from W83627EHF driver so the NCT6775
    driver will still be used for those chips.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
    Signed-off-by: Philip Prindeville <philipp at redfish-solutions.com>
---
 package/kernel/linux/modules/hwmon.mk              | 17 ++++++++++++
 .../800-hwmon-w83627ehf-dont-claim-nct677x.patch   | 32 ++++++++++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk
index 79c8184..ed05cae 100644
--- a/package/kernel/linux/modules/hwmon.mk
+++ b/package/kernel/linux/modules/hwmon.mk
@@ -313,6 +313,23 @@ endef
 $(eval $(call KernelPackage,hwmon-w83627hf))
 
 
+define KernelPackage/hwmon-w83627ehf
+  TITLE:=Winbond W83627EHF/EHG/DHG/UHG, W83667HG monitoring support
+  KCONFIG:=CONFIG_SENSORS_W83627EHF
+  FILES:=$(LINUX_DIR)/drivers/hwmon/w83627ehf.ko
+  AUTOLOAD:=$(call AutoProbe,w83627ehf)
+  $(call AddDepends/hwmon, at TARGET_x86 +kmod-hwmon-vid)
+endef
+
+define KernelPackage/hwmon-w83627ehf/description
+ Kernel module for Winbond W83627EHF/EHG/DHG/UHG and W83667HG thermal monitor chip
+ Support for NCT6775F and NCT6776F has been removed from this driver in favour of
+ using the nct6775 driver to handle those chips.
+endef
+
+$(eval $(call KernelPackage,hwmon-w83627ehf))
+
+
 define KernelPackage/hwmon-w83793
   TITLE:=Winbond W83793G/R monitoring support
   KCONFIG:=CONFIG_SENSORS_W83793
diff --git a/target/linux/x86/patches-4.9/800-hwmon-w83627ehf-dont-claim-nct677x.patch b/target/linux/x86/patches-4.9/800-hwmon-w83627ehf-dont-claim-nct677x.patch
new file mode 100644
index 0000000..a04a674
--- /dev/null
+++ b/target/linux/x86/patches-4.9/800-hwmon-w83627ehf-dont-claim-nct677x.patch
@@ -0,0 +1,32 @@
+diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
+index 697007afb99c..4a4e0b4c077c 100644
+--- a/drivers/hwmon/w83627ehf.c
++++ b/drivers/hwmon/w83627ehf.c
+@@ -2707,8 +2707,8 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr,
+ 	static const char sio_name_W83627UHG[] __initconst = "W83627UHG";
+ 	static const char sio_name_W83667HG[] __initconst = "W83667HG";
+ 	static const char sio_name_W83667HG_B[] __initconst = "W83667HG-B";
+-	static const char sio_name_NCT6775[] __initconst = "NCT6775F";
+-	static const char sio_name_NCT6776[] __initconst = "NCT6776F";
++/*	static const char sio_name_NCT6775[] __initconst = "NCT6775F";
++	static const char sio_name_NCT6776[] __initconst = "NCT6776F"; */
+ 
+ 	u16 val;
+ 	const char *sio_name;
+@@ -2749,14 +2749,14 @@ static int __init w83627ehf_find(int sioaddr, unsigned short *addr,
+ 		sio_data->kind = w83667hg_b;
+ 		sio_name = sio_name_W83667HG_B;
+ 		break;
+-	case SIO_NCT6775_ID:
++/*	case SIO_NCT6775_ID:
+ 		sio_data->kind = nct6775;
+ 		sio_name = sio_name_NCT6775;
+ 		break;
+ 	case SIO_NCT6776_ID:
+ 		sio_data->kind = nct6776;
+ 		sio_name = sio_name_NCT6776;
+-		break;
++		break; */
+ 	default:
+ 		if (val != 0xffff)
+ 			pr_debug("unsupported chip ID: 0x%04x\n", val);



More information about the lede-commits mailing list