Linux-Doc Archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Erik Rosen <erik.rosen@metormote.com>
Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-hwmon@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Jean Delvare <jdelvare@suse.com>
Subject: Re: [PATCH v3 1/2] hwmon: (pmbus) Add pmbus_set_update() function to set update flag
Date: Thu, 11 Mar 2021 14:00:56 -0800	[thread overview]
Message-ID: <20210311220056.GA37350@roeck-us.net> (raw)
In-Reply-To: <20210218115249.28513-2-erik.rosen@metormote.com>

On Thu, Feb 18, 2021 at 12:52:48PM +0100, Erik Rosen wrote:
> For the STPDDC60 chip, the vout alarm-limits are represented as an offset
> relative to the commanded output voltage. This means that the limits are
> dynamic and must not be cached by the pmbus driver. This patch adds a
> pmbus_set_sensor() function to pmbus_core to be able to set the update flag
> on selected sensors after auto-detection of limit attributes.
> 
> Signed-off-by: Erik Rosen <erik.rosen@metormote.com>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/pmbus/pmbus.h      |  1 +
>  drivers/hwmon/pmbus/pmbus_core.c | 11 +++++++++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h
> index 4c30ec89f5bf..3968924f8533 100644
> --- a/drivers/hwmon/pmbus/pmbus.h
> +++ b/drivers/hwmon/pmbus/pmbus.h
> @@ -475,6 +475,7 @@ extern const struct regulator_ops pmbus_regulator_ops;
>  /* Function declarations */
>  
>  void pmbus_clear_cache(struct i2c_client *client);
> +void pmbus_set_update(struct i2c_client *client, u8 reg, bool update);
>  int pmbus_set_page(struct i2c_client *client, int page, int phase);
>  int pmbus_read_word_data(struct i2c_client *client, int page, int phase,
>  			 u8 reg);
> diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
> index 192442b3b7a2..a8f910826a18 100644
> --- a/drivers/hwmon/pmbus/pmbus_core.c
> +++ b/drivers/hwmon/pmbus/pmbus_core.c
> @@ -141,6 +141,17 @@ void pmbus_clear_cache(struct i2c_client *client)
>  }
>  EXPORT_SYMBOL_GPL(pmbus_clear_cache);
>  
> +void pmbus_set_update(struct i2c_client *client, u8 reg, bool update)
> +{
> +	struct pmbus_data *data = i2c_get_clientdata(client);
> +	struct pmbus_sensor *sensor;
> +
> +	for (sensor = data->sensors; sensor; sensor = sensor->next)
> +		if (sensor->reg == reg)
> +			sensor->update = update;
> +}
> +EXPORT_SYMBOL_GPL(pmbus_set_update);
> +
>  int pmbus_set_page(struct i2c_client *client, int page, int phase)
>  {
>  	struct pmbus_data *data = i2c_get_clientdata(client);

  reply	other threads:[~2021-03-11 22:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18 11:52 [PATCH v3 0/2] hwmon: (pmbus) Add ST STPDDC60 pmbus driver Erik Rosen
2021-02-18 11:52 ` [PATCH v3 1/2] hwmon: (pmbus) Add pmbus_set_update() function to set update flag Erik Rosen
2021-03-11 22:00   ` Guenter Roeck [this message]
2021-02-18 11:52 ` [PATCH v3 2/2] hwmon: (pmbus/stpddc60) Add ST STPDDC60 pmbus driver Erik Rosen
2021-03-11 22:02   ` 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=20210311220056.GA37350@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=corbet@lwn.net \
    --cc=erik.rosen@metormote.com \
    --cc=jdelvare@suse.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.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).