[PATCH 0/5] hwmon: (cros_ec): fan target, fan pwm control and temperature thresholds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
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@xxxxxxxxxxxxxx>





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux