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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240608-cros_ec-hwmon-pwm-v1-0-d29dfc26fbc3@weissschuh.net>
Date: Sat, 08 Jun 2024 10:12:42 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Benson Leung <bleung@...omium.org>, Tzung-Bi Shih <tzungbi@...nel.org>, 
 Guenter Roeck <groeck@...omium.org>, 
 Thomas Weißschuh <thomas@...ssschuh.net>, 
 Jean Delvare <jdelvare@...e.com>, Guenter Roeck <linux@...ck-us.net>
Cc: Dustin Howett <dustin@...ett.net>, 
 Mario Limonciello <mario.limonciello@....com>, 
 Stephen Horvath <s.horvath@...look.com.au>, chrome-platform@...ts.linux.dev, 
 linux-kernel@...r.kernel.org, linux-hwmon@...r.kernel.org, 
 Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH 0/5] hwmon: (cros_ec): fan target, fan pwm control and
 temperature thresholds

Add support to cros_ec_hwmon for
* fan target speed for fan 1
* fan pwm control for all fans
* fan temperature thresholds (RW) for all temp sensors

The EC also supports tempY_auto_pointZ_{pwm,temp} but that does not yet
seem to be usable from "struct hwmon_channel_info".
Guenter, is this intentional, do you want me to add support for it?

Patch 1 introduces a utility function cros_ec_cmd_versions() which wraps
EC_CMD_GET_CMD_VERSIONS.
That is used as it seems inadvisable to call EC_CMD_PWM_SET_FAN_DUTY
during probing.
I'm planning on also using this utility function in my CrOS EC charge
control driver.
Also  there are some other places throughout the tree that could use it.

This series is meant to be merged through the chrome-platform tree,
as cros_ec_hwmon itself is only available there and because of
the new cros_ec_cmd_version().
To test it you *also* need
commit 27e669820c ("mfd: cros_ec: Register hardware monitoring subdevice")
from the MFD tree (branch mfd-for-next).

Tested on a Framework 13 AMD.

Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
---
Thomas Weißschuh (5):
      platform/chrome: cros_ec_proto: Introduce cros_ec_cmd_versions()
      hwmon: (cros_ec) Add support for fan target speed
      hwmon: (cros_ec) Add support for PWM fan control
      hwmon: (cros_ec) Split temperature channel params
      hwmon: (cros_ec) Add support for temperature thresholds

 Documentation/hwmon/cros_ec_hwmon.rst       |   8 +-
 drivers/hwmon/cros_ec_hwmon.c               | 284 +++++++++++++++++++++++++---
 drivers/platform/chrome/cros_ec_proto.c     |  26 +++
 include/linux/platform_data/cros_ec_proto.h |   2 +
 4 files changed, 290 insertions(+), 30 deletions(-)
---
base-commit: c8a4bdca928debacf49524d1b09dbf27e88e1f18
change-id: 20240529-cros_ec-hwmon-pwm-0dcc610ba0dc

Best regards,
-- 
Thomas Weißschuh <linux@...ssschuh.net>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ