Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f37ab0fb authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull hwmon updates from Jean Delvare:
 "We have support for the MCP3021, MC13892 and GMT G781, automatic fan
  speed control for LM63/LM64 chips, and a few clean-ups."

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: Add MCP3021 ADC driver
  hwmon: (mc13783-adc) Add support for the MC13892 PMIC
  hwmon: (mc13783-adc) Remove space before tab
  hwmon: (lm63) Let the user adjust the lookup table
  hwmon: (lm63) Make fan speed control strategy changeable
  hwmon: (lm63) Reorganize the code
  hwmon: (lm90) Restore original configuration if probe function fails
  hwmon: (lm90) Add support for GMT G781
  hwmon: (lm90) Fix multi-line comments
  hwmon: (w83795) Fix multi-line comments
  hwmon: (w83795) Unconditionally support manual fan speed control
  hwmon: (fam15h_power) Increase output resolution
  hwmon: (fam15h_power) Correct sign extension of running_avg_capture
parents 0b0c9d3a 5510e62a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -118,6 +118,10 @@ Supported chips:
    Addresses scanned: I2C 0x48 through 0x4F
    Datasheet: Publicly available at NXP website
               http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
  * GMT G781
    Prefix: 'g781'
    Addresses scanned: I2C 0x4c, 0x4d
    Datasheet: Not publicly available from GMT

Author: Jean Delvare <khali@linux-fr.org>

+37 −13
Original line number Diff line number Diff line
@@ -3,8 +3,11 @@ Kernel driver mc13783-adc

Supported chips:
  * Freescale Atlas MC13783
    Prefix: 'mc13783_adc'
    Prefix: 'mc13783'
    Datasheet: http://www.freescale.com/files/rf_if/doc/data_sheet/MC13783.pdf?fsrch=1
  * Freescale Atlas MC13892
    Prefix: 'mc13892'
    Datasheet: http://cache.freescale.com/files/analog/doc/data_sheet/MC13892.pdf?fsrch=1&sr=1

Authors:
    Sascha Hauer <s.hauer@pengutronix.de>
@@ -13,20 +16,21 @@ Authors:
Description
-----------

The Freescale MC13783 is a Power Management and Audio Circuit. Among
other things it contains a 10-bit A/D converter. The converter has 16
channels which can be used in different modes.
The A/D converter has a resolution of 2.25mV. Channels 0-4 have
a dedicated meaning with chip internal scaling applied. Channels 5-7
can be used as general purpose inputs or alternatively in a dedicated
mode. Channels 12-15 are occupied by the touchscreen if it's active.
The Freescale MC13783 and MC13892 are Power Management and Audio Circuits.
Among other things they contain a 10-bit A/D converter. The converter has 16
(MC13783) resp. 12 (MC13892) channels which can be used in different modes. The
A/D converter has a resolution of 2.25mV.

Currently the driver only supports channels 2 and 5-15 with no alternative
modes for channels 5-7.
Some channels can be used as General Purpose inputs or in a dedicated mode with
a chip internal scaling applied .

See this table for the meaning of the different channels and their chip
internal scaling:
Currently the driver only supports the Application Supply channel (BP / BPSNS),
the General Purpose inputs and touchscreen.

See the following tables for the meaning of the different channels and their
chip internal scaling:

MC13783:
Channel	Signal						Input Range	Scaling
-------------------------------------------------------------------------------
0	Battery Voltage (BATT)				2.50 - 4.65V	-2.40V
@@ -34,7 +38,7 @@ Channel Signal Input Range Scaling
2	Application Supply (BP)				2.50 - 4.65V	-2.40V
3	Charger Voltage (CHRGRAW)			0 - 10V /	/5
							0 - 20V		/10
4	Charger Current (CHRGISNSP-CHRGISNSN)		-0.25V - 0.25V	x4
4	Charger Current (CHRGISNSP-CHRGISNSN)		-0.25 - 0.25V	x4
5	General Purpose ADIN5 / Battery Pack Thermistor	0 - 2.30V	No
6	General Purpose ADIN6 / Backup Voltage (LICELL)	0 - 2.30V /	No /
							1.50 - 3.50V	-1.20V
@@ -48,3 +52,23 @@ Channel Signal Input Range Scaling
13	General Purpose TSX2 / Touchscreen X-plate 2	0 - 2.30V	No
14	General Purpose TSY1 / Touchscreen Y-plate 1	0 - 2.30V	No
15	General Purpose TSY2 / Touchscreen Y-plate 2	0 - 2.30V	No

MC13892:
Channel	Signal						Input Range	Scaling
-------------------------------------------------------------------------------
0	Battery Voltage (BATT)				0 - 4.8V	/2
1	Battery Current (BATT - BATTISNSCC)		-60 - 60 mV	x20
2	Application Supply (BPSNS)			0 - 4.8V	/2
3	Charger Voltage (CHRGRAW)			0 - 12V /	/5
							0 - 20V		/10
4	Charger Current (CHRGISNS-BPSNS) /		-0.3 - 0.3V /	x4 /
	Touchscreen X-plate 1				0 - 2.4V	No
5	General Purpose ADIN5 /	Battery Pack Thermistor	0 - 2.4V	No
6	General Purpose ADIN6 / Backup Voltage (LICELL)	0 - 2.4V /	No
	Backup Voltage (LICELL)                        	0 - 3.6V	x2/3
7	General Purpose ADIN7 / UID / Die Temperature	0 - 2.4V /	No /
							0 - 4.8V	/2
12	General Purpose TSX1 / Touchscreen X-plate 1	0 - 2.4V	No
13	General Purpose TSX2 / Touchscreen X-plate 2	0 - 2.4V	No
14	General Purpose TSY1 / Touchscreen Y-plate 1	0 - 2.4V	No
15	General Purpose TSY2 / Touchscreen Y-plate 2	0 - 2.4V	No
+22 −0
Original line number Diff line number Diff line
Kernel driver MCP3021
======================

Supported chips:
  * Microchip Technology MCP3021
    Prefix: 'mcp3021'
    Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/21805a.pdf

Author: Mingkai Hu

Description
-----------

This driver implements support for the Microchip Technology MCP3021 chip.

The Microchip Technology Inc. MCP3021 is a successive approximation A/D
converter (ADC) with 10-bit resolution.
This device provides one single-ended input with very low power consumption.
Communication to the MCP3021 is performed using a 2-wire I2C compatible
interface. Standard (100 kHz) and Fast (400 kHz) I2C modes are available.
The default I2C device address is 0x4d (contact the Microchip factory for
additional address options).
+20 −8
Original line number Diff line number Diff line
@@ -648,7 +648,8 @@ config SENSORS_LM90
	  LM86, LM89 and LM99, Analog Devices ADM1032, ADT7461, and ADT7461A,
	  Maxim MAX6646, MAX6647, MAX6648, MAX6649, MAX6657, MAX6658, MAX6659,
	  MAX6680, MAX6681, MAX6692, MAX6695, MAX6696, ON Semiconductor NCT1008,
	  Winbond/Nuvoton W83L771W/G/AWG/ASG and Philips SA56004 sensor chips.
	  Winbond/Nuvoton W83L771W/G/AWG/ASG, Philips SA56004, and GMT G781
	  sensor chips.

	  This driver can also be built as a module.  If so, the module
	  will be called lm90.
@@ -812,6 +813,16 @@ config SENSORS_MAX6650
	  This driver can also be built as a module.  If so, the module
	  will be called max6650.

config SENSORS_MCP3021
	tristate "Microchip MCP3021"
	depends on I2C && EXPERIMENTAL
	help
	  If you say yes here you get support for the MCP3021 chip
	  that is a A/D converter (ADC) with 10-bit resolution.

	  This driver can also be built as a module.  If so, the module
	  will be called mcp3021.

config SENSORS_NTC_THERMISTOR
	tristate "NTC thermistor support"
	depends on EXPERIMENTAL
@@ -1229,18 +1240,19 @@ config SENSORS_W83795
	depends on I2C && EXPERIMENTAL
	help
	  If you say yes here you get support for the Winbond W83795G and
	  W83795ADG hardware monitoring chip.
	  W83795ADG hardware monitoring chip, including manual fan speed
	  control.

	  This driver can also be built as a module.  If so, the module
	  will be called w83795.

config SENSORS_W83795_FANCTRL
	boolean "Include fan control support (DANGEROUS)"
	boolean "Include automatic fan control support (DANGEROUS)"
	depends on SENSORS_W83795 && EXPERIMENTAL
	default n
	help
	  If you say yes here, support for the both manual and automatic
	  fan control features will be included in the driver.
	  If you say yes here, support for automatic fan speed control
	  will be included in the driver.

	  This part of the code wasn't carefully reviewed and tested yet,
	  so enabling this option is strongly discouraged on production
@@ -1358,10 +1370,10 @@ config SENSORS_APPLESMC
	  the awesome power of applesmc.

config SENSORS_MC13783_ADC
        tristate "Freescale MC13783 ADC"
        depends on MFD_MC13783
        tristate "Freescale MC13783/MC13892 ADC"
        depends on MFD_MC13XXX
        help
          Support for the A/D converter on MC13783 PMIC.
          Support for the A/D converter on MC13783 and MC13892 PMIC.

if ACPI

+1 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@ obj-$(CONFIG_SENSORS_MAX6639) += max6639.o
obj-$(CONFIG_SENSORS_MAX6642)	+= max6642.o
obj-$(CONFIG_SENSORS_MAX6650)	+= max6650.o
obj-$(CONFIG_SENSORS_MC13783_ADC)+= mc13783-adc.o
obj-$(CONFIG_SENSORS_MCP3021)	+= mcp3021.o
obj-$(CONFIG_SENSORS_NTC_THERMISTOR)	+= ntc_thermistor.o
obj-$(CONFIG_SENSORS_PC87360)	+= pc87360.o
obj-$(CONFIG_SENSORS_PC87427)	+= pc87427.o
Loading