lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241121-fix_power_limit_ec_cmd_version-v1-1-2f15dcf32084@chromium.org>
Date: Thu, 21 Nov 2024 13:18:26 +0800
From: Sung-Chi Li <lschyi@...omium.org>
To: Benson Leung <bleung@...omium.org>, Guenter Roeck <groeck@...omium.org>, 
 Sebastian Reichel <sre@...nel.org>
Cc: chrome-platform@...ts.linux.dev, linux-pm@...r.kernel.org, 
 linux-kernel@...r.kernel.org, Sung-Chi Li <lschyi@...omium.org>
Subject: [PATCH] power:supply: cros_usbpd-charger: update command version
 to set limit

The request that sets the power limit on the ChromeOS Embedded
Controller (EC) requires the command version to be 1, so update the
command version used in the driver.

Signed-off-by: Sung-Chi Li <lschyi@...omium.org>
---
The ChromeOS Embedded Controller (EC) exposes a set of commands (host
commands) for communicating with it, and the kernel driver
cros_usbpd-charger uses host commands to get and set power settings on
EC.

The host command needs to specify the version in the sent request. The
set external power command (EC_CMD_EXTERNAL_POWER_LIMIT) requires the
command version to be 1, so update that setting in the driver.
---
 drivers/power/supply/cros_usbpd-charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/cros_usbpd-charger.c b/drivers/power/supply/cros_usbpd-charger.c
index 47d3f58aa15c..c496c7c4dd2c 100644
--- a/drivers/power/supply/cros_usbpd-charger.c
+++ b/drivers/power/supply/cros_usbpd-charger.c
@@ -325,7 +325,7 @@ static int cros_usbpd_charger_set_ext_power_limit(struct charger_data *charger,
 	req.current_lim = current_lim;
 	req.voltage_lim = voltage_lim;
 
-	ret = cros_usbpd_charger_ec_command(charger, 0,
+	ret = cros_usbpd_charger_ec_command(charger, 1,
 					    EC_CMD_EXTERNAL_POWER_LIMIT,
 					    &req, sizeof(req), NULL, 0);
 	if (ret < 0)

---
base-commit: ac24e26aa08fe026804f678599f805eb13374a5d
change-id: 20241121-fix_power_limit_ec_cmd_version-6f2d75ad84b5

Best regards,
-- 
Sung-Chi Li <lschyi@...omium.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ