hwmon: (isl28022) new driver for ISL28022 power monitor

Driver for Renesas ISL28022 power monitor with I2C interface.
The device monitors voltage, current via shunt resistor
and calculated power.

Signed-off-by: Carsten Spieß <mail@carsten-spiess.de>
Signed-off-by: Yikai Tsai <yikai.tsai.wiwynn@gmail.com>
Message-ID: <20241002081133.13123-3-yikai.tsai.wiwynn@gmail.com>
[groeck: Fixed alignment issues, dropped noise at end of probe]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
Yikai Tsai
2024-11-10 14:48:07 -08:00
committed by Guenter Roeck
parent f3bfd13c4a
commit 39671a14df
6 changed files with 613 additions and 0 deletions
+1
View File
@@ -96,6 +96,7 @@ Hardware Monitoring Kernel Drivers
ir35221
ir38064
ir36021
isl28022
isl68137
it87
jc42
+63
View File
@@ -0,0 +1,63 @@
.. SPDX-License-Identifier: GPL-2.0-or-later
Kernel driver isl28022
======================
Supported chips:
* Renesas ISL28022
Prefix: 'isl28022'
Addresses scanned: none
Datasheet: Publicly available at the Renesas website
https://www.renesas.com/us/en/www/doc/datasheet/isl28022.pdf
Author:
Carsten Spieß <mail@carsten-spiess.de>
Description
-----------
The ISL28022 is a power monitor with I2C interface. The device monitors
voltage, current via shunt resistor and calculated power.
Usage Notes
-----------
This driver does not auto-detect devices. You will have to instantiate the
device explicitly. Please see Documentation/i2c/instantiating-devices.rst for
details.
The shunt value in micro-ohms, shunt voltage range and averaging can be set
with device properties.
Please refer to the Documentation/devicetree/bindings/hwmon/isl,isl28022.yaml
for bindings if the device tree is used.
The driver supports only shunt and bus continuous ADC mode at 15bit resolution.
Averaging can be set from 1 to 128 samples (power of 2) on both channels.
Shunt voltage range of 40, 80, 160 or 320mV is allowed
The bus voltage range is 60V fixed.
Sysfs entries
-------------
The following attributes are supported. All attributes are read-only.
======================= =======================================================
in0_input bus voltage (milli Volt)
curr1_input current (milli Ampere)
power1_input power (micro Watt)
======================= =======================================================
Debugfs entries
---------------
The following attributes are supported. All attributes are read-only.
======================= =======================================================
shunt_voltage shunt voltage (micro Volt)
======================= =======================================================
+2
View File
@@ -12109,6 +12109,8 @@ M: Carsten Spieß <mail@carsten-spiess.de>
L: linux-hwmon@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml
F: Documentation/hwmon/isl28022.rst
F: drivers/hwmon/isl28022.c
ISOFS FILESYSTEM
M: Jan Kara <jack@suse.cz>
+11
View File
@@ -855,6 +855,17 @@ config SENSORS_CORETEMP
sensor inside your CPU. Most of the family 6 CPUs
are supported. Check Documentation/hwmon/coretemp.rst for details.
config SENSORS_ISL28022
tristate "Renesas ISL28022"
depends on I2C
select REGMAP_I2C
help
If you say yes here you get support for ISL28022 power monitor.
Check Documentation/hwmon/isl28022.rst for details.
This driver can also be built as a module. If so, the module
will be called isl28022.
config SENSORS_IT87
tristate "ITE IT87xx and compatibles"
depends on HAS_IOPORT
+1
View File
@@ -103,6 +103,7 @@ obj-$(CONFIG_SENSORS_INA2XX) += ina2xx.o
obj-$(CONFIG_SENSORS_INA238) += ina238.o
obj-$(CONFIG_SENSORS_INA3221) += ina3221.o
obj-$(CONFIG_SENSORS_INTEL_M10_BMC_HWMON) += intel-m10-bmc-hwmon.o
obj-$(CONFIG_SENSORS_ISL28022) += isl28022.o
obj-$(CONFIG_SENSORS_IT87) += it87.o
obj-$(CONFIG_SENSORS_JC42) += jc42.o
obj-$(CONFIG_SENSORS_K8TEMP) += k8temp.o
File diff suppressed because it is too large Load Diff