dt-bindings: hwmon: pmbus: add ti tps25990 support
Subsystems (4)
PATCH 1/2 dt-bindings: hwmon: pmbus: add ti tps25990 support
From: Jerome Brunet <[email protected]>
Add DT binding for the Texas Instruments TPS25990 eFuse
Message-ID: <[email protected]>
--- .../bindings/hwmon/pmbus/ti,tps25990.yaml | 83 +++++++++++++++++++ MAINTAINERS | 6 ++ 2 files changed, 89 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/ti,tps25990.yaml
Documentation/devicetree/bindings/hwmon/pmbus/ti,tps25990.yaml new file +83 -0
@@ -0,0 +1,83 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- + +$id: http://devicetree.org/schemas/hwmon/pmbus/ti,tps25990.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments TPS25990 Stackable eFuse + +maintainers: + - Jerome Brunet <[email protected]> + +description: + The TI TPS25990 is an integrated, high-current circuit + protection and power management device with PMBUS interface + +properties: + compatible: + const: ti,tps25990 + + reg: + maxItems: 1 + + ti,rimon-micro-ohms: + description: + micro Ohms value of the resistance installed between the Imon pin + and the ground reference. + + interrupts: + description: PMBUS SMB Alert Interrupt. + maxItems: 1 + + regulators: + type: object + description: + list of regulators provided by this controller. + + properties: + vout: + $ref: /schemas/regulator/regulator.yaml# + type: object + unevaluatedProperties: false + + gpdac1: + $ref: /schemas/regulator/regulator.yaml# + type: object + unevaluatedProperties: false + + gpdac2: + $ref: /schemas/regulator/regulator.yaml# + type: object + unevaluatedProperties: false + additionalProperties: false + +required: + - compatible + - reg + - ti,rimon-micro-ohms + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + i2c { + #address-cells = <1>; + #size-cells = <0>; + + hw-monitor@46 { + compatible = "ti,tps25990"; + reg = <0x46>; + + interrupt-parent = <&gpio>; + interrupts = <42 IRQ_TYPE_LEVEL_LOW>; + ti,rimon-micro-ohms = <1370000000>; + + regulators { + cpu0_vout: vout { + regulator-name = "main_cpu0"; + }; + }; + }; + };
MAINTAINERS +6 -0
@@ -21363,6 +21363,12 @@ F: include/linux/dma/k3-udma-glue.h F: include/linux/dma/ti-cppi5.h X: drivers/dma/ti/cppi41.c +TEXAS INSTRUMENTS TPS25990 HARDWARE MONITOR DRIVER +M: Jerome Brunet <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/hwmon/pmbus/ti,tps25990.yaml + TEXAS INSTRUMENTS TPS23861 PoE PSE DRIVER M: Robert Marko <[email protected]> M: Luka Perkov <[email protected]>
Signature · 1 line
2.49.0
PATCH 2/2 hwmon: (pmbus/tps25990) Add initial support
From: Jerome Brunet <[email protected]>
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
--- Documentation/hwmon/index.rst | 1 + Documentation/hwmon/tps25990.rst | 147 +++++++++++ MAINTAINERS | 2 + drivers/hwmon/pmbus/Kconfig | 17 ++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/tps25990.c | 436 +++++++++++++++++++++++++++++++ 6 files changed, 604 insertions(+) create mode 100644 Documentation/hwmon/tps25990.rst create mode 100644 drivers/hwmon/pmbus/tps25990.c
Documentation/hwmon/index.rst +1 -0
@@ -221,6 +221,7 @@ Hardware Monitoring Kernel Drivers tmp464 tmp513 tps23861 + tps25990 tps40422 tps53679 tps546d24
Documentation/hwmon/tps25990.rst new file +147 -0
147 lines not on this page · raw message
MAINTAINERS +2 -0
@@ -21368,6 +21368,8 @@ M: Jerome Brunet <[email protected]> L: [email protected] S: Maintained F: Documentation/devicetree/bindings/hwmon/pmbus/ti,tps25990.yaml +F: Documentation/hwmon/tps25990.rst +F: drivers/hwmon/pmbus/tps25990.c TEXAS INSTRUMENTS TPS23861 PoE PSE DRIVER M: Robert Marko <[email protected]>
drivers/hwmon/pmbus/Kconfig +17 -0
@@ -473,6 +473,23 @@ config SENSORS_TDA38640_REGULATOR If you say yes here you get regulator support for Infineon TDA38640 as regulator. +config SENSORS_TPS25990 + tristate "TI TPS25990" + help + If you say yes here you get hardware monitoring support for TI + TPS25990. + + This driver can also be built as a module. If so, the module will + be called tps25990. + +config SENSORS_TPS25990_REGULATOR + bool "Regulator support for TPS25990 and compatibles" + depends on SENSORS_TPS25990 && REGULATOR + default SENSORS_TPS25990 + help + If you say yes here you get regulator support for Texas Instruments + TPS25990. + config SENSORS_TPS40422 tristate "TI TPS40422" help
drivers/hwmon/pmbus/Makefile +1 -0
@@ -46,6 +46,7 @@ obj-$(CONFIG_SENSORS_PXE1610) += pxe1610.o obj-$(CONFIG_SENSORS_Q54SJ108A2) += q54sj108a2.o obj-$(CONFIG_SENSORS_STPDDC60) += stpddc60.o obj-$(CONFIG_SENSORS_TDA38640) += tda38640.o +obj-$(CONFIG_SENSORS_TPS25990) += tps25990.o obj-$(CONFIG_SENSORS_TPS40422) += tps40422.o obj-$(CONFIG_SENSORS_TPS53679) += tps53679.o obj-$(CONFIG_SENSORS_TPS546D24) += tps546d24.o
drivers/hwmon/pmbus/tps25990.c new file +436 -0
436 lines not on this page · raw message
Signature · 1 line
2.49.0