aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/ams (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-10-28Move ams driver to macintoshJean Delvare6-963/+0
The ams driver isn't a hardware monitoring driver, so it shouldn't live under driver/hwmon. drivers/macintosh seems much more appropriate, as the driver is only useful on PowerBooks and iBooks. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Stelian Pop <stelian@popies.net> Cc: Michael Hanselmann <linux-kernel@hansmi.ch> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Grant Likely <grant.likely@secretlab.ca>
2010-08-06of/device: Replace struct of_device with struct platform_deviceGrant Likely1-1/+1
of_device is just an alias for platform_device, so remove it entirely. Also replace to_of_device() with to_platform_device() and update comment blocks. This patch was initially generated from the following semantic patch, and then edited by hand to pick up the bits that coccinelle didn't catch. @@ @@ -struct of_device +struct platform_device Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: David S. Miller <davem@davemloft.net>
2010-02-03macintosh/hwmon/ams: Fix device removal sequenceJean Delvare4-4/+12
Some code that is in ams_exit() (the module exit code) should instead be called when the device (not module) is removed. It probably doesn't make much of a difference in the PMU case, but in the I2C case it does matter. I make no guarantee that my fix isn't racy, I'm not familiar enough with the ams driver code to tell for sure. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Christian Kujau <lists@nerdbynature.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Stelian Pop <stelian@popies.net> Cc: Michael Hanselmann <linux-kernel@hansmi.ch> Cc: stable@kernel.org Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2008-10-17hwmon: (ams) Simplify IRQ handling routineDmitry Torokhov1-25/+17
Simplify the IRQ handling routine of ams driver. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17hwmon: (ams) Fix locking issuesDmitry Torokhov4-65/+56
Use a separate mutex to serialize input device creation/removal, otheriwse we deadlock if we try to remove input device while it is being polled. Also do not take ams_info.lock when it is not needed. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17hwmon: (ams) Fix permissions on 'joystick' module parameterDmitry Torokhov1-2/+2
We should not allow writes to the 'joystick' module parameters since writing there will not trigger creation of the input device. Disable writes since we provide alternative way of enabling input device via AMS device's sysfs attribute. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17hwmon: (ams) Convert to a new-style i2c driverJean Delvare2-41/+19
The legacy i2c binding model is phasing out, so the ams driver needs to be converted to a new-style i2c driver. Here is a naive approach of this conversion. Basically it is moving the i2c device creation from the ams driver to the i2c-powermac driver. This should work, but I suspect we could come up with something cleaner by declaring the i2c device as part of the platform setup. This could be done later by someone more familiar with openfirmware-based platforms than I am myself. One nice thing brought by this conversion is that the ams driver should be loaded automatically on systems where is is needed (at least when the I2C interface to the chip is used) providing coldplug-aware user-space environment. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Johannes Berg <johannes@sipsolutions.net> Cc: Stelian Pop <stelian@popies.net> Cc: Michael Hanselmann <linux-kernel@hansmi.ch> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2008-08-20powerpc/drivers: Use linux/of_device.h instead of asm/of_device.hStephen Rothwell1-1/+1
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-06-30hwmon: Use linux/of_platform.h instead of asmStephen Rothwell1-1/+1
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Stelian Pop <stelian@popies.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-10-12Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6Dmitry Torokhov1-1/+0
Conflicts: drivers/macintosh/adbhid.c
2007-09-26HWMON: ams - convert to use input-polldevDmitry Torokhov2-47/+34
Switch to using input-polldev skeleton instead of implementing polling loop by itself. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Michael Hanselmann <linux-kernel@hansmi.ch>
2007-07-30hwmon: clean up duplicate includesJesper Juhl1-1/+0
This patch cleans up duplicate includes in drivers/hwmon/ Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-05-10drivers/hwmon: switch to using input_dev->dev.parentDmitry Torokhov1-1/+1
In preparation for struct class_device -> struct device input core conversion, switch to using input_dev->dev.parent when specifying device position in sysfs tree. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6Linus Torvalds2-7/+4
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: (32 commits) Use menuconfig objects - hwmon hwmon/smsc47b397: Use dynamic sysfs callbacks hwmon/smsc47b397: Convert to a platform driver hwmon/w83781d: Deprecate W83627HF support hwmon/w83781d: Use dynamic sysfs callbacks hwmon/w83781d: Be less i2c_client-centric hwmon/w83781d: Clean up conversion macros hwmon/w83781d: No longer use i2c-isa hwmon/ams: Do not print error on systems without apple motion sensor hwmon/ams: Fix I2C read retry logic hwmon: New AD7416, AD7417 and AD7418 driver hwmon/coretemp: Add documentation hwmon: New coretemp driver i386: Use functions from library in msr driver i386: Add safe variants of rdmsr_on_cpu and wrmsr_on_cpu hwmon/lm75: Use dynamic sysfs callbacks hwmon/lm78: Use dynamic sysfs callbacks hwmon/lm78: Be less i2c_client-centric hwmon/lm78: No longer use i2c-isa hwmon: New max6650 driver ...
2007-05-08hwmon/ams: Do not print error on systems without apple motion sensorOlaf Hering1-3/+0
It is not an error if a system has no ams hardware. Do not clutter dmesg in this case. Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Michael Hanselmann <linux-kernel@hansmi.ch> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-08hwmon/ams: Fix I2C read retry logicStelian Pop1-4/+4
Fix sleep and retry logic in ams-i2c. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-07[POWERPC] Rename device_is_compatible to of_device_is_compatibleStephen Rothwell1-2/+2
for consistency with other Open Firmware interfaces (and Sparc). This is just a straight replacement. This leaves the compatibility define in place. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-02[POWERPC] Rename get_property to of_get_property: driversStephen Rothwell3-3/+3
These are all the remaining instances of get_property. Simple rename of get_property to of_get_property. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-26Revert "[POWERPC] Rename get_property to of_get_property: drivers"Paul Mackerras3-3/+3
This reverts commit d05c7a80cf39ae7d0f8d0c3e47c93d51fcd393d3, which included changes which should go via other subsystem maintainers.
2007-04-13[POWERPC] Rename get_property to of_get_property: driversStephen Rothwell3-3/+3
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-13[POWERPC] get_property returns constStephen Rothwell3-6/+6
This just tidies up some of the remains. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-09[PATCH] hwmon: ansifyAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-12-12hwmon: New AMS hardware monitoring driverStelian Pop6-0/+1011
This driver adds support for the Apple Motion Sensor (AMS) as found in 2005 revisions of Apple PowerBooks and iBooks. It implements both the PMU and I2C variants. The I2C driver and mouse emulation is based on code by Stelian Pop, while the PMU driver has been developped by Michael Hanselmann. HD parking support will be added later. Various people contributed fixes to this driver, including Aristeu Sergio Rozanski Filho and Jean Delvare. Signed-off-by: Stelian Pop <stelian@popies.net> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Robert Love <rml@novell.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>