Commit 1e406332 authored by Erik Rosen's avatar Erik Rosen Committed by Guenter Roeck
Browse files

hwmon: (pmbus) Add pmbus driver for MAX15301



Add pmbus driver support for Maxim MAX15301 InTune Automatically
Compensated Digital PoL Controller with Driver and PMBus Telemetry

Even though the specification does not specifically mention it,
extensive empirical testing has revealed that auto-detection of
limit-registers will fail in a random fashion unless the delay
parameter is set to above about 80us. The default delay is set
to 100us to include some safety margin.

This patch is tested on a Flex BMR461 converter module.

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


[groeck: Added rationale for delay to driver header]
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent bab10bf9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -115,6 +115,7 @@ Hardware Monitoring Kernel Drivers
   ltc4260
   ltc4261
   max127
   max15301
   max16064
   max16065
   max1619
+87 −0
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0

Kernel driver max15301
======================

Supported chips:

  * Maxim MAX15301

    Prefix: 'max15301', 'bmr461'

    Addresses scanned: -

    Datasheet: https://datasheets.maximintegrated.com/en/ds/MAX15301.pdf

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


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

This driver supports hardware monitoring for Maxim MAX15301 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.


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

The driver supports standard PMBus driver platform data.


Module parameters
-----------------

delay
-----

The controller requires a minimum interval between I2C bus accesses.
The default interval is set to 100 us. For manual override, the driver
provides a writeable module parameter, 'delay', which can be used to
set the interval to a value between 0 and 65,535 microseconds.


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_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_crit		Critical maximum output current.
curr1_crit_alarm	Output current 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
@@ -10791,6 +10791,13 @@ S: Orphan
F:	drivers/video/fbdev/matrox/matroxfb_*
F:	include/uapi/linux/matroxfb.h
MAX15301 DRIVER
M:	Daniel Nilsson <daniel.nilsson@flex.com>
L:	linux-hwmon@vger.kernel.org
S:	Maintained
F:	Documentation/hwmon/max15301.rst
F:	drivers/hwmon/pmbus/max15301.c
MAX16065 HARDWARE MONITOR DRIVER
M:	Guenter Roeck <linux@roeck-us.net>
L:	linux-hwmon@vger.kernel.org
+9 −0
Original line number Diff line number Diff line
@@ -176,6 +176,15 @@ config SENSORS_LTC3815
	  This driver can also be built as a module. If so, the module will
	  be called ltc3815.

config SENSORS_MAX15301
	tristate "Maxim MAX15301"
	help
	  If you say yes here you get hardware monitoring support for Maxim
	  MAX15301, as well as for Flex BMR461.

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

config SENSORS_MAX16064
	tristate "Maxim MAX16064"
	help
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ obj-$(CONFIG_SENSORS_ISL68137) += isl68137.o
obj-$(CONFIG_SENSORS_LM25066)	+= lm25066.o
obj-$(CONFIG_SENSORS_LTC2978)	+= ltc2978.o
obj-$(CONFIG_SENSORS_LTC3815)	+= ltc3815.o
obj-$(CONFIG_SENSORS_MAX15301)	+= max15301.o
obj-$(CONFIG_SENSORS_MAX16064)	+= max16064.o
obj-$(CONFIG_SENSORS_MAX16601)	+= max16601.o
obj-$(CONFIG_SENSORS_MAX20730)	+= max20730.o
Loading