public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@kernel.org>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Benson Leung <bleung@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Jonathan Corbet <corbet@lwn.net>,
	Dustin Howett <dustin@howett.net>,
	Mario Limonciello <mario.limonciello@amd.com>,
	Stephen Horvath <s.horvath@outlook.com.au>,
	chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-hwmon@vger.kernel.org, Sung-Chi Li <lschyi@chromium.org>,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH v2 2/4] hwmon: (cros_ec) Add support for fan target speed
Date: Thu, 22 Jan 2026 03:24:07 +0000	[thread overview]
Message-ID: <aXGYV5VdeI-CRIWk@google.com> (raw)
In-Reply-To: <04a8e024-0502-4033-8fb6-c3c8a84088fb@t-8ch.de>

On Wed, Jan 21, 2026 at 09:55:38PM +0100, Thomas Weißschuh wrote:
> On 2026-01-21 09:08:26+0000, Tzung-Bi Shih wrote:
> > On Sun, Jan 18, 2026 at 10:45:56AM +0100, Thomas Weißschuh wrote:
> > > @@ -259,8 +278,13 @@ static umode_t cros_ec_hwmon_is_visible(const void *data, enum hwmon_sensor_type
> > >  					u32 attr, int channel)
> > >  {
> > >  	const struct cros_ec_hwmon_priv *priv = data;
> > > +	u16 speed;
> > >  
> > >  	if (type == hwmon_fan) {
> > > +		if (attr == hwmon_fan_target &&
> > > +		    cros_ec_hwmon_read_fan_target(priv->cros_ec, &speed) == -EOPNOTSUPP)
> > 
> > [v2 4/4] patch uses is_cros_ec_cmd_available() for the purpose.  Can't it
> > also use here?
> 
> That is somewhat intentional. The code in patch 4 is executed many
> times, so caching the result is faster. The code here is only executed
> once. Calling the accessor instead of using  is_cros_ec_cmd_available()
> makes sure that we test for the correct command and version, without
> needing another, long CROS_EC_HWMON_*_VERSION define.

I have no strong preference.  For the patch,
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>

  reply	other threads:[~2026-01-22  3:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-18  9:45 [PATCH v2 0/4] hwmon: (cros_ec) Fan target and temperature thresholds Thomas Weißschuh
2026-01-18  9:45 ` [PATCH v2 1/4] hwmon: (cros_ec) Split up supported features in the documentation Thomas Weißschuh
2026-01-21  9:07   ` Tzung-Bi Shih
2026-01-27  0:23   ` Guenter Roeck
2026-01-18  9:45 ` [PATCH v2 2/4] hwmon: (cros_ec) Add support for fan target speed Thomas Weißschuh
2026-01-21  9:08   ` Tzung-Bi Shih
2026-01-21 20:55     ` Thomas Weißschuh
2026-01-22  3:24       ` Tzung-Bi Shih [this message]
2026-01-27  0:24   ` Guenter Roeck
2026-01-18  9:45 ` [PATCH v2 3/4] hwmon: (cros_ec) Move temperature channel params to a macro Thomas Weißschuh
2026-01-21  9:08   ` Tzung-Bi Shih
2026-01-27  0:24   ` Guenter Roeck
2026-01-18  9:45 ` [PATCH v2 4/4] hwmon: (cros_ec) Add support for temperature thresholds Thomas Weißschuh
2026-01-21  9:09   ` Tzung-Bi Shih
2026-01-27  0:26   ` Guenter Roeck
2026-01-21 21:00 ` [PATCH v2 0/4] hwmon: (cros_ec) Fan target and " Dustin Howett

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=aXGYV5VdeI-CRIWk@google.com \
    --to=tzungbi@kernel.org \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=corbet@lwn.net \
    --cc=dustin@howett.net \
    --cc=groeck@chromium.org \
    --cc=jdelvare@suse.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=linux@weissschuh.net \
    --cc=lschyi@chromium.org \
    --cc=mario.limonciello@amd.com \
    --cc=s.horvath@outlook.com.au \
    /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