Skip to content

Commit

Permalink
hwmon: DA9055 HWMON driver
Browse files Browse the repository at this point in the history
This is the HWMON patch for DA9055 PMIC and has got dependency on the
DA9055 MFD core.

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

This patch is functionally tested on Samsung SMDKV6410.

Signed-off-by: David Dajun Chen <[email protected]>
Signed-off-by: Ashish Jangam <[email protected]>
[Guenter Roeck: Dropped __devinit, __devexit, __devexit_p]
Signed-off-by: Guenter Roeck <[email protected]>
  • Loading branch information
Ashish Jangam authored and groeck committed Dec 5, 2012
1 parent 04a87a0 commit e597022
Show file tree
Hide file tree
Showing 4 changed files with 394 additions and 0 deletions.
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 <[email protected]>

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.
10 changes: 10 additions & 0 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
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 e597022

Please sign in to comment.