Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Benson Leung <bleung@chromium.org>,
	Sung-Chi Li <lschyi@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	chrome-platform@lists.linux.dev, linux-hwmon@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] hwmon: (cros_ec) Store the hwmon device in cros_ec_hwmon_priv
Date: Sun, 19 Jul 2026 07:35:05 -0700	[thread overview]
Message-ID: <d02a06cb-403b-43c1-bfcd-da5d2ac87bce@roeck-us.net> (raw)
In-Reply-To: <20260711-cros_ec-hwmon-locking-v1-2-cb6d0fdbb2d3@weissschuh.net>

On Sat, Jul 11, 2026 at 11:59:06AM +0200, Thomas Weißschuh wrote:
> The upcoming locking scheme for thermal devices will require access
> to the hwmon device.
> 
> Add it do the priv struct.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/cros_ec_hwmon.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/hwmon/cros_ec_hwmon.c b/drivers/hwmon/cros_ec_hwmon.c
> index f9b19da50472..fb5daa9f80d1 100644
> --- a/drivers/hwmon/cros_ec_hwmon.c
> +++ b/drivers/hwmon/cros_ec_hwmon.c
> @@ -25,6 +25,7 @@
>  
>  struct cros_ec_hwmon_priv {
>  	struct cros_ec_device *cros_ec;
> +	struct device *hwmon_dev;
>  	const char *temp_sensor_names[EC_TEMP_SENSOR_ENTRIES + EC_TEMP_SENSOR_B_ENTRIES];
>  	u8 usable_fans;
>  	bool fan_control_supported;
> @@ -556,7 +557,6 @@ static int cros_ec_hwmon_probe(struct platform_device *pdev)
>  	struct cros_ec_dev *ec_dev = dev_get_drvdata(dev->parent);
>  	struct cros_ec_device *cros_ec = ec_dev->ec_dev;
>  	struct cros_ec_hwmon_priv *priv;
> -	struct device *hwmon_dev;
>  	u8 thermal_version;
>  	int ret;
>  
> @@ -580,10 +580,10 @@ static int cros_ec_hwmon_probe(struct platform_device *pdev)
>  	priv->temp_threshold_supported = is_cros_ec_cmd_available(priv->cros_ec,
>  								  EC_CMD_THERMAL_GET_THRESHOLD, 1);
>  
> -	hwmon_dev = devm_hwmon_device_register_with_info(dev, "cros_ec", priv,
> -							 &cros_ec_hwmon_chip_info, NULL);
> -	if (IS_ERR(hwmon_dev))
> -		return PTR_ERR(hwmon_dev);
> +	priv->hwmon_dev = devm_hwmon_device_register_with_info(dev, "cros_ec", priv,
> +							       &cros_ec_hwmon_chip_info, NULL);
> +	if (IS_ERR(priv->hwmon_dev))
> +		return PTR_ERR(priv->hwmon_dev);
>  
>  	cros_ec_hwmon_register_fan_cooling_devices(dev, priv);
>  

  parent reply	other threads:[~2026-07-19 14:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-11  9:59 [PATCH 0/3] hwmon: (cros_ec) Synchronize EC access from the thermal device callbacks Thomas Weißschuh
2026-07-11  9:59 ` [PATCH 1/3] hwmon: (cros_ec) Register the thermal devices after the hwmon ones Thomas Weißschuh
2026-07-11 10:10   ` sashiko-bot
2026-07-19 14:34   ` Guenter Roeck
2026-07-11  9:59 ` [PATCH 2/3] hwmon: (cros_ec) Store the hwmon device in cros_ec_hwmon_priv Thomas Weißschuh
2026-07-11 10:05   ` sashiko-bot
2026-07-19 14:35   ` Guenter Roeck [this message]
2026-07-11  9:59 ` [PATCH 3/3] hwmon: (cros_ec) Synchronize EC access from the thermal device callbacks Thomas Weißschuh
2026-07-11 10:04   ` sashiko-bot
2026-07-19 14:35   ` 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=d02a06cb-403b-43c1-bfcd-da5d2ac87bce@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=groeck@chromium.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=lschyi@chromium.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