aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/nct6775.c
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 /drivers/hwmon/nct6775.c
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>
Diffstat (limited to 'drivers/hwmon/nct6775.c')
-rw-r--r--drivers/hwmon/nct6775.c17
1 files changed, 8 insertions, 9 deletions
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;