mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 23:23:55 +08:00
94ee5fcc24
The appropriate mantissa values for the lm25066 family's direct-format current and power readings are a function of the sense resistor employed between the SENSE and VIN pins of the chip. Instead of assuming that resistance is always the same 1mOhm as used in the datasheet, allow it to be configured via a device-tree property ("shunt-resistor-micro-ohms"). Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Link: https://lore.kernel.org/r/20210928092242.30036-8-zev@bewilderbeest.net [groeck: Fixed checkpatch warnings] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
140 lines
3.3 KiB
ReStructuredText
140 lines
3.3 KiB
ReStructuredText
Kernel driver lm25066
|
|
=====================
|
|
|
|
Supported chips:
|
|
|
|
* TI LM25056
|
|
|
|
Prefix: 'lm25056'
|
|
|
|
Addresses scanned: -
|
|
|
|
Datasheets:
|
|
|
|
https://www.ti.com/lit/gpn/lm25056
|
|
|
|
https://www.ti.com/lit/gpn/lm25056a
|
|
|
|
* National Semiconductor LM25066
|
|
|
|
Prefix: 'lm25066'
|
|
|
|
Addresses scanned: -
|
|
|
|
Datasheets:
|
|
|
|
http://www.national.com/pf/LM/LM25066.html
|
|
|
|
http://www.national.com/pf/LM/LM25066A.html
|
|
|
|
* National Semiconductor LM5064
|
|
|
|
Prefix: 'lm5064'
|
|
|
|
Addresses scanned: -
|
|
|
|
Datasheet:
|
|
|
|
http://www.national.com/pf/LM/LM5064.html
|
|
|
|
* National Semiconductor LM5066
|
|
|
|
Prefix: 'lm5066'
|
|
|
|
Addresses scanned: -
|
|
|
|
Datasheet:
|
|
|
|
http://www.national.com/pf/LM/LM5066.html
|
|
|
|
* Texas Instruments LM5066I
|
|
|
|
Prefix: 'lm5066i'
|
|
|
|
Addresses scanned: -
|
|
|
|
Datasheet:
|
|
|
|
https://www.ti.com/product/LM5066I
|
|
|
|
|
|
Author: Guenter Roeck <linux@roeck-us.net>
|
|
|
|
|
|
Description
|
|
-----------
|
|
|
|
This driver supports hardware monitoring for National Semiconductor / TI LM25056,
|
|
LM25066, LM5064, and LM5066/LM5066I Power Management, Monitoring,
|
|
Control, and Protection ICs.
|
|
|
|
The driver is a client driver to the core PMBus driver. Please see
|
|
Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
|
|
|
|
|
|
Usage Notes
|
|
-----------
|
|
|
|
This driver does not auto-detect devices. You will have to instantiate the
|
|
devices explicitly. Please see Documentation/i2c/instantiating-devices.rst for
|
|
details.
|
|
|
|
The shunt (sense) resistor value can be configured by a device tree property;
|
|
see Documentation/devicetree/bindings/hwmon/pmbus/ti,lm25066.yaml for details.
|
|
|
|
Platform data support
|
|
---------------------
|
|
|
|
The driver supports standard PMBus driver platform data.
|
|
|
|
|
|
Sysfs entries
|
|
-------------
|
|
|
|
The following attributes are supported. Limits are read-write; all other
|
|
attributes are read-only.
|
|
|
|
======================= =======================================================
|
|
in1_label "vin"
|
|
in1_input Measured input voltage.
|
|
in1_average Average measured input voltage.
|
|
in1_min Minimum input voltage.
|
|
in1_max Maximum input voltage.
|
|
in1_min_alarm Input voltage low alarm.
|
|
in1_max_alarm Input voltage high alarm.
|
|
|
|
in2_label "vmon"
|
|
in2_input Measured voltage on VAUX pin
|
|
in2_min Minimum VAUX voltage (LM25056 only).
|
|
in2_max Maximum VAUX voltage (LM25056 only).
|
|
in2_min_alarm VAUX voltage low alarm (LM25056 only).
|
|
in2_max_alarm VAUX voltage high alarm (LM25056 only).
|
|
|
|
in3_label "vout1"
|
|
Not supported on LM25056.
|
|
in3_input Measured output voltage.
|
|
in3_average Average measured output voltage.
|
|
in3_min Minimum output voltage.
|
|
in3_min_alarm Output voltage low alarm.
|
|
|
|
curr1_label "iin"
|
|
curr1_input Measured input current.
|
|
curr1_average Average measured input current.
|
|
curr1_max Maximum input current.
|
|
curr1_max_alarm Input current high alarm.
|
|
|
|
power1_label "pin"
|
|
power1_input Measured input power.
|
|
power1_average Average measured input power.
|
|
power1_max Maximum input power limit.
|
|
power1_alarm Input power alarm
|
|
power1_input_highest Historical maximum power.
|
|
power1_reset_history Write any value to reset maximum power history.
|
|
|
|
temp1_input Measured temperature.
|
|
temp1_max Maximum temperature.
|
|
temp1_crit Critical high temperature.
|
|
temp1_max_alarm Chip temperature high alarm.
|
|
temp1_crit_alarm Chip temperature critical high alarm.
|
|
======================= =======================================================
|