Commit Graph

2163 Commits

Author SHA1 Message Date
Linus Torvalds 5d88d15e93 Single patch to staticize a local variable
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJR5AarAAoJEMsfJm/On5mB8HoP/32EnbohT1wrfzYRCj/hbclM
 65V/5m547LBp/PjRwGV8sSHTp5wpXguEoAmSHjVCRg7BXErxDlFtSkUBEvRYP9vl
 v8A3cFkJa36m/VESAo/Fa/LP7dk/nGhTM6fKx2ReMbO/ZzcpKURBsBo5apsmXH5H
 0EIwvmD6XXPkUG4VPWJIFgQLKxHRvAag7Bb4qe60BgqSlRNzpyegltzNgb8qkDbE
 S+Ui2I8T7clHw/h3348pYFKuDP8pHzFr5bXCkjsFxaennXwkT7qcVAN43dbCVZym
 /7hmxTK8PFkU379pRieXwq2yLGPZEHGD9x6LxIouPfT8OyaiOaJDIHY8ggitNWA8
 jF4u+BC7KfbLp8+15iRCOIE7xpEOqRWKDfmIGVQesCk8LoDVrVkITlCf4U5imwQ+
 qsxuVg7khDXUA6x0qoWY1Z+sB7iGBAcKHosSwfzw4VKZPAzuK0PpZ0zbwMY/JBas
 kL4xep+uFtNiu3bufVr7Cn8WVk5LKi3no1slAspEhRilc52k00Ct8w17iGFvByJP
 zcYZZE8E4dRyhnbE8YqEeuXIL3Q+1AQ8slfL87lUCTkoU0fRVh/ZWcPabdnJVwgH
 t/3C6sHD6QxF/t2ijsMSGRsiL97cwcRcp9j2PvLn86lDGKaxQqiWyBld5Z8c/0JW
 xTiFlHZHqLFWn2rq5Dv0
 =xfk+
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fix from Guenter Roeck:
 "Single patch to staticize a local variable"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (abx500) Staticize abx500_temp_attributes
2013-07-18 11:32:36 -07:00
Paul Gortmaker d23e2ae1aa hwmon: delete __cpuinit usage from all hwmon files
The __cpuinit type of throwaway sections might have made sense
some time ago when RAM was more constrained, but now the savings
do not offset the cost and complications.  For example, the fix in
commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
is a good example of the nasty type of bugs that can be created
with improper use of the various __init prefixes.

After a discussion on LKML[1] it was decided that cpuinit should go
the way of devinit and be phased out.  Once all the users are gone,
we can then finally remove the macros themselves from linux/init.h.

This removes all the drivers/hwmon uses of the __cpuinit macros
from all C files.

[1] https://lkml.org/lkml/2013/5/20/589

Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: lm-sensors@lm-sensors.org
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2013-07-14 19:36:57 -04:00
Sachin Kamat 0b905d83c4 hwmon: (abx500) Staticize abx500_temp_attributes
abx500_temp_attributes is used only in this file. Make it static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-07-14 16:24:25 -07:00
Jean Delvare 5b0620df9c hwmon: (lm63) Drop redundant safety on cache lifetime
time_after (as opposed to time_after_equal) already ensures that the
cache lifetime is at least as much as requested. There is no point in
manually adding another jiffy to that value, and this can confuse the
reader into wrong interpretation.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Imre Deak <imre.deak@intel.com>
2013-07-08 14:18:24 +02:00
Jean Delvare 78c2c2fe59 hwmon: (lm90) Drop redundant safety on cache lifetime
time_after (as opposed to time_after_equal) already ensures that the
cache lifetime is at least as much as requested. There is no point in
manually adding another jiffy to that value, and this can confuse the
reader into wrong interpretation.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Imre Deak <imre.deak@intel.com>
2013-07-08 14:18:24 +02:00
Linus Torvalds ddcf6600b1 New driver to support GMT G762/G763 pwm fan controllers
Add support for DS1631, DS1721, and DS1731 to ds1621 driver
 Remove detect function from ds1621 driver as unreliable
 Bug fixes in nct6775, iio_hwmon, and adm1021 drivers
 Remove redundant platform_set_drvdata in various drivers
 Add device tree support to ina2xx driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJR0I8LAAoJEMsfJm/On5mBPp8P+wedtxZpljmca+YnuBnZnnZN
 7HLFdGvbwOA+ThfYx7UhpyRgJ+D4ggB0jTiVCPHGUJzmwYjEVk5e9qZkIX/1fBIB
 Iun9TZdJPG+fYFkr8H91dnJcaeELog76yOvx3VRU1QYO11L1wx56oJ2b3a+lnIb5
 UNyovFhvJuZ4jDpzQNUGY5/CMScj2rtPiRPT5NC/3HoSmkXFuV1uw4nhn3C79ycR
 NoZFyjFi7J1hCTB7ExoHHSQBGdLFDXQiEZqNaQS4WXnW1jmiTsQl0rRLoP5KqUDU
 3NovVA557nOfOHAjB98nQrBM7Syn2jKYeZP+M5OR1iKIXxv5uUs/Ajmpnk5x2t1d
 Wf5uHW99SEDTn19U8icgOO4zLvNX0lSXHs+FC6hzKTpLp/FLVjP2uOYj9TcxtPzn
 pLAYsE5UIySH4ybJ0Jdf2pKA+8D2eAOVo1joFhaoz8qFjMNdSxBlf8/xOUsBaJoi
 dAQ/SmWc9z0Tk03Hxn1b/XVKHLbb3AIpPTe1PCK9bUBzLQyZp2UmBmSPHIVxdjO/
 zyRABp64pkoVMqomJPzujEgT2NaqSfr+wwLyUOPBtmaMM8N6aOUlRjrJyOHrSrmB
 3CTT23h8xp8lEgjezQ0jYlhNQPgpGmlu/yuFfL2GyqRw00clAkUem0BrstZg0EOD
 lepSJCaSpyqr3jfhIBwN
 =OdGw
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 - new driver to support GMT G762/G763 pwm fan controllers
 - add support for DS1631, DS1721, and DS1731 to ds1621 driver
 - remove detect function from ds1621 driver as unreliable
 - bug fixes in nct6775, iio_hwmon, and adm1021 drivers
 - remove redundant platform_set_drvdata in various drivers
 - add device tree support to ina2xx driver

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (ds1621) Fix temperature rounding operations
  hwmon: (nct6775) Drop unsupported fan alarm attributes for NCT6775
  hwmon: (nct6775) Fix temperature alarm attributes
  Add support for GMT G762/G763 PWM fan controllers
  hwmon: (ina2xx) Add device tree support to pass the shunt resistor
  hwmon: (ds1621) Update documentation
  hwmon: (ds1621) Add DS1731 chip support to ds1621 driver
  hwmon: (iio_hwmon) add alias table
  hwmon: (adm1021) Do not create min sysfs attributes for LM84
  hwmon: (ds1621) Remove detect function
  hwmon: (ds1621) Add ds1631 chip support to ds1621 driver and documentation
  hwmon: (ds1621) Add ds1721 update interval sysfs attribute
  hwmon: (ds1621) Add ds1721 chip support
  hwmon: (w83627ehf) Remove redundant platform_set_drvdata()
  hwmon: (ntc_thermistor) Remove redundant platform_set_drvdata()
  hwmon: (i5k_amb) Remove redundant platform_set_drvdata()
  hwmon: (coretemp) Remove redundant platform_set_drvdata()
  hwmon: (abituguru3) Remove redundant platform_set_drvdata()
2013-07-03 19:56:35 -07:00
Kees Cook f170168b9a drivers: avoid parsing names as kthread_run() format strings
Calling kthread_run with a single name parameter causes it to be handled
as a format string. Many callers are passing potentially dynamic string
content, so use "%s" in those cases to avoid any potential accidents.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-03 16:07:41 -07:00
Guenter Roeck a50d9a4d9a hwmon: (ds1621) Fix temperature rounding operations
Commit "hwmon: (ds1621) Add ds1721 chip support" broke rounding
for chips or configurations with less than 12 bit resolution.

Tested-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-28 06:43:55 -07:00
Guenter Roeck 41fa9a944f hwmon: (nct6775) Drop unsupported fan alarm attributes for NCT6775
NCT6775 does not support alarms for fans 4 and 5. Drop the attributes.

cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-27 10:31:43 -07:00
Guenter Roeck b1d2bff6a6 hwmon: (nct6775) Fix temperature alarm attributes
Driver displays wrong alarms for temperature attributes.

Turns out that temperature alarm bits are not fixed, but determined
by temperature source mapping. To fix the problem, walk through
the temperature sources to determine the correct alarm bit associated
with a given attribute.

Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-27 10:31:43 -07:00
Arnaud Ebalard 594fbe713b Add support for GMT G762/G763 PWM fan controllers
GMT G762/763 fan speed PWM controller is connected directly to a fan
and performs closed-loop or open-loop control of the fan speed. Two
modes - PWM or DC - are supported by the chip. Introduced driver
provides various knobs to control the operations of the chip (via
sysfs interface). Specific characteristics of the system can be passed
either using board init code or via DT. Documentation for both the
driver and DT bindings are also provided.

Signed-off-by: Arnaud Ebalard <arno@natisbad.org>
Tested-by: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-27 10:31:42 -07:00
Tang Yuantian 31e7ad74f6 hwmon: (ina2xx) Add device tree support to pass the shunt resistor
Adding another way that is device tree to pass the shunt resistor
value to driver except for platform data.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
[Guenter Roeck: Added missing of.h include]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-27 10:31:42 -07:00
Robert Coulson 260f81ffc1 hwmon: (ds1621) Add DS1731 chip support to ds1621 driver
These changes add DS1731 chip support to the ds1621 driver,
Kconfig, and documentation.

Signed-off-by: Robert Coulson <rob.coulson@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-27 10:30:43 -07:00
Sebastian Andrzej Siewior 2ec2819623 hwmon: (iio_hwmon) add alias table
This helps the kernel to find the right module once the device is
created.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-27 10:29:03 -07:00
Guenter Roeck 68146a5712 hwmon: (adm1021) Do not create min sysfs attributes for LM84
LM84 does not support minimum temperature registers.
Only create the respective sysfs attributes for other chips.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2013-06-27 10:29:02 -07:00
Robert Coulson ed7c34e89d hwmon: (ds1621) Remove detect function
Due to a lack of device and vendor identification registers, the
Dallas/Maxim DS16xx devices cannot be uniquely detected, sometimes
resulting in false positives. Therefore, the detect function is
being removed in favor of explicit device instantiation.

Signed-off-by: Robert Coulson <rob.coulson@gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-27 10:29:02 -07:00
Robert Coulson 79c1cc1c90 hwmon: (ds1621) Add ds1631 chip support to ds1621 driver and documentation
Add definitions, information, and code for ds1631 chip support
to the ds1621 driver.

Signed-off-by: Robert Coulson <rob.coulson@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-27 10:29:02 -07:00
Robert Coulson 3a8fe33155 hwmon: (ds1621) Add ds1721 update interval sysfs attribute
The ds1721 device can be configured for 9..12 bit resolutions;
add a sysfs attribute for userspace to configure this attribute.
The definition, description, details, and usage are shown in the
documentation and were crafted from an LM73 driver patch done by
Chris Verges & Guenter Roeck).

Signed-off-by: Robert Coulson <rob.coulson@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-27 10:29:01 -07:00
Robert Coulson cd6c8a4297 hwmon: (ds1621) Add ds1721 chip support
Update the ds1621 documentation, driver, and Kconfig with
ds1721 chip support.

Signed-off-by: Robert Coulson <rob.coulson@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-27 10:28:59 -07:00
Sachin Kamat cd275a5635 hwmon: (w83627ehf) Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-21 10:05:24 -07:00
Sachin Kamat 3a2af25d84 hwmon: (ntc_thermistor) Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-21 10:05:19 -07:00
Sachin Kamat 15d2f565f2 hwmon: (i5k_amb) Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-21 10:05:13 -07:00
Sachin Kamat 807f730105 hwmon: (coretemp) Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-21 10:05:08 -07:00
Sachin Kamat bb6067e980 hwmon: (abituguru3) Remove redundant platform_set_drvdata()
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-06-21 10:05:03 -07:00
Guenter Roeck 591bfcfc33 hwmon: (adm1021) Strengthen chip detection for ADM1021, LM84 and MAX1617
On a system with both MAX1617 and JC42 sensors, JC42 sensors can be misdetected
as LM84. Strengthen detection sufficiently enough to avoid this misdetection.
Also improve detection for ADM1021.

Modeled after chip detection code in sensors-detect command.

Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
2013-06-07 12:29:31 -07:00
Jean Delvare 4e2284d23b hwmon: (tmp401) Drop redundant safety on cache lifetime
time_after (as opposed to time_after_equal) already ensures that the
cache lifetime is at least as much as requested. There is no point in
manually adding another jiffy to that value, and this can confuse the
reader into wrong interpretation.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-05-19 08:19:29 -07:00
Wei Yongjun ecacb0b17c hwmon: fix error return code in abituguru_probe()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-05-13 08:07:13 -07:00
Axel Lin 159c8cddd9 hwmon: (iio_hwmon) Fix null pointer dereference
This patch fixes the null pointer dereference in goto error_release_channels
path when allocate memory for st fails.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-05-13 06:43:14 -07:00
Guenter Roeck 169c05cd54 hwmon: (nct6775) Do not create non-existing attributes
Overtemperature and hysteresis registers only exist for primary
temperature registers, not for alternates, so do not assign
those registers when initializing alternates.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-05-11 22:55:07 -07:00
Axel Lin 4510d198f9 hwmon: (iio_hwmon) Fix missing iio_channel_release_all call if devm_kzalloc fail
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-05-11 22:55:07 -07:00
Linus Torvalds e72a5d1ceb Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
Pull hwmon update from Jean Delvare:
 "Only lm75 driver updates this time"

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (lm75) Add support for the Dallas/Maxim DS7505
  hwmon: (lm75) Tune resolution and sample time per chip
  hwmon: (lm75) Prepare to support per-chip resolution and sample time
  hwmon: (lm75) Per-chip configuration register initialization
2013-05-04 13:44:38 -07:00
Al Viro 60b7bf4e61 more mode_t whack-a-mole...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-05-04 14:46:28 -04:00
Jean Delvare 3fbc81e3c0 hwmon: (lm75) Add support for the Dallas/Maxim DS7505
Basically it's the same as the original DS75 but much faster.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
2013-05-04 14:49:36 +02:00
Jean Delvare 0cd2c72d76 hwmon: (lm75) Tune resolution and sample time per chip
Most LM75-compatible chips can either sample much faster or with a
much better resolution than the original LM75 chip. So far the lm75
driver did not let the user take benefit of these improvements. Do it
now.

I decided to almost always configure the chip to use the best
resolution possible, which also means the longest sample time. The
only chips for which I didn't are the DS75, DS1775 and STDS75, because
they are really too slow in 12-bit mode (1.2 to 1.5 second worst case)
so I went for 11-bit mode as a more reasonable tradeoff. This choice is
dictated by the fact that the hwmon subsystem is meant for system
monitoring, it has never been supposed to be ultra-fast, and as a
matter of fact we do cache the sampled values in almost all drivers.

If anyone isn't pleased with these default settings, they can always
introduce a platform data structure or DT support for the lm75. That
being said, it seems nobody ever complained that the driver wouldn't
refresh the value faster than every 1.5 second, and the change made
it faster for all chips even in 12-bit mode, so I don't expect any
complaint.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
2013-05-04 14:49:36 +02:00
Jean Delvare 87d0621ae2 hwmon: (lm75) Prepare to support per-chip resolution and sample time
Prepare the lm75 driver to support per-chip resolution and sample
time. For now we only make the code generic enough to support it, but
we still use the same, unchanged resolution (9-bit) and sample time
(1.5 s) for all chips.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
2013-05-04 14:49:36 +02:00
Jean Delvare 8a5c5cc617 hwmon: (lm75) Per-chip configuration register initialization
There is no standard for the configuration register bits of LM75-like
chips. We shouldn't blindly clear bits setting the resolution as they
are either unused or used for something else on some of the supported
chips.

So, switch to per-chip configuration initialization. This will allow
for better tuning later, for example using more resolution bits when
available.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
2013-05-04 14:49:36 +02:00
Linus Torvalds 151173e8ce Highlights:
- OpenFirmware/DeviceTree support for the Power Supply core: the core now
   automatically populates supplied_from hierarchy from the device tree.
   With these patches chargers and batteries can now lookup each other
   without the board files support shim. Rhyland Klein at NVIDIA did the
   work;
 
 - New ST-Ericsson ABX500 hwmon driver. The driver is heavily using the
   AB85xx core and depends on some recent changes to it, so that is why the
   driver comes through the battery tree. It has an appropriate ack from
   the hwmon maintainer (i.e. Guenter Roeck). Martin Persson at ST-Ericsson
   and Hongbo Zhang at Linaro authored the driver;
 
 - Final bits to sync AB85xx ST-Ericsson changes into mainline. The changes
   touch mfd parts, but these were acked by the appropriate MFD maintainer
   (i.e. Samuel Ortiz). Lee Jones at Linaro did most of the work and lead
   the submission process.
 
 Minor changes, but still worth mentioning:
 
 - Battery temperature reporting fix for Nokia N900 phones;
 - Versatile Express poweroff driver moved into drivers/power/reset/.
 - Tree-wise: use devm_kzalloc() where appropriate;
 - Tree-wise: dev_pm_ops cleanups/fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJRf1BPAAoJEGgI9fZJve1bwyoP/3Gv+qStzbN7mUtIVEvH3EAe
 aVJwlODFzEZjk5xoiw7Dc8PuBE8O948hWOnQyCuUQ8+OfK6SyNIjexPYy3Z25a0F
 cX9JMj7rtPWHvxo2q/YuKwBPZoxj/JIPyxwUT7akwXoHAV059fvcy9R1DfFX2Qur
 hSP0NXTg+guvEpxGV4bC2l+LWZPmDFK9n0RsorttYaBvsiRDWl0c2TY2byofYlBw
 ++m/rI8Qgl8db8pKq/WDue62HtMt3kmZj6ZIgej3Wb0+GIRmYHMyPIyAkf82Wlw2
 g2sGNPT7cstrSNOozegzJ7UghJObcYDFf10NCgvFMNjmAT1dAwdneQHEWy6Ek7pT
 9X3e0LmaFqVbufFp4xFiLkMutsCLLTnGyXIbzs7RkTm3XBVIUqiDWtI6I6X44ohG
 6PJn8vUlufu7owXrqFpgSBar2U1vfoQdhInmz4hbQeff0qn2nX/BGNwhxYptZ549
 TudsI9WGzJ6fvYQ56zh6+BfiA0FmjhUiSKOtrXImrhxE6gUf3IOJyMQlkxLx5t8D
 uuhBmO0J6kDi2lqF6alOEo+UDefJj4mUJn2tnIdis90+lNQlSV02GEtiwFT1zt1z
 LFW0xshQkxZ4lMa28h35FB1/Z11ApUOe4Es+OKADDJhAnxdZzXcAwIRyPRRPgdsy
 jTnJno+Kxk9wXLcekxVE
 =5BdE
 -----END PGP SIGNATURE-----

Merge tag 'for-v3.10' of git://git.infradead.org/battery-2.6

Pull battery updates from Anton Vorontsov:
 "Highlights:

   - OpenFirmware/DeviceTree support for the Power Supply core: the core
     now automatically populates supplied_from hierarchy from the device
     tree.  With these patches chargers and batteries can now lookup
     each other without the board files support shim.  Rhyland Klein at
     NVIDIA did the work

   - New ST-Ericsson ABX500 hwmon driver.  The driver is heavily using
     the AB85xx core and depends on some recent changes to it, so that
     is why the driver comes through the battery tree.  It has an
     appropriate ack from the hwmon maintainer (i.e.  Guenter Roeck).
     Martin Persson at ST-Ericsson and Hongbo Zhang at Linaro authored
     the driver

   - Final bits to sync AB85xx ST-Ericsson changes into mainline.  The
     changes touch mfd parts, but these were acked by the appropriate
     MFD maintainer (ie Samuel Ortiz).  Lee Jones at Linaro did most of
     the work and lead the submission process.

  Minor changes, but still worth mentioning:

   - Battery temperature reporting fix for Nokia N900 phones
   - Versatile Express poweroff driver moved into drivers/power/reset/
   - Tree-wide: use devm_kzalloc() where appropriate
   - Tree-wide: dev_pm_ops cleanups/fixes"

* tag 'for-v3.10' of git://git.infradead.org/battery-2.6: (112 commits)
  pm2301-charger: Fix suspend/resume
  charger-manager: Use kmemdup instead of kzalloc + memcpy
  power_supply: Populate supplied_from hierarchy from the device tree
  power_supply: Add core support for supplied_from
  power_supply: Define Binding for power-supplies
  rx51_battery: Fix reporting temperature
  hwmon: Add ST-Ericsson ABX500 hwmon driver
  ab8500_bmdata: Export abx500_res_to_temp tables for hwmon
  ab8500_{bmdata,fg}: Add const attributes to some data arrays
  ab8500_bmdata: Eliminate CamelCase warning of some variables
  ab8500_btemp: Make ab8500_btemp_get* interfaces public
  goldfish_battery: Use resource_size()
  lp8788-charger: Use PAGE_SIZE for the sysfs read operation
  max8925_power: Use devm_kzalloc()
  da9030_battery: Use devm_kzalloc()
  da9052-battery: Use devm_kzalloc()
  ds2760_battery: Use devm_kzalloc()
  ds2780_battery: Use devm_kzalloc()
  gpio-charger: Use devm_kzalloc()
  isp1704_charger: Use devm_kzalloc()
  ...
2013-04-30 15:15:24 -07:00
Linus Torvalds fdc719b63a Staging driver tree update for 3.10-rc1
Here's the big staging driver tree update for 3.10-rc1
 
 This update contains loads of comedi driver cleanups and fixes in here,
 iio updates, android driver changes, and other various staging driver
 cleanups.
 
 Thanks to some drivers being removed, and the comedi driver cleanups, we
 have removed more code than we added:
  627 files changed, 65145 insertions(+), 76321 deletions(-)
 which is always nice to see.
 
 All of these have been in linux-next for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlF+nF8ACgkQMUfUDdst+ynlIwCfYm2pSkA0w1K56mftq1T0hpMH
 b9IAmwQlfEHSIKeAxqRO3RRrfLu5XD7L
 =Jnxr
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver tree update from Greg Kroah-Hartman:
 "Here's the big staging driver tree update for 3.10-rc1

  This update contains loads of comedi driver cleanups and fixes in
  here, iio updates, android driver changes, and other various staging
  driver cleanups.

  Thanks to some drivers being removed, and the comedi driver cleanups,
  we have removed more code than we added:

   627 files changed, 65145 insertions(+), 76321 deletions(-)

  which is always nice to see.

  All of these have been in linux-next for a while."

* tag 'staging-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (940 commits)
  staging: comedi: ni_labpc: fix legacy driver build
  staging: comedi: das800: cleanup the cio-das802/16 fifo comments
  staging: comedi: das800: rename CamelCase vars in das800_ai_do_cmd()
  staging: comedi: das800: tidy up the private data
  staging: comedi: das800: tidy up das800_interrupt()
  staging: comedi: das800: tidy up das800_ai_insn_read()
  staging: comedi: das800: tidy up das800_di_insn_bits()
  staging: comedi: das800: tidy up das800_do_insn_bits()
  staging: comedi: das800: remove extra divisor calculation call
  staging: comedi: das800: rename {enable,disable}_das800
  staging: comedi: das800: tidy up subdevice init
  staging: comedi: das800: allow attaching without interrupt support
  staging: comedi: das800: interrupts are required for async command support
  staging: comedi: das800: tidy up das800_ai_do_cmdtest()
  staging: comedi: das800: remove 'volatile' on private data variables
  staging: comedi: das800: cleanup the boardinfo
  staging: comedi: das800: cleanup range table declarations
  staging: comedi: das800: introduce das800_ind_{write, read}()
  staging: comedi: das800: remove forward declarations
  staging: comedi: das800: move das800_set_frequency()
  ...
2013-04-29 11:34:17 -07:00
Guenter Roeck 6445e6600f hwmon: (nct6775) Fix coding style problems
Add space around binary operators (CodingStyle, chapter 3.1).

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-04-21 09:42:52 -07:00
Guenter Roeck 6d4b3621bb hwmon: (nct6775) Constify strings
nct6775_sio_names should be a constant pointer to an array of
constant strings.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-04-21 09:42:45 -07:00
Guenter Roeck 29dd3b64b9 hwmon: (tmp401) Add support for TMP432
TMP432 is similar to TMP431 with a second external temperature sensor.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2013-04-21 08:56:48 -07:00
Guenter Roeck 0846e30dd4 hwmon: (tmp401) Add support for update_interval attribute
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2013-04-21 08:27:38 -07:00
Guenter Roeck 8eb6d90fec hwmon: (tmp401) Reset valid flag when resetting temperature history
Cached data is no longer valid after resetting the temperature history.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2013-04-21 08:27:28 -07:00
Guenter Roeck 14f2a6654d hwmon: (tmp401) Simplification and cleanup
Use two-dimensional array pointing to registers
Merge temperature and limit access functions into a single function
Return error codes from I2C reads
Use DIV_ROUND_CLOSEST for rounding operations and improve rounding

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2013-04-21 08:26:41 -07:00
Hongbo Zhang 0bbb06ed56 hwmon: Add ST-Ericsson ABX500 hwmon driver
Each of ST-Ericsson X500 chip set series consists of both ABX500 and DBX500
chips. This is ABX500 hwmon driver, where the abx500.c is a common layer for
all ABX500s, and the ab8500.c is specific for AB8500 chip. Under this designed
structure, other chip specific files can be added simply using the same common
layer abx500.c.

Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-04-16 18:27:52 -07:00
Guenter Roeck b4e665c780 hwmon: (tmp401) Use sysfs_create_group / sysfs_remove_group
instead of creating and removing sysfs attribute files individually.

Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-04-14 04:47:06 -07:00
Guenter Roeck 947e92719d hwmon: (tmp401) Drop unused defines, use BIT for bit masks
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2013-04-14 04:46:56 -07:00
Guenter Roeck c409fd43bd hwmon: (nct6775) Use ARRAY_SIZE for loops where possible
This ensures that the loop iterations are correct even if/when
the number of elements in an array changes.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-04-13 08:44:35 -07:00
Guenter Roeck 573728c647 hwmon: (nct6775) Enable both AUXTIN and VIN3 on NCT6776
Per datasheet, VIN3 and AUXTIN share the same external pin. However, there
is no clean way to detect this condition. Furthermore, both are reported
by the BIOS on Supermicro C7H61. It may thus be possible that chip revisions
exist where both attributes are supported at the same time.
Better play safe and report both.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-04-07 21:16:42 -07:00
Jingoo Han debe597cca hwmon: (ad7314) use spi_get_drvdata() and spi_set_drvdata()
Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-04-07 21:16:42 -07:00