Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: add SCH5317 to smsc47b397 driver

This patch adds the SMSC SCH5317 chip (device ID 0x85) as a supported
device to the smsc47b397 driver.

Signed-off-by: Juerg Haefliger <juergh at gmail.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

authored by

Juerg Haefliger and committed by
Mark M. Hoffman
2dbbdb35 b74f3fdd

+7 -5
+4 -3
Documentation/hwmon/smsc47b397
··· 4 4 Supported chips: 5 5 * SMSC LPC47B397-NC 6 6 * SMSC SCH5307-NS 7 + * SMSC SCH5317 7 8 Prefix: 'smsc47b397' 8 9 Addresses scanned: none, address read from Super I/O config space 9 10 Datasheet: In this file ··· 19 18 provided by Craig Kelly (In-Store Broadcast Network) and edited/corrected 20 19 by Mark M. Hoffman <mhoffman@lightlink.com>. 21 20 22 - [1] And SMSC SCH5307-NS, which has a different device ID but is otherwise 23 - compatible. 21 + [1] And SMSC SCH5307-NS and SCH5317, which have different device IDs but are 22 + otherwise compatible. 24 23 25 24 * * * * * 26 25 ··· 132 131 The registers of interest for identifying the SIO on the dc7100 are Device ID 133 132 (0x20) and Device Rev (0x21). 134 133 135 - The Device ID will read 0x6F (for SCH5307-NS, 0x81) 134 + The Device ID will read 0x6F (0x81 for SCH5307-NS, and 0x85 for SCH5317) 136 135 The Device Rev currently reads 0x01 137 136 138 137 Obtaining the HWM Base Address.
+3 -2
drivers/hwmon/smsc47b397.c
··· 333 333 superio_enter(); 334 334 id = superio_inb(SUPERIO_REG_DEVID); 335 335 336 - if ((id != 0x6f) && (id != 0x81)) { 336 + if ((id != 0x6f) && (id != 0x81) && (id != 0x85)) { 337 337 superio_exit(); 338 338 return -ENODEV; 339 339 } ··· 346 346 347 347 printk(KERN_INFO DRVNAME ": found SMSC %s " 348 348 "(base address 0x%04x, revision %u)\n", 349 - id == 0x81 ? "SCH5307-NS" : "LPC47B397-NC", *addr, rev); 349 + id == 0x81 ? "SCH5307-NS" : id == 0x85 ? "SCH5317" : 350 + "LPC47B397-NC", *addr, rev); 350 351 351 352 superio_exit(); 352 353 return 0;