mbox series

[v2,0/4] pwm-fan: Support multiple tachometer inputs

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

Message

Paul Barker Nov. 13, 2020, 3:08 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-v2_2020-11-13

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 (4):
  hwmon: pwm-fan: Refactor pwm_fan_probe
  hwmon: pwm-fan: Dynamically setup attribute groups
  hwmon: pwm-fan: Store tach data separately
  hwmon: pwm-fan: Support multiple fan tachometers

 drivers/hwmon/pwm-fan.c | 155 ++++++++++++++++++++++++----------------
 1 file changed, 95 insertions(+), 60 deletions(-)


base-commit: 414920a4a5d5613e4aa77c89944f9c1dc86b06c4

Comments

Paul Barker Nov. 25, 2020, 4:45 p.m. UTC | #1
On Fri, 13 Nov 2020 at 15:09, Paul Barker <pbarker@konsulko.com> wrote:
>
> 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-v2_2020-11-13
>
> 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 (4):
>   hwmon: pwm-fan: Refactor pwm_fan_probe
>   hwmon: pwm-fan: Dynamically setup attribute groups
>   hwmon: pwm-fan: Store tach data separately
>   hwmon: pwm-fan: Support multiple fan tachometers
>
>  drivers/hwmon/pwm-fan.c | 155 ++++++++++++++++++++++++----------------
>  1 file changed, 95 insertions(+), 60 deletions(-)
>
>
> base-commit: 414920a4a5d5613e4aa77c89944f9c1dc86b06c4
> --
> 2.29.2
>

Has anyone had a chance to look at this series? I see that the
corresponding dt-bindings change has been accepted into the hwmon-next
tree but I've not heard anything back on these patches.

I also see that a patch just got sent to this list which will conflict
with this series
(https://lore.kernel.org/linux-hwmon/20201125163242.GA1264232@paju/T/#u).
It'd be good to get feedback so that either myself, Dongjin Kim or
both of us can re-work our patches to be compatible.

Thanks,
Guenter Roeck Nov. 25, 2020, 10:27 p.m. UTC | #2
On Wed, Nov 25, 2020 at 04:45:27PM +0000, Paul Barker wrote:
> On Fri, 13 Nov 2020 at 15:09, Paul Barker <pbarker@konsulko.com> wrote:
> >
> > 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-v2_2020-11-13
> >
> > 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 (4):
> >   hwmon: pwm-fan: Refactor pwm_fan_probe
> >   hwmon: pwm-fan: Dynamically setup attribute groups
> >   hwmon: pwm-fan: Store tach data separately
> >   hwmon: pwm-fan: Support multiple fan tachometers
> >
> >  drivers/hwmon/pwm-fan.c | 155 ++++++++++++++++++++++++----------------
> >  1 file changed, 95 insertions(+), 60 deletions(-)
> >
> >
> > base-commit: 414920a4a5d5613e4aa77c89944f9c1dc86b06c4
> > --
> > 2.29.2
> >
> 
> Has anyone had a chance to look at this series? I see that the
> corresponding dt-bindings change has been accepted into the hwmon-next
> tree but I've not heard anything back on these patches.
> 
Still on my list. Sorry, I have been buried in work, and being stuck in
the middle of nowhere (aka Wyoming) last week with a broken charge port
on a Tesla didn't help.

> I also see that a patch just got sent to this list which will conflict
> with this series
> (https://lore.kernel.org/linux-hwmon/20201125163242.GA1264232@paju/T/#u).
> It'd be good to get feedback so that either myself, Dongjin Kim or
> both of us can re-work our patches to be compatible.
> 
I have seen it. I hope I'll get to your series over the weekend.
Sorry for the delay.

Guenter