Message ID | 20250224180801.128685-2-francesco@dolcini.it (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | hwmon: (amc6821) Add PWM polarity configuration with OF | expand |
On Mon, Feb 24, 2025 at 07:08:00PM +0100, Francesco Dolcini wrote: > From: Francesco Dolcini <francesco.dolcini@toradex.com> > > Add property to describe the PWM-Out pin polarity. Why doesn't the invert support in the pwm binding work for you? Yes, I read the discussion, but don't remember the conclusion and you need to justify it here. > > Link: https://www.ti.com/lit/gpn/amc6821 > Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> > --- > v2: no changes > v1: https://lore.kernel.org/all/20250218165633.106867-2-francesco@dolcini.it/ > --- > Documentation/devicetree/bindings/hwmon/ti,amc6821.yaml | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/Documentation/devicetree/bindings/hwmon/ti,amc6821.yaml b/Documentation/devicetree/bindings/hwmon/ti,amc6821.yaml > index 5d33f1a23d03..11604aa41b3e 100644 > --- a/Documentation/devicetree/bindings/hwmon/ti,amc6821.yaml > +++ b/Documentation/devicetree/bindings/hwmon/ti,amc6821.yaml > @@ -28,6 +28,14 @@ properties: > i2c-mux: > type: object > > + ti,pwm-inverted: > + type: boolean > + description: > + Set to make the PWM-Out pin go high (with an external pull-up resistor) > + for 100% duty cycle (suitable for driving the fan using a NMOS device), > + when not set the PWM-Out pin goes low for 100% duty cycle (suitable for > + driving the fan using a PMOS device). > + > required: > - compatible > - reg > -- > 2.39.5 >
On Wed, Feb 26, 2025 at 07:49:22AM -0600, Rob Herring wrote: > On Mon, Feb 24, 2025 at 07:08:00PM +0100, Francesco Dolcini wrote: > > From: Francesco Dolcini <francesco.dolcini@toradex.com> > > > > Add property to describe the PWM-Out pin polarity. > > Why doesn't the invert support in the pwm binding work for you? Yes, I > read the discussion, but don't remember the conclusion and you need to > justify it here. This chip is not a PWM controller, it is a FAN controller. The HW has a PWM pin output that is used to control the fan, but the device is not modelled as a PWM controller (correctly, given that is not such a device) and the OS does not control the PWM, the chip reads the temperature and decide the PWM duty cycle accordingly in an autonomous way. It's just the same that was done in commit ed39ff506adb ("dt-bindings: hwmon: Document adt7475 pwm-active-state property"). Francesco
diff --git a/Documentation/devicetree/bindings/hwmon/ti,amc6821.yaml b/Documentation/devicetree/bindings/hwmon/ti,amc6821.yaml index 5d33f1a23d03..11604aa41b3e 100644 --- a/Documentation/devicetree/bindings/hwmon/ti,amc6821.yaml +++ b/Documentation/devicetree/bindings/hwmon/ti,amc6821.yaml @@ -28,6 +28,14 @@ properties: i2c-mux: type: object + ti,pwm-inverted: + type: boolean + description: + Set to make the PWM-Out pin go high (with an external pull-up resistor) + for 100% duty cycle (suitable for driving the fan using a NMOS device), + when not set the PWM-Out pin goes low for 100% duty cycle (suitable for + driving the fan using a PMOS device). + required: - compatible - reg