mbox series

[v3,0/2] pwm-fan: Support multiple tachometer inputs

Message ID 20201212195008.6036-1-pbarker@konsulko.com (mailing list archive)
Headers show
Series pwm-fan: Support multiple tachometer inputs | expand

Message

Paul Barker Dec. 12, 2020, 7:50 p.m. UTC
These changes were made to support a custom board where one PWM output
is routed to two fans, each of which has a tachometer signal routed to a
GPIO input on the SoC.

As the custom board doesn't currently support the latest mainline kernel
I've tested these changes on a SanCloud BeagleBone Enhanced using an
oscilloscope to check the PWM output and a signal generator to simulate
the fan tachometer signals. I've tested variants of the device tree with
0, 1 and 2 fan tachometer inputs configured to ensure the logic in the
probe function is correct.

The device tree bindings changes have been submitted in a separate
series:
https://lore.kernel.org/linux-devicetree/20200920180943.352526-1-pbarker@konsulko.com/

These changes can also be pulled from:

  https://gitlab.com/pbarker.dev/staging/linux.git
  tag: for-hwmon/pwm-fan-tachometers-v3_2020-12-12

Changes since v2:

  * Split refactoring and API conversion into a separate patch series
    which has now been accepted. These changes now use the recommended
    hwmon API and dynamically allocate struct hwmon_channel_info
    objects as needed.

  * Rebased changes on the current HEAD of hwmon-next.

Changes since v1:

  * Split RPM calculation fix into a separate patch which has now been
    accepted.

  * Break the changes down into smaller patches so they're easier to
    review.

  * Rebased changes on hwmon-next.

Paul Barker (2):
  hwmon: pwm-fan: Store tach data separately
  hwmon: pwm-fan: Support multiple fan tachometers

 drivers/hwmon/pwm-fan.c | 111 +++++++++++++++++++++++++---------------
 1 file changed, 69 insertions(+), 42 deletions(-)


base-commit: 1a033769a4fe9a86ee791fd553b6a996dd76e026