Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: linux-hwmon@vger.kernel.org
Cc: Tomasz Bojanowski <tomasz@bojanowski.me>,
	Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH 2/4] hwmon: (msi_mystic_light) Stop calling hid_hw_power()
Date: Sat,  7 Nov 2026 16:01:29 -0800	[thread overview]
Message-ID: <20261108000131.1249664-3-linux@roeck-us.net> (raw)
In-Reply-To: <20261108000131.1249664-1-linux@roeck-us.net>

msi_ml_read_report() currently wraps hid_hw_raw_request() with
hid_hw_power(..., PM_HINT_FULLON) and hid_hw_power(..., PM_HINT_NORMAL)
to prevent USB autosuspend during the feature report transfer.

However, msi_ml_probe() already calls hid_hw_open() and keeps the HID
device open for the entire lifetime of the driver binding so its
interrupt IN endpoint remains actively polled. Because the device is
kept open and remote wakeup is not enabled on this controller, USB
autosuspend is already inhibited while the driver is bound. Consistent
with other hwmon HID drivers, explicit per-request hid_hw_power() calls
are unnecessary.

Drop the redundant hid_hw_power() calls to simplify the report read
path.

Cc: Tomasz Bojanowski <tomasz@bojanowski.me>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/hwmon/msi_mystic_light.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/hwmon/msi_mystic_light.c b/drivers/hwmon/msi_mystic_light.c
index a008999e7c06..4b4e07f15aa8 100644
--- a/drivers/hwmon/msi_mystic_light.c
+++ b/drivers/hwmon/msi_mystic_light.c
@@ -76,17 +76,9 @@ static int msi_ml_read_report(struct msi_ml_data *priv)
 	memset(buf, 0, MSI_ML_SENSOR_REPORT_SIZE);
 	buf[0] = MSI_ML_SENSOR_REPORT_ID;
 
-	/* Make sure the device is not autosuspended during the request */
-	ret = hid_hw_power(priv->hdev, PM_HINT_FULLON);
-	if (ret < 0)
-		return ret;
-
 	ret = hid_hw_raw_request(priv->hdev, MSI_ML_SENSOR_REPORT_ID, buf,
 				 MSI_ML_SENSOR_REPORT_SIZE, HID_FEATURE_REPORT,
 				 HID_REQ_GET_REPORT);
-
-	hid_hw_power(priv->hdev, PM_HINT_NORMAL);
-
 	if (ret < 0)
 		return ret;
 	if (ret != MSI_ML_SENSOR_REPORT_SIZE)
-- 
2.45.2


  parent reply	other threads:[~2026-11-08  0:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-08  0:01 [PATCH 0/4] hwmon: (msi_mystic_light) Add support for additional MSI motherboards Guenter Roeck
2026-11-08  0:01 ` [PATCH 1/4] hwmon: (msi_mystic_light) Rearrange code to simplify adding per-board read functions Guenter Roeck
2026-11-08  0:01 ` Guenter Roeck [this message]
2026-11-08  0:01 ` [PATCH 3/4] hwmon: (msi_mystic_light) Make sensor read function board specific Guenter Roeck
2026-11-08  0:01 ` [PATCH 4/4] hwmon: (msi_mystic_light) Add support for additional boards Guenter Roeck
2026-11-08  8:14 ` [PATCH 0/4] hwmon: (msi_mystic_light) Add support for additional MSI motherboards Tomasz Bojanowski

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=20261108000131.1249664-3-linux@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=tomasz@bojanowski.me \
    /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