1
0
Fork 0
Commit Graph

447 Commits (e1868b9e36d0ca52e4e7c6c06953f191446e44df)

Author SHA1 Message Date
Sudeep Holla b23688aefb hwmon: add support for sensors exported via ARM SCMI
Create a driver to add support for SoC sensors exported by the System
Control Processor (SCP) via the System Control and Management Interface
(SCMI). The supported sensor types is one of voltage, temperature,
current, and power.

The sensor labels and values provided by the SCP are exported via the
hwmon sysfs interface.

Cc: linux-hwmon@vger.kernel.org
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2018-02-28 16:37:57 +00:00
Guenter Roeck 6335d98abd hwmon: Drop unnecessary 'default n' from Kconfig
'default n' is default, so there is no need to specify it explicitly.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-01-02 15:05:34 -08:00
Lei YU ee249f2715 hwmon: Add W83773G driver
Nuvoton W83773G is a hardware monitor IC providing one local
temperature and two remote temperature sensors.

Signed-off-by: Lei YU <mine260309@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2018-01-02 15:05:34 -08:00
Linus Walleij a9b4c8afcd hwmon: (gpio-fan) Mandate OF_GPIO and cut pdata path
We have no users of platform data, we made platform data driver-local,
so cut all #ifdefs for the platform data case, and depend on the
Kconfig CONFIG_OF_GPIO symbol.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-10-29 18:36:03 -07:00
Vadim Pasternak 92b64580f1 hwmon: (max6621) Add support for Maxim MAX6621 temperature sensor
MAX6621 is a PECI-to-I2C translator provides an efficient, low-cost
solution for PECI-to-SMBus/I2C protocol conversion. It allows reading the
temperature from the PECI-compliant host directly from up to four
PECI-enabled CPUs.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-10-29 18:36:03 -07:00
Florian Eckert 7074d0a927 hwmon: (ltq-cputemp) add cpu temp sensor driver
Add the lantiq cpu temperature sensor support for xrx200.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-09-01 07:24:14 -07:00
Arnd Bergmann d5553c2619 hwmon: (aspeed-pwm) add THERMAL dependency
With CONFIG_THERMAL=m, a built-in aspeed pwm tacho driver causes
a link error:

drivers/hwmon/aspeed-pwm-tacho.o: In function `aspeed_pwm_tacho_probe':
aspeed-pwm-tacho.c:(.text+0x7f0): undefined reference to `thermal_of_cooling_device_register'

This adds a dependency similar to what other hwmon drivers use,
ensuring that the aspeed driver cannot be built-in in this
case but has to be a module. With THERMAL=n, we still allow building it.

Fixes: 2d7a548a3e ("drivers: hwmon: Support for ASPEED PWM/Fan tach")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-08-15 07:54:34 -07:00
Guenter Roeck 08fd5e76c2 hwmon: (aspeed-pwm-tacho) Select REGMAP
The driver uses regmap and thus has to select it to avoid build
errors such as the following.

drivers/hwmon/aspeed-pwm-tacho.c:337:21: error: variable
	'aspeed_pwm_tacho_regmap_config' has initializer but incomplete type

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Acked-by: Joel Stanley <joel@jms.id.au>
Fixes: 2d7a548a3e ("drivers: hwmon: Support for ASPEED PWM/Fan tach")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-05-30 15:15:19 -07:00
Sebastian Reichel 09d9d82745 hwmon: (twl4030-madc) drop driver
This driver is no longer needed:

 * It has no mainline users
 * It has no DT support and OMAP is DT only
 * iio-hwmon can be used for madc, which also works with DT

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-30 11:45:31 -07:00
Jaghathiswari Rankappagounder Natarajan 2d7a548a3e drivers: hwmon: Support for ASPEED PWM/Fan tach
The ASPEED AST2400/2500 PWM controller supports 8 PWM output ports.
The ASPEED AST2400/2500 Fan tach controller supports 16 tachometer
inputs.
The device driver matches on the device tree node. The configuration
values are read from the device tree and written to the respective
registers.
The driver provides a sysfs entries through which the user can
configure the duty-cycle value (ranging from 0 to 100 percent) and read
the fan tach rpm value.

Signed-off-by: Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-10 13:12:18 -07:00
andrea.merello 7f07ec0fa1 hwmon: new driver for ST stts751 thermal sensor
This patch adds a HWMON driver for ST Microelectronics STTS751
temperature sensors.

Thanks-to: LABBE Corentin [for suggestions]
Thanks-to: Guenter Roeck [for suggestion and discussions]
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Cc: LABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-02-03 05:32:59 -08:00
John Muir 66e1c91713 hwmon: Add Texas Instruments TMP108 temperature sensor driver.
Add support for the TI TMP108 temperature sensor with some device
configuration parameters.

Signed-off-by: John Muir <john@jmuir.com>
[groeck: Initialize of_match_table]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-12-09 21:54:25 -08:00
Tobias Klauser a2a0c3c57a hwmon: (lm90) Mention support for TI TMP451 in Kconfig description
The lm90 driver also supports the Texas Instruments TMP451 sensor chip.
Since the Kconfig description for the driver includes a list of all
compatible chips, mention the TI TMP451 there as well.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-12-09 21:54:14 -08:00
Chris Packham aaf6fabf1b hwmon: Add tc654 driver
Add support for the tc654 and tc655 fan controllers from Microchip.

http://ww1.microchip.com/downloads/en/DeviceDoc/20001734C.pdf

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Acked-by: Rob Herring <robh@kernel.org>
[groeck: Fixed continuation line alignments]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-12-02 13:28:05 -08:00
Axel Lin ca05ab20f1 hwmon: (lm95245) Select REGMAP_I2C
This driver now uses regmap APIs, so it needs to select REGMAP_I2C.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-09-13 07:27:34 -07:00
Guenter Roeck 0208531d90 hwmon: (tmp102) Convert to use new hwmon registration API
Simplify code and reduce code size by using the new hwmon
registration API.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-09-08 21:34:17 -07:00
Guenter Roeck 08b0243381 hwmon: (lm75) Convert to use new hwmon registration API
Simplify code and reduce code size by using the new hwmon
registration API.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-09-08 21:34:17 -07:00
hotran ed42cfa881 hwmon: Add xgene hwmon driver
This patch adds hardware temperature and power reading support for
APM X-Gene SoC using the mailbox communication interface.

Signed-off-by: Hoan Tran <hotran@apm.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-09-08 21:34:16 -07:00
Thilo Cestonaro 08426eda58 hwmon: Add driver for FTS BMC chip "Teutates"
This driver implements hardware monitoring and watchdog support
for the FTS BMC Chip "Teutates".

Signed-off-by: Thilo Cestonaro <thilo@cestona.ro>
[groeck: Updated subject and description; fixed dependencies]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-07-20 06:29:54 -07:00
Guenter Roeck 28a340db90 hwmon: (tmp102) Convert to use regmap, and drop local cache
By converting the driver to regmap, we can use regmap to cache non-volatile
registers. Stop caching the temperature register; while potentially reading
it more often can result in reading it more often than necessary, this is
offset by the gain due to not re-reading the limit registers.

A positive side effect of this change is that limit registers can now be
read and updated before the first temperature conversion is complete.

Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-07-12 14:24:14 -07:00
Guenter Roeck e65365fed8 hwmon: (lm75) Convert to use regmap
Convert to use regmap. Leave caching to regmap and drop the register
update function. While this can result in additional read operations
if the temperature register is read continuously, it avoids re-reading
the limit registers and thus overall reduces complexity.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-07-09 08:33:47 -07:00
Alison Schofield a31887dc9b hwmon: (jc42) Add support for Microchip MCP9808 temperature sensor
MCP9808 is not officially compliant to JC-42, similar to MCP9804,
but its registers are compatible to JC-42.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-06-27 18:58:04 -07:00
Andrew F. Davis 7cb6dcff19 hwmon: Add support for INA3221 Triple Current/Voltage Monitors
Add support for the the INA3221 26v capable, Triple channel,
Bi-Directional, Zero-Drift, Low-/High-Side, Current/Voltage Monitor
with I2C interface.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-06-27 18:58:03 -07:00
Andrew F. Davis c0a6860180 hwmon: (tmp401) Add support for TI TMP461
Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-06-27 18:58:03 -07:00
David Frey 7c84f7f80d hwmon: add support for Sensirion SHT3x sensors
This driver implements support for the Sensirion SHT3x-DIS chip,
a humidity and temperature sensor. Temperature is measured
in degrees celsius, relative humidity is expressed as a percentage.
In the sysfs interface, all values are scaled by 1000,
i.e. the value for 31.5 degrees celsius is 31500.

Signed-off-by: Pascal Sachs <pascal.sachs@sensirion.com>
[groeck: Fixed 'Variable length array is used' gcc warning]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-06-27 18:58:03 -07:00
Guenter Roeck 71a9c23246 hwmon: (it87) Add support for IT8628E
IT8628E is functionally identical to IT8620E.

Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-04-19 06:32:38 -07:00
Huang Rui 3ba4e38415 hwmon: (fam15h_power) Add CPU_SUP_AMD as the dependence
This patch adds CONFIG_CPU_SUP_AMD as the dependence of fam15h_power
driver. Because the following patch will use the interface from
x86/kernel/cpu/amd.c.

Otherwise, the below error might be encountered:

All errors (new ones prefixed by >>):

   drivers/built-in.o: In function `fam15h_power_probe':
>> fam15h_power.c:(.text+0x26e3a3): undefined reference to
>> `amd_get_cores_per_cu'
   fam15h_power.c:(.text+0x26e41e): undefined reference to
`amd_get_cores_per_cu'

Reported-by: build test robot <lkp@intel.com>
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-04-19 06:32:34 -07:00
Tiberiu Breana 04e1e70afe hwmon: (max31722) Add support for MAX31722/MAX31723 temperature sensors
Add basic support for the Maxim Integrated MAX31722/MAX31723 SPI
temperature sensors / thermostats.

Includes:
    - ACPI support;
    - raw temperature readings;
    - power management

Datasheet:
https://datasheets.maximintegrated.com/en/ds/MAX31722-MAX31723.pdf

Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-04-19 06:32:34 -07:00
Adam Baker 630300d5fc hwmon: Create an NSA320 hardware monitoring driver
Create a driver to support the hardware monitoring chip present in
the Zyxel NSA320 and some of the other Zyxel NAS devices.

The driver reads fan speed and temperature from a suitably
pre-programmed MCU on the device.

Signed-off-by: Adam Baker <linux@baker-net.org.uk>
[groeck: Dropped .owner field initialization]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-03-08 18:40:49 -08:00
Joseph McNally 54ce3a0d80 hwmon: (ntc_thermistor) Add support for ncpXXxh103
This patch adds support for the Murata NCP15XH103 thermistor series.

Signed-off-by: Joseph McNally <jmcna06@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-03-05 06:25:34 -08:00
Mike Looijmans df92270357 hwmon: Add LTC2990 sensor driver
This adds support for the Linear Technology LTC2990  I2C System Monitor.
The LTC2990 supports a combination of voltage, current and temperature
monitoring. This driver currently only supports reading two currents
by measuring two differential voltages across series resistors, in
addition to the Vcc supply voltage and internal temperature.

This is sufficient to support the Topic Miami SOM which uses this chip
to monitor the currents flowing into the FPGA and the CPU parts.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-03-05 06:25:34 -08:00
Guenter Roeck 2ff44072e3 hwmon: (htu21) Remove driver
HTU21 is now supported by IIO, and can be instantiated as hwmon driver
using the iio-hwmon bridge. An explicit hwmon driver is no longer needed.

Cc: William Markezana <william.markezana@meas-spec.com>
Cc: Ludovic Tancerel <ludovic.tancerel@maplehightech.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-12-18 08:20:59 -08:00
Arnd Bergmann a3a316cfc4 hwmon: (sht15) Select CONFIG_BITREVERSE
If CONFIG_BITREVERSE is not built-in, the sht15 driver fails to link:

drivers/built-in.o: In function `sht15_crc8':
drivers/hwmon/sht15.c:195: undefined reference to `byte_rev_table'

This adds a Kconfig 'select' statement, like all other users of
bitrev.h have it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 33836ee985 ("hwmon:change sht15_reverse()")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-12-18 08:19:52 -08:00
Arnd Bergmann d42d5b6f72 hwmon: (scpi) add thermal-of dependency
The newly added scpi thermal support is broken when the scpi driver
is built-in but the thermal driver is a loadable module:

drivers/built-in.o: In function `scpi_hwmon_probe':
(.text+0x444d70): undefined reference to `thermal_zone_of_sensor_unregister'
(.text+0x444d94): undefined reference to `thermal_zone_of_sensor_register'
drivers/built-in.o: In function `scpi_hwmon_remove':
(text+0x444e6c): undefined reference to `thermal_zone_of_sensor_unregister'

This uses the same Kconfig trick that we have in a couple of other
drivers already to ensure we can only select the driver in valid
configurations when either THERMAL_OF is disabled, or when with a
dependency on CONFIG_THERMAL that can force SCPI to be a loadable
module in the case I was hitting.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 68acc77a2d ("hwmon: Support thermal zones registration for SCP temperature sensors")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-11-16 09:54:45 -08:00
Li Yang 92e11f002c hwmon: (ina2xx) Fix build issue by selecting REGMAP_I2C
Since a0de56c81f ("hwmon: (ina2xx) convert driver to using regmap")
the driver requires REGMAP_I2C to build.  Select it by default
in Kconfig.

Reported-by: Guo Chunrong <B40290@freescale.com>
Cc: Marc Titinger <mtitinger@baylibre.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Fixes: a0de56c81f ("hwmon: (ina2xx) convert driver to using regmap")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-11-15 21:52:39 -08:00
Linus Torvalds b44a3d2a85 ARM: SoC driver updates for v4.4
As we've enabled multiplatform kernels on ARM, and greatly done away with
 the contents under arch/arm/mach-*, there's still need for SoC-related
 drivers to go somewhere.
 
 Many of them go in through other driver trees, but we still have
 drivers/soc to hold some of the "doesn't fit anywhere" lowlevel code
 that might be shared between ARM and ARM64 (or just in general makes
 sense to not have under the architecture directory).
 
 This branch contains mostly such code:
 
 - Drivers for qualcomm SoCs for SMEM, SMD and SMD-RPM, used to communicate
   with power management blocks on these SoCs for use by clock, regulator and
   bus frequency drivers.
 - Allwinner Reduced Serial Bus driver, again used to communicate with PMICs.
 - Drivers for ARM's SCPI (System Control Processor). Not to be confused with
   PSCI (Power State Coordination Interface). SCPI is used to communicate with
   the assistant embedded cores doing power management, and we have yet to see
   how many of them will implement this for their hardware vs abstracting in
   other ways (or not at all like in the past).
 - To make confusion between SCPI and PSCI more likely, this release also
   includes an update of PSCI to interface version 1.0.
 - Rockchip support for power domains.
 - A driver to talk to the firmware on Raspberry Pi.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWQC+cAAoJEIwa5zzehBx3jEUP/0GpxfDVanEUkudVLLe7J0RH
 CNlRan107Cw6hXRUJo7elEsuCALjccXjc1CAH4+RnNpOAeBKW97n+WU7trTv+wUZ
 sQX4SkBPKFBlgwGF2qhsi5q74gms/BrgtCa4kNb9joOYso039tlfIOPzK80DMkOm
 TkyIJdUCgFJMjCQLhX6kGT0PDcrbIjb6aA2cF3FAVeaJA7uz8lNe/eHJr3oHxIEY
 CvC651yJ2mIHQUU4BJx/AJo+wXg3dRUXNCAtBjwLRPEAzduYZXYm1ZTVIby/1q9r
 dR2KDFEuibODXmXrDBzKNJwCu/TLJEwo/1oPaEIVfY91XLKfiWUhgVqa1o1I+d9U
 XoGPibCW461qFahjQW87MfInALpCOA7/RbTNjFp+MVyipCYvkaYq7KFiYEldgFDx
 z4Qx/J4hYc2TlDWrpNiUCZMfmhwi7y+Ib+tnenYTO1eyMuw0e9mfnVdjk5iU3Pvk
 Ye4qPqpYclJruyHbYi164878+1lLaW2NCUgC3rkBO/GWPAzp7d9iLWoZ3PuyD5i5
 PEjs668UcRdZYbI4rdrhGHL8Eq9Gnuc4Rthu7HxPOK+DG0XgP8r97PhM8aYGYVDO
 +yikBtjWRsA9fPj3rMKA3UsQ61DAeR9LmZ0XPGjWFMCjCG0JlUoIMaA+Uu0i8fr8
 95qxBVxbO7rhL39r1rhV
 =dm+I
 -----END PGP SIGNATURE-----

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

Pull ARM SoC driver updates from Olof Johansson:
 "As we've enabled multiplatform kernels on ARM, and greatly done away
  with the contents under arch/arm/mach-*, there's still need for
  SoC-related drivers to go somewhere.

  Many of them go in through other driver trees, but we still have
  drivers/soc to hold some of the "doesn't fit anywhere" lowlevel code
  that might be shared between ARM and ARM64 (or just in general makes
  sense to not have under the architecture directory).

  This branch contains mostly such code:

   - Drivers for qualcomm SoCs for SMEM, SMD and SMD-RPM, used to
     communicate with power management blocks on these SoCs for use by
     clock, regulator and bus frequency drivers.

   - Allwinner Reduced Serial Bus driver, again used to communicate with
     PMICs.

   - Drivers for ARM's SCPI (System Control Processor).  Not to be
     confused with PSCI (Power State Coordination Interface).  SCPI is
     used to communicate with the assistant embedded cores doing power
     management, and we have yet to see how many of them will implement
     this for their hardware vs abstracting in other ways (or not at all
     like in the past).

   - To make confusion between SCPI and PSCI more likely, this release
     also includes an update of PSCI to interface version 1.0.

   - Rockchip support for power domains.

   - A driver to talk to the firmware on Raspberry Pi"

* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (57 commits)
  soc: qcom: smd-rpm: Correct size of outgoing message
  bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus
  bus: sunxi-rsb: Add Allwinner Reduced Serial Bus (RSB) controller bindings
  ARM: bcm2835: add mutual inclusion protection
  drivers: psci: make PSCI 1.0 functions initialization version dependent
  dt-bindings: Correct paths in Rockchip power domains binding document
  soc: rockchip: power-domain: don't try to print the clock name in error case
  soc: qcom/smem: add HWSPINLOCK dependency
  clk: berlin: add cpuclk
  ARM: berlin: dts: add CLKID_CPU for BG2Q
  ARM: bcm2835: Add the Raspberry Pi firmware driver
  soc: qcom: smem: Move RPM message ram out of smem DT node
  soc: qcom: smd-rpm: Correct the active vs sleep state flagging
  soc: qcom: smd: delete unneeded of_node_put
  firmware: qcom-scm: build for correct architecture level
  soc: qcom: smd: Correct SMEM items for upper channels
  qcom-scm: add missing prototype for qcom_scm_is_available()
  qcom-scm: fix endianess issue in __qcom_scm_is_call_available
  soc: qcom: smd: Reject send of too big packets
  soc: qcom: smd: Handle big endian CPUs
  ...
2015-11-10 15:00:03 -08:00
Arnd Bergmann c049adc9fd ARM System Control and Power Interface(SCPI) support
It adds support for the following features provided by SCP firmware
 using different subsystems in Linux:
   1. SCPI mailbox protocol driver which using mailbox framework
   2. Clocks provided by SCP using clock framework
   3. CPU DVFS(cpufreq) using existing arm-big-little driver
   4. SCPI based sensors including temperature sensors
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJWF7ifAAoJEABBurwxfuKYAfMP/34ka/n4+U/aPQXzStNIwr3v
 Nme9WSf3mUPv26MstRDrWRYi1G2WLOTlc196MpdIt6m6QLOjxzEl3tSq5ILrj7yN
 KoLojtISmu/pbhVcJN5fllxgpcJzufLoEWBa5T/Y/4GoIhh1NCYa82QpNgzPmsMd
 rPCkYHqwT6I3sIS+/mbDkGA/QnwJ2qtJ8sp3+fL+dyJbI7Aa1zJZP6ectPsxK22+
 HFoFTY45rdFv/ojZZFZL8E/gcblYwRWKzIgwdASHuDXxIhd/IPwjrex2Iyv75AQK
 zusRQ5Xv82GaYWHVa9GXmZqXkTsvBg4AJwc4Uq2JdB0qOi2a4tc8PkK7Ts5YdHgS
 YVGxbY1POtMBi2bJUjsviMY7dGR3I+iEXJTYnbPnkVa+GTv8/FViVmOOLQnnBF4R
 fN5FN0vfuL6zaQzOPYLGx3SuEHix3ko2DCAcMg6idIxuBHArlJuS7XKECWdHuc0+
 +qn6Iqf8YSKIZ1zrWMggqY/sXuxjtABUBXe3jP3iTKQh8h+9SLfN3wgQM4GFJJcB
 gNfvk3Hl5aPFy/7gsgSDlaYbhGKPwTup+R8Fqd6nSBQO+rpRXvQQftwigYQiIEcE
 IiOS3BntVQWjoVr9WIifguf6rHG1ZoSMTHdtVVEaqsspT/OGJyq/ynEFJYSFqcqX
 NRPdQJNuoXGolGhyoWxD
 =9u+p
 -----END PGP SIGNATURE-----

Merge tag 'arm-scpi-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/drivers

Merge "ARM System Control and Power Interface(SCPI) support" from Sudeep Holla

It adds support for the following features provided by SCP firmware
using different subsystems in Linux:
  1. SCPI mailbox protocol driver which using mailbox framework
  2. Clocks provided by SCP using clock framework
  3. CPU DVFS(cpufreq) using existing arm-big-little driver
  4. SCPI based sensors including temperature sensors

* tag 'arm-scpi-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  hwmon: Support thermal zones registration for SCP temperature sensors
  hwmon: Support sensors exported via ARM SCP interface
  firmware: arm_scpi: Extend to support sensors
  Documentation: add DT bindings for ARM SCPI sensors
  cpufreq: arm_big_little: add SCPI interface driver
  clk: scpi: add support for cpufreq virtual device
  clk: add support for clocks provided by SCP(System Control Processor)
  firmware: add support for ARM System Control and Power Interface(SCPI) protocol
  Documentation: add DT binding for ARM System Control and Power Interface(SCPI) protocol
2015-10-14 17:07:32 +02:00
Il Han 195a4b4298 hwmon: Driver for Maxim MAX31790
The driver supports the Maxim MAX31790.

Signed-off-by: Il Han <corone.il.han@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-10-14 07:57:14 -07:00
Punit Agrawal ea98b29a05 hwmon: Support sensors exported via ARM SCP interface
Create a driver to add support for SoC sensors exported by the System
Control Processor (SCP) via the System Control and Power Interface
(SCPI). The supported sensor types is one of voltage, temperature,
current, and power.

The sensor labels and values provided by the SCP are exported via the
hwmon sysfs interface.

Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Cc: Sudeep Holla <sudeep.holla@arm.com>
2015-10-09 11:05:52 +01:00
Guenter Roeck cd1faefa66 hwmon: (nct6775) Add support for NCT6793D
NCT6793D is register compatible with NCT6792D.

Also move nct6775_sio_names[] closer to enum kinds to simplify
adding new chips.

Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-09-12 19:43:02 -07:00
Justin Maggard ead8080351 hwmon: (it87) Add support for IT8732F
Add support for the IT8732F.  This chip is pretty similar to IT8721F,
with the main difference being that the ADC LSB is 10.9 mV instead of
12 mV.

Signed-off-by: Justin Maggard <jmaggard@netgear.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-09 13:44:27 -07:00
Linus Torvalds d87823813f Char/Misc driver patches for 4.2-rc1
Here's the big char/misc driver pull request for 4.2-rc1.
 
 Lots of mei, extcon, coresight, uio, mic, and other driver updates in
 here.  Full details in the shortlog.  All of these have been in
 linux-next for some time with no reported problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlWNn0gACgkQMUfUDdst+ykCCQCgvdF4F2+Hy9+RATdk22ak1uq1
 JDMAoJTf4oyaIEdaiOKfEIWg9MasS42B
 =H5wD
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver updates from Greg KH:
 "Here's the big char/misc driver pull request for 4.2-rc1.

  Lots of mei, extcon, coresight, uio, mic, and other driver updates in
  here.  Full details in the shortlog.  All of these have been in
  linux-next for some time with no reported problems"

* tag 'char-misc-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (176 commits)
  mei: me: wait for power gating exit confirmation
  mei: reset flow control on the last client disconnection
  MAINTAINERS: mei: add mei_cl_bus.h to maintained file list
  misc: sram: sort and clean up included headers
  misc: sram: move reserved block logic out of probe function
  misc: sram: add private struct device and virt_base members
  misc: sram: report correct SRAM pool size
  misc: sram: bump error message level on unclean driver unbinding
  misc: sram: fix device node reference leak on error
  misc: sram: fix enabled clock leak on error path
  misc: mic: Fix reported static checker warning
  misc: mic: Fix randconfig build error by including errno.h
  uio: pruss: Drop depends on ARCH_DAVINCI_DA850 from config
  uio: pruss: Add CONFIG_HAS_IOMEM dependence
  uio: pruss: Include <linux/sizes.h>
  extcon: Redefine the unique id of supported external connectors without 'enum extcon' type
  char:xilinx_hwicap:buffer_icap - change 1/0 to true/false for bool type variable in function buffer_icap_set_configuration().
  Drivers: hv: vmbus: Allocate ring buffer memory in NUMA aware fashion
  parport: check exclusive access before register
  w1: use correct lock on error in w1_seq_show()
  ...
2015-06-26 14:51:15 -07:00
Maciej S. Szmigiero 761c1770f2 hwmon: add driver for Microchip TC74
Add hwmon driver for the Microchip TC74.

The TC74 is a single-input 8-bit I2C temperature sensor,
with +-2 degrees centigrade accuracy.

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-06-21 22:54:53 -07:00
Geert Uytterhoeven 1376e2c3d7 hwmon: Allow compile test of GPIO consumers if !GPIOLIB
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
functionality only, can still be compiled if GPIOLIB is not enabled.

Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
appropriate.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jean Delvare <jdelvare@suse.de>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: lm-sensors@lm-sensors.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-05-31 22:58:36 -07:00
Beomho Seo 887ee43477 hwmon: (ntc_thermistor) Add support for ncpXXwf104
This patch adds support for the ntc thermistor NCPXXWF104 series.

Cc: Jean Delvare <jdelvare@suse.de>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-05-31 22:58:36 -07:00
Pali Rohár 039ae58503 hwmon: Allow to compile dell-smm-hwmon driver without /proc/i8k
This patch splits CONFIG_I8K compile option to SENSORS_DELL_SMM and CONFIG_I8K.
Option SENSORS_DELL_SMM is now used to enable compilation of dell-smm-hwmon
driver and old CONFIG_I8K option to enable /proc/i8k interface in driver.

So this change allows to compile dell-smm-hwmon driver without legacy /proc/i8k
interface which is needed only for old Dell Inspirion models or for userspace
i8kutils package.

For backward compatibility when CONFIG_I8K is enabled then also SENSORS_DELL_SMM
is enabled and so driver dell-smm-hwmon (with /proc/i8k) is compiled.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 12:48:12 -07:00
Guenter Roeck 3ba9d977a9 hwmon: (it87) Add support for IT8620E
IT8620E is mostly compatible to IT7828F. Add generic support for it.

IT8620E supports up to 6 fan tachometers and 6 pwm controls.
Support for the 6th tachometer and for the additional pwm controls
are addded in separate patches.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-04-05 06:01:00 -07:00
Guenter Roeck 4ee07157d6 hwmon: (it87) Add support for IT8790E
IT8790E is a super-IO chip with three fan tachometers. It is mostly
compatible to IT8728F, but only supports three fan tachometers
instead of five.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-04-05 06:00:59 -07:00
Randy Dunlap f6906edeac hwmon: (gpio-fan) Fix build with CONFIG_THERMAL=m and SENSORS_GPIO_FAN=y
Fix build error when CONFIG_THERMAL=m and SENSORS_GPIO_FAN=y
by preventing that combination.

Fixes these build errors:

drivers/built-in.o: In function `gpio_fan_remove':
gpio-fan.c:(.text+0x21e97e): undefined reference to `thermal_cooling_device_unregister'
drivers/built-in.o: In function `gpio_fan_probe':
gpio-fan.c:(.text+0x21efbc): undefined reference to `thermal_cooling_device_register'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc:	Jean Delvare <jdelvare@suse.de>
Cc:	Guenter Roeck <linux@roeck-us.net>
Cc:	lm-sensors@lm-sensors.org
Cc:	Simon Guinot <sguinot@lacie.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-03-10 19:13:15 -07:00
Randy Dunlap 18fd303fea hwmon: (pwm-fan) Fix build when THERMAL=m
Fix build errors when CONFIG_THERMAL=m and SENSORS_PWM_FAN=y
by restricting SENSORS_PWM_FAN to 'm' when THERMAL=m.

drivers/built-in.o: In function `pwm_fan_remove':
pwm-fan.c:(.text+0x22ba58): undefined reference to `thermal_cooling_device_unregister'
drivers/built-in.o: In function `pwm_fan_probe':
pwm-fan.c:(.text+0x22bebb): undefined reference to `thermal_of_cooling_device_register'
pwm-fan.c:(.text+0x22bf11): undefined reference to `thermal_cdev_update'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-03-09 09:59:36 -07:00
Vadim V. Vlasov 9c947d25c9 hwmon: Add Nuvoton NCT7904 hwmon driver
The NCT7904D is a hardware monitor supporting up to 20 voltage sensors,
internal temperature sensor, Intel PECI and AMD SB-TSI CPU temperature
interface, up to 12 fan tachometer inputs, up to 4 fan control channels
with SmartFan.

Signed-off-by: Vadim V. Vlasov <vvlasov@dev.rtsoft.ru>
[Guenter Roeck: Fixed whitespace errors, dropped redundant comment]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-03-09 09:59:36 -07:00
Thomas Lorblanches a0c1424acb hwmon: (it87) Add support for IT8786E
IT8786E is mostly compatible with IT8771 / IT8772.
Parameters determined by testing various combinations.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Thomas Lorblanches <zlika_ese@hotmail.com>
[Guenter Roeck: merged from github, addressed review comments]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-03-09 09:59:36 -07:00
Guenter Roeck 0ea2f1db8e hwmon: (jc42) Add support for additional IDT temperature sensors
TS3000GB0 has a new device ID (0x2913). Since IDT's datasheets suggest
that the upper 8 bit of the device ID reflect the chip ID and the lower
8 bit reflect the version number, modify the code to accept all chips
with ID 0x29xx.

Also add support for TS3001 and TSE2004.

Some of the datasheets for older chips are no longer available from
the IDT web site, so replace explicit links in the documentation with
a generic note.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-03-09 09:59:35 -07:00
Guenter Roeck 7bc32d298b hwmon: (it87) Add support for IT8781F
IT8781F is mostly compatible to IT8782F. Major difference is that it only
supports four instead of six UART channels, and therefore does not share
the uart6 pins.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-03-09 09:59:35 -07:00
Linus Torvalds b11a278397 Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kconfig updates from Michal Marek:
 "Yann E Morin was supposed to take over kconfig maintainership, but
  this hasn't happened.  So I'm sending a few kconfig patches that I
  collected:

   - Fix for missing va_end in kconfig
   - merge_config.sh displays used if given too few arguments
   - s/boolean/bool/ in Kconfig files for consistency, with the plan to
     only support bool in the future"

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kconfig: use va_end to match corresponding va_start
  merge_config.sh: Display usage if given too few arguments
  kconfig: use bool instead of boolean for type definition attributes
2015-02-19 10:36:45 -08:00
Guenter Roeck bea0bab0fc hwmon: (ads2828) Convert to use regmap
Simplify code and reduce code size by using regmap to access i2c registers.

Reviewed-and-Tested-by: Robert Rosengren <robert.rosengren@axis.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-02-02 08:19:58 -08:00
Kevin Hilman add513be1c hwmon: (ina2xx) Add ina231 compatible string
Add support for "ina231" as compatible string, and update
Documentation and Kconfig accordingly.

Tested with the Exynos5422-based odroid-xu3 board which has on-board
INA231 sensors.

Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-01-25 21:23:59 -08:00
Jean Delvare ada072816b hwmon: (i5500_temp) New driver for the Intel 5500/5520/X58 chipsets
The Intel 5500, 5520 and X58 chipsets embed a digital thermal sensor.
This new driver supports it.

Note that on many boards the sensor seems to be disabled and reports
the minimum value (36.5 degrees Celsius) all the time.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Tested-by: Romain Dolbeau <romain@dolbeau.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
2015-01-24 14:16:21 +01:00
Christoph Jaeger 6341e62b21 kconfig: use bool instead of boolean for type definition attributes
Support for keyword 'boolean' will be dropped later on.

No functional change.

Reference: http://lkml.kernel.org/r/cover.1418003065.git.cj@linux.com
Signed-off-by: Christoph Jaeger <cj@linux.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-01-07 13:08:04 +01:00
Patrick Titiano 06adbaec2a hwmon: (tmp401) Add support for TI TMP435
Signed-off-by: Patrick Titiano <ptitiano@baylibre.com>
[Bartosz Golaszewski: prepared for submission, code review fixes]
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
[Guenter Roeck: Merged two patches into one]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-12-04 10:59:42 -08:00
Guenter Roeck dfcd4c53be hwmon: (lm95234) Add support for LM95233
LM95233 is similar to LM95234, but it only supports two
instead of four external temperature sensors.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-12-02 06:11:53 -08:00
Guenter Roeck 162a8dfe73 hwmon: (lm95245) Add support for LM95235
LM95235 is register compatible to LM95245.

Also update link to LM95245 data sheet, and drop the link to the
datasheet from the driver source to simplify code maintenance.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-12-02 03:44:18 -08:00
Guenter Roeck 8aefb93f09 hwmon: (nct6775) Add support for NCT6792D
NCT6792D is similar to NCT6791D. Only beep control and temperature
monitoring registers are different.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-11-30 20:13:13 -08:00
Guenter Roeck 3434f37835 hwmon: Driver for Nuvoton NCT7802Y
NCT7802Y is an I2C based hardware monitoring chip from Nuvoton.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-11-30 20:13:13 -08:00
Guenter Roeck 7ad8966f4f Immutable branch between MFD, HWMON, LEDs and Watchdog for v3.18
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUItc7AAoJEFGvii+H/HdhxTEP/A0Gg35acsBa8JPWUGuTcGTi
 GHDdnDh1sJtJWadKhs+JV9tOX80YY/5OaHr0TKXcb0eAZopqG4G4yyJXmju+rkFn
 sp4nQ4QzM8gNzmVpo6K45xdZw913QQbVcwDThnZwq1xMHVvMT2TFZ+PQLXZ2e2kN
 HRs65Ftw9geNlZ6cLSXPa+fmhbhC90izXRYB/+eSv9LfxJkARVBtRwVkjLnbe52h
 V7gm/sqcdLs4S0Iauv3qPCjmNCtLWjzJsjq+umiEmmwRvWXGHcLWxCSbmrMsi075
 VmMTY1G+ys2OaNo4wpMEx3s2+Cg/dxyMKfuJn3Zz+Wk196v4UaQWFKBfH8IcjcuJ
 zKy9RntFZ6Esut/PeaMlk7nlgkSXOEbQZFcMDhn8LFwL8LzVDUIMtmcIEsfwHfme
 SWGt6lYUkeSC0yxdylYtIvAKVhkSInkg0z7YiChB0eHflBgWsNn4r8v5iGk9yAXu
 keR9sQlXKS2gFbMtZ8e+VgNVqPmapJx+1E1F5/JbjVpiQG+fzsleHi9UF91pyLJL
 IGZM51l2FEMBMuKSNEUy+mcLX4Y/63iEg3fGvv5nX52A0MVrL47ADDJSEoaZoUpg
 Yz3AW/+yYKi5cmcZ7sUirrCHawvfIYGeR1jZjYaIk8lAeqjFHTDzayIXUoOoQfN7
 vi+fRCxYLA/Z/Rnfylmt
 =keMM
 -----END PGP SIGNATURE-----

Merge tag 'mfd-hwmon-leds-watchdog-v3.18' into hwmon-next

Immutable branch between MFD, HWMON, LEDs and Watchdog for v3.18
2014-09-24 09:25:06 -07:00
Andreas Werner 964356938f hwmon: (menf21bmc) Introduce MEN14F021P00 BMC HWMON driver
Added driver to support the 14F021P00 BMC Hardware Monitoring.
The BMC is a Board Management Controller including monitoring of the
board voltages.

Signed-off-by: Andreas Werner <andreas.werner@men.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-09-24 15:36:33 +01:00
Jonghwa Lee c08860ffe5 hwmon: (ntc_thermistor) Add ntc thermistor to thermal subsystem as a sensor.
To get more comprehensive and integrated thermal management, it adds ntc
thermistor to thermal framework as a thermal sensor. It's governed thermal
susbsystem only if it is described in DT node. Otherwise, it just notifies
temperature to userspace via sysfs as it used to be.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-09-22 11:14:52 -07:00
Aravind Gopalakrishnan f89ce2706d hwmon: (k10temp) Add support for F15h M60h
This patch adds temperature monitoring support for F15h M60h processor.
 - Add new pci device id for the relevant processor
 - The functionality of REG_REPORTED_TEMPERATURE is moved to
   D0F0xBC_xD820_0CA4 [Reported Temperature Control]
   - So, use this to get CUR_TEMP value
   - Since we need an indirect register access, protect this with
     a mutex lock
 - Add Kconfig, Doc entries to indicate support for this processor.

Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
Acked-by: Borislav Petkov <bp@suse.de>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
[Guenter Roeck: Declare new mutex and function static]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-09-22 11:14:52 -07:00
Axel Lin dbd1db7d42 hwmon: (pwm-fan) Make SENSORS_PWM_FAN depend on OF
This driver won't instantiate if OF is not configured, thus add OF dependency.
Also add COMPILE_TEST to increase build testing coverage.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04 07:01:40 -07:00
Axel Lin 78313b9542 hwmon: (nct6775) Update module description and Kconfig for NCT6106D and NCT6791D
This driver also supports NCT6106D and NCT6791D, thus update module description
and Kconfig accordingly.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04 07:01:40 -07:00
Kamil Debski d82d57767c hwmon: Add pwm-fan driver
The pwm-fan driver enables control of fans connected to PWM lines.
This driver uses the PWM framework, so it is compatible with all
PWM devices that provide drivers through the PWM framework.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Reviewed-by: Varka Bhadram <varkabhadram@gmail.com>
Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
[Guenter Roeck: Last argument to devm_of_pwm_get is pointer, use NULL]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04 07:01:38 -07:00
Neelesh Gupta 24c1aa8587 hwmon: (powerpc/powernv) hwmon driver for power, fan rpm, voltage and temperature
This patch adds basic kernel support for reading power values, fan
speed rpm, voltage and temperature data on powernv platforms which
will be exported to user space through sysfs interface.

Test results:
-------------
[root@tul163p1 ~]# sensors
ibmpowernv-isa-0000
Adapter: ISA adapter
fan1:        5465 RPM  (min =    0 RPM)
fan2:        5152 RPM  (min =    0 RPM)
fan3:        5521 RPM  (min =    0 RPM)
fan4:        4891 RPM  (min =    0 RPM)
fan5:           0 RPM  (min =    0 RPM)
fan6:           0 RPM  (min =    0 RPM)
fan7:        7480 RPM  (min =    0 RPM)
fan8:        7944 RPM  (min =    0 RPM)
temp1:        +39.0°C  (high =  +0.0°C)
power1:      190.00 W

[root@tul163p1 ~]# ls /sys/devices/platform/
alarmtimer  ibmpowernv.0  power  rtc-generic  serial8250  uevent
[root@tul163p1 ~]# ls /sys/devices/platform/ibmpowernv.0/hwmon/hwmon0/
device	    fan2_min	fan4_min    fan6_min	fan8_min   power
fan1_fault  fan3_fault	fan5_fault  fan7_fault	in1_fault  power1_input
fan1_input  fan3_input	fan5_input  fan7_input	in2_fault  subsystem
fan1_min    fan3_min	fan5_min    fan7_min	in3_fault  temp1_input
fan2_fault  fan4_fault	fan6_fault  fan8_fault	in4_fault  temp1_max
fan2_input  fan4_input	fan6_input  fan8_input	name	   uevent
[root@tul163p1 ~]# ls /sys/class/hwmon/hwmon0/
device	    fan2_min	fan4_min    fan6_min	fan8_min   power
fan1_fault  fan3_fault	fan5_fault  fan7_fault	in1_fault  power1_input
fan1_input  fan3_input	fan5_input  fan7_input	in2_fault  subsystem
fan1_min    fan3_min	fan5_min    fan7_min	in3_fault  temp1_input
fan2_fault  fan4_fault	fan6_fault  fan8_fault	in4_fault  temp1_max
fan2_input  fan4_input	fan6_input  fan8_input	name	   uevent
[root@tul163p1 ~]#

Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04 07:01:38 -07:00
Guenter Roeck 05c77ab240 hwmon: (tmp421) Add support for TMP441 and TMP442
TMP441 and TMP442 are compatible to TMP421 and TMP422.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
2014-08-04 07:01:38 -07:00
Johannes Pointner ed67f0872b hwmon: (ntc_thermistor) Support B57330V2103 from EPCOS
This patch adds support for the ntc thermistor B57330V2103 from EPCOS.

Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04 07:01:35 -07:00
Frans Klaver c83959f89f hwmon: (lm75) Add support for TMP112
TMP112 is compatible to LM75.

Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04 07:01:34 -07:00
Heiko Schocher d17a7dca04 hwmon: Driver for TI TMP103 temperature sensor
Driver for the TI TMP103.

The TI TMP103 is similar to the TMP102.  It differs from the TMP102
by having only 8 bit registers.

Signed-off-by: Heiko Schocher <hs@denx.de>
[linux@roeck-us.net: Select REGMAP_I2C in Kconfig]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04 07:01:33 -07:00
Scott Kanowitz f4ff415564 hwmon: Add support for Lattice's POWR1220 power manager IC
This patch adds support for Lattice's POWR1220 power manager IC. Read
access to all the ADCs on the chip are supported through the hwmon
sysfs files.

Signed-off-by: Scott Kanowitz <skanowitz@echo360.com>
[Guenter Roeck: Removed some extra ( )]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04 07:01:33 -07:00
Josef Gajdusek adb578355f hwmon: (emc1403) Fix missing 'select REGMAP_I2C' in Kconfig
In commit 4cab259f, the emc1403 driver was converted to use regmap but the
necessary Kconfig option was not added.

Signed-off-by: Josef Gajdusek <atx@atx.name>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-06-25 07:29:22 -07:00
Naveen Krishna Chatradhi 8b6f5e0f19 hwmon: (ntc_thermistor) Use the manufacturer name properly
Murata Manufacturing Co., Ltd is the vendor for
NTC (Negative Temperature coefficient) based Thermistors.
But, the driver extensively uses "NTC" as the vendor name.

This patch corrects the vendor name also updates the
compatibility strings according to the vendor-prefix.txt

Note: Drivers continue to support the previous compatible strings
but further addition of these compatible strings in device tree
is deprecated.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-06-25 07:09:13 -07:00
Tomas Pop 1a539d372e hwmon: add support for Sensirion SHTC1 sensor
Add support for Sensirion SHTC1 and compatible temperature and humidity
sensors.

Signed-off-by: Tomas Pop <tomas.pop@sensirion.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-06-12 08:36:48 -07:00
Linus Torvalds f456205265 New driver for NCT6683D
New chip support to existing drivers:
 	Add support for STTS2004 and AT30TSE004 to jc42 driver
 	Add support for EMC1402/EMC1412/EMC1422 to emc1403 driver
 
 Other notable changes:
 	Document hwmon kernel API
 	Convert jc42, lm70, lm75, lm77, lm83, lm92, max1619, tmp421,
 	and tmp102 drivers to use new hwmon API functions
 	Replace function macros in lm80, lm92, and jc42 drivers with
 	real code
 	Convert emc1403 driver to use regmap, add support for additional
 	attributes, and add device IDs for EMC1412, EMC1413, and EMC1414
 	Various additional cleanup and minor bug fixes in several drivers
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTjUZbAAoJEMsfJm/On5mBnY4P/A15UCpfNzNa/tYzHUYtb0/Y
 7yI6fEWhgSegiWuWl3I7jOJrz+uU2emrIdOVW1ci8Y7WNjoL+TWYTlvvwf0OYwMz
 k7duMcNWcIOzBAm+swyaKvPQjoLcxtKYn+pSCxb1dzVkjzpelnjHctBNnfbvrNQt
 FCMs+t2azIZGkgNf9G1U/uV702/vKKYWrBc69/EB3osDxSRLKvM2sPqnScxmBR6q
 oohZ5pxbpDhO0gXc9s7AprUFf4puMEWw6eul3QPMzBAgZqh44iOv+yNvJk6pjG5L
 FwWkand4U2BVMGY3+dnBCeA8fsYq9owPCK8WN+5NI1W+CLMnKQFHK4iOEDbiaSHH
 PsgGrFnj5ArVxcmPKUQ3l2nWQcwXUvuBTxRmc707HNLt93y2JrdIncdSnhNR5PVk
 nlUNwTXCqfQmv0aY/yTDIzrgYfXXxhngaw59kEZXBPyO7rH7IcXZw6sq/scn8+G3
 Nd8lHLaFOAZwZVNU1hUWkow88t/NwkW/CZ2c2796pjsjAuJfBS1P+C4hkkUQ7+QB
 SavLg8S9E+Ienxacx2tZs8OdcAXsvlrHMeM0TTiWLbKPosDz3FbwbPeqlCpcVQAY
 kSPIXA+l1Dps0v8Yf6pdJCL1eX1jyzdfA+YKMT0aCPALTQYEPQXAE4Nced+qCZ52
 1vm6eTqDAf1KQfOmxxxT
 =dytt
 -----END PGP SIGNATURE-----

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

Pull hwmon updates from Guenter Roeck:
 "New driver for NCT6683D

  New chip support to existing drivers:
   - add support for STTS2004 and AT30TSE004 to jc42 driver
   - add support for EMC1402/EMC1412/EMC1422 to emc1403 driver

  Other notable changes:
   - document hwmon kernel API
   - convert jc42, lm70, lm75, lm77, lm83, lm92, max1619, tmp421, and
     tmp102 drivers to use new hwmon API functions
   - replace function macros in lm80, lm92, and jc42 drivers with real
     code
   - convert emc1403 driver to use regmap, add support for additional
     attributes, and add device IDs for EMC1412, EMC1413, and EMC1414
   - various additional cleanup and minor bug fixes in several drivers"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (60 commits)
  hwmon: (nct6775) Fix probe unwind paths to properly unregister platform devices
  hwmon: (nct6683) Fix probe unwind paths to properly unregister platform devices
  hwmon: (ultra45_env) Introduce managed version of kzalloc
  hwmon: Driver for NCT6683D
  hwmon: (lm80) Rearrange code to avoid forward declarations
  hwmon: (lm80) Convert fan display function macros into functions
  hwmon: (lm80) Convert voltage display function macros into functions
  hwmon: (lm80) Convert temperature display function macros into functions
  hwmon: (lm80) Normalize all temperature values to 16 bit
  hwmon: (lm80) Simplify TEMP_FROM_REG
  hwmon: (lm83) Convert to use devm_hwmon_device_register_with_groups
  hwmon: (lm83) Rearange code to avoid forward declarations
  hwmon: (lm83) Drop FSF address
  hwmon: (max1619) Convert to use devm_hwmon_device_register_with_groups
  hwmon: (max1619) Drop function macros
  hwmon: (max1619) Rearrange code to avoid forward declarations
  hwmon: (max1619) Drop FSF address
  hwmon: (max1619) Fix critical alarm display
  hwmon: (jc42) Add support for STTS2004 and AT30TSE004
  hwmon: (jc42) Convert function macros into functions
  ...
2014-06-03 11:09:43 -07:00
Jean Delvare 59cf4243e5 hwmon: (ntc_thermistor) Fix dependencies
In commit 9e8269de, support was added for ntc_thermistor devices being
declared in the device tree and implemented on top of IIO. With that
change, a dependency was added to the ntc_thermistor driver:

	depends on (!OF && !IIO) || (OF && IIO)

This construct has the drawback that the driver can no longer be
selected when OF is set and IIO isn't, nor when IIO is set and OF is
not. This is a regression for the original users of the driver.

As the new code depends on IIO and is useless without OF, include it
only if both are enabled, and set the dependencies accordingly. This
is clearer, more simple and more correct.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Fixes: 9e8269de hwmon: (ntc_thermistor) Add DT with IIO support to NTC thermistor driver
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Cc: Doug Anderson <dianders@chromium.org>
2014-05-25 17:23:08 +02:00
Guenter Roeck 41082d66bf hwmon: Driver for NCT6683D
Nuvoton NCT6683D is an eSIO with hardware monitoring capabilities.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-05-21 16:02:27 -07:00
Benjamin Herrenschmidt 4952ef9aec Revert "powerpc/powernv: hwmon driver for power values, fan rpm and temperature"
This reverts commit 0de7f8a917.

This driver wasn't merged via the proper maintainers (my fault ... ooops !)
and has serious issues so let's take it out for now and have a new better
one be merged the right way

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
2014-04-09 12:56:37 +10:00
Aravind Gopalakrishnan ec0159503a hwmon: (k10temp) Add support for AMD F16 M30h processor
Adding new PCI ID to support AMD F16 M30h processor (Mullins).
While at it, modify Kconfig and Doc files to reflect the
support for newer processors

Note: PCI ID for this processor will make it into pci_ids.h
as part of this patch:
http://marc.info/?l=linux-kernel&m=139291362126057&w=2
which should be pulled into 3.15 when merge window opens
(It currently sits in 'for-next' branch of bp.git-
https://git.kernel.org/cgit/linux/kernel/git/bp/bp.git/log/?h=for-next)

Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-04-02 22:09:14 -07:00
Linus Torvalds 235c7b9feb Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull main powerpc updates from Ben Herrenschmidt:
 "This time around, the powerpc merges are going to be a little bit more
  complicated than usual.

  This is the main pull request with most of the work for this merge
  window.  I will describe it a bit more further down.

  There is some additional cpuidle driver work, however I haven't
  included it in this tree as it depends on some work in tip/timer-core
  which Thomas accidentally forgot to put in a topic branch.  Since I
  didn't want to carry all of that tip timer stuff in powerpc -next, I
  setup a separate branch on top of Thomas tree with just that cpuidle
  driver in it, and Stephen has been carrying that in next separately
  for a while now.  I'll send a separate pull request for it.

  Additionally, two new pieces in this tree add users for a sysfs API
  that Tejun and Greg have been deprecating in drivers-core-next.
  Thankfully Greg reverted the patch that removes the old API so this
  merge can happen cleanly, but once merged, I will send a patch
  adjusting our new code to the new API so that Greg can send you the
  removal patch.

  Now as for the content of this branch, we have a lot of perf work for
  power8 new counters including support for our new "nest" counters
  (also called 24x7) under pHyp (not natively yet).

  We have new functionality when running under the OPAL firmware
  (non-virtualized or KVM host), such as access to the firmware error
  logs and service processor dumps, system parameters and sensors, along
  with a hwmon driver for the latter.

  There's also a bunch of bug fixes accross the board, some LE fixes,
  and a nice set of selftests for validating our various types of copy
  loops.

  On the Freescale side, we see mostly new chip/board revisions, some
  clock updates, better support for machine checks and debug exceptions,
  etc..."

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (70 commits)
  powerpc/book3s: Fix CFAR clobbering issue in machine check handler.
  powerpc/compat: 32-bit little endian machine name is ppcle, not ppc
  powerpc/le: Big endian arguments for ppc_rtas()
  powerpc: Use default set of netfilter modules (CONFIG_NETFILTER_ADVANCED=n)
  powerpc/defconfigs: Enable THP in pseries defconfig
  powerpc/mm: Make sure a local_irq_disable prevent a parallel THP split
  powerpc: Rate-limit users spamming kernel log buffer
  powerpc/perf: Fix handling of L3 events with bank == 1
  powerpc/perf/hv_{gpci, 24x7}: Add documentation of device attributes
  powerpc/perf: Add kconfig option for hypervisor provided counters
  powerpc/perf: Add support for the hv 24x7 interface
  powerpc/perf: Add support for the hv gpci (get performance counter info) interface
  powerpc/perf: Add macros for defining event fields & formats
  powerpc/perf: Add a shared interface to get gpci version and capabilities
  powerpc/perf: Add 24x7 interface headers
  powerpc/perf: Add hv_gpci interface header
  powerpc: Add hvcalls for 24x7 and gpci (Get Performance Counter Info)
  sysfs: create bin_attributes under the requested group
  powerpc/perf: Enable BHRB access for EBB events
  powerpc/perf: Add BHRB constraint and IFM MMCRA handling for EBB
  ...
2014-04-02 13:42:59 -07:00
Shivaprasad G Bhat 0de7f8a917 powerpc/powernv: hwmon driver for power values, fan rpm and temperature
This patch adds basic kernel enablement for reading power values, fan
speed rpm and temperature values on powernv platforms which will
be exported to user space through sysfs interface.

Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-03-24 09:48:22 +11:00
Guenter Roeck b4c9c1a798 hwmon: Driver for TI ADC128D818
ADC128D818 is a System Monitor with Temperature Sensor. It is similar to LM80
and LM96080, but has 16 bit wide sensor registers and no fan speed monitoring.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03 08:01:04 -08:00
Jean Delvare ebf5e87791 hwmon: Sort Kconfig entries alphabetically
Entries have been added at more or less random positions over time, so
it becomes difficult to find what you are looking for or figure out
where to insert new entries.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03 08:01:04 -08:00
Axel Lin 2065bdd64c hwmon: (ltc4260) Fix trivial typo
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03 08:01:03 -08:00
Guenter Roeck 6700ce035f hwmon: Driver for Linear Technologies LTC2945
LTC2945 is a system monitor that measures current, voltage, and power.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03 08:01:03 -08:00
Guenter Roeck 69e1ded651 hwmon: Driver for Linear Technologies LTC4260
LTC4260 is a Positive Voltage Hot Swap Controller.
The driver currently only supports voltage monitoring, not voltage control.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03 08:01:03 -08:00
Guenter Roeck 79ffe8594f hwmon: Driver for Linear Technologies LTC4222
Driver Linear Technologies LTC4222 Dual Hot Swap Controller
The driver currently only supports voltage monitoring, not voltage control.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03 08:01:03 -08:00
Jean Delvare 632007e201 hwmon: Fix SENSORS_TMP102 dependencies to eliminate build errors
Similar to what was done for the lm75 driver.

Add depends on THERMAL since that is what provides the
register/unregister functions above, but only if THERMAL_OF was
selected as this is an optional feature of the driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
2014-02-02 17:59:07 +01:00
Jean Delvare 920130a9de hwmon: Fix SENSORS_LM75 dependencies to eliminate build errors
Based on an earlier attempt by Randy Dunlap.

Fix SENSORS_LM75 dependencies to eliminate build errors:

drivers/built-in.o: In function `lm75_remove':
lm75.c:(.text+0x12bd8c): undefined reference to `thermal_zone_of_sensor_unregister'
drivers/built-in.o: In function `lm75_probe':
lm75.c:(.text+0x12c123): undefined reference to `thermal_zone_of_sensor_register'

Add depends on THERMAL since that is what provides the
register/unregister functions above, but only if THERMAL_OF was
selected as this is an optional feature of the driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
2014-02-02 17:59:07 +01:00
Rudolf Marek c145d5c628 hwmon: (it87) Add support for the ITE IT8603E
Add support for IT8603E.

This closes bug #57861:
https://bugzilla.kernel.org/show_bug.cgi?id=57861

[JD: Fixes and clean-ups.]

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2014-01-29 20:40:08 +01:00
Arnaud Ebalard c98d6c65e6 hwmon: (lm75) Add support for GMT G751 chip
This was tested on a NETGEAR ReadyNAS 2120 device (Marvell Armada XP
based board, via DT).

Signed-off-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-11-18 14:08:05 -08:00
William Markezana f060c658b8 hwmon: (htu21) Add Measurement Specialties HTU21D support
Signed-off-by: William Markezana <william.markezana@meas-spec.com>
[Guenter Roeck - minor formatting changes]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-08-29 09:09:12 -07:00
Wei Hu 30b146d1cb hwmon: (k10temp) Add support for Fam16h (Kabini)
The temperature reporting interface stays the same, so we just
add the PCI-ID to the list.

Verified on AMD Olive Hill.

Signed-off-by: Wei Hu <wei@aristanetworks.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-08-27 08:28:01 -07:00
Evgeniy Dushistov 60c1f31fc5 hwmon: (ads1015) Add support for ADS1115
This patch adds support for ads1115 device to ads1015 driver.
Based on work of Emiliano Carnati <carnatiatebneuro.com>.
Tested on ARM CPU based board.

Signed-off-by: Evgeniy A. Dushistov <dushistov@mail.ru>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-08-11 22:10:40 -07:00