Linux-i2c Archive mirror
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: Jose Ramon San Buenaventura <jose.sanbuenaventura@analog.com>,
	 linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	 linux-i2c@vger.kernel.org
Cc: Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	 Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	 Jonathan Corbet <corbet@lwn.net>,
	Delphine CC Chiu <Delphine_CC_Chiu@Wiwynn.com>
Subject: Re: [PATCH v2 2/2] hwmon: pmbus: adm1275: add adm1281 support
Date: Mon, 22 Apr 2024 09:20:37 +0200	[thread overview]
Message-ID: <a00c375a9e96ea28f5d8cb0d0eaeb750ba462b17.camel@gmail.com> (raw)
In-Reply-To: <20240422025123.29770-3-jose.sanbuenaventura@analog.com>

Hi Jose,

On Mon, 2024-04-22 at 10:51 +0800, Jose Ramon San Buenaventura wrote:
> Adding support for adm1281 which is similar to adm1275
> 
> Removed extra case for STATUS_CML in adm1275_read_byte_data function.
> 

Remove the above line. As nothing to do with supporting the new device. This is what
it should be in your v2 changelog :)

> Signed-off-by: Jose Ramon San Buenaventura <jose.sanbuenaventura@analog.com>
> ---
>  Documentation/hwmon/adm1275.rst | 14 +++++++++++---
>  drivers/hwmon/pmbus/Kconfig     |  4 ++--
>  drivers/hwmon/pmbus/adm1275.c   | 11 +++++++++--
>  3 files changed, 22 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/hwmon/adm1275.rst b/Documentation/hwmon/adm1275.rst
> index 804590eea..467daf8ce 100644
> --- a/Documentation/hwmon/adm1275.rst
> +++ b/Documentation/hwmon/adm1275.rst
> @@ -43,6 +43,14 @@ Supported chips:
>  
>      Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1278.pdf
>  
> +  * Analog Devices ADM1281
> +
> +    Prefix: 'adm1281'
> +
> +    Addresses scanned: -
> +
> +    Datasheet:
> https://www.analog.com/media/en/technical-documentation/data-sheets/adm1281.pdf
> +
>    * Analog Devices ADM1293/ADM1294
>  
>      Prefix: 'adm1293', 'adm1294'
> @@ -58,10 +66,10 @@ Description
>  -----------
>  
>  This driver supports hardware monitoring for Analog Devices ADM1075, ADM1272,
> -ADM1275, ADM1276, ADM1278, ADM1293, and ADM1294 Hot-Swap Controller and
> +ADM1275, ADM1276, ADM1278, ADM1281, ADM1293, and ADM1294 Hot-Swap Controller and
>  Digital Power Monitors.
>  
> -ADM1075, ADM1272, ADM1275, ADM1276, ADM1278, ADM1293, and ADM1294 are hot-swap
> +ADM1075, ADM1272, ADM1275, ADM1276, ADM1278, ADM1281, ADM1293, and ADM1294 are
> hot-swap
>  controllers that allow a circuit board to be removed from or inserted into
>  a live backplane. They also feature current and voltage readback via an
>  integrated 12 bit analog-to-digital converter (ADC), accessed using a
> @@ -144,5 +152,5 @@ temp1_highest		Highest observed temperature.
>  temp1_reset_history	Write any value to reset history.
>  
>  			Temperature attributes are supported on ADM1272 and
> -			ADM1278.
> +			ADM1278, and ADM1281.
>  ======================= =======================================================
> diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig
> index 557ae0c41..9c1d0d7d5 100644
> --- a/drivers/hwmon/pmbus/Kconfig
> +++ b/drivers/hwmon/pmbus/Kconfig
> @@ -51,8 +51,8 @@ config SENSORS_ADM1275
>  	tristate "Analog Devices ADM1275 and compatibles"
>  	help
>  	  If you say yes here you get hardware monitoring support for Analog
> -	  Devices ADM1075, ADM1272, ADM1275, ADM1276, ADM1278, ADM1293,
> -	  and ADM1294 Hot-Swap Controller and Digital Power Monitors.
> +	  Devices ADM1075, ADM1272, ADM1275, ADM1276, ADM1278, ADM1281,
> +	  ADM1293, and ADM1294 Hot-Swap Controller and Digital Power Monitors.
>  
>  	  This driver can also be built as a module. If so, the module will
>  	  be called adm1275.
> diff --git a/drivers/hwmon/pmbus/adm1275.c b/drivers/hwmon/pmbus/adm1275.c
> index e2c61d6fa..2baeee8be 100644
> --- a/drivers/hwmon/pmbus/adm1275.c
> +++ b/drivers/hwmon/pmbus/adm1275.c
> @@ -18,7 +18,7 @@
>  #include <linux/log2.h>
>  #include "pmbus.h"
>  
> -enum chips { adm1075, adm1272, adm1275, adm1276, adm1278, adm1293, adm1294 };
> +enum chips { adm1075, adm1272, adm1275, adm1276, adm1278, adm1281, adm1293,
> adm1294 };
>  
>  #define ADM1275_MFR_STATUS_IOUT_WARN2	BIT(0)
>  #define ADM1293_MFR_STATUS_VAUX_UV_WARN	BIT(5)
> @@ -101,6 +101,7 @@ struct adm1275_data {
>  	bool have_pin_max;
>  	bool have_temp_max;
>  	bool have_power_sampling;
> +	bool have_status_cml;

don't think we need this...

>  	struct pmbus_driver_info info;
>  };
>  
> @@ -482,6 +483,7 @@ static const struct i2c_device_id adm1275_id[] = {
>  	{ "adm1275", adm1275 },
>  	{ "adm1276", adm1276 },
>  	{ "adm1278", adm1278 },
> +	{ "adm1281", adm1281 },
>  	{ "adm1293", adm1293 },
>  	{ "adm1294", adm1294 },
>  	{ }
> @@ -555,7 +557,8 @@ static int adm1275_probe(struct i2c_client *client)
>  			   client->name, mid->name);
>  
>  	if (mid->driver_data == adm1272 || mid->driver_data == adm1278 ||
> -	    mid->driver_data == adm1293 || mid->driver_data == adm1294)
> +	    mid->driver_data == adm1281 || mid->driver_data == adm1293 ||
> +	    mid->driver_data == adm1294)
>  		config_read_fn = i2c_smbus_read_word_data;
>  	else
>  		config_read_fn = i2c_smbus_read_byte_data;
> @@ -703,6 +706,10 @@ static int adm1275_probe(struct i2c_client *client)
>  			  PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT;
>  		break;
>  	case adm1278:
> +	case adm1281:
> +		if (data->id == adm1281)
> +			data->have_status_cml = true;
> +

and this...

- Nuno Sá


  reply	other threads:[~2024-04-22  7:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22  2:51 [PATCH v2 0/2] Add adm1281 support Jose Ramon San Buenaventura
2024-04-22  2:51 ` [PATCH v2 1/2] dt-bindings: hwmon: adm1275: add adm1281 Jose Ramon San Buenaventura
2024-04-22  2:51 ` [PATCH v2 2/2] hwmon: pmbus: adm1275: add adm1281 support Jose Ramon San Buenaventura
2024-04-22  7:20   ` Nuno Sá [this message]
2024-04-22  3:28 ` [PATCH v2 0/2] Add " Krzysztof Kozlowski
2024-04-22  3:45   ` Guenter Roeck
2024-04-22  4:09     ` SanBuenaventura, Jose

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=a00c375a9e96ea28f5d8cb0d0eaeb750ba462b17.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=Delphine_CC_Chiu@Wiwynn.com \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=jose.sanbuenaventura@analog.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh@kernel.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).