Skip to content

Commit

Permalink
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 "New driver: DA9055

  Added/improved support for new chips in existing drivers: Z650/670,
  N550/570, ADS7830, AMD 16h family"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (da9055) Fix chan_mux[DA9055_ADC_ADCIN3] setting
  hwmon: DA9055 HWMON driver
  hwmon: (coretemp) List TjMax for Z650/670 and N550/570
  hwmon: (coretemp) Drop N4xx, N5xx, D4xx, D5xx CPUs from tjmax table
  hwmon: (coretemp) Use model table instead of if/else to identify CPU models
  hwmon: da9052: Use da9052_reg_update for rmw operations
  hwmon: (coretemp) Drop dependency on PCI for TjMax detection on Atom CPUs
  hwmon: (ina2xx) use module_i2c_driver to simplify the code
  hwmon: (ads7828) add support for ADS7830
  hwmon: (ads7828) driver cleanup
  x86,AMD: Power driver support for AMD's family 16h processors
  • Loading branch information
Linus Torvalds committed Dec 11, 2012
2 parents 11b84c5 + 44f751c commit a8936db
Show file tree
Hide file tree
Showing 12 changed files with 607 additions and 224 deletions.
46 changes: 34 additions & 12 deletions Documentation/hwmon/ads7828
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,55 @@ Kernel driver ads7828
Supported chips:
* Texas Instruments/Burr-Brown ADS7828
Prefix: 'ads7828'
Addresses scanned: I2C 0x48, 0x49, 0x4a, 0x4b
Datasheet: Publicly available at the Texas Instruments website :
Datasheet: Publicly available at the Texas Instruments website:
http://focus.ti.com/lit/ds/symlink/ads7828.pdf

* Texas Instruments ADS7830
Prefix: 'ads7830'
Datasheet: Publicly available at the Texas Instruments website:
http://focus.ti.com/lit/ds/symlink/ads7830.pdf

Authors:
Steve Hardy <shardy@redhat.com>
Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>

Platform data
-------------

The ads7828 driver accepts an optional ads7828_platform_data structure (defined
in include/linux/platform_data/ads7828.h). The structure fields are:

Module Parameters
-----------------
* diff_input: (bool) Differential operation
set to true for differential mode, false for default single ended mode.

* se_input: bool (default Y)
Single ended operation - set to N for differential mode
* int_vref: bool (default Y)
Operate with the internal 2.5V reference - set to N for external reference
* vref_mv: int (default 2500)
If using an external reference, set this to the reference voltage in mV
* ext_vref: (bool) External reference
set to true if it operates with an external reference, false for default
internal reference.

* vref_mv: (unsigned int) Voltage reference
if using an external reference, set this to the reference voltage in mV,
otherwise it will default to the internal value (2500mV). This value will be
bounded with limits accepted by the chip, described in the datasheet.

If no structure is provided, the configuration defaults to single ended
operation and internal voltage reference (2.5V).

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

This driver implements support for the Texas Instruments ADS7828.
This driver implements support for the Texas Instruments ADS7828 and ADS7830.

This device is a 12-bit 8-channel A-D converter.
The ADS7828 device is a 12-bit 8-channel A/D converter, while the ADS7830 does
8-bit sampling.

It can operate in single ended mode (8 +ve inputs) or in differential mode,
where 4 differential pairs can be measured.

The chip also has the facility to use an external voltage reference. This
may be required if your hardware supplies the ADS7828 from a 5V supply, see
the datasheet for more details.

There is no reliable way to identify this chip, so the driver will not scan
some addresses to try to auto-detect it. That means that you will have to
statically declare the device in the platform support code.
2 changes: 2 additions & 0 deletions Documentation/hwmon/coretemp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ Process Processor TjMax(C)

45nm Atom Processors
D525/510/425/410 100
Z670/650 90
Z560/550/540/530P/530/520PT/520/515/510PT/510P 90
Z510/500 90
N570/550 100
N475/470/455/450 100
N280/270 90
330/230 125
Expand Down
47 changes: 47 additions & 0 deletions Documentation/hwmon/da9055
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Supported chips:
* Dialog Semiconductors DA9055 PMIC
Prefix: 'da9055'
Datasheet: Datasheet is not publicly available.

Authors: David Dajun Chen <dchen@diasemi.com>

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

The DA9055 provides an Analogue to Digital Converter (ADC) with 10 bits
resolution and track and hold circuitry combined with an analogue input
multiplexer. The analogue input multiplexer will allow conversion of up to 5
different inputs. The track and hold circuit ensures stable input voltages at
the input of the ADC during the conversion.

The ADC is used to measure the following inputs:
Channel 0: VDDOUT - measurement of the system voltage
Channel 1: ADC_IN1 - high impedance input (0 - 2.5V)
Channel 2: ADC_IN2 - high impedance input (0 - 2.5V)
Channel 3: ADC_IN3 - high impedance input (0 - 2.5V)
Channel 4: Internal Tjunc. - sense (internal temp. sensor)

By using sysfs attributes we can measure the system voltage VDDOUT,
chip junction temperature and auxiliary channels voltages.

Voltage Monitoring
------------------

Voltages are sampled in a AUTO mode it can be manually sampled too and results
are stored in a 10 bit ADC.

The system voltage is calculated as:
Milli volt = ((ADC value * 1000) / 85) + 2500

The voltages on ADC channels 1, 2 and 3 are calculated as:
Milli volt = (ADC value * 1000) / 102

Temperature Monitoring
----------------------

Temperatures are sampled by a 10 bit ADC. Junction temperatures
are monitored by the ADC channels.

The junction temperature is calculated:
Degrees celsius = -0.4084 * (ADC_RES - T_OFFSET) + 307.6332
The junction temperature attribute is supported by the driver.
19 changes: 15 additions & 4 deletions drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,16 @@ config SENSORS_DA9052_ADC
This driver can also be built as module. If so, the module
will be called da9052-hwmon.

config SENSORS_DA9055
tristate "Dialog Semiconductor DA9055 ADC"
depends on MFD_DA9055
help
If you say yes here you get support for ADC on the Dialog
Semiconductor DA9055 PMIC.

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

config SENSORS_I5K_AMB
tristate "FB-DIMM AMB temperature sensor on Intel 5000 series chipsets"
depends on PCI
Expand Down Expand Up @@ -455,7 +465,7 @@ config SENSORS_HIH6130

config SENSORS_CORETEMP
tristate "Intel Core/Core2/Atom temperature sensor"
depends on X86 && PCI
depends on X86
help
If you say yes here you get support for the temperature
sensor inside your CPU. Most of the family 6 CPUs
Expand Down Expand Up @@ -1106,11 +1116,12 @@ config SENSORS_ADS1015
will be called ads1015.

config SENSORS_ADS7828
tristate "Texas Instruments ADS7828"
tristate "Texas Instruments ADS7828 and compatibles"
depends on I2C
help
If you say yes here you get support for Texas Instruments ADS7828
12-bit 8-channel ADC device.
If you say yes here you get support for Texas Instruments ADS7828 and
ADS7830 8-channel A/D converters. ADS7828 resolution is 12-bit, while
it is 8-bit on ADS7830.

This driver can also be built as a module. If so, the module
will be called ads7828.
Expand Down
1 change: 1 addition & 0 deletions drivers/hwmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ obj-$(CONFIG_SENSORS_ASC7621) += asc7621.o
obj-$(CONFIG_SENSORS_ATXP1) += atxp1.o
obj-$(CONFIG_SENSORS_CORETEMP) += coretemp.o
obj-$(CONFIG_SENSORS_DA9052_ADC)+= da9052-hwmon.o
obj-$(CONFIG_SENSORS_DA9055)+= da9055-hwmon.o
obj-$(CONFIG_SENSORS_DME1737) += dme1737.o
obj-$(CONFIG_SENSORS_DS620) += ds620.o
obj-$(CONFIG_SENSORS_DS1621) += ds1621.o
Expand Down
Loading

0 comments on commit a8936db

Please sign in to comment.