Commit Graph

1753 Commits

Author SHA1 Message Date
Xie Xiaobo 5510e62a66 hwmon: Add MCP3021 ADC driver
Add I2C driver for MCP3021 that is an ADC chip from Microchip.
The MCP3021 is a successive approximation A/D converter (ADC)
with 10-bit resolution.
The driver export the value of Vin to sysfs, the voltage unit is
mV. Through the sysfs interface, lm-sensors tool can also display
Vin voltage.

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-03-23 10:02:20 +01:00
Uwe Kleine-Koenig 0c2732152a hwmon: (mc13783-adc) Add support for the MC13892 PMIC
Based on a patch by David Jander that mostly did s/mc13783/mc13xxx/ .

Additionally use dev_get_drvdata instead of to_platform_device +
platform_get_drvdata in mc13783_adc_read (spotted by Jean Delvare).

Cc: David Jander <david.jander@protonic.nl>
Signed-off-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-03-23 10:02:19 +01:00
Frans Meulenbroeks cb88200490 hwmon: (mc13783-adc) Remove space before tab
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-03-23 10:02:19 +01:00
Jean Delvare af2ef4fc04 hwmon: (lm63) Let the user adjust the lookup table
Make the automatic fan speed control lookup table writable. This lets
the user tweak the fan speed / temperature response curve.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Tested-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-23 10:02:19 +01:00
Jean Delvare 817c6cc546 hwmon: (lm63) Make fan speed control strategy changeable
Let the user switch between automatic and manual fan speed control.
Before switching to automatic fan speed control, we always check that
the lookup table looks sane.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-23 10:02:19 +01:00
Jean Delvare dac27dce31 hwmon: (lm63) Reorganize the code
Reorder functions and driver declaration to no longer need to
forward-declare functions. Also rename new_client to just client
everywhere for readability.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-23 10:02:18 +01:00
Guenter Roeck f7001bb063 hwmon: (lm90) Restore original configuration if probe function fails
The lm90 driver restores the original chip configuration in its exit function.
However, the chip configuration is not restored if the probe function fails.
Restore it there as well.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-03-23 10:02:18 +01:00
Guenter Roeck ae544f64cc hwmon: (lm90) Add support for GMT G781
GMT G781 is a ADM1032-compatible temperature sensor chip.
Add support to the LM90 driver.

Cc: Mike Gorchak <lestat@i.com.ua>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-03-23 10:02:18 +01:00
Guenter Roeck f36ffeab0a hwmon: (lm90) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-03-23 10:02:18 +01:00
Guenter Roeck c10b3ee8aa hwmon: (w83795) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-03-23 10:02:18 +01:00
Jean Delvare 72fea694c4 hwmon: (w83795) Unconditionally support manual fan speed control
Manual fan speed control uses a standard interface and has received
sufficient testing and review by now, it can be enabled
unconditionally. This includes attributes pwm[1-8], pwm[1-8]_enable,
pwm[1-8]_mode and pwm[1-8]_freq.

We only let the user switch from automatic mode to manual mode, but
not the other way around, as automatic control settings may not have
been set properly by the BIOS.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-23 10:02:17 +01:00
Andre Przywara 941a956b0e hwmon: (fam15h_power) Increase output resolution
On high CPU load the accumulating values in the running_avg_cap
register are very low (below 10), so averaging them too early leads
to unnecessary poor output resolution. Since we pretend to output
micro-Watt we better keep all the bits we have as long as possible.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-03-23 10:02:17 +01:00
Andreas Herrmann fc0900cbda hwmon: (fam15h_power) Correct sign extension of running_avg_capture
Wrong bit was used for sign extension which caused wrong end results.
Thanks to Andre for spotting this bug.

Reported-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@vger.kernel.org
2012-03-23 10:02:17 +01:00
Linus Torvalds 31f6765266 hwmon changes for v3.4
Mostly cleanup. No new drivers this time around, but support for several chips
 added to existing drivers: TPS40400, TPS40422, MTD040, MAX34446, ZL9101M,
 ZL9117M, and LM96080. Also, added watchdog support for SCH56xx, and additional
 attributes for a couple of drivers.
 
 312869e hwmon: (sch56xx) Add support for the integrated watchdog (v2)
 840e191 hwmon: (w83627ehf) Add support for temperature offset registers
 86dda17 hwmon: (jc42) Remove unnecessary device IDs
 3360a10 hwmon: (zl6100) Add support for ZL9101M and ZL9117M
 9271126 hwmon: (adm1275) Add support for ADM1075
 590defe hwmon: (max34440) Add support for MAX34446
 60b873e hwmon: (pmbus) Add more virtual registers
 2163340 hwmon: (pmbus) Add support for Lineage Power MDT040
 c5f35c9 hwmon: (pmbus) Add support for TI TPS40400 and TPS40422
 56aad5d hwmon: (max34440) Add support for 'lowest' output voltage attribute
 f15df57 hwmon: (jc42) Convert to use devm_kzalloc
 918ddef hwmon: (max16065) Convert to use devm_kzalloc
 b8a5a7c hwmon: (smm665) Convert to use devm_kzalloc
 3683928 hwmon: (ltc4261) Convert to use devm_kzalloc
 dd285ad hwmon: (pmbus) Simplify remove functions
 8b313ca hwmon: (pmbus) Convert pmbus drivers to use devm_kzalloc
 07404aa hwmon: (lineage-pem) Convert to use devm_kzalloc
 f352df6 hwmon: (hwmon-vid) Fix checkpatch issues
 3230f70 hwmon: (hwmon-vid) Add new entries to VRM model table
 9908ad4 hwmon: (lm80) Add detection of NatSemi/TI LM96080
 0e190b7 hwmon: (lm87) Get rid of macro-generated functions
 8652a26 hwmon: (lm87) Reorganize the code
 0fc86ec hwmon: (applesmc) Silence uninitialized warnings
 7599d32 hwmon: (lm70) Fix: do not use assignment in if condition
 e200c14 hwmon: (lm70) Register hwmon device after creating attribute files, and remove it first
 01d9def hwmon: (w83l786ng) Fix multi-line comments
 130067d hwmon: (w83l785ts) Fix multi-line comments
 7950133 hwmon: (w83781d) Fix: do not use assignment in if condition
 aff6e00 hwmon: (w83781d) Fix multi-line comments
 2a52dd6 hwmon: (smsc47b397) Fix multi-line comments
 36564ef hwmon: (pc87427) Fix multi-line comments
 b6707b7 hwmon: (max1668) Fix multi-line comments
 1160631 hwmon: (lm80) Fix multi-line comments
 bf0f3a0 hwmon: (emc2103) Fix multi-line comments
 fbb6670 hwmon: (adm1031) Fix multi-line comments
 94b991d hwmon: (adm1029) Fix multi-line comments
 27b9de3 hwmon: (w83627hf) Fix checkpatch issues
 ca3ccad hwmon: (w83l786ng) Fix checkpatch issues
 47efe87 hwmon: (w83793) Fix checkpatch issues
 d174368 hwmon: (w83792d) Fix checkpatch issues
 2185696 hwmon: (vt1211) Fix: do not use assignment in if condition
 b162c03 hwmon: (vt1211) Fix checkpatch issues
 9004ac8 hwmon: (via686a) Fix checkpatch issues
 bce2778 hwmon: (pc87360) Fix: do not use assignment in if condition
 449a7a0 hwmon: (pc87360) Fix checkpatch issues
 8958dfb hwmon: (max1619): Fix checkpatch issues
 09770b2 hwmon: (lm85) Fix checkpatch issues
 9b03079 hwmon: (lm78) Fix checkpatch issues
 02fe2fd hwmon: (lm77) Fix checkpatch issues
 f445a9a hwmon: (gl520sm) Fix: do not use assignment in if condition
 43da3d1 hwmon: (gl520sm) Fix checkpatch issues
 228f8e0 hwmon: (gl518sm) Fix checkpatch issues
 c8de836 hwmon: (dme1737) Fix checkpatch issues
 8c10369 hwmon: (asb100): Fix checkpatch issues
 c387e4e hwmon: (adm9240) Fix checkpatch issues
 86aa3e2 hwmon: (adm1026) Fix checkpatch issues
 21d2a8f hwmon: (adm1021) Fix checkpatch issues
 1bd385d hwmon: (abituguru) Fix checkpatch issues
 8969e84 hwmon: (w83627ehf) Fix multi-line comments
 51683ee hwmon: (max1111) Fix multi-line comments
 1b05d22 hwmon: (ltc4151) Fix multi-line comments
 1b9c491 hwmon: (g760a) Fix multi-line comments
 20eaf72 hwmon: (f71882fg) Fix multi-line comments
 4bebced hwmon: (emc1403) Fix multi-line comments
 ca3c7b6 hwmon: (amc6821) Fix multi-line comments
 10775d1 hwmon: (ads7871) Fix multi-line comments
 d13d623 hwmon: (ads7828) Fix multi-line comments
 562fca2 hwmon: (abituguru3) Fix multi-line comments
 ec1c319 hwmon: (w83791d) Fix checkpatch issues
 a80b10c hwmon: (ultra45_env) Fix checkpatch issues
 4d387df hwmon: (thmc50) Fix checkpatch issues
 85a0c0d hwmon: (smsc47m1) Fix checkpatch issues
 7e61268 hwmon: (smsc47m1) Fix: do not use assignment in if condition
 7cc3cb6 hwmon: (smsc47m192) Fix checkpatch issues
 8fda79e hwmon: (sis5595) Fix checkpatch issues
 5725608 hwmon: (pcf8591) Fix checkpatch issues
 2804a4c hwmon: (lm93) Fix checkpatch issues
 a318afd hwmon: (lm92) Fix checkpatch issues
 073f1e6c hwmon: (lm87) Fix: do not use assignment in if condition
 c6370db hwmon: (lm87) Fix checkpatch issues
 525ad37 hwmon: (fschmd) Fix checkpatch issues
 f24d548 hwmon: (atxp1) Fix checkpatch issues
 724cc33 hwmon: (adt7462) Fix checkpatch issues
 790fa38 hwmon: (ltc4215) Fix multi-line comments
 430b4fc hwmon: (ltc4245) Fix multi-line comments
 a68abd3 hwmon: (wm8350-hwmon) Constify fixed string array
 85ebfd3 hwmon: (applesmc) Fix multi-line comments
 75bdc93 hwmon: (asus_atk0110) Fix multi-line comments
 3c4c497 hwmon: (it87) Constify fixed string arrays
 8deeac8 hwmon: (ad7414) Fix multi-line comments
 5d577db hwmon: (jc42) Fix multi-line comments
 780affe hwmon: (coretemp) Fix checkpatch error
 3af2861 hwmon: (pc87360) Fix multi-line comments
 07de3df hwmon: (wm831x-hwmon) Fix multi-line comments
 3c22e23 hwmon: (smm665) Fix checkpatch error
 3c56b06 hwmon: (asc7621) Fix multi-line comments
 4a0d71c hwmon: (it87) Fix multi-line comments
 86d566e hwmon: (hwmon-vid) Fix multi-line comments
 5ed0488 hwmon: (hwmon) Fix multi-line comments
 19f2c05 hwmon: (ds1621) Fix checkpatch issues
 91efffe hwmon: convert drivers/hwmon/* to use module_spi_driver()
 f0967ee hwmon: convert drivers/hwmon/* to use module_i2c_driver()
 61ba031 hwmon: (vt8231) Fix multi-line comments
 9ed5bc2 hwmon: (adt7475) Fix multi-line comments
 2fff084 hwmon: (f71805f) Fix checkpatch issues
 703af96 hwmon: (max6650) Fix multi-line comments
 c531eb3 hwmon: (w83781d) Fix checkpatch issues
 2b22de5 hwmon: (adm1025) Fix checkpatch issues
 7973841 hwmon: (abituguru3) Fix checkpatch issues
 65fe5c7 hwmon: (vt8231) Fix checkpatch issues
 bafda5d hwmon: (max6650) Fix checkpatch issues
 0117c3f hwmon: (pmbus) Replace strict_strtol with kstrtol
 b3789a0 hwmon: (lm83) fix checkpatch issues
 93092a6 hwmon: (k8temp) fix checkpatch issues
 96585f1 hwmon: (lm80) reset device if error occurred
 6a9e7c4c hwmon: (lm80) fix checkpatch warnings
 6b904b6 hwmon: (adt7470) fix checkpatch issues
 e6a83db hwmon: (adt7411) fix checkpatch issues
 56c24af hwmon: (lm70) fix checkpatch issues
 1dc3708 hwmon: (f71882fg) fix checkpatch issues
 c6e8ac0 hwmon: (asus_atk0110) fix checkpatch issues
 99b8c83 hwmon: (adt7475) fix checkpatch issues
 b2ae8f8 hwmon: (smm665) fix checkpatch issues
 c9e1498 hwmon: (sht15) fix checkpatch issues
 0910b28 hwmon: (ibmaem) fix checkpatch issues
 dcb7cb9 hwmon: (ad7414) fix checkpatch issues
 e91aef2 hwmon: (ad7418) fix checkpatch issues
 5996542 hwmon: (w83l785ts) fix checkpatch issues
 a6100f6 hwmon: (wm831x-hwmon) fix checkpatch issues
 839a9ee hwmon: fix checkpatch issues
 08f5090 hwmon: (adm1029) fix checkpatch issues
 4d7c5d4 hwmon: (g760a) fix checkpatch issues
 7b102ed hwmon: (i5k_amb) fix checkpatch issues
 600151b hwmon: use DEFINE_PCI_DEVICE_TABLE
 7fe83ad hwmon: remove () used with return
 a6bee4a hwmon: (amc6821) fix initialisation
 2faaa93 hwmon: (lm80) add error handling
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJPaJBFAAoJEMsfJm/On5mBhkMP/09vlmsG7J3TLHcSKYJBkvSx
 6VNOOJgPqnvF71Az0dX47SU3zVXhG3I7dZufd/hqOK+0CNylSB7OSZMcWvBTduea
 0hDLTYj++SyVDQfVXb3zCVLU/wAE3YuXB3umWPwAKit4s2wAYYRDVCjwK96B88rv
 llNvo6JryuJDBUq7xiEmr0vKWMO0mKwwjpMTGCD3NpzK02ZV49T0gM94xa4gi5nM
 QAhNeO1AzQTx0+mBSRlq+SBBLSiXQmHcNrhnxcRMPha1bEi1D+QESozsczr+9/lz
 8vuTIULOIZxafM4XkBsZdknvlZnYrA6ukituDfVfiYQVcljO/cNu+seutFQDCMJe
 1zTDoNGIAwwnw0sAWWmTQwUMi+GSvlaL20gmm8FhTlvQaj9hNETsPYxEvPEsBNY1
 ICCixZcwpa1mZBXmryz2btf8az0OlX/sApzyHiq24B7lSE5Fv4tBDtwypLRu5N8m
 C4oNXC2dqDU0gtVxzO5Lavu6LHWV9lhyZvRPO75+zxYt4i5cnO04GTAYWh46aOzO
 DAZcs8M2Rj++dI5VW9Vl0k8hP9eWjxtPJFhNv/OWTx4YYQRICrde+j7QZcikIUWF
 0bzYI/zeIcwOg059vhnglBFM3mr7Z92jm4mftcNaSj/zuUHbWf6AQLbIq86Zq7tF
 3Eru3WuTZTwAkyNAVWd5
 =cUoW
 -----END PGP SIGNATURE-----

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

Pull hwmon changes for v3.4 from Guenter Roeck:
 "Mostly cleanup.  No new drivers this time around, but support for
  several chips added to existing drivers: TPS40400, TPS40422, MTD040,
  MAX34446, ZL9101M, ZL9117M, and LM96080.  Also, added watchdog support
  for SCH56xx, and additional attributes for a couple of drivers."

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (137 commits)
  hwmon: (sch56xx) Add support for the integrated watchdog (v2)
  hwmon: (w83627ehf) Add support for temperature offset registers
  hwmon: (jc42) Remove unnecessary device IDs
  hwmon: (zl6100) Add support for ZL9101M and ZL9117M
  hwmon: (adm1275) Add support for ADM1075
  hwmon: (max34440) Add support for MAX34446
  hwmon: (pmbus) Add more virtual registers
  hwmon: (pmbus) Add support for Lineage Power MDT040
  hwmon: (pmbus) Add support for TI TPS40400 and TPS40422
  hwmon: (max34440) Add support for 'lowest' output voltage attribute
  hwmon: (jc42) Convert to use devm_kzalloc
  hwmon: (max16065) Convert to use devm_kzalloc
  hwmon: (smm665) Convert to use devm_kzalloc
  hwmon: (ltc4261) Convert to use devm_kzalloc
  hwmon: (pmbus) Simplify remove functions
  hwmon: (pmbus) Convert pmbus drivers to use devm_kzalloc
  hwmon: (lineage-pem) Convert to use devm_kzalloc
  hwmon: (hwmon-vid) Fix checkpatch issues
  hwmon: (hwmon-vid) Add new entries to VRM model table
  hwmon: (lm80) Add detection of NatSemi/TI LM96080
  ...
2012-03-21 10:37:25 -07:00
Linus Torvalds 69a7aebcf0 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree from Jiri Kosina:
 "It's indeed trivial -- mostly documentation updates and a bunch of
  typo fixes from Masanari.

  There are also several linux/version.h include removals from Jesper."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (101 commits)
  kcore: fix spelling in read_kcore() comment
  constify struct pci_dev * in obvious cases
  Revert "char: Fix typo in viotape.c"
  init: fix wording error in mm_init comment
  usb: gadget: Kconfig: fix typo for 'different'
  Revert "power, max8998: Include linux/module.h just once in drivers/power/max8998_charger.c"
  writeback: fix fn name in writeback_inodes_sb_nr_if_idle() comment header
  writeback: fix typo in the writeback_control comment
  Documentation: Fix multiple typo in Documentation
  tpm_tis: fix tis_lock with respect to RCU
  Revert "media: Fix typo in mixer_drv.c and hdmi_drv.c"
  Doc: Update numastat.txt
  qla4xxx: Add missing spaces to error messages
  compiler.h: Fix typo
  security: struct security_operations kerneldoc fix
  Documentation: broken URL in libata.tmpl
  Documentation: broken URL in filesystems.tmpl
  mtd: simplify return logic in do_map_probe()
  mm: fix comment typo of truncate_inode_pages_range
  power: bq27x00: Fix typos in comment
  ...
2012-03-20 21:12:50 -07:00
Linus Torvalds 4a52246302 driver core merge for 3.4-rc1
Here's the big driver core merge for 3.4-rc1.
 
 Lots of various things here, sysfs fixes/tweaks (with the nlink breakage
 reverted), dynamic debugging updates, w1 drivers, hyperv driver updates,
 and a variety of other bits and pieces, full information in the
 shortlog.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAk9neCsACgkQMUfUDdst+ylyQwCfY2eizvzw5HhjQs8gOiBRDADe
 yrgAnj1Zan2QkoCnQIFJNAoxqNX9yAhd
 =biH6
 -----END PGP SIGNATURE-----

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

Pull driver core patches for 3.4-rc1 from Greg KH:
 "Here's the big driver core merge for 3.4-rc1.

  Lots of various things here, sysfs fixes/tweaks (with the nlink
  breakage reverted), dynamic debugging updates, w1 drivers, hyperv
  driver updates, and a variety of other bits and pieces, full
  information in the shortlog."

* tag 'driver-core-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (78 commits)
  Tools: hv: Support enumeration from all the pools
  Tools: hv: Fully support the new KVP verbs in the user level daemon
  Drivers: hv: Support the newly introduced KVP messages in the driver
  Drivers: hv: Add new message types to enhance KVP
  regulator: Support driver probe deferral
  Revert "sysfs: Kill nlink counting."
  uevent: send events in correct order according to seqnum (v3)
  driver core: minor comment formatting cleanups
  driver core: move the deferred probe pointer into the private area
  drivercore: Add driver probe deferral mechanism
  DS2781 Maxim Stand-Alone Fuel Gauge battery and w1 slave drivers
  w1_bq27000: Only one thread can access the bq27000 at a time.
  w1_bq27000 - remove w1_bq27000_write
  w1_bq27000: remove unnecessary NULL test.
  sysfs: Fix memory leak in sysfs_sd_setsecdata().
  intel_idle: Revert change of auto_demotion_disable_flags for Nehalem
  w1: Fix w1_bq27000
  driver-core: documentation: fix up Greg's email address
  powernow-k6: Really enable auto-loading
  powernow-k7: Fix CPU family number
  ...
2012-03-20 11:16:20 -07:00
Hans de Goede 312869ec93 hwmon: (sch56xx) Add support for the integrated watchdog (v2)
Add support for the watchdog integrated into the SMSC SCH5627 and
SCH5636 superio-s. Since the watchdog is part of the hwmon logical device
and thus shares ioports with it, the watchdog driver is integrated into the
existing hwmon drivers for these.

Note that this version of the watchdog support for sch56xx superio-s
implements the watchdog chardev interface itself, rather then relying on
the recently added watchdog core / watchdog_dev. This is done because
currently some needed functionality is missing from watchdog_dev, as soon
as this functionality is added (which is being discussed on the
linux-watchdog mailinglist), I'll convert this driver over to using
watchdog_dev.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[guenter.roeck@ericsson.com: Added missing linux/slab.h include]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-20 06:42:05 -07:00
Guenter Roeck 840e191dba hwmon: (w83627ehf) Add support for temperature offset registers
Add support for temperature offset registers for CPUTIN, SYSTIN,
and AUXTIN temperatures.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:54 -07:00
Guenter Roeck 86dda17634 hwmon: (jc42) Remove unnecessary device IDs
We don't really use or need separate device IDs for the various JC42.4 compliant
chips, so remove them and just stick with jc42.

Also update a datasheet references for SE98A, STTS424, and STTS424E02.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:53 -07:00
Guenter Roeck 3360a106f8 hwmon: (zl6100) Add support for ZL9101M and ZL9117M
ZL9101M and ZL9117M are compatible to ZL6100. Add support to the zl6100 driver.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:53 -07:00
Guenter Roeck 9271126966 hwmon: (adm1275) Add support for ADM1075
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:52 -07:00
Guenter Roeck 590defe59e hwmon: (max34440) Add support for MAX34446
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:52 -07:00
Guenter Roeck 60b873e332 hwmon: (pmbus) Add more virtual registers
Add PMBUS_VIRT_READ_TEMP_AVG, PMBUS_VIRT_READ_TEMP2_AVG,
PMBUS_VIRT_READ_POUT_AVG, PMBUS_VIRT_READ_POUT_MAX,
and PMBUS_VIRT_RESET_POUT_HISTORY.

We'll need those for MAX34446.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:51 -07:00
Guenter Roeck 216334094a hwmon: (pmbus) Add support for Lineage Power MDT040
MDT040 is supported by the generic PMBus driver. Add device ID and reference to
datasheet. Also mention Lineage Power device support in Kconfig.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:50 -07:00
Guenter Roeck c5f35c9d82 hwmon: (pmbus) Add support for TI TPS40400 and TPS40422
TPS40400 and TPS40422 are supported by the generic PMBus driver.
Add device IDs and data sheet references.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:50 -07:00
Guenter Roeck 56aad5d143 hwmon: (max34440) Add support for 'lowest' output voltage attribute
MAX34440 and compatibles support reporting the lowest measured output voltage.
Add support for it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:49 -07:00
Guenter Roeck f15df57ded hwmon: (jc42) Convert to use devm_kzalloc
Marginally less code and eliminate the possibility of memory leaks.
Also replace new_client variable with client and introduce dev variable to make
the code a bit easier to read.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:48 -07:00
Guenter Roeck 918ddef35f hwmon: (max16065) Convert to use devm_kzalloc
Marginally less code and eliminate the possibility of memory leaks.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:48 -07:00
Guenter Roeck b8a5a7cebd hwmon: (smm665) Convert to use devm_kzalloc
Marginally less code and eliminate the possibility of memory leaks.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:47 -07:00
Guenter Roeck 3683928720 hwmon: (ltc4261) Convert to use devm_kzalloc
Marginally less code and eliminate the possibility of memory leaks.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:46 -07:00
Guenter Roeck dd285ad737 hwmon: (pmbus) Simplify remove functions
Since devm_kzalloc() is now used to allocate driver memory, the client
driver remove function has no purpose other than to call pmbus_do_remove().
This means we can get rid of it by redefining pmbus_do_remove() to use the
same prototype, and pointing to it directly.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:46 -07:00
Guenter Roeck 8b313ca7f1 hwmon: (pmbus) Convert pmbus drivers to use devm_kzalloc
Marginally less code and eliminate the possibility of memory leaks.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:45 -07:00
Guenter Roeck 07404aab52 hwmon: (lineage-pem) Convert to use devm_kzalloc
Marginally less code and eliminate the possibility of memory leaks.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:44 -07:00
Guenter Roeck f352df652f hwmon: (hwmon-vid) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: space required before the open parenthesis '('
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

Not fixed (url):
WARNING: line over 80 characters

Not fixed (false positive):
ERROR: Macros with complex values should be enclosed in parenthesis

Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:44 -07:00
Guenter Roeck 3230f7049e hwmon: (hwmon-vid) Add new entries to VRM model table
The VRM model table was missing several Intel CPUs, resulting in wrong VRM table
entries to be used for many recent CPUs. Update it. Also, use values from
struct cpuinfo_x86 to retrieve CPU model information instead of re-calculating
it locally.

Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:43 -07:00
Jean Delvare 9908ad4cd4 hwmon: (lm80) Add detection of NatSemi/TI LM96080
Add detection of the National Semiconductor (now Texas Instruments)
LM96080. It is functionally compatible with the LM80 but detection is
completely different.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:27:43 -07:00
Jean Delvare 0e190b7fa3 hwmon: (lm87) Get rid of macro-generated functions
Use SENSORS_DEVICE_ATTR instead of DEVICE_ATTR for most attributes,
so that the attribute number can be retrieved and it is no longer
necessary to generate functions using macros.

This shaves about 2 kB on the binary module size.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:27:42 -07:00
Jean Delvare 8652a2642c hwmon: (lm87) Reorganize the code
Reorder functions and driver declaration to no longer need to
forward-declare functions. Also rename new_client to just client
everywhere for readability.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:27:41 -07:00
Henrik Rydberg 0fc86eca1b hwmon: (applesmc) Silence uninitialized warnings
Some error paths do not set a result, leading to the (false)
assumption that the value may be used uninitialized. Set results for
those paths as well.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:27:41 -07:00
Guenter Roeck 7599d32b13 hwmon: (lm70) Fix: do not use assignment in if condition
Fix checkpatch issue:
ERROR: do not use assignment in if condition

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:40 -07:00
Guenter Roeck e200c14f60 hwmon: (lm70) Register hwmon device after creating attribute files, and remove it first
Register hwmon device as last operation in the probe function to ensure that all
attribute files exist when accessed from user applications. Otherwise, there
is a short time frame where the device is registered as hwmon device but
sysfs attributes do not yet exist. This could result in applications erroneously
not detecting attributes.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:39 -07:00
Guenter Roeck 01d9def5ba hwmon: (w83l786ng) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:39 -07:00
Guenter Roeck 130067d7c6 hwmon: (w83l785ts) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:38 -07:00
Guenter Roeck 795013333b hwmon: (w83781d) Fix: do not use assignment in if condition
Fix checkpatch issue:
ERROR: do not use assignment in if condition

Replace repeated calls to device_create_file() with calls to sysfs_create_group.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:37 -07:00
Guenter Roeck aff6e00ee1 hwmon: (w83781d) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:37 -07:00
Guenter Roeck 2a52dd667d hwmon: (smsc47b397) Fix multi-line comments
Cc: Mark M Hoffman <mhoffman@lightlink.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:36 -07:00
Guenter Roeck 36564efadd hwmon: (pc87427) Fix multi-line comments
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:35 -07:00
Guenter Roeck b6707b78ff hwmon: (max1668) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:35 -07:00
Guenter Roeck 1160631b10 hwmon: (lm80) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:34 -07:00
Guenter Roeck bf0f3a0430 hwmon: (emc2103) Fix multi-line comments
Cc: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:33 -07:00