mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Armin Wolf <W_Armin@gmx.de>
To: jdelvare@suse.com, linux@roeck-us.net
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] hwmon: Add new pwmX_fan_channel attribute
Date: Sat, 23 Jul 2022 05:38:18 +0200	[thread overview]
Message-ID: <20220723033820.22612-1-W_Armin@gmx.de> (raw)

Userspace software which needs to know which PWM channel is
associated with which fan channel (like fancontrol/pwmconfig)
currently has to probe each PWM channel and watch for fan speed
changes.

This process has multiple issues:
1. Hardware might overhead during probing of PWM channels.
2. Not all fans react the same to PWM changes, making
detection unreliable.

However some hwmon chips, especially firmware-based ones, already
know which PWM channels are associated to which fan channel,
making probing of them unnecessary.

Add a new sysfs attribute to allow such chips to export
this knowlege to userspace in a standardized manner.

The first patch adds support for the new attribute to the hwmon core,
while the second patch adds support for this new attribute to the
dell-smm-hwmon driver.

All changes have been tested on a Dell Inspiron 3505.

Armin Wolf (2):
  hwmon: Add pwmX_fan_channel attribute
  hwmon: (dell-smm) Add support for pwmX_fan_channel attribute

 Documentation/ABI/testing/sysfs-class-hwmon |  8 ++++++++
 Documentation/hwmon/dell-smm-hwmon.rst      |  1 +
 Documentation/hwmon/sysfs-interface.rst     |  3 +++
 drivers/hwmon/dell-smm-hwmon.c              | 15 ++++++++++++---
 drivers/hwmon/hwmon.c                       |  1 +
 include/linux/hwmon.h                       |  2 ++
 6 files changed, 27 insertions(+), 3 deletions(-)

--
2.30.2


             reply	other threads:[~2022-07-23  3:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23  3:38 Armin Wolf [this message]
2022-07-23  3:38 ` [PATCH 1/2] hwmon: Add " Armin Wolf
2022-07-23 14:17   ` Guenter Roeck
2022-07-24  1:20     ` Armin Wolf
2022-07-24 14:44       ` Guenter Roeck
2022-07-24 16:06         ` Armin Wolf
2022-07-24 16:30           ` Guenter Roeck
2022-07-24 17:50             ` Armin Wolf
2022-07-23  3:38 ` [PATCH 2/2] hwmon: (dell-smm) Add support for " Armin Wolf
2022-07-23 14:14   ` 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=20220723033820.22612-1-W_Armin@gmx.de \
    --to=w_armin@gmx.de \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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

all inboxes | Powered by JetHome®