1
0
Fork 0
Commit Graph

2138 Commits (edb4973dbc4b729098ba081225bf370e19081127)

Author SHA1 Message Date
Chris Verges 8c14d126ae hwmon: (lm73) Add 'update_interval' attribute
The LM73 supports four A/D conversion resolutions.  The default used by
the existing lm73 driver is the chip's default, 11-bit (0.25 C/LSB).
This patch enables changing of this resolution from userspace via the
update_interval sysfs attribute.  Full details on usage are included in
Documentation/hwmon/lm73.

Signed-off-by: Chris Verges <kg4ysn@gmail.com>
[linux@roeck-us.net: cleanup]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-02-06 09:57:57 -08:00
Guenter Roeck 91bba68801 hwmon: (lm73) Fix lower and upper temperature limits
While the LM73 is only specified for temperatures from -40 to +150 degrees C,
its power-up minimum and maximum temperature limits are -256 and +255.75
degrees C. For better consistency and to avoid confusion, clamp limits to
the power-up limits and not to -40 / +150 degrees C.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-02-06 09:57:57 -08:00
Guenter Roeck b06367070d hwmon: (it87) Add support for IT8771E and IT8772E
Assume that IT8771E and IT8772E are fully compatible with IT8728F.

IT8771E support contributed by Kelly Anderson.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
2013-02-06 09:57:56 -08:00
Guenter Roeck 5372d2d71c hwmon: Driver for Maxim MAX6697 and compatibles
Add support for MAX6581, MAX6602, MAX6622, MAX6636, MAX6689, MAX6693,
MAX6694, MAX6697, MAX6698, and MAX6699 temperature sensors

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
2013-02-06 09:57:56 -08:00
Vivien Didelot 412e29c135 hwmon: (sht15) check GPIO directions
Without this patch, the SHT15 driver may fail silently with a
non-bidirectional data line and/or an input-only clock line.

This patch checks the return value of gpio_direction_* function calls
and returns the error code (if any) to the caller. If an error occurs in
the read work function (work_funct_t), we wake the queue up directly
without updating the data->state flag, to notice the waiter of the I/O
error.

The patch also makes minor cleanups: s/error_ret/unlock for some labels
and uses devm_gpio_request_one() for the clock line.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-02-06 09:57:55 -08:00
Guenter Roeck 9e3970fba9 hwmon: (coretemp) Document and add support for additional CPU models
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-01-25 21:03:55 -08:00
Guenter Roeck 2a844c148e hwmon: Replace SENSORS_LIMIT with clamp_val
SENSORS_LIMIT and the generic clamp_val have the same functionality,
and clamp_val is more efficient.

This patch reduces text size by 9052 bytes and bss size by 11624 bytes
for x86_64 builds.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: George Joseph <george.joseph@fairview5.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
2013-01-25 21:03:54 -08:00
Vivien Didelot 142c090184 hwmon: (sht15) avoid CamelCase
This patch renames the supply_uV* variables to supply_uv* to avoid
CamelCase as warned by the checkpatch.pl script.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-01-25 21:03:54 -08:00
Rafael J. Wysocki 51fac8388a ACPI: Remove useless type argument of driver .remove() operation
The second argument of ACPI driver .remove() operation is only used
by the ACPI processor driver and the value passed to that driver
through it is always available from the given struct acpi_device
object's removal_type field.  For this reason, the second ACPI driver
.remove() argument is in fact useless, so drop it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Jiang Liu <jiang.liu@huawei.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
2013-01-26 00:37:24 +01:00
Guenter Roeck 08245ad87e hwmon: (vexpress) Fix build error seen if CONFIG_OF_DEVICE is not set
Fix:
vexpress.c: In function ‘vexpress_hwmon_name_show’:
vexpress.c:34:2: error: implicit declaration of function
‘of_get_property’ [-Werror=implicit-function-declaration]
vexpress.c:34:27: warning: initialization makes pointer from integer
without a cast [enabled by default]
vexpress.c: In function ‘vexpress_hwmon_label_show’:
vexpress.c:43:22: warning: initialization makes pointer from integer
without a cast [enabled by default]

Seen if CONFIG_OF_DEVICE is not defined. of_get_property is declared in
of.h which is only included by of_device.h if CONFIG_OF_DEVICE is defined.
of.h needs to be included directly.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-01-09 21:47:22 -08:00
Greg Kroah-Hartman 0fe763c570 Drivers: misc: remove __dev* attributes.
CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-03 15:57:16 -08:00
Guenter Roeck 86266ca0e2 hwmon: (emc6w201) Fix DIV_ROUND_CLOSEST problem with unsigned divisors
Result of DIV_ROUND_CLOSEST is undefined for negative dividends if the divisor
variable type is unsigned. Fix by declaring divisor as signed variable.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-12-22 02:16:40 -08:00
Chris Verges 0602934f30 hwmon: (lm73} Detect and report i2c bus errors
If an LM73 device does not exist on an I2C bus, attempts to communicate
with the device result in an error code returned from the i2c read/write
functions.  The current lm73 driver casts that return value from a s32
type to a s16 type, then converts it to a temperature in celsius.
Because negative temperatures are valid, it is difficult to distinguish
between an error code printed to the response buffer and a negative
temperature recorded by the sensor.

The solution is to evaluate the return value from the i2c functions
before performing any temperature calculations.  If the i2c function did
not succeed, the error code should be passed back through the virtual
file system layer instead of being printed into the response buffer.

Before:

   $ cat /sys/class/hwmon/hwmon0/device/temp1_input
   -46

After:

   $ cat /sys/class/hwmon/hwmon0/device/temp1_input
   cat: read error: No such device or address

Signed-off-by: Chris Verges <kg4ysn@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-12-21 17:59:30 -08:00
Jean Delvare c8ecd27da7 hwmon-vid: Add support for AMD family 11h to 15h processors
Since family 11h processors, AMD is exclusively using 7-bit VID codes
transmitted using a serial protocol over two pins (clock and data.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: David Hubbard <david.c.hubbard@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
2012-12-19 22:17:02 +01:00
Guenter Roeck 1952978478 hwmon: (it87) Support PECI for additional chips
Extend support for reporting and selecting PECI temperature sensors
to IT8718, IT8720, IT8782, and IT8783. For IT8721, report the sensor
type for temp2 as Intel PECI (6) if the chip is configured to report
the PCH temperature.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19 22:17:02 +01:00
Guenter Roeck 5d8d2f2bdb hwmon: (it87) Report thermal sensor type as Intel PECI if appropriate
IT8721 and IT8728 support Intel PECI temperature reporting. Each sensor
can be programmed to display the temperature reported on the PECI interface.

If configured for Intel PECI, the driver reported the wrong sensor type for
the respective thermal sensor. Fix the code to correctly report it as
"Intel PECI (6)".

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19 22:17:02 +01:00
Guenter Roeck 483db43e81 hwmon: (it87) Manage device specific features with table
This simplifies the code, improves runtime performance, reduces
code size (about 280 bytes on x86_64), and makes it easier
to add support for new devices.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19 22:17:02 +01:00
Guenter Roeck c4458db368 hwmon: (it87) Replace pwm group macro with direct attribute definitions
Fix checkpatch error:

ERROR: Macros with multiple statements should be enclosed in a do - while loop

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19 22:17:02 +01:00
Guenter Roeck 1d9bcf6aef hwmon: (it87) Avoid quoted string splits across lines
Fix the respective checkpatch warnings.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19 22:17:01 +01:00
Guenter Roeck e1169ba0ae hwmon: (it87) Save fan registers in 2-dimensional array
Also unify fan functions to use the same code for 8 and 16 bit fans.

This patch reduces code size by approximately 1,200 bytes on x86_64.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19 22:17:01 +01:00
Guenter Roeck 161d898ac9 hwmon: (it87) Introduce support for tempX_offset sysfs attribute
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19 22:17:01 +01:00
Guenter Roeck 2cece01ffd hwmon: (it87) Replace macro defining tempX_type sensors with direct definitions
The macro name show_sensor_offset is confusing since it related to the sensor
type, not an offset - even more so when we introduce offset attributes later on.
Replace it with direct definitions, and replace the show_sensor/set_sensor
function names with show_temp_type/set_temp_type. This also resolves a
checkpatch error.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19 22:17:01 +01:00
Guenter Roeck 929c6a5696 hwmon: (it87) Save voltage register values in 2-dimensional array
Reduces code size (more than 600 bytes on x86_64),
and gets rid of some checkpatch errors.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19 22:17:00 +01:00
Guenter Roeck 60ca385a53 hwmon: (it87) Save temperature registers in 2-dimensional array
Cleaner code, fewer checkpatch errors, and reduced code size
(saves more than 500 bytes on x86-64).

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-12-19 22:17:00 +01:00
Jean Delvare 45633fb370 hwmon: (w83627ehf) Get rid of smatch warnings
The smatch static code analyzer complains:

drivers/hwmon/w83627ehf.c:911 w83627ehf_update_device() error: buffer overflow 'W83627EHF_REG_TEMP_OFFSET' 3 <= 8
drivers/hwmon/w83627ehf.c:909 w83627ehf_update_device() error: buffer overflow 'data->temp_offset' 3 <= 8
drivers/hwmon/w83627ehf.c:2672 w83627ehf_resume() error: buffer overflow 'W83627EHF_REG_TEMP_OFFSET' 3 <= 8
drivers/hwmon/w83627ehf.c:2673 w83627ehf_resume() error: buffer overflow 'data->temp_offset' 3 <= 8

A deeper analysis of the code shows that these are false positives, as
only the lower 3 bits of data->have_temp_offset can be set so the
write is never attempted with i >= 3. However this shows that the code
isn't very robust and future changes could easily introduce a buffer
overflow. So let's add a safety check to prevent that and make smatch
happy.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Peter Huewe <PeterHuewe@gmx.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
2012-12-19 22:17:00 +01:00
Jean Delvare 8f3c7c547d hwmon: (w83627hf) Don't touch nonexistent I2C address registers
Only the W83627HF could be accessed through I2C. All other supported
chips are LPC-only, so they do not have I2C address registers. Don't
write to nonexistent or reserved registers on these chips.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
2012-12-19 22:17:00 +01:00
Jean Delvare 7e630bb55a hwmon: (w83627ehf) Add support for suspend
On suspend some register values are lost, most notably the Value RAM
areas but also other limits and settings. Restore them on resume.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
2012-12-19 22:16:59 +01:00
Jean Delvare 275b7d6ebe hwmon: (w83627hf) Add support for suspend
On suspend some register values are lost, most notably the Value RAM
areas but also other limits. Restore them on resume. On top of that,
some fixups are needed to work around BIOS bugs, in particular when
the BIOS omits running the same initialization sequence on resume
that it does after boot. In that case we have to carry initialization
over suspend.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
2012-12-19 22:16:59 +01:00
Jean Delvare d6dab7dd12 hwmon: Fix PCI device reference leak in quirk
Thankfully this only affects systems with one specific south bridge
and is most probably harmless unless the hwmon module is heavily
cycled.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
2012-12-19 22:16:59 +01:00
Guenter Roeck 7764b5282e hwmon: (twl4030-madc-hwmon) Fix warning message caused by removal of __devexit
Commit 281dfd0 removed __devexit from the exit function but left __exit_p in
place. This results in the following warning message if the module is built into
the kernel.

twl4030-madc-hwmon.c:123:12: warning: ‘twl4030_madc_hwmon_remove’ defined
but not used [-Wunused-function]

Fix by removing __exit_p as well.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
2012-12-16 18:21:33 -08:00
Linus Torvalds 698d601224 ARM: arm-soc: driver specific changes
A collection of mostly SoC-specific driver updates:
 - a handful of pincontrol and setup changes
 - new drivers for hwmon and reset controller for vexpress
 - timing support updates for OMAP (gpmc and other interfaces)
 - + a collection of smaller cleanups
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQySxPAAoJEIwa5zzehBx3NbgP/iI1EFKI8fK6tp7F1EeTwDYK
 tKeKFmx+Lio2z5OF0CS0qK0HODtcS2ifJ5Zz3C9VyiRBNDOuYAvDT+5bIAKsKIo3
 p0mZyYvgdbcxH30EhYY8klaUVwRyc1noxdO8vENdzoAik4EwUv5zXEKAlcBfScrA
 usCW0dhGJYKH73kgLKQvsyE9d/aV0hbcniSYoVHH1G4e6U5vG45y8pqeSrTQxfCP
 nG177/AheoCHoyoh/td0lmkAJsmXM7NpvdJTaAwKgOmEXvOCUwAcuOgOCEuc7sd/
 FG3jGLntcB9z0AtbO/YOl3+110o71KBF7gYrDDEjLD6U7zz7yhcmhGVh+FEnVa0I
 ppgReNN3jZOs7HVlDTvTXLdh5cjZU5JIpLOmHWdERAwkxakDCd07KzPo5g44XTyO
 CzZuqVFU2JNliIujoJHL2Trnj7Q54fWcgHWkWJdWBhJMsxC42xWgaukCaLDHNuBX
 Po5cqOnEnAYA0rgvQxfdfPWzJd/NN/kU/ewun0pwni3+PlzhfxFzTRcLcj4BT4By
 1S2foQUt0CVkswgFdkRlbGolSsXIlOQmKvsd8kvzldDUzn+0cxgwYHzg4T29hlmY
 zv0+sfgSxub68zfodDtdyjBWDCgrSHrf3TGjGD/4/X6Bm9Ss3hRj4LHIM7Z2BX7F
 PJgvGjAZIfuZThLkShLa
 =CwMf
 -----END PGP SIGNATURE-----

Merge tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC driver specific changes from Olof Johansson:
 "A collection of mostly SoC-specific driver updates:
   - a handful of pincontrol and setup changes
   - new drivers for hwmon and reset controller for vexpress
   - timing support updates for OMAP (gpmc and other interfaces)
   - plus a collection of smaller cleanups"

* tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (21 commits)
  ARM: ux500: fix pin warning
  ARM: OMAP2+: tusb6010: generic timing calculation
  ARM: OMAP2+: smc91x: generic timing calculation
  ARM: OMAP2+: onenand: generic timing calculation
  ARM: OMAP2+: gpmc: generic timing calculation
  ARM: OMAP2+: gpmc: handle additional timings
  ARM: OMAP2+: nand: remove redundant rounding
  gpio: samsung: use pr_* instead of printk
  ARM: ux500: fixup magnetometer pins
  ARM: ux500: add STM pin configuration
  ARM: ux500: 8500: add pinctrl support for uart1 and uart2
  ARM: ux500: cosmetic fixups for uart0
  gpio: samsung: Fix input mode setting function for GPIO int
  ARM: SAMSUNG: Insert bitmap_gpio_int member in samsung_gpio_chip
  ARM: ux500: 8500: define SDI sleep states
  ARM: vexpress: Reset driver
  ARM: ux500: 8500: update SKE keypad pinctrl table
  hwmon: Versatile Express hwmon driver
  ARM: ux500: delete duplicate macro
  ARM: ux500: 8500: add IDLE pin configuration for SPI
  ...
2012-12-13 10:59:11 -08:00
Linus Torvalds cff2f741b8 Driver core updates for 3.8-rc1
Here's the large driver core updates for 3.8-rc1.
 
 The biggest thing here is the various __dev* marking removals.  This is
 going to be a pain for the merge with different subsystem trees, I know,
 but all of the patches included here have been ACKed by their various
 subsystem maintainers, as they wanted them to go through here.
 
 If this is too much of a pain, I can pull all of them out of this tree
 and just send you one with the other fixes/updates and then, after
 3.8-rc1 is out, do the rest of the removals to ensure we catch them all,
 it's up to you.  The merges should all be trivial, and Stephen has been
 doing them all in linux-next for a few weeks now quite easily.
 
 Other than the __dev* marking removals, there's nothing major here, some
 firmware loading updates and other minor things in the driver core.
 
 All of these have (much to Stephen's annoyance), 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)
 
 iEYEABECAAYFAlDHkPkACgkQMUfUDdst+ykaWgCfW7AM30cv0nzoVO08ax6KjlG1
 KVYAn3z/KYazvp4B6LMvrW9y0G34Wmad
 =yvVr
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core updates from Greg Kroah-Hartman:
 "Here's the large driver core updates for 3.8-rc1.

  The biggest thing here is the various __dev* marking removals.  This
  is going to be a pain for the merge with different subsystem trees, I
  know, but all of the patches included here have been ACKed by their
  various subsystem maintainers, as they wanted them to go through here.

  If this is too much of a pain, I can pull all of them out of this tree
  and just send you one with the other fixes/updates and then, after
  3.8-rc1 is out, do the rest of the removals to ensure we catch them
  all, it's up to you.  The merges should all be trivial, and Stephen
  has been doing them all in linux-next for a few weeks now quite
  easily.

  Other than the __dev* marking removals, there's nothing major here,
  some firmware loading updates and other minor things in the driver
  core.

  All of these have (much to Stephen's annoyance), been in linux-next
  for a while.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

Fixed up trivial conflicts in drivers/gpio/gpio-{em,stmpe}.c due to gpio
update.

* tag 'driver-core-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (93 commits)
  modpost.c: Stop checking __dev* section mismatches
  init.h: Remove __dev* sections from the kernel
  acpi: remove use of __devinit
  PCI: Remove __dev* markings
  PCI: Always build setup-bus when PCI is enabled
  PCI: Move pci_uevent into pci-driver.c
  PCI: Remove CONFIG_HOTPLUG ifdefs
  unicore32/PCI: Remove CONFIG_HOTPLUG ifdefs
  sh/PCI: Remove CONFIG_HOTPLUG ifdefs
  powerpc/PCI: Remove CONFIG_HOTPLUG ifdefs
  mips/PCI: Remove CONFIG_HOTPLUG ifdefs
  microblaze/PCI: Remove CONFIG_HOTPLUG ifdefs
  dma: remove use of __devinit
  dma: remove use of __devexit_p
  firewire: remove use of __devinitdata
  firewire: remove use of __devinit
  leds: remove use of __devexit
  leds: remove use of __devinit
  leds: remove use of __devexit_p
  mmc: remove use of __devexit
  ...
2012-12-11 13:13:55 -08:00
Axel Lin 44f751cee1 hwmon: (da9055) Fix chan_mux[DA9055_ADC_ADCIN3] setting
Set chan_mux[DA9055_ADC_ADCIN3] = DA9055_ADC_MUX_ADCIN3.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-12-05 10:55:55 -08:00
Ashish Jangam e597022353 hwmon: DA9055 HWMON driver
This is the HWMON patch for DA9055 PMIC and has got dependency on the
DA9055 MFD core.

This patch monitors the DA9055 PMIC's ADC channels vddout, junction temperature
and auxiliary channels.

This patch is functionally tested on Samsung SMDKV6410.

Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com>
[Guenter Roeck: Dropped __devinit, __devexit, __devexit_p]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-12-05 10:55:55 -08:00
Guenter Roeck 3e280ba08a hwmon: (coretemp) Drop N4xx, N5xx, D4xx, D5xx CPUs from tjmax table
Since N4xx, N5xx, D4xx, and D5xx are now reliably detected using the model ID
and the stepping/mask, drop the respective entries from tjmax_table.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-12-05 10:55:55 -08:00
Guenter Roeck 2fa5222efe hwmon: (coretemp) Use model table instead of if/else to identify CPU models
Make the code easier to extend and easier to adjust by using a model table
listing CPU models, stepping/mask, and associated TjMax.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-12-05 10:55:55 -08:00
Axel Lin d9b24e373d hwmon: da9052: Use da9052_reg_update for rmw operations
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-12-05 10:55:55 -08:00
Guenter Roeck 72cbdddcc1 hwmon: (coretemp) Drop dependency on PCI for TjMax detection on Atom CPUs
So far, we use the NM10 Express Chipset PCI chip ID to detect TjMax for
Atom CPUs with model 0x1c. As it turns out, we can use the CPU stepping
(x86_mask) for the same purpose; stepping is 10 for all model 0x1c CPUs
with TjMax of 100 degrees C. This was verified by checking the output of
/proc/cpuinfo for the respective CPUs (D4xx, D5xx, N4xx, N5xx).

Other CPUs currently covered by the same code (Exx, Z6xx, Z2460) are not
supported by the NM10 Express Chipset. Most of those CPUs have TjMax of 90
degrees C, except for E6xxT models which have a TjMax of 110 degrees C.
E6xxT CPUs can however not be detected by software.

Calculate TjMax for Atom CPUs as follows. Note that the listed values are not
correct in some cases (230, 330). tjmax_table is used for those to override
the default values.

ID	Stepping	TjMax		Models
0x1c	10		100		D4xx, N4xx, D5xx, N5xx
0x1c	not 10		90		Z5xx, N2xx, 230, 330, others
0x26	-		90		Atom Tunnel Creek (Exx),
					Lincroft (Z6xx)
0x27	-		90		Atom Medfield (Z2460)
0x36	-		100		Atom Cedar Trail (N2xxx, D2xxx)

Also drop the module dependency on PCI.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-12-05 10:55:54 -08:00
Wei Yongjun d835ca0fd2 hwmon: (ina2xx) use module_i2c_driver to simplify the code
Use the module_i2c_driver() macro to make the code smaller
and a bit simpler.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-12-05 10:55:54 -08:00
Guillaume Roguez 0962e0f1a5 hwmon: (ads7828) add support for ADS7830
The ADS7830 device is almost the same as the ADS7828,
except that it does 8-bit sampling, instead of 12-bit.
This patch extends the ads7828 driver to support this chip.

Signed-off-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-12-05 10:55:54 -08:00
Vivien Didelot 46d7846292 hwmon: (ads7828) driver cleanup
As there is no reliable way to identify the chip, it is preferable to
remove the detect callback, to avoid misdetection.

Module parameters are not worth it here, so let's get rid of them and
add an ads7828_platform_data structure instead.

Clean the code by removing unused macros, fixing coding style issues,
avoiding function prototypes and using convenient macros such as
module_i2c_driver().

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-12-05 10:55:54 -08:00
Boris Ostrovsky 22e32f4f57 x86,AMD: Power driver support for AMD's family 16h processors
Add family 16h PCI ID to AMD's power driver to allow it report
power consumption on these processors.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-12-05 10:54:41 -08:00
Bill Pemberton 281dfd0b6e hwmon: remove use of __devexit
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Alistair John Strachan <alistair@devzero.co.uk>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Juerg Haefliger <juergh@gmail.com>
Cc: Andreas Herrmann <herrmann.der.user@googlemail.com>
Cc: Clemens Ladisch <clemens@ladisch.de>
Cc: Rudolf Marek <r.marek@assembler.cz>
Cc: Jim Cromie <jim.cromie@gmail.com>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Roger Lucas <vt8231@hiddenengine.co.uk>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28 11:50:34 -08:00
Bill Pemberton a5977246cf hwmon: remove use of __devinitdata
CONFIG_HOTPLUG is going away as an option so __devinitdata is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28 11:49:40 -08:00
Bill Pemberton 6c931ae1c0 hwmon: remove use of __devinit
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Alistair John Strachan <alistair@devzero.co.uk>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Juerg Haefliger <juergh@gmail.com>
Cc: Andreas Herrmann <herrmann.der.user@googlemail.com>
Cc: Clemens Ladisch <clemens@ladisch.de>
Cc: Rudolf Marek <r.marek@assembler.cz>
Cc: Jim Cromie <jim.cromie@gmail.com>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Roger Lucas <vt8231@hiddenengine.co.uk>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28 11:49:40 -08:00
Bill Pemberton 9e5e9b7a92 hwmon: remove use of __devexit_p
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Alistair John Strachan <alistair@devzero.co.uk>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Juerg Haefliger <juergh@gmail.com>
Cc: Andreas Herrmann <herrmann.der.user@googlemail.com>
Cc: Clemens Ladisch <clemens@ladisch.de>
Cc: Rudolf Marek <r.marek@assembler.cz>
Cc: Jim Cromie <jim.cromie@gmail.com>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Roger Lucas <vt8231@hiddenengine.co.uk>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28 11:48:59 -08:00
Arnd Bergmann 8dbd2879e3 Merge branch 'omap/dt' into next/drivers
Needed for the omap timer changes.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-11-15 17:41:21 +01:00
Jean Delvare 4101ece3a2 hwmon: Fix chip feature table headers
These got broken by recent patches fixing checkpatch warnings in these
drivers. The trick is that the patches themselves looked good, but the
source files after applying them do not. That's why I am not a big fan
of using tabs inside comments.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
2012-11-05 21:54:40 +01:00
Jean Delvare 3300fb4f88 hwmon: (w83627ehf) Force initial bank selection
Don't assume bank 0 is selected at device probe time. This may not be
the case. Force bank selection at first register access to guarantee
that we read the right registers upon driver loading.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Cc: stable@vger.kernel.org
2012-11-05 21:54:39 +01:00
Jamie Lentin eaa7cc60f7 hwmon: Only include of_match_table with CONFIG_OF_GPIO
The following fixes build errors on sparc. Without any DT support,
of_match_ptr is NULL and the below is a no-op. However, if just
CONFIG_OF is defined then so is of_match_ptr.

All useful parts of the gpio-fan DT support rely on CONFIG_OF_GPIO
anyway, so of_match_table should too.

Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-11-01 17:31:20 -07:00
Andreas Herrmann d034fbf08b hwmon, fam15h_power: Change email address, MAINTAINERS entry
Signed-off-by: Andreas Herrmann <herrmann.der.user@googlemail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-10-29 17:48:01 -07:00
Arnd Bergmann 9628d85975 Merge branch 'vexpress-drivers' of git://git.linaro.org/people/pawelmoll/linux into next/drivers
Versatile Express changes from Pawel Moll <pawel.moll@arm.com>:

* 'vexpress-drivers' of git://git.linaro.org/people/pawelmoll/linux:
  ARM: vexpress: Reset driver
  hwmon: Versatile Express hwmon driver

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-10-26 15:29:40 +02:00
Pawel Moll 48ed887724 hwmon: Versatile Express hwmon driver
hwmon framework driver for Versatile Express sensors, providing
information about board level voltage (only when regulator driver
is not configured), currents, temperature and power/energy usage.
Labels for the values can be defined as DT properties.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
2012-10-16 17:12:35 +01:00
Guenter Roeck 1102dcab84 hwmon: (coretemp) Add support for Atom CE4110/4150/4170
TjMax for the CE4100 series of Atom CPUs was previously reported to be
110 degrees C.

cpuinfo logs on the web show existing CPU types CE4110, CE4150, and CE4170,
reported as "model name : Intel(R) Atom(TM) CPU CE41{1|5|7}0 @ 1.{2|6}0GHz"
with model 28 (0x1c) and stepping 10 (0x0a). Add the three known variants
to the tjmax table.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
cc: stable@vger.kernel.org
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-10-14 15:21:33 -07:00
Kees Cook f2bab3eb41 hwmon: (pmbus) remove CONFIG_EXPERIMENTAL
This config item has not carried much meaning for a while now and is
almost always enabled by default. As agreed during the Linux kernel
summit, remove it.

CC: Guenter Roeck <linux@roeck-us.net>
CC: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-10-14 15:21:33 -07:00
Linus Torvalds a3920a6efa Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull ACPI & Thermal updates from Len Brown:
 "The generic Linux thermal layer is gaining some new capabilities
  (generic cooling via cpufreq) and some new customers (ARM).

  Also, an ACPI EC bug fix plus a regression fix."

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (30 commits)
  tools/power/acpi/acpidump: remove duplicated include from acpidump.c
  ACPI idle, CPU hotplug: Fix NULL pointer dereference during hotplug
  cpuidle / ACPI: fix potential NULL pointer dereference
  ACPI: EC: Add a quirk for CLEVO M720T/M730T laptop
  ACPI: EC: Make the GPE storm threshold a module parameter
  thermal: Exynos: Fix NULL pointer dereference in exynos_unregister_thermal()
  Thermal: Fix bug on cpu_cooling, cooling device's id conflict problem.
  thermal: exynos: Use devm_* functions
  ARM: exynos: add thermal sensor driver platform data support
  thermal: exynos: register the tmu sensor with the kernel thermal layer
  thermal: exynos5: add exynos5250 thermal sensor driver support
  hwmon: exynos4: move thermal sensor driver to driver/thermal directory
  thermal: add generic cpufreq cooling implementation
  Fix a build error.
  thermal: Fix potential NULL pointer accesses
  thermal: add Renesas R-Car thermal sensor support
  thermal: fix potential out-of-bounds memory access
  Thermal: Introduce locking for cdev.thermal_instances list.
  Thermal: Unify the code for both active and passive cooling
  Thermal: Introduce simple arbitrator for setting device cooling state
  ...
2012-10-13 11:27:59 +09:00
Jean Delvare 0657777fce hwmon: Drop needless includes of <linux/delay.h>
These drivers use no sleep or delay functions so they don't need to
include <linux/delay.h>.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Cc: Rudolf Marek <r.marek@assembler.cz>
2012-10-10 15:25:57 +02:00
Jean Delvare fa845740cb hwmon: Add missing inclusions of <linux/err.h>
These drivers use IS_ERR so they should include <linux/err.h>.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Luca Tettamanti <kronos.it@gmail.com>
Cc: Henrik Rydberg <rydberg@euromail.se>
2012-10-10 15:25:56 +02:00
Jean Delvare dcd8f39230 hwmon: Add missing inclusions of <linux/jiffies.h>
Many hwmon drivers use jiffies but omit the inclusion of the header
file. Fix that, and also fix one driver which was including the header
file but didn't need it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Luca Tettamanti <kronos.it@gmail.com>
Cc: Marc Hulsman <m.hulsman@tudelft.nl>
Cc: Rudolf Marek <r.marek@assembler.cz>
2012-10-10 15:25:56 +02:00
Oleksij Rempel 9292f05556 hwmon: Update Alexey Fisher's name
My name was change after migration.

Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-10-10 15:25:56 +02:00
Len Brown d1d4a81b84 Merge branches 'fixes-for-37', 'ec' and 'thermal' into release 2012-10-09 01:47:35 -04:00
Len Brown 29b19e2504 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux into thermal
Conflicts:
	drivers/staging/omap-thermal/omap-thermal-common.
		OMAP supplied dummy TC1 and TC2,
		at the same time that the thermal tree removed them
		from thermal_zone_device_register()

	drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
		propogate the upstream MAX_IDR_LEVEL re-name
			to prevent a build failure

	Previously-fixed-by: Stephen Rothwell <sfr@canb.auug.org.au>

Signed-off-by: Len Brown <len.brown@intel.com>
2012-10-09 01:35:52 -04:00
Linus Torvalds 5e090ed7af ARM: soc: late platform updates
This branch contains updates to OMAP and Marvell platforms (kirkwood,
 dove, mvebu) that came in after we had done the big multiplatform merges,
 so they were kept separate from the rest, and not separated into the
 traditional topics of cleanup/driver/platform features.
 
 For OMAP, the updates are:
 - Runtime PM conversions for the GPMC and RNG IP blocks
 - Preparation patches for the OMAP common clock framework conversion
 - clkdev alias additions required by other drivers
 - Performance Monitoring Unit (PMU) support for OMAP2, 3, and non-4430 OMAP4
 - OMAP hwmod code and data improvements
 - Preparation patches for the IOMMU runtime PM conversion
 - Preparation patches for OMAP4 full-chip retention support
 
 For Kirkwood/Dove/mvebu:
 
 - New driver for "address decoder controller" for mvebu, which
   is a piece of hardware that configures addressable devices and
   peripherals. First user is the boot rom aperture on armada XP since
   it is needed for SMP support.
 - New device tree bindings for peripherals such as gpio-fan, iconnect
   nand, mv_cesa and the above address decoder controller.
 - Some defconfig updates, mostly to enable new DT boards and a few drivers.
 - New drivers using the pincontrol subsystem for dove, kirkwood and mvebu
 - New clean gpio driver for mvebu
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQblIiAAoJEIwa5zzehBx3J1EP/1pxMqjVKQDXxak+A6g8a7r0
 hUTjqfiA9nZ4st+nk3PKJL9DNkoTEoZZqXghYRA+N6ej4hAaFJX1izgQDtjtjfRE
 s2izZuxGka8Oiic6FpCUoQnMORg10tSLgyvlHNW4hXy3qpe2C4u1D2GJwA/GPeLQ
 lHREekcJ3RKWutpG2hMtCT+9Bm4AwnnMY5uO39gxoXeMn6RoaACNIyYxz0NeL5bV
 GDuawi7Pc4KJTXX+D/VU0o7VtksiUO8YBczFEra/9khSL/RI2PFalIX3DKiioqvA
 yUA11d9proqojIdfdjVRPBHnIMl49H8ohBwbQfKnkNz9msl1BKN5PbakKls97mQ+
 vaJpoACnc/3x4P/izEpwry5XqeIl5S5mwz4R4+fojpWpp4JPcly/cAKMAsXf5WRi
 NF50E4D/8ysHE8WuBU5YHFgEEbn3nXkRbNMgdYtUwzixdmNJNaU8+33BJo34c4j0
 DNktiEdKUBoiiEdsC1MgH86olD/sFNUxvXBub30hhOywoapgQE61fGQGxG38DV/K
 kspTHz9SKUrmgbYEyMNOhz4paRrheYxx9cAgKP7Hp7m4Gu8d6ZqRqLqN9hbAbLuW
 TbH2FpqcjSw4KnYYCepTixJ3dhGiICiILWHfsW3qCj5Le3YVwedCpBCL1/I+RqEP
 kYTToVhur/T1yamHAmBi
 =xVaJ
 -----END PGP SIGNATURE-----

Merge tag 'soc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull late ARM soc platform updates from Olof Johansson:
 "This branch contains updates to OMAP and Marvell platforms (kirkwood,
  dove, mvebu) that came in after we had done the big multiplatform
  merges, so they were kept separate from the rest, and not separated
  into the traditional topics of cleanup/driver/platform features.

  For OMAP, the updates are:
   - Runtime PM conversions for the GPMC and RNG IP blocks
   - Preparation patches for the OMAP common clock framework conversion
   - clkdev alias additions required by other drivers
   - Performance Monitoring Unit (PMU) support for OMAP2, 3, and
     non-4430 OMAP4
   - OMAP hwmod code and data improvements
   - Preparation patches for the IOMMU runtime PM conversion
   - Preparation patches for OMAP4 full-chip retention support

  For Kirkwood/Dove/mvebu:
   - New driver for "address decoder controller" for mvebu, which is a
     piece of hardware that configures addressable devices and
     peripherals.  First user is the boot rom aperture on armada XP
     since it is needed for SMP support.
   - New device tree bindings for peripherals such as gpio-fan, iconnect
     nand, mv_cesa and the above address decoder controller.
   - Some defconfig updates, mostly to enable new DT boards and a few
     drivers.
   - New drivers using the pincontrol subsystem for dove, kirkwood and
     mvebu
   - New clean gpio driver for mvebu"

* tag 'soc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (98 commits)
  ARM: mvebu: fix build breaks from multi-platform conversion
  ARM: OMAP4460/4470: PMU: Enable PMU for OMAP4460/70
  ARM: OMAP2+: PMU: Add runtime PM support
  ARM: OMAP4430: PMU: prepare to create PMU device via HWMOD
  ARM: OMAP2+: PMU: Convert OMAP2/3 devices to use HWMOD
  ARM: OMAP3: hwmod data: Add debugss HWMOD data
  ARM: OMAP2+: clockdomain/hwmod: add workaround for EMU clockdomain idle problems
  ARM: OMAP: Add a timer attribute for timers that can interrupt the DSP
  hwrng: OMAP: remove SoC restrictions from driver registration
  ARM: OMAP: split OMAP1, OMAP2+ RNG device registration
  hwrng: OMAP: convert to use runtime PM
  hwrng: OMAP: store per-device data in per-device variables, not file statics
  ARM: OMAP2xxx: hwmod/CM: add RNG integration data
  ARM: OMAP2+: gpmc: minimal driver support
  ARM: OMAP2+: gpmc: Adapt to HWMOD
  ARM: OMAP2/3: hwmod data: add gpmc
  ARM: OMAP4: hwmod data: add mmu hwmod for ipu and dsp
  ARM: OMAP3: hwmod data: add mmu data for iva and isp
  ARM: OMAP: iommu: fix including iommu.h without IOMMU_API selected
  ARM: OMAP4: hwmod data: add missing HWMOD_NO_IDLEST flags to some PRCM IP blocks
  ...
2012-10-07 20:55:16 +09:00
Linus Torvalds 9cd11c0c47 ARM: soc: multiplatform enablement
This is a pretty significant branch. It's the introduction of the
 first multiplatform support on ARM, and with this (and the later
 branch) merged, it is now possible to build one kernel that contains
 support for highbank, vexpress, mvebu, socfpga, and picoxcell. More
 platforms will be convered over in the next few releases.
 
 Two critical last things had to be done for this to be practical and
 possible:
 * Today each platform has its own include directory under
   mach-<mach>/include/mach/*, and traditionally that is where a lot of
   driver/platform shared definitions have gone, such as platform data
   structures. They now need to move out to a common location instead,
   and this branch moves a large number of those out to
   include/linux/platform_data.
 * Each platform used to list the device trees to compile for its
   boards in mach-<mach>/Makefile.boot.
 
 Both of the above changes will mean that there are some merge
 conflicts to come (and some to resolve here). It's a one-time move and
 once it settles in, we should be good for quite a while. Sorry for the
 overhead.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQaO7aAAoJEIwa5zzehBx3bUIP/02U8PhkHJJrrowyIsWRBOql
 7LPJ53PRRgrpBdmEGzFD3TO3zaNyrjQRbYgNDvzHMO6NAMNvdRFouuWYjO11/tuB
 i32zssXCC+eUOEgbAo/U/lYq+UOvqw9gv6mU+3+i3OcGEhdKOaoT/DSLPQC4hoDm
 222TeLfFB3HJXu5n720dEQ9V3fO6TS1+bbh8TU3cjHqzceXsOrffZqOA5CQxUcRr
 KWwOjA0nALDwWcqgv45GJNwY3GTyAQ/hPMQavnuWK0voJ+qUYk5HftKocAK7C+py
 0T0OFOAHTwtyhvzJBxLC84M6Ox465BYXyeNjIB+2nG/Um9+mDoP0dnWpGy4c7DMU
 P5hyqbeLGeqjUXQuYtRmgMMc3UeHKoUGAfXW9eMsjLa6/M4NLGv//7E7LbZPpgMZ
 obkjwuesmcaYn/FRyj/yFmC35YlF4oCLziVzEtURZw3eKHHSUlhkTDSMNnkcZ0kZ
 Vv7kFxnD2Y46ixiwSJv30ErQnVkgI3MdqDlDxkE8r5+phYuK4gCrNaJtiwRh/oNw
 cFhpPxKuA0sJ9b6YRTzjC45eT/XZomEEr/uifCFeRNaCquyjYP00Mm8F0flSqwx9
 zi+emzPAwNmk1bvxMUM/idGnaj0V4p+BAYUAvkbSoqU1p1flzyhU88fGTSIyKOt6
 K5TCDS2v5hrVykK9TDwl
 =Tc6y
 -----END PGP SIGNATURE-----

Merge tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM soc multiplatform enablement from Olof Johansson:
 "This is a pretty significant branch.  It's the introduction of the
  first multiplatform support on ARM, and with this (and the later
  branch) merged, it is now possible to build one kernel that contains
  support for highbank, vexpress, mvebu, socfpga, and picoxcell.  More
  platforms will be convered over in the next few releases.

  Two critical last things had to be done for this to be practical and
  possible:
   * Today each platform has its own include directory under
     mach-<mach>/include/mach/*, and traditionally that is where a lot
     of driver/platform shared definitions have gone, such as platform
     data structures.  They now need to move out to a common location
     instead, and this branch moves a large number of those out to
     include/linux/platform_data.
   * Each platform used to list the device trees to compile for its
     boards in mach-<mach>/Makefile.boot.

  Both of the above changes will mean that there are some merge
  conflicts to come (and some to resolve here).  It's a one-time move
  and once it settles in, we should be good for quite a while.  Sorry
  for the overhead."

Fix conflicts as per Olof.

* tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (51 commits)
  ARM: add v7 multi-platform defconfig
  ARM: msm: Move core.h contents into common.h
  ARM: highbank: call highbank_pm_init from .init_machine
  ARM: dtb: move all dtb targets to common Makefile
  ARM: spear: move platform_data definitions
  ARM: samsung: move platform_data definitions
  ARM: orion: move platform_data definitions
  ARM: vexpress: convert to multi-platform
  ARM: initial multiplatform support
  ARM: mvebu: move armada-370-xp.h in mach dir
  ARM: vexpress: remove dependency on mach/* headers
  ARM: picoxcell: remove dependency on mach/* headers
  ARM: move all dtb targets out of Makefile.boot
  ARM: picoxcell: move debug macros to include/debug
  ARM: socfpga: move debug macros to include/debug
  ARM: mvebu: move debug macros to include/debug
  ARM: vexpress: move debug macros to include/debug
  ARM: highbank: move debug macros to include/debug
  ARM: move debug macros to common location
  ARM: make mach/gpio.h headers optional
  ...
2012-10-01 19:11:38 -07:00
Amit Daniel Kachhap c48cbba6fe hwmon: exynos4: move thermal sensor driver to driver/thermal directory
This movement is needed because the hwmon entries and corresponding sysfs
interface is a duplicate of utilities already provided by
driver/thermal/thermal_sys.c.  The goal is to place it in thermal folder
and add necessary functions to use the in-kernel thermal interfaces.

Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: SangWook Ju <sw.ju@samsung.com>
Cc: Durgadoss <durgadoss.r@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Kyungmin Park <kmpark@infradead.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-09-24 14:44:38 +08:00
Sven Schuchmann 592758b12f hwmon: (mcp3021) Add MCP3221 support
This Patch adds support for mcp3221 chip to the
mcp3021 driver.

Signed-off-by: Sven Schuchmann <schuchmann@schleissheimer.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:36 -07:00
Sven Schuchmann 8b662f38e0 hwmon: (mcp3021) Prepare MCP3021 driver to support other chips
This Patch is to prepare the MCP3021 driver to support
other chips like the MCP3221. The hard defined chip data
is now stored within the data struct of each chip.

Signed-off-by: Sven Schuchmann <schuchmann@schleissheimer.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:36 -07:00
Guenter Roeck a91698135b hwmon: (w83791d) Drop unnecessary compare statements
The following build warnings are seen with -Wextra.

w83791d.c: In function store_temp_target:
w83791d.c:858:2: warning: comparison of unsigned expression < 0 is always false
w83791d.c: In function store_temp_tolerance:
w83791d.c:920:2: warning: comparison of unsigned expression < 0 is always false

For store_temp_target, accept negative numbers and clamp to >= 0.
For store_temp_tolerance, drop the unnecessary comparison.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-09-23 21:08:35 -07:00
Guenter Roeck 3be8102fe3 hwmon: (lm93) Drop unnecessary compare statement
The following build warning is seen with -Wextra.

lm93.c: In function ‘store_fan_smart_tach’:
lm93.c:1833:2: warning: comparison of unsigned expression >= 0 is always true

Drop the unnecessary comparison.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-09-23 21:08:35 -07:00
Guenter Roeck 860f37319e hwmon: (lm70) Simplify show_name function
Instead of using a switch statement to determine the device name, use
to_spi_device(dev)->modalias to simplify the code and reduce module size.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:35 -07:00
Guenter Roeck cc00e4ddbf hwmon: (adcxx) Simplify show_name function
Display device name using to_spi_device(dev)->modalias instead of computing it
from the number of ADC channels. This is cleaner and reduces code size.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:35 -07:00
Guenter Roeck e2d8c2b6de hwmon: Drop dependencies on EXPERIMENTAL
CONFIG_EXPERIMENTAL is expected to be removed, so drop dependencies on it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-09-23 21:08:35 -07:00
Guenter Roeck ca2e24cbed hwmon: (it87) Fix Kconfig for IT87 driver
Add missing reference to IT8782F and IT8783E/F to it87 driver description
in Kconfig. Replace wrong reference to Si960 with the correct Si950.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-09-23 21:08:35 -07:00
Vivien Didelot f9b693eb3d hwmon: (sht15) move header to linux/platform_data/
This patch moves the sht15.h header from include/linux to
include/linux/platform_data, and update existing support (stargate2
platform) accordingly.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:35 -07:00
Peter Senna Tschudin 8494df3aa6 hwmon: (asus_atk0110) Remove useless kfree
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
position p1,p2;
expression x;
@@

if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; }

@unchanged exists@
position r.p1,r.p2;
expression e <= r.x,x,e1;
iterator I;
statement S;
@@

if (x@p1 == NULL) { ... when != I(x,...) S
                        when != e = e1
                        when != e += e1
                        when != e -= e1
                        when != ++e
                        when != --e
                        when != e++
                        when != e--
                        when != &e
   kfree@p2(x); ... return ...; }

@ok depends on unchanged exists@
position any r.p1;
position r.p2;
expression x;
@@

... when != true x@p1 == NULL
kfree@p2(x);

@depends on !ok && unchanged@
position r.p2;
expression x;
@@

*kfree@p2(x);
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:35 -07:00
Guenter Roeck dc92cd0c13 hwmon: (ina2xx) Add support for INA220 and INA230
INA220 is register compatible to INA219, and INA230 is register compatible to
INA226, so all we need to do is to add name aliases for those two chips.

Cc: Lothar Felten <l-felten@ti.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
2012-09-23 21:08:35 -07:00
Guenter Roeck 6106db25c2 hwmon: (ina2xx) Use structure array to distinguish chip types
Replace per-device initialization and per-device calculation code with
per-device configuration data, which is then used to configure the chip and
perform calculations based on that data.

This patch reduces code size by more than 400 bytes on x86_64.

Cc: Lothar Felten <l-felten@ti.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-09-23 21:08:34 -07:00
Guenter Roeck 9224c38a31 hwmon: (max1111) Add support for MAX1110, MAX1112, and MAX1113
MAX1110 is similar to MAX1111, with 8 instead of 4 channels. MAX1112 and MAX1113
are similar to MAX1110 and MAX1111, with 4.096V reference voltage instead of
2.048V.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-09-23 21:08:34 -07:00
Christophe Leroy a86e94dc94 hwmon: (lm70) Add support for LM71 and LM74
Add support for LM74 and LM71 to LM70 driver.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:34 -07:00
Guenter Roeck 1a2a064eb8 hwmon: (w83793) Remove legacy chassis intrusion detection sysfs attributes
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-09-23 21:08:34 -07:00
Guenter Roeck 1267ce9c33 hwmon: (w83792d) Remove legacy chassis intrusion detection attributes
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-09-23 21:08:34 -07:00
Guenter Roeck f4a41eeac9 hwmon: (adm9240) Remove legacy chassis intrusion detection sysfs attribute
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-09-23 21:08:34 -07:00
Christophe Leroy 146ab288bb hwmon: (lm70) Allow 4wire SPI bus with LM70
Removing the 3wire limitation on LM70 as the component also allows
operation on 4wire SPI bus

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:34 -07:00
Vivien Didelot edec5af7c5 hwmon: (sht15) remove multiple driver registration
Declare an array of platform_device_id, instead of registering a driver
for each supported chip. This makes the code cleaner.
Also add a module description.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:34 -07:00
Vivien Didelot 6c1fe725fd hwmon: add Maxim MAX197 support
The MAX197 is an A/D converter, made by Maxim. This driver currently
supports the MAX197, and MAX199. They are both 8-Channel, Multi-Range,
5V, 12-Bit DAS with 8+4 Bus Interface and Fault Protection.

The available ranges for the MAX197 are {0,-5V} to 5V, and {0,-10V} to
10V, while they are {0,-2V} to 2V, and {0,-4V} to 4V on the MAX199.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:33 -07:00
Dan Carpenter 37f9648b27 hwmon: (adt7410) handle errors from adt7410_update_device()
Smatch complains that adt7410_update_device() can return error pointers.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:33 -07:00
Hartmut Knaack 983b97bed2 hwmon: Driver for ADT7410
This patch brings basic support for the Analog Devices ADT7410 temperature
sensor. The following functionality has been implemented:

  * get current temperature
  * get/set minimum, maximum and critical temperature
  * get/set hysteresis
  * get alarm events for minimum, maximum and critical temperature

All implemented sysfs attributes have been sucessfully tested at temperatures
of 15°C to 40°C.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:33 -07:00
Guenter Roeck 87432a2e22 hwmon: (fam15h_power) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:33 -07:00
Guenter Roeck 505dc0cc7e hwmon: (via-cputemp) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:33 -07:00
Guenter Roeck b25df2bfbe hwmon: (jz4740-hwmon) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:33 -07:00
Guenter Roeck 816864d996 hwmon: (w83l786ng) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:33 -07:00
Guenter Roeck 7711f1bd03 hwmon: (vt8231) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Roger Lucas <vt8231@hiddenengine.co.uk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:33 -07:00
Guenter Roeck a844af19b9 hwmon: (sht21) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Urs Fleisch <urs.fleisch@sensirion.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:32 -07:00
Guenter Roeck 38fe7560a3 hwmon: (sht15) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
2012-09-23 21:08:32 -07:00
Guenter Roeck 9220f1e4a2 hwmon: (sch5636) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:32 -07:00
Guenter Roeck bd8d8e088d hwmon: (sch5627) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:32 -07:00
Guenter Roeck 79831fd4e0 hwmon: (mcp3021) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Mingkai Hu <Mingkai.hu@freescale.com>
Cc: Xie Xiaobo <X.Xie@freescale.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:32 -07:00
Guenter Roeck effb8ab114 hwmon: (ltc4245) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:32 -07:00
Guenter Roeck d2b95e58ea hwmon: (ltc4215) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:32 -07:00
Guenter Roeck 78968642cc hwmon: (ltc4151) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Per Dalen <per.dalen@appeartv.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:32 -07:00
Guenter Roeck 7008b9704a hwmon: (max1668) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:32 -07:00
Guenter Roeck a8dd946c42 hwmon: (lm95245) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:31 -07:00
Guenter Roeck 1487bf70c1 hwmon: (lm95241) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:31 -07:00
Guenter Roeck 33ed6d4a82 hwmon: (lm70) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:31 -07:00
Guenter Roeck a81b0f73d1 hwmon: (g760a) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:31 -07:00
Guenter Roeck 05639bcb4b hwmon: (f75375s) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:31 -07:00
Guenter Roeck 33cd66e3c8 hwmon: (f71882fg) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:31 -07:00
Guenter Roeck 59da32d8df hwmon: (emc2103) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:31 -07:00
Guenter Roeck 7b52eefe16 hwmon: (emc1403) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:31 -07:00
Guenter Roeck 3aa9d1df7e hwmon: (ds620) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:31 -07:00
Guenter Roeck 805fd8c5b8 hwmon: (dme1737) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Juerg Haefliger <juergh@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:30 -07:00
Guenter Roeck 64adf39837 hwmon: (asb100) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:30 -07:00
Guenter Roeck f9286434ea hwmon: (amc6821) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:30 -07:00
Guenter Roeck 9cc7dcc523 hwmon: (adt7470) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:30 -07:00
Guenter Roeck 0880830096 hwmon: (adt7462) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:30 -07:00
Guenter Roeck 65ec17b0d5 hwmon: (adt7411) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:30 -07:00
Guenter Roeck 33fd2b84c9 hwmon: (ads7871) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:30 -07:00
Guenter Roeck 34e3f7f5a2 hwmon: (ads7828) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:30 -07:00
Guenter Roeck 57457e314e hwmon: (ads1015) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:30 -07:00
Guenter Roeck 08940b8aba hwmon: (adm1029) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Corentin Labbe <corentin.labbe@geomatys.fr>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:29 -07:00
Guenter Roeck c60da82593 hwmon: (adcxx) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:29 -07:00
Guenter Roeck d5282926aa hwmon: (ad7418) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:29 -07:00
Guenter Roeck 0fee6591b7 hwmon: (ad7414) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:29 -07:00
Guenter Roeck be92304034 hwmon: (ad7314) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:29 -07:00
Guenter Roeck a34c26d8e2 hwmon: (abituguru3) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Alistair John Strachan <alistair@devzero.co.uk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:29 -07:00
Guenter Roeck d8f30ad8e5 hwmon: (abituguru) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-23 21:08:29 -07:00
Guenter Roeck 313829ee3c hwmon: (sch56xx-common) Fix build warnings
Fix:
warning: 'address' may be used uninitialized in this function
warning: 'name' may be used uninitialized in this function

While those are false warnings, the patch reduces module size on x86_64 by
approximately 110 bytes, so it is still worth the effort.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Hans de Goede <hdegoede@redhat.com>
2012-09-23 21:08:29 -07:00
Guenter Roeck 0038389add hwmon: (f71882fg) Fix build warning
Fix:

warning: 'address' may be used uninitialized in this function [-Wuninitialized]

While this is a false warning, the patch reduces module size on x86_64 by
approximately 175 bytes, so it is still worth the effort.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Hans de Goede <hdegoede@redhat.com>
2012-09-23 21:08:29 -07:00
Andreas Herrmann 5f0ecb907d hwmon: (fam15h_power) Tweak runavg_range on resume
The quirk introduced with commit
00250ec909 (hwmon: fam15h_power: fix
bogus values with current BIOSes) is not only required during driver
load but also when system resumes from suspend. The BIOS might set the
previously recommended (but unsuitable) initilization value for the
running average range register during resume.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Tested-by: Andreas Hartmann <andihartmann@01019freenet.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@vger.kernel.org # 3.0+
2012-09-23 20:54:09 +02:00
Silas Boyd-Wickizer 641f145600 hwmon: (coretemp) Use get_online_cpus to avoid races involving CPU hotplug
coretemp_init loops with for_each_online_cpu, adding platform_devices
and sysfs interfaces, then calls register_hotcpu_notifier.  There is a
race if a CPU is offlined or onlined after the loop, but before
register_hotcpu_notifier.  The race might result in the absence of a
platform_device+sysfs interface for an online CPU, or the presence of
a platform_device+sysfs interface for an offline CPU.  A similar race
occurs during coretemp_exit, after the module calls
unregister_hotcpu_notifier, but before it unregisters all devices, a
CPU might offline and a device for an offline CPU will exist for a
short while.

This fix surrounds for_each_online_cpu and register_hotcpu_notifier
with get_online_cpus+put_online_cpus; and surrounds
unregister_hotcpu_notifier and device unregistering with
get_online_cpus+put_online_cpus.

Build tested.

Signed-off-by: Silas Boyd-Wickizer <sbw@mit.edu>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-09-23 20:27:32 +02:00
Silas Boyd-Wickizer 1ec3ddfd27 hwmon: (via-cputemp) Use get_online_cpus to avoid races involving CPU hotplug
via_cputemp_init loops with for_each_online_cpu, adding
platform_devices, then calls register_hotcpu_notifier.  If a CPU is
offlined between the loop and register_hotcpu_notifier, then later
onlined, via_cputemp_device_add will attempt to add platform devices
with the same ID.  A similar race occurs during via_cputemp_exit,
after the module calls unregister_hotcpu_notifier, a CPU might offline
and a device will exist for a CPU that is offline.

This fix surrounds for_each_online_cpu and register_hotcpu_notifier
with get_online_cpus+put_online_cpus; and surrounds
unregister_hotcpu_notifier and device unregistering with
get_online_cpus+put_online_cpus.

Build tested.

Signed-off-by: Silas Boyd-Wickizer <sbw@mit.edu>
Acked-by: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-09-23 20:27:32 +02:00
Olof Johansson d6a93ceb3f Merge branch 'kirkwood/dt' of git://git.infradead.org/users/jcooper/linux into late/kirkwood
From Jason Cooper:

New bindings:
  - iconnect nand and keys
  - mv_cesa
  - gpio-fan

* 'kirkwood/dt' of git://git.infradead.org/users/jcooper/linux:
  ARM: kirkwood: Use devicetree to define DNS-32[05] fan
  hwmon: Add devicetree bindings to gpio-fan
  Crypto: CESA: Add support for DT based instantiation.
  ARM: Kirkwood: Describe iconnect nand in DT.
  ARM: Kirkwood: Describe iconnect keys in DT.
2012-09-22 13:24:09 -07:00
Jamie Lentin 55fb8b0681 hwmon: Add devicetree bindings to gpio-fan
Allow a gpio-fan to be defined in devicetree, see binding documentation
for details.

Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-09-22 14:40:49 +00:00
Olof Johansson e3a66aa33a Merge branch 'multiplatform/platform-data' into next/multiplatform
* multiplatform/platform-data:
  ARM: spear: move platform_data definitions
  ARM: samsung: move platform_data definitions
  ARM: orion: move platform_data definitions
  ARM: nomadik: move platform_data definitions
  ARM: w90x900: move platform_data definitions
  ARM: vt8500: move platform_data definitions
  ARM: tegra: move sdhci platform_data definition
  ARM: sa1100: move platform_data definitions
  ARM: pxa: move platform_data definitions
  ARM: netx: move platform_data definitions
  ARM: msm: move platform_data definitions
  ARM: imx: move platform_data definitions
  ARM: ep93xx: move platform_data definitions
  ARM: davinci: move platform_data definitions
  ARM: at91: move platform_data definitions

Conflicts due to removed files:
	arch/arm/mach-tegra/board-harmony.c
	arch/arm/mach-tegra/board-trimslice.c

Conflicts due to code removal:
	arch/arm/mach-tegra/board-paz00.c

Context conflicts in:
	drivers/mmc/host/sdhci-tegra.c
	drivers/net/irda/pxaficp_ir.c

Signed-off-by: Olof Johansson <olof@lixom.net>
2012-09-22 01:07:21 -07:00
Arnd Bergmann 436d42c61c ARM: samsung: move platform_data definitions
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the samsung include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Bryan Wu <bryan.wu@canonical.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: linux-samsung-soc@vger.kernel.org
2012-09-19 17:42:18 +02:00
Parag Warudkar 521cf64892 hwmon: (applesmc) Bump max wait
A heavy-load test on a MacBookPro6,1 is still showing a substantial
amount of read errors.  Increasing the maximum wait time to 128 ms
resolves the issue.

Signed-off-by: Parag Warudkar <parag.lkml@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-18 13:20:49 -07:00
Guenter Roeck 3ceefe4319 hwmon: (ad7314) Add 'name' sysfs attribute
The 'name' sysfs attribute is mandatory for hwmon devices, but was missing
in this driver.

Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
2012-09-18 13:20:35 -07:00
Guenter Roeck 4e21f4eaa4 hwmon: (ads7871) Add 'name' sysfs attribute
The 'name' sysfs attribute is mandatory for hwmon devices, but was missing
in this driver.

Cc: Paul Thomas <pthomas8589@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Paul Thomas <pthomas8589@gmail.com>
2012-09-17 14:29:20 -07:00
Guenter Roeck 080b98e9ab hwmon: (ina2xx) Fix word size register read and write operations
The driver uses be16_to_cpu and cpu_to_be16 to convert data in SMBus word
operations from chip to host byte order. However, the data passed from and to
the SMBus word API functions is in host byte order, not in chip byte order.
Conversion should therefore use swab16 instead of be16 to change the byte order.

Replace driver internal word conversion functions with SMBus API functions to
solve the problem.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: stable@vger.kernel.org # 3.5+
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-09-12 06:42:11 -07:00
Guenter Roeck 73d7c11925 hwmon: (twl4030-madc-hwmon) Initialize uninitialized structure elements
twl4030_madc_conversion uses do_avg and type structure elements of
twl4030_madc_request. Initialize structure to avoid random operation.

Fix for: Coverity CID 200794 Uninitialized scalar variable.

Cc: Keerthy <j-keerthy@ti.com>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Keerthy <j-keerthy@ti.com>
2012-09-11 21:16:27 -07:00
Luca Tettamanti 43ca6cb28c hwmon: (asus_atk0110) Add quirk for Asus M5A78L
The old interface is bugged and reads the wrong sensor when retrieving
the reading for the chassis fan (it reads the CPU sensor); the new
interface works fine.

Reported-by: Göran Uddeborg <goeran@uddeborg.se>
Cc: stable@vger.kernel.org
Tested-by: Göran Uddeborg <goeran@uddeborg.se>
Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-08-22 22:33:31 -07:00
Andi Kleen 64f503076f sections: Fix section conflicts in drivers/hwmon
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-08-18 16:17:43 -07:00
Linus Torvalds 76159c20c0 Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
Pull a howmon update from Jean Delvare.

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: struct x86_cpu_id arrays can be __initconst
2012-07-30 10:10:26 -07:00
Jan Beulich e273bd98c9 hwmon: struct x86_cpu_id arrays can be __initconst
... as being referenced from __init code only.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-07-30 11:33:00 +02:00
Henrik Rydberg 829917cd72 hwmon: (applesmc) Decode and act on read/write status codes
The behavior of the SMC has changed several times over the years,
causing read failures in the driver. It seems the problem can be
explained by a shift in SMC speed combined with improper action on
status codes.

We should first wait for the SMC to settle, which was the most
frequent response on the old slow machines. Then, if the SMC is busy,
we need to try again later by resending the command. This was the most
likely response until 2012. Now, with a shorter wait time, we are
again most likely to poll while the SMC is settling, and as a result
we see high failure rates on many old and new models.

With the distinction between busy and failure, we can also wait longer
before retrying, without sacrificing speed.  This seems to bring
failures down to virtually zero on all models.

Tested on: MBA1,1 MBA3,1 MBA5,1 MBA5,2 MBP9,2

Tested-by: Adam Somerville <adamsomerville@gmail.com>
Tested-by: Hubert Eichner <hubert.georg.eichner@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-07-27 14:00:12 -07:00
Jean Delvare 5953e2761b hwmon: (jc42) Don't reset hysteresis on device removal
Restoring the configuration register on device removal has the side
effect of also resetting the hysteresis value. This is inconsistent as
the other limits are not reset, only hysteresis. So, following the
principle of least surprise, preserve the hysteresis value when
restoring the configuration register.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-07-27 13:59:22 -07:00
Jean Delvare 2ccc8731e5 hwmon: (jc42) Simplify hysteresis mask
Define JC42_CFG_HYST_MASK as the mask _before_ shifting instead of
after shifting. This simplifies the current code slightly, and will
simplify the code to come even more.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-07-27 13:59:22 -07:00
Guenter Roeck 9baeb8fdd7 hwmon: (acpi_power_meter) Fix build warning
Commit c5dec01822 (acpi_power_meter: Use struct
dev_pm_ops for power management) introduced the following build warning. It is
seen if CONFIG_PM_SLEEP is not defined.

acpi_power_meter.c:930:12: warning: acpi_power_meter_resume defined but not used

Fix it.

Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-07-27 13:59:13 -07:00
Linus Torvalds d14b7a419a Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree from Jiri Kosina:
 "Trivial updates all over the place as usual."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (29 commits)
  Fix typo in include/linux/clk.h .
  pci: hotplug: Fix typo in pci
  iommu: Fix typo in iommu
  video: Fix typo in drivers/video
  Documentation: Add newline at end-of-file to files lacking one
  arm,unicore32: Remove obsolete "select MISC_DEVICES"
  module.c: spelling s/postition/position/g
  cpufreq: Fix typo in cpufreq driver
  trivial: typo in comment in mksysmap
  mach-omap2: Fix typo in debug message and comment
  scsi: aha152x: Fix sparse warning and make printing pointer address more portable.
  Change email address for Steve Glendinning
  Btrfs: fix typo in convert_extent_bit
  via: Remove bogus if check
  netprio_cgroup.c: fix comment typo
  backlight: fix memory leak on obscure error path
  Documentation: asus-laptop.txt references an obsolete Kconfig item
  Documentation: ManagementStyle: fixed typo
  mm/vmscan: cleanup comment error in balance_pgdat
  mm: cleanup on the comments of zone_reclaim_stat
  ...
2012-07-24 13:34:56 -07:00
Linus Torvalds 0cd5ff591a New drivers for DA9052/53 PMIC as well as HIH-6130/HIH-6131 humidity and
temperature sensors.
 
 Convert drivers to use devm_ functions and to use dev_pm_ops.
 Address a couple of Coverity errors/warnings as well as compile warnings.
 Some functional improvements in applesmc driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQDMjFAAoJEMsfJm/On5mBQy0QAIOMh+xxhfpIYmOz6e7lXyGK
 IvsYvJ16jvMzkIHxIsCJ8lYo0tQJTVFZAoDE0KnXMt/vpDGuooa/L2Rq0NQwAadF
 nb+XijtV042FMScLiGCbJQRyPmVWEpQ1sHvf6Ob+xUido4xTL/J0ObMv1P76Ro5v
 OlCWqt5bly9JDDzwTdvmkmVQ7TSLV27IbEy1XFeQ3B9AquIzCsHjLXmyzTGtWuEa
 e73pR62m+nEHlIwEyCnH9QBc5fhUyrOm+mzmGWaEZX+PUt4OC2VeBCOB4tyYA1f+
 +PV9wcCsFyre4Xdi2mtfyMnqSs6qio07diJB33oAmApKs6dbsfZvwM1gSIVTp8W/
 RooxePKN2fFgjnLSbAQZWaC3AMTcrsMlUMVxqZ75BPmQvrm1bxJh/OcWpo5lZM8s
 yAmdx587eHABMqvYgs4QVIf3QqmPXi194Qzq4loLHteGDohK8Z6u6t7famx1sRLt
 ApqfmcxPAjvpXfQB11VboYTLiFtXJK8T/VwOOoB9L24/dxoymSUa2UQuoeSBdESM
 dTTKJQebUcJs6J0OWzGRjKwS/jH8wcGJCzMlcHW9dpxMdh98R4gHHi/UTkfgJi/n
 j50/oxpJCyHqGthvKyA77oztWyyfuAdJbG2eKtRNVPriJMP3uuAbbBA9Cl9ytXyh
 SUChQ49urUSABI9up1iR
 =TcQ+
 -----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 drivers for DA9052/53 PMIC as well as HIH-6130/HIH-6131 humidity
  and temperature sensors.

  Convert drivers to use devm_ functions and to use dev_pm_ops.  Address
  a couple of Coverity errors/warnings as well as compile warnings.
  Some functional improvements in applesmc driver."

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (72 commits)
  hwmon: (applesmc) Ignore some temperature registers
  hwmon: (applesmc) Allow negative temperature values
  hwmon: (s3c-hwmon) Use devm_kzalloc instead of kzalloc
  hwmon: (w83781d) Fix compile warning
  hwmon: (applesmc) Shorten minimum wait time
  hwmon: (exynos4_tmu) Use struct dev_pm_ops for power management
  hwmon: (gpio-fan) Use struct dev_pm_ops for power management
  hwmon: (abituguru3) Use struct dev_pm_ops for power management
  hwmon: (abituguru) Use struct dev_pm_ops for power management
  hwmon: (acpi_power_meter) Fix unintentional integer overflow
  hwmon: (acpi_power_meter) Cleanup and optimizations
  hwmon: Honeywell Humidicon HIH-6130/HIH-6131 humidity and temperature sensor driver
  hwmon: (applesmc) Skip sensor mapping
  hwmon: (ntc_thermistor) Ensure that data->name string is terminated
  hwmon: (w83l785ts) Convert to use devm_ functions
  hwmon: (w83l785ts) Simplify code and improve readability
  hwmon: (smsc47m192) Convert to use devm_ functions
  hwmon: (smsc47m1) Convert to use devm_ functions
  hwmon: (smsc47b397) Convert to use devm_ functions
  hwmon: (k8temp) Convert to use devm_ functions
  ...
2012-07-24 13:29:18 -07:00