summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pc87427.c
Commit message (Collapse)AuthorAgeFilesLines
* hwmon: Use resource_sizeJulia Lawall2009-09-151-3/+3
| | | | | | | | | | | | | | | | | | | | Use the function resource_size, which reduces the chance of introducing off-by-one errors in calculating the resource size. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ struct resource *res; @@ - (res->end - res->start) + 1 + resource_size(res) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: Include <linux/io.h> instead of <asm/io.h>H Hartley Sweeten2009-09-151-1/+1
| | | | | | | | | | | | | | Drivers should be including <linux/io.h> instead of <asm/io.h>. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Alistair John Strachan <alistair@devzero.co.uk> Cc: Nicolas Boichat <nicolas@boichat.ch> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Frank Seidel <frank@f-seidel.de> Acked-by: Jim Cromie <jim.cromie@gmail.com> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: Check for ACPI resource conflictsJean Delvare2009-01-071-0/+5
| | | | | | | | | | | | | | | | | | Check for ACPI resource conflicts in hwmon drivers. I've included all Super-I/O and PCI drivers. I've voluntarily left out: * Vendor-specific drivers: if they conflicted on any system, this would pretty much mean that they conflict on all systems, and we would know by now. * Legacy ISA drivers (lm78 and w83781d): they only support chips found on old designs were ACPI either wasn't supported or didn't deal with thermal management. * Drivers accessing the I/O resources indirectly (e.g. through SMBus): the checks are already done where they belong, i.e. in the bus drivers. Signed-off-by: Jean Delvare <jdelvare@suse.de> Acked-by: David Hubbard <david.c.hubbard@gmail.com>
* hwmon: Let the user override the detected Super-I/O device IDJean Delvare2008-02-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | While it is possible to force SMBus-based hardware monitoring chip drivers to drive a not officially supported device, we do not have this possibility for Super-I/O-based drivers. That's unfortunate because sometimes newer chips are fully compatible and just forcing the driver to load would work. Instead of that we have to tell the users to recompile the kernel driver, which isn't an easy task for everyone. So, I propose that we add a module parameter to all Super-I/O based hardware monitoring drivers, letting advanced users force the driver to load on their machine. The user has to provide the device ID of a supposedly compatible device. This requires looking at the source code or a datasheet, so I am confident that users can't randomly force a driver without knowing what they are doing. Thus this should be relatively safe. As you can see from the code, the implementation is pretty simple and unintrusive. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
* hwmon: Convert from class_device to deviceTony Jones2007-10-091-5/+5
| | | | | | | | | Convert from class_device to device for hwmon_device_register/unregister Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
* hwmon: Fix a potential race condition on unloadJean Delvare2007-07-191-1/+1
| | | | | | | | | | | | | | | Fix a potential race condition when some hardware monitoring platform drivers are being unloaded. I believe that the driver data pointer shouldn't be cleared before all the sysfs files are removed, otherwise a sysfs callback might attempt to dereference a NULL pointer. I'm not sure exactly what the driver core protects drivers against, so let's play it safe. While we're here, clear the driver data pointer when probe fails, so as to not leave an invalid pointer behind us. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
* hwmon: Request the I/O regions in platform driversJean Delvare2007-05-081-1/+14
| | | | | | | | | | | | | | | | | | My understanding of the resource management in the Linux 2.6 device driver model is that the devices should declare their resources, and then when a driver attaches to a device, it should request the resources it will be using, so as to mark them busy. This is how the PCI and PNP subsystems work, you can clearly see the two levels of resources (declaration and request) in /proc/ioports for these devices. So I believe that our platform hardware monitoring drivers should follow the same logic. At the moment, we only declare the resources but we do not request them. This patch adds the I/O region request and release calls. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Juerg Haefliger <juergh@gmail.com>
* hwmon: New PC87427 hardware monitoring driverJean Delvare2006-12-121-0/+627
This is a new hardware monitoring driver for the National Semiconductor PC87427 Super-I/O chip. It only supports fan speed monitoring for now, while the chip can do much more. Thanks to Amir Habibi at Candelis for setting up a test system, and to Michael Kress for testing several iterations of this driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
OpenPOWER on IntegriCloud