aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2013-04-02 11:53:19 -0400
committerGuenter Roeck <linux@roeck-us.net>2013-04-08 00:16:42 -0400
commit2c7fd30da21bf6bda12d7a0f678e4fd8ed362c96 (patch)
tree466504e48c8d28fee78f5515dbdd5a6b199a650d
parentc81cc5a4c14d8d7cc5c891ddf6cb8e7750a44dee (diff)
hwmon: (nct6775) Expand scope of supported chips
NCT6775, NCT6776, and NCT6779 have a number of variants with the same chip ID but different chip labels. Add text "or compatible" to the message displayed when the driver is loaded and rephrase the Kconfig entry to reflect that it also supports compatible chips. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--Documentation/hwmon/nct67758
-rw-r--r--drivers/hwmon/Kconfig8
-rw-r--r--drivers/hwmon/nct6775.c17
3 files changed, 16 insertions, 17 deletions
diff --git a/Documentation/hwmon/nct6775 b/Documentation/hwmon/nct6775
index 3f5587e39093..4e9ef60e8c6c 100644
--- a/Documentation/hwmon/nct6775
+++ b/Documentation/hwmon/nct6775
@@ -8,15 +8,15 @@ Kernel driver NCT6775
8===================== 8=====================
9 9
10Supported chips: 10Supported chips:
11 * Nuvoton NCT6775F/W83667HG-I 11 * Nuvoton NCT5572D/NCT6771F/NCT6772F/NCT6775F/W83677HG-I
12 Prefix: 'nct6775' 12 Prefix: 'nct6775'
13 Addresses scanned: ISA address retrieved from Super I/O registers 13 Addresses scanned: ISA address retrieved from Super I/O registers
14 Datasheet: Available from Nuvoton upon request 14 Datasheet: Available from Nuvoton upon request
15 * Nuvoton NCT6776F 15 * Nuvoton NCT5577D/NCT6776D/NCT6776F
16 Prefix: 'nct6776' 16 Prefix: 'nct6776'
17 Addresses scanned: ISA address retrieved from Super I/O registers 17 Addresses scanned: ISA address retrieved from Super I/O registers
18 Datasheet: Available from Nuvoton upon request 18 Datasheet: Available from Nuvoton upon request
19 * Nuvoton NCT6779D 19 * Nuvoton NCT5532D/NCT6779D
20 Prefix: 'nct6779' 20 Prefix: 'nct6779'
21 Addresses scanned: ISA address retrieved from Super I/O registers 21 Addresses scanned: ISA address retrieved from Super I/O registers
22 Datasheet: Available from Nuvoton upon request 22 Datasheet: Available from Nuvoton upon request
@@ -28,7 +28,7 @@ Description
28----------- 28-----------
29 29
30This driver implements support for the Nuvoton NCT6775F, NCT6776F, and NCT6779D 30This driver implements support for the Nuvoton NCT6775F, NCT6776F, and NCT6779D
31super I/O chips. 31and compatible super I/O chips.
32 32
33The chips support up to 25 temperature monitoring sources. Up to 6 of those are 33The chips support up to 25 temperature monitoring sources. Up to 6 of those are
34direct temperature sensor inputs, the others are special sources such as PECI, 34direct temperature sensor inputs, the others are special sources such as PECI,
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 4986961a98f8..26ebff0b45ca 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -908,14 +908,14 @@ config SENSORS_MCP3021
908 will be called mcp3021. 908 will be called mcp3021.
909 909
910config SENSORS_NCT6775 910config SENSORS_NCT6775
911 tristate "Nuvoton NCT6775F, NCT6776F, NCT6779D" 911 tristate "Nuvoton NCT6775F and compatibles"
912 depends on !PPC 912 depends on !PPC
913 select HWMON_VID 913 select HWMON_VID
914 help 914 help
915 If you say yes here you get support for the hardware monitoring 915 If you say yes here you get support for the hardware monitoring
916 functionality of the Nuvoton NCT6775F, NCT6776F, and NCT6779D 916 functionality of the Nuvoton NCT6775F, NCT6776F, NCT6779D
917 Super-I/O chips. This driver replaces the w83627ehf driver for 917 and compatible Super-I/O chips. This driver replaces the
918 NCT6775F and NCT6776F. 918 w83627ehf driver for NCT6775F and NCT6776F.
919 919
920 This driver can also be built as a module. If so, the module 920 This driver can also be built as a module. If so, the module
921 will be called nct6775. 921 will be called nct6775.
diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c
index 2269bb241b83..d05a700b7daf 100644
--- a/drivers/hwmon/nct6775.c
+++ b/drivers/hwmon/nct6775.c
@@ -4072,16 +4072,17 @@ static struct platform_driver nct6775_driver = {
4072 .remove = nct6775_remove, 4072 .remove = nct6775_remove,
4073}; 4073};
4074 4074
4075static const char *nct6775_sio_names[] __initconst = {
4076 "NCT6775F",
4077 "NCT6776D/F",
4078 "NCT6779D",
4079};
4080
4075/* nct6775_find() looks for a '627 in the Super-I/O config space */ 4081/* nct6775_find() looks for a '627 in the Super-I/O config space */
4076static int __init nct6775_find(int sioaddr, unsigned short *addr, 4082static int __init nct6775_find(int sioaddr, unsigned short *addr,
4077 struct nct6775_sio_data *sio_data) 4083 struct nct6775_sio_data *sio_data)
4078{ 4084{
4079 static const char sio_name_NCT6775[] __initconst = "NCT6775F";
4080 static const char sio_name_NCT6776[] __initconst = "NCT6776F";
4081 static const char sio_name_NCT6779[] __initconst = "NCT6779D";
4082
4083 u16 val; 4085 u16 val;
4084 const char *sio_name;
4085 int err; 4086 int err;
4086 4087
4087 err = superio_enter(sioaddr); 4088 err = superio_enter(sioaddr);
@@ -4096,15 +4097,12 @@ static int __init nct6775_find(int sioaddr, unsigned short *addr,
4096 switch (val & SIO_ID_MASK) { 4097 switch (val & SIO_ID_MASK) {
4097 case SIO_NCT6775_ID: 4098 case SIO_NCT6775_ID:
4098 sio_data->kind = nct6775; 4099 sio_data->kind = nct6775;
4099 sio_name = sio_name_NCT6775;
4100 break; 4100 break;
4101 case SIO_NCT6776_ID: 4101 case SIO_NCT6776_ID:
4102 sio_data->kind = nct6776; 4102 sio_data->kind = nct6776;
4103 sio_name = sio_name_NCT6776;
4104 break; 4103 break;
4105 case SIO_NCT6779_ID: 4104 case SIO_NCT6779_ID:
4106 sio_data->kind = nct6779; 4105 sio_data->kind = nct6779;
4107 sio_name = sio_name_NCT6779;
4108 break; 4106 break;
4109 default: 4107 default:
4110 if (val != 0xffff) 4108 if (val != 0xffff)
@@ -4132,7 +4130,8 @@ static int __init nct6775_find(int sioaddr, unsigned short *addr,
4132 } 4130 }
4133 4131
4134 superio_exit(sioaddr); 4132 superio_exit(sioaddr);
4135 pr_info("Found %s chip at %#x\n", sio_name, *addr); 4133 pr_info("Found %s or compatible chip at %#x\n",
4134 nct6775_sio_names[sio_data->kind], *addr);
4136 sio_data->sioreg = sioaddr; 4135 sio_data->sioreg = sioaddr;
4137 4136
4138 return 0; 4137 return 0;