Linux Documentation
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Colin Huang <u8813345@gmail.com>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>
Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, colin.huang2@amd.com,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH v6 2/2] hwmon: (pmbus/tda38740) Add driver for Infineon TDA38740/TDA38725
Date: Fri, 18 Sep 2026 08:02:38 -0700	[thread overview]
Message-ID: <dbd0a721-898b-4524-a0cd-c9751fd4bd68@roeck-us.net> (raw)
In-Reply-To: <20260918-add-tda38740-and-tda38725-v6-2-a8b11018d850@gmail.com>

On 9/18/26 03:23, Colin Huang wrote:
> Add a PMBus driver for Infineon TDA38740 and TDA38725
> single-voltage synchronous buck regulators.
> 
> Signed-off-by: Colin Huang <u8813345@gmail.com>

For my reference (waiting for DT patch approval):

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   Documentation/hwmon/index.rst    |  1 +
>   Documentation/hwmon/tda38740.rst | 65 ++++++++++++++++++++++++++++++++++++++++
>   drivers/hwmon/pmbus/Kconfig      |  9 ++++++
>   drivers/hwmon/pmbus/Makefile     |  1 +
>   drivers/hwmon/pmbus/tda38740.c   | 64 +++++++++++++++++++++++++++++++++++++++
>   5 files changed, 140 insertions(+)
> 
> diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst
> index f07977a20271..aeff87b3d46d 100644
> --- a/Documentation/hwmon/index.rst
> +++ b/Documentation/hwmon/index.rst
> @@ -265,6 +265,7 @@ Hardware Monitoring Kernel Drivers
>      sy7636a-hwmon
>      tc654
>      tc74
> +   tda38740
>      thmc50
>      tmp102
>      tmp103
> diff --git a/Documentation/hwmon/tda38740.rst b/Documentation/hwmon/tda38740.rst
> new file mode 100644
> index 000000000000..55ce12f14914
> --- /dev/null
> +++ b/Documentation/hwmon/tda38740.rst
> @@ -0,0 +1,65 @@
> +.. SPDX-License-Identifier: GPL-2.0-only
> +
> +====================================
> +Kernel driver tda38740
> +====================================
> +
> +Supported chips:
> +  * Infineon TDA38740
> +  * Infineon TDA38725
> +
> +    Prefix: 'tda38740'
> +
> +    Addresses scanned: -
> +
> +    Datasheet:
> +      https://www.infineon.com/row/public/documents/24/49/infineon-tda38740-tda38725-datasheet-en.pdf
> +
> +Author: Colin Huang <u8813345@gmail.com>
> +
> +Description
> +-----------
> +
> +The TDA38740 and TDA38725 are single-output synchronous buck regulators with a
> +PMBus interface. They expose basic voltage, current, power and temperature
> +telemetry through the standard PMBus hwmon interfaces.
> +
> +Sysfs entries
> +-------------
> +
> +======================= =======================================================
> +curr1_alarm		Input current alarm
> +curr1_input		Measured input current
> +curr1_label		"iin"
> +
> +curr2_crit		Critical maximum output current
> +curr2_crit_alarm	Output current critical high alarm
> +curr2_input		Measured output current
> +curr2_label		"iout"
> +
> +in1_crit		Critical maximum input voltage
> +in1_crit_alarm		Input voltage critical high alarm
> +in1_input		Measured input voltage
> +in1_label		"vin"
> +
> +in2_crit		Critical maximum output voltage
> +in2_crit_alarm		Output voltage critical high alarm
> +in2_input		Measured output voltage
> +in2_label		"vout"
> +in2_lcrit		Critical minimum output voltage
> +in2_lcrit_alarm		Output voltage critical low alarm
> +
> +power1_alarm		Input power alarm
> +power1_input		Measured input power
> +power1_label		"pin"
> +
> +power2_input		Measured output power
> +power2_label		"pout"
> +
> +temp1_crit		Critical high temperature
> +temp1_crit_alarm	Chip temperature critical high alarm
> +temp1_input		Measured temperature
> +temp1_max		Maximum temperature
> +temp1_max_alarm		Chip temperature high alarm
> +======================= =======================================================
> +
> diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig
> index bcfdc4ce4c10..e4ca80dd0574 100644
> --- a/drivers/hwmon/pmbus/Kconfig
> +++ b/drivers/hwmon/pmbus/Kconfig
> @@ -763,6 +763,15 @@ config SENSORS_TDA38640_REGULATOR
>   	  If you say yes here you get regulator support for Infineon
>   	  TDA38640 as regulator.
>   
> +config SENSORS_TDA38740
> +	tristate "Infineon TDA38725/TDA38740"
> +	help
> +	  If you say yes here you get hardware monitoring support for Infineon
> +	  TDA38725 and TDA38740.
> +
> +	  This driver can also be built as a module. If so, the module will
> +	  be called tda38740.
> +
>   config SENSORS_TPS25990
>   	tristate "TI TPS25990"
>   	help
> diff --git a/drivers/hwmon/pmbus/Makefile b/drivers/hwmon/pmbus/Makefile
> index e288fe72a437..eb06d47816fd 100644
> --- a/drivers/hwmon/pmbus/Makefile
> +++ b/drivers/hwmon/pmbus/Makefile
> @@ -70,6 +70,7 @@ obj-$(CONFIG_SENSORS_STEF48H28)	+= stef48h28.o
>   obj-$(CONFIG_SENSORS_SQ24860)	+= sq24860.o
>   obj-$(CONFIG_SENSORS_STPDDC60)	+= stpddc60.o
>   obj-$(CONFIG_SENSORS_TDA38640)	+= tda38640.o
> +obj-$(CONFIG_SENSORS_TDA38740)	+= tda38740.o
>   obj-$(CONFIG_SENSORS_TPS25990)	+= tps25990.o
>   obj-$(CONFIG_SENSORS_TPS40422)	+= tps40422.o
>   obj-$(CONFIG_SENSORS_TPS53679)	+= tps53679.o
> diff --git a/drivers/hwmon/pmbus/tda38740.c b/drivers/hwmon/pmbus/tda38740.c
> new file mode 100644
> index 000000000000..067de07ba9fb
> --- /dev/null
> +++ b/drivers/hwmon/pmbus/tda38740.c
> @@ -0,0 +1,64 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Hardware monitoring driver for Infineon TDA38725/TDA38740
> + *
> + * Copyright (c) 2023 9elements GmbH
> + *
> + */
> +
> +#include <linux/err.h>
> +#include <linux/i2c.h>
> +#include <linux/init.h>
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include "pmbus.h"
> +
> +static struct pmbus_driver_info tda38740_info = {
> +	.pages = 1,
> +	.format[PSC_VOLTAGE_IN] = linear,
> +	.format[PSC_VOLTAGE_OUT] = linear,
> +	.format[PSC_CURRENT_OUT] = linear,
> +	.format[PSC_CURRENT_IN] = linear,
> +	.format[PSC_POWER] = linear,
> +	.format[PSC_TEMPERATURE] = linear,
> +	.func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_STATUS_INPUT
> +	    | PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP
> +	    | PMBUS_HAVE_IIN
> +	    | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
> +	    | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT
> +	    | PMBUS_HAVE_POUT | PMBUS_HAVE_PIN,
> +};
> +
> +static int tda38740_probe(struct i2c_client *client)
> +{
> +	return pmbus_do_probe(client, &tda38740_info);
> +}
> +
> +static const struct i2c_device_id tda38740_id[] = {
> +	{ .name = "tda38725"},
> +	{ .name = "tda38740"},
> +	{}
> +};
> +MODULE_DEVICE_TABLE(i2c, tda38740_id);
> +
> +static const struct of_device_id tda38740_of_match[] = {
> +	{ .compatible = "infineon,tda38725"},
> +	{ .compatible = "infineon,tda38740"},
> +	{}
> +};
> +MODULE_DEVICE_TABLE(of, tda38740_of_match);
> +
> +static struct i2c_driver tda38740_driver = {
> +	.driver = {
> +		.name = "tda38740",
> +		.of_match_table = tda38740_of_match,
> +	},
> +	.probe = tda38740_probe,
> +	.id_table = tda38740_id,
> +};
> +
> +module_i2c_driver(tda38740_driver);
> +
> +MODULE_DESCRIPTION("PMBus driver for Infineon TDA38725/TDA38740");
> +MODULE_LICENSE("GPL");
> +MODULE_IMPORT_NS("PMBUS");
> 


  reply	other threads:[~2026-09-18 15:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18 10:23 [PATCH v6 0/2] Add driver for Infineon TDA38740/TDA38725 Colin Huang
2026-09-18 10:23 ` [PATCH v6 1/2] dt-bindings: hwmon: pmbus: Add Infineon tda38740 and tda38725 Colin Huang
2026-09-19  7:18   ` Krzysztof Kozlowski
2026-09-19 11:35   ` Guenter Roeck
2026-09-18 10:23 ` [PATCH v6 2/2] hwmon: (pmbus/tda38740) Add driver for Infineon TDA38740/TDA38725 Colin Huang
2026-09-18 15:02   ` Guenter Roeck [this message]
2026-09-18 17:24     ` Conor
2026-09-18 17:30       ` Guenter Roeck
2026-09-22 17:13         ` Conor Dooley
2026-09-19 11:36   ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dbd0a721-898b-4524-a0cd-c9751fd4bd68@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=colin.huang2@amd.com \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=robh@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=u8813345@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox