mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
339bca4ffd
Add initial support for the Texas Instruments TPS25990 eFuse. This adds the basic PMBUS telemetry support for the device. From Karol Przybylski: The tps25990_read_word_data function contains a block of unreachable code caused by the syntactic structure in the PMBUS_VIRT_READ_IIN_MAX case. Specifically, the return TPS25990_READ_IIN_PEAK; statement immediately exits the function, making the next lines unreachable. This patch removes the return statement, leaving the expected handling. Discovered in coverity: CID 1602227 Tested-by: Vaishnav Achath <vaishnav.a@ti.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> [groeck: Adjust to MODULE_IMPORT_NS API change] [karprzy7@gmail.com: Fix unreachable code in tps25990_read_word_data] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
148 lines
2.1 KiB
ReStructuredText
148 lines
2.1 KiB
ReStructuredText
.. SPDX-License-Identifier: GPL-2.0
|
|
|
|
Kernel driver tps25990
|
|
======================
|
|
|
|
Supported chips:
|
|
|
|
* TI TPS25990
|
|
|
|
Prefix: 'tps25990'
|
|
|
|
* Datasheet
|
|
|
|
Publicly available at Texas Instruments website: https://www.ti.com/lit/gpn/tps25990
|
|
|
|
Author:
|
|
|
|
Jerome Brunet <jbrunet@baylibre.com>
|
|
|
|
Description
|
|
-----------
|
|
|
|
This driver implements support for TI TPS25990 eFuse.
|
|
This is an integrated, high-current circuit protection and power
|
|
management device with PMBUS interface
|
|
|
|
Device compliant with:
|
|
|
|
- PMBus rev 1.3 interface.
|
|
|
|
Device supports direct format for reading input voltages,
|
|
output voltage, input current, input power and temperature.
|
|
|
|
Due to the specificities of the chip, all history reset attributes
|
|
are tied together. Resetting the history of a sensor, resets the
|
|
history of all the sensors.
|
|
|
|
The driver exports the following attributes via the 'sysfs' files
|
|
for input current:
|
|
|
|
**curr1_average**
|
|
|
|
**curr1_crit**
|
|
|
|
**curr1_crit_alarm**
|
|
|
|
**curr1_highest**
|
|
|
|
**curr1_input**
|
|
|
|
**curr1_label**
|
|
|
|
**curr1_max**
|
|
|
|
**curr1_max_alarm**
|
|
|
|
**curr1_reset_history**
|
|
|
|
The driver provides the following attributes for main input voltage:
|
|
|
|
**in1_average**
|
|
|
|
**in1_crit**
|
|
|
|
**in1_crit_alarm**
|
|
|
|
**in1_highest**
|
|
|
|
**in1_input**
|
|
|
|
**in1_label**
|
|
|
|
**in1_lcrit**
|
|
|
|
**in1_lcrit_alarm**
|
|
|
|
**in1_lowest**
|
|
|
|
**in1_max**
|
|
|
|
**in1_max_alarm**
|
|
|
|
**in1_min**
|
|
|
|
**in1_min_alarm**
|
|
|
|
**in1_reset_history**
|
|
|
|
The driver provides the following attributes for auxiliary input voltage:
|
|
|
|
**in2_input**
|
|
|
|
**in2_label**
|
|
|
|
The driver provides the following attributes for output voltage:
|
|
|
|
**in3_average**
|
|
|
|
**in3_input**
|
|
|
|
**in3_label**
|
|
|
|
**in3_lowest**
|
|
|
|
**in3_min**
|
|
|
|
**in3_min_alarm**
|
|
|
|
**in3_reset_history**
|
|
|
|
The driver provides the following attributes for input power:
|
|
|
|
**power1_alarm**
|
|
|
|
**power1_average**
|
|
|
|
**power1_input**
|
|
|
|
**power1_input_highest**
|
|
|
|
**power1_label**
|
|
|
|
**power1_max**
|
|
|
|
**power1_reset_history**
|
|
|
|
The driver provides the following attributes for temperature:
|
|
|
|
**temp1_average**
|
|
|
|
**temp1_crit**
|
|
|
|
**temp1_crit_alarm**
|
|
|
|
**temp1_highest**
|
|
|
|
**temp1_input**
|
|
|
|
**temp1_max**
|
|
|
|
**temp1_max_alarm**
|
|
|
|
**temp1_reset_history**
|
|
|
|
The driver provides the following attributes for sampling:
|
|
|
|
**samples**
|