Message ID | 20250102175041.822977-1-peter@korsgaard.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [1/2] dt-bindings: hwmon: pwm-fan: Document default-pwm property | expand |
On 02/01/2025 18:50, Peter Korsgaard wrote: > The pwm-fan driver uses full PWM (255) duty cycle at startup, which may not > always be desirable because of noise or power consumption peaks, so add an > optional "default-pwm" property that can be used to specify a custom default > PWM duty cycle. > > Signed-off-by: Peter Korsgaard <peter@korsgaard.com> That's v3, not v1. Also mention here shortly how Rob's comment is addressed. Please always handle reviewers' feedback, either by implementing it or by responding or by extending commit msg. All this is missing in all your versions you sent. Best regards, Krzysztof
On Thu, 02 Jan 2025 18:50:40 +0100, Peter Korsgaard wrote: > The pwm-fan driver uses full PWM (255) duty cycle at startup, which may not > always be desirable because of noise or power consumption peaks, so add an > optional "default-pwm" property that can be used to specify a custom default > PWM duty cycle. > > Signed-off-by: Peter Korsgaard <peter@korsgaard.com> > --- > Documentation/devicetree/bindings/hwmon/pwm-fan.yaml | 7 +++++++ > 1 file changed, 7 insertions(+) > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml: default-pwm: missing type definition Error: Documentation/devicetree/bindings/hwmon/pwm-fan.example.dts:75.25-27 syntax error FATAL ERROR: Unable to parse input tree make[2]: *** [scripts/Makefile.dtbs:131: Documentation/devicetree/bindings/hwmon/pwm-fan.example.dtb] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1506: dt_binding_check] Error 2 make: *** [Makefile:251: __sub-make] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250102175041.822977-1-peter@korsgaard.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On 1/2/25 19:22, Krzysztof Kozlowski wrote: > On 02/01/2025 18:50, Peter Korsgaard wrote: >> The pwm-fan driver uses full PWM (255) duty cycle at startup, which may not >> always be desirable because of noise or power consumption peaks, so add an >> optional "default-pwm" property that can be used to specify a custom default >> PWM duty cycle. >> >> Signed-off-by: Peter Korsgaard <peter@korsgaard.com> > > That's v3, not v1. Also mention here shortly how Rob's comment is addressed. It is? Then that wasn't from me, and I don't right away see anything related on lore. Can you give me a pointer?
On 03/01/2025 08:59, Peter Korsgaard wrote: > On 1/2/25 19:22, Krzysztof Kozlowski wrote: >> On 02/01/2025 18:50, Peter Korsgaard wrote: >>> The pwm-fan driver uses full PWM (255) duty cycle at startup, which may not >>> always be desirable because of noise or power consumption peaks, so add an >>> optional "default-pwm" property that can be used to specify a custom default >>> PWM duty cycle. >>> >>> Signed-off-by: Peter Korsgaard <peter@korsgaard.com> >> >> That's v3, not v1. Also mention here shortly how Rob's comment is addressed. > > It is? Then that wasn't from me, and I don't right away see anything > related on lore. Can you give me a pointer? It is trivial to find your v1 and v2 in lore, so I assume you just reply here to waste my time. Best regards, Krzysztof
On 1/3/25 09:10, Krzysztof Kozlowski wrote: > On 03/01/2025 08:59, Peter Korsgaard wrote: >> On 1/2/25 19:22, Krzysztof Kozlowski wrote: >>> On 02/01/2025 18:50, Peter Korsgaard wrote: >>>> The pwm-fan driver uses full PWM (255) duty cycle at startup, which may not >>>> always be desirable because of noise or power consumption peaks, so add an >>>> optional "default-pwm" property that can be used to specify a custom default >>>> PWM duty cycle. >>>> >>>> Signed-off-by: Peter Korsgaard <peter@korsgaard.com> >>> >>> That's v3, not v1. Also mention here shortly how Rob's comment is addressed. >> >> It is? Then that wasn't from me, and I don't right away see anything >> related on lore. Can you give me a pointer? > > It is trivial to find your v1 and v2 in lore, so I assume you just reply > here to waste my time. Sorry, I indeed apparently did send a v1/v2 ~1 year ago, I must be getting old. I didn't look that far back in lore and for some reason I don't have the changes in my local tree anymore, hence the reason for recreating the commits yesterday and sending a new v1. Looking at lore, v1 used target-pwm which Gunter suggested I changed to default-rpm while explaining that it cannot be a generic property: https://lore.kernel.org/linux-devicetree/b717da30-1d4c-4e09-b98c-4aa41a235234@roeck-us.net/ Which I then did as a v2, that then didn't get any additional feedback: https://lore.kernel.org/linux-devicetree/3aa21a01-c994-4b36-8893-181e55a60c5e@korsgaard.com/ So if we agree on default-pwm, then I can send an update (a v4!) with the typo in the example fixed, OK?
On 1/2/25 20:24, Rob Herring (Arm) wrote: > > On Thu, 02 Jan 2025 18:50:40 +0100, Peter Korsgaard wrote: >> The pwm-fan driver uses full PWM (255) duty cycle at startup, which may not >> always be desirable because of noise or power consumption peaks, so add an >> optional "default-pwm" property that can be used to specify a custom default >> PWM duty cycle. >> >> Signed-off-by: Peter Korsgaard <peter@korsgaard.com> >> --- >> Documentation/devicetree/bindings/hwmon/pwm-fan.yaml | 7 +++++++ >> 1 file changed, 7 insertions(+) >> > > My bot found errors running 'make dt_binding_check' on your patch: > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml: default-pwm: missing type definition > Error: Documentation/devicetree/bindings/hwmon/pwm-fan.example.dts:75.25-27 syntax error > FATAL ERROR: Unable to parse input tree > make[2]: *** [scripts/Makefile.dtbs:131: Documentation/devicetree/bindings/hwmon/pwm-fan.example.dtb] Error 1 > make[2]: *** Waiting for unfinished jobs.... > make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1506: dt_binding_check] Error 2 > make: *** [Makefile:251: __sub-make] Error 2 Ups, I added the entry to the example AFTER running make dt_binding_check and missed the <>, will fix.
On 03/01/2025 10:01, Peter Korsgaard wrote: > > Looking at lore, v1 used target-pwm which Gunter suggested I changed to > default-rpm while explaining that it cannot be a generic property: > > https://lore.kernel.org/linux-devicetree/b717da30-1d4c-4e09-b98c-4aa41a235234@roeck-us.net/ > > Which I then did as a v2, that then didn't get any additional feedback: > > https://lore.kernel.org/linux-devicetree/3aa21a01-c994-4b36-8893-181e55a60c5e@korsgaard.com/ > > So if we agree on default-pwm, then I can send an update (a v4!) with > the typo in the example fixed, OK? Yes and we go back to my first comment about commit msg: "Also mention here shortly how Rob's comment is addressed." e.g. we cannot use default/target-rpm because of foo bar. Best regards, Krzysztof
On 1/3/25 10:35, Krzysztof Kozlowski wrote: >> So if we agree on default-pwm, then I can send an update (a v4!) with >> the typo in the example fixed, OK? > > Yes and we go back to my first comment about commit msg: > > "Also mention here shortly how Rob's comment is addressed." > > e.g. we cannot use default/target-rpm because of foo bar. OK, I'll extend the commit message and send a v4.
diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml b/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml index 8b4ed5ee962f..83b8b0b964ee 100644 --- a/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml +++ b/Documentation/devicetree/bindings/hwmon/pwm-fan.yaml @@ -20,6 +20,12 @@ properties: items: maximum: 255 + default-pwm: + description: Default PWM duty cycle value to use at startup + minimum: 0 + maximum: 255 + default: 255 + fan-supply: description: Phandle to the regulator that provides power to the fan. @@ -100,6 +106,7 @@ examples: pwm-fan { compatible = "pwm-fan"; pwms = <&pwm 0 40000 0>; + default-pwm = 75; fan-supply = <®_fan>; interrupt-parent = <&gpio5>; interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
The pwm-fan driver uses full PWM (255) duty cycle at startup, which may not always be desirable because of noise or power consumption peaks, so add an optional "default-pwm" property that can be used to specify a custom default PWM duty cycle. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> --- Documentation/devicetree/bindings/hwmon/pwm-fan.yaml | 7 +++++++ 1 file changed, 7 insertions(+)