All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Joaquín Ignacio Aramendía" <samsagax@gmail.com>
To: w_armin@gmx.de
Cc: hdegoede@redhat.com, jdelvare@suse.com,
	linux-hwmon@vger.kernel.org, linux@roeck-us.net,
	markgross@kernel.org, platform-driver-x86@vger.kernel.org,
	pobrn@protonmail.com,
	"Joaquín Ignacio Aramendía" <samsagax@gmail.com>
Subject: [PATCH] hwmon: (oxp-sensors) Bugfix pwm reading
Date: Mon, 28 Nov 2022 15:52:06 -0300	[thread overview]
Message-ID: <20221128185206.212022-1-samsagax@gmail.com> (raw)

PWM reading is only 1 register long.

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
---
 drivers/hwmon/oxp-sensors.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/oxp-sensors.c b/drivers/hwmon/oxp-sensors.c
index c04277676b72..f84ec8f8eda9 100644
--- a/drivers/hwmon/oxp-sensors.c
+++ b/drivers/hwmon/oxp-sensors.c
@@ -158,7 +158,7 @@ static int oxp_platform_read(struct device *dev, enum hwmon_sensor_types type,
 	case hwmon_pwm:
 		switch (attr) {
 		case hwmon_pwm_input:
-			ret = read_from_ec(OXP_SENSOR_PWM_REG, 2, val);
+			ret = read_from_ec(OXP_SENSOR_PWM_REG, 1, val);
 			if (ret)
 				return ret;
 			if (board == oxp_mini_amd)

base-commit: 9494c53e1389b120ba461899207ac8a3aab2632c
-- 
2.38.1


             reply	other threads:[~2022-11-28 18:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28 18:52 Joaquín Ignacio Aramendía [this message]
2022-11-28 22:19 ` [PATCH] hwmon: (oxp-sensors) Bugfix pwm reading 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=20221128185206.212022-1-samsagax@gmail.com \
    --to=samsagax@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=pobrn@protonmail.com \
    --cc=w_armin@gmx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.