Commit 42bfe7dd authored by Erik Rosen's avatar Erik Rosen Committed by Guenter Roeck
Browse files

hwmon: (pmbus/stpddc60) Add ST STPDDC60 pmbus driver



Add hardware monitoring support for ST STPDDC60 Unversal Digital
Multicell Controller.

Signed-off-by: default avatarErik Rosen <erik.rosen@metormote.com>
Link: https://lore.kernel.org/r/20210218115249.28513-3-erik.rosen@metormote.com


[groeck: Fixed whitespace error in Makefile]
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent d3e33067
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -169,6 +169,7 @@ Hardware Monitoring Kernel Drivers
   smsc47m192
   smsc47m1
   sparx5-temp
   stpddc60
   tc654
   tc74
   thmc50
+90 −0
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0

Kernel driver stpddc60
======================

Supported chips:

  * ST STPDDC60

    Prefix: 'stpddc60', 'bmr481'

    Addresses scanned: -

    Datasheet: https://flexpowermodules.com/documents/fpm-techspec-bmr481

Author: Erik Rosen <erik.rosen@metormote.com>


Description
-----------

This driver supports hardware monitoring for ST STPDDC60 controller chip and
compatible modules.

The driver is a client driver to the core PMBus driver. Please see
Documentation/hwmon/pmbus.rst and Documentation.hwmon/pmbus-core 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 vout under- and over-voltage limits are set in relation to the commanded
output voltage as a positive or negative offset in the interval 50mV to 400mV
in 50mV steps. This means that the absolute values of the limits will change
when the commanded output voltage changes. Also, care should be taken when
writing to those limits since in the worst case the commanded output voltage
could change at the same time as the limit is written to, wich will lead to
unpredictable results.


Platform data support
---------------------

The driver supports standard PMBus driver platform data.


Sysfs entries
-------------

The following attributes are supported. Vin, iout, pout and temp limits
are read-write; all other attributes are read-only.

======================= ========================================================
in1_label		"vin"
in1_input		Measured input voltage.
in1_lcrit		Critical minimum input voltage.
in1_crit		Critical maximum input voltage.
in1_lcrit_alarm		Input voltage critical low alarm.
in1_crit_alarm		Input voltage critical high alarm.

in2_label		"vout1"
in2_input		Measured output voltage.
in2_lcrit		Critical minimum output voltage.
in2_crit		Critical maximum output voltage.
in2_lcrit_alarm		Critical output voltage critical low alarm.
in2_crit_alarm		Critical output voltage critical high alarm.

curr1_label		"iout1"
curr1_input		Measured output current.
curr1_max		Maximum output current.
curr1_max_alarm		Output current high alarm.
curr1_crit		Critical maximum output current.
curr1_crit_alarm	Output current critical high alarm.

power1_label		"pout1"
power1_input		Measured output power.
power1_crit		Critical maximum output power.
power1_crit_alarm	Output power critical high alarm.

temp1_input		Measured maximum temperature of all phases.
temp1_max		Maximum temperature limit.
temp1_max_alarm		High temperature alarm.
temp1_crit		Critical maximum temperature limit.
temp1_crit_alarm	Critical maximum temperature alarm.
======================= ========================================================
+7 −0
Original line number Diff line number Diff line
@@ -16947,6 +16947,13 @@ L: linux-i2c@vger.kernel.org
S:	Maintained
F:	drivers/i2c/busses/i2c-stm32*
ST STPDDC60 DRIVER
M:	Daniel Nilsson <daniel.nilsson@flex.com>
L:	linux-hwmon@vger.kernel.org
S:	Maintained
F:	Documentation/hwmon/stpddc60.rst
F:	drivers/hwmon/pmbus/stpddc60.c
ST VL53L0X ToF RANGER(I2C) IIO DRIVER
M:	Song Qiang <songqiang1304521@gmail.com>
L:	linux-iio@vger.kernel.org
+10 −0
Original line number Diff line number Diff line
@@ -256,6 +256,16 @@ config SENSORS_Q54SJ108A2
	  This driver can also be built as a module. If so, the module will
	  be called q54sj108a2.

config SENSORS_STPDDC60
	tristate "ST STPDDC60"
	help
	  If you say yes here you get hardware monitoring support for ST
	  STPDDC60 Universal Digital Multicell Controller, as well as for
	  Flex BMR481.

	  This driver can also be built as a module. If so, the module will
	  be called stpddc60.

config SENSORS_TPS40422
	tristate "TI TPS40422"
	help
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ obj-$(CONFIG_SENSORS_MP2975) += mp2975.o
obj-$(CONFIG_SENSORS_PM6764TR)	+= pm6764tr.o
obj-$(CONFIG_SENSORS_PXE1610)	+= pxe1610.o
obj-$(CONFIG_SENSORS_Q54SJ108A2)	+= q54sj108a2.o
obj-$(CONFIG_SENSORS_STPDDC60)	+= stpddc60.o
obj-$(CONFIG_SENSORS_TPS40422)	+= tps40422.o
obj-$(CONFIG_SENSORS_TPS53679)	+= tps53679.o
obj-$(CONFIG_SENSORS_UCD9000)	+= ucd9000.o
Loading