aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-24 16:29:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-24 16:29:18 -0400
commit0cd5ff591ab6473355d5a6a47f7694def28e451d (patch)
treeaed0ea4fbb724f13208ed76d438518ffc9130a17 /Documentation
parent3539fc544f39017cf3403b9319fb4d74b5116135 (diff)
parente30bca12573fbf54e2470723aadc047549d147ce (diff)
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck: "New drivers for DA9052/53 PMIC as well as HIH-6130/HIH-6131 humidity and temperature sensors. Convert drivers to use devm_ functions and to use dev_pm_ops. Address a couple of Coverity errors/warnings as well as compile warnings. Some functional improvements in applesmc driver." * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (72 commits) hwmon: (applesmc) Ignore some temperature registers hwmon: (applesmc) Allow negative temperature values hwmon: (s3c-hwmon) Use devm_kzalloc instead of kzalloc hwmon: (w83781d) Fix compile warning hwmon: (applesmc) Shorten minimum wait time hwmon: (exynos4_tmu) Use struct dev_pm_ops for power management hwmon: (gpio-fan) Use struct dev_pm_ops for power management hwmon: (abituguru3) Use struct dev_pm_ops for power management hwmon: (abituguru) Use struct dev_pm_ops for power management hwmon: (acpi_power_meter) Fix unintentional integer overflow hwmon: (acpi_power_meter) Cleanup and optimizations hwmon: Honeywell Humidicon HIH-6130/HIH-6131 humidity and temperature sensor driver hwmon: (applesmc) Skip sensor mapping hwmon: (ntc_thermistor) Ensure that data->name string is terminated hwmon: (w83l785ts) Convert to use devm_ functions hwmon: (w83l785ts) Simplify code and improve readability hwmon: (smsc47m192) Convert to use devm_ functions hwmon: (smsc47m1) Convert to use devm_ functions hwmon: (smsc47b397) Convert to use devm_ functions hwmon: (k8temp) Convert to use devm_ functions ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/hwmon/da905261
-rw-r--r--Documentation/hwmon/hih613037
-rw-r--r--Documentation/hwmon/submitting-patches3
3 files changed, 101 insertions, 0 deletions
diff --git a/Documentation/hwmon/da9052 b/Documentation/hwmon/da9052
new file mode 100644
index 000000000000..ef898553638e
--- /dev/null
+++ b/Documentation/hwmon/da9052
@@ -0,0 +1,61 @@
1Supported chips:
2 * Dialog Semiconductors DA9052-BC and DA9053-AA/Bx PMICs
3 Prefix: 'da9052'
4 Datasheet: Datasheet is not publicly available.
5
6Authors: David Dajun Chen <dchen@diasemi.com>
7
8Description
9-----------
10
11The DA9052/53 provides an Analogue to Digital Converter (ADC) with 10 bits
12resolution and track and hold circuitry combined with an analogue input
13multiplexer. The analogue input multiplexer will allow conversion of up to 10
14different inputs. The track and hold circuit ensures stable input voltages at
15the input of the ADC during the conversion.
16
17The ADC is used to measure the following inputs:
18Channel 0: VDDOUT - measurement of the system voltage
19Channel 1: ICH - internal battery charger current measurement
20Channel 2: TBAT - output from the battery NTC
21Channel 3: VBAT - measurement of the battery voltage
22Channel 4: ADC_IN4 - high impedance input (0 - 2.5V)
23Channel 5: ADC_IN5 - high impedance input (0 - 2.5V)
24Channel 6: ADC_IN6 - high impedance input (0 - 2.5V)
25Channel 7: XY - TSI interface to measure the X and Y voltage of the touch
26 screen resistive potentiometers
27Channel 8: Internal Tjunc. - sense (internal temp. sensor)
28Channel 9: VBBAT - measurement of the backup battery voltage
29
30By using sysfs attributes we can measure the system voltage VDDOUT, the battery
31charging current ICH, battery temperature TBAT, battery junction temperature
32TJUNC, battery voltage VBAT and the back up battery voltage VBBAT.
33
34Voltage Monitoring
35------------------
36
37Voltages are sampled by a 10 bit ADC.
38
39The battery voltage is calculated as:
40 Milli volt = ((ADC value * 1000) / 512) + 2500
41
42The backup battery voltage is calculated as:
43 Milli volt = (ADC value * 2500) / 512;
44
45The voltages on ADC channels 4, 5 and 6 are calculated as:
46 Milli volt = (ADC value * 2500) / 1023
47
48Temperature Monitoring
49----------------------
50
51Temperatures are sampled by a 10 bit ADC. Junction and battery temperatures
52are monitored by the ADC channels.
53
54The junction temperature is calculated:
55 Degrees celsius = 1.708 * (TJUNC_RES - T_OFFSET) - 108.8
56The junction temperature attribute is supported by the driver.
57
58The battery temperature is calculated:
59 Degree Celcius = 1 / (t1 + 1/298)- 273
60where t1 = (1/B)* ln(( ADCval * 2.5)/(R25*ITBAT*255))
61Default values of R25, B, ITBAT are 10e3, 3380 and 50e-6 respectively.
diff --git a/Documentation/hwmon/hih6130 b/Documentation/hwmon/hih6130
new file mode 100644
index 000000000000..73dae918ea7b
--- /dev/null
+++ b/Documentation/hwmon/hih6130
@@ -0,0 +1,37 @@
1Kernel driver hih6130
2=====================
3
4Supported chips:
5 * Honeywell HIH-6130 / HIH-6131
6 Prefix: 'hih6130'
7 Addresses scanned: none
8 Datasheet: Publicly available at the Honeywell website
9 http://sensing.honeywell.com/index.php?ci_id=3106&la_id=1&defId=44872
10
11Author:
12 Iain Paton <ipaton0@gmail.com>
13
14Description
15-----------
16
17The HIH-6130 & HIH-6131 are humidity and temperature sensors in a SO8 package.
18The difference between the two devices is that the HIH-6131 has a condensation
19filter.
20
21The devices communicate with the I2C protocol. All sensors are set to the same
22I2C address 0x27 by default, so an entry with I2C_BOARD_INFO("hih6130", 0x27)
23can be used in the board setup code.
24
25Please see Documentation/i2c/instantiating-devices for details on how to
26instantiate I2C devices.
27
28sysfs-Interface
29---------------
30
31temp1_input - temperature input
32humidity1_input - humidity input
33
34Notes
35-----
36
37Command mode and alarms are not currently supported.
diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches
index 86f42e8e9e49..790f774a3032 100644
--- a/Documentation/hwmon/submitting-patches
+++ b/Documentation/hwmon/submitting-patches
@@ -70,6 +70,9 @@ increase the chances of your change being accepted.
70 review more difficult. It may also result in code which is more complicated 70 review more difficult. It may also result in code which is more complicated
71 than necessary. Use inline functions or just regular functions instead. 71 than necessary. Use inline functions or just regular functions instead.
72 72
73* Use devres functions whenever possible to allocate resources. For rationale
74 and supported functions, please see Documentation/driver-model/devres.txt.
75
73* If the driver has a detect function, make sure it is silent. Debug messages 76* If the driver has a detect function, make sure it is silent. Debug messages
74 and messages printed after a successful detection are acceptable, but it 77 and messages printed after a successful detection are acceptable, but it
75 must not print messages such as "Chip XXX not found/supported". 78 must not print messages such as "Chip XXX not found/supported".