[PATCH] arm64: zynqmp: Fix pwm-fan polarity

From: Vishal Patel vishal.patel@amd.com
The correct operating mode for the fan is inversed (1). The previous pwm driver implementation had a bug and the polarity information was propagated incorrectly to the kernel. The normal (0) polarity specified in the device tree was incorrectly clearing the polarity bit in the counter control register. After the bug fix, setting the polarity to inversed (1) in the device tree will clear the polarity bit.
Signed-off-by: Vishal Patel vishal.patel@amd.com Signed-off-by: Michal Simek michal.simek@amd.com ---
arch/arm/dts/zynqmp-sm-k26-revA.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/dts/zynqmp-sm-k26-revA.dts b/arch/arm/dts/zynqmp-sm-k26-revA.dts index 5859e6cd8c23..d95a05e21592 100644 --- a/arch/arm/dts/zynqmp-sm-k26-revA.dts +++ b/arch/arm/dts/zynqmp-sm-k26-revA.dts @@ -107,7 +107,7 @@ pwm-fan { compatible = "pwm-fan"; status = "okay"; - pwms = <&ttc0 2 40000 0>; + pwms = <&ttc0 2 40000 1>; }; };

On 7/29/24 10:18, Michal Simek wrote:
From: Vishal Patel vishal.patel@amd.com
The correct operating mode for the fan is inversed (1). The previous pwm driver implementation had a bug and the polarity information was propagated incorrectly to the kernel. The normal (0) polarity specified in the device tree was incorrectly clearing the polarity bit in the counter control register. After the bug fix, setting the polarity to inversed (1) in the device tree will clear the polarity bit.
Signed-off-by: Vishal Patel vishal.patel@amd.com Signed-off-by: Michal Simek michal.simek@amd.com
arch/arm/dts/zynqmp-sm-k26-revA.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/dts/zynqmp-sm-k26-revA.dts b/arch/arm/dts/zynqmp-sm-k26-revA.dts index 5859e6cd8c23..d95a05e21592 100644 --- a/arch/arm/dts/zynqmp-sm-k26-revA.dts +++ b/arch/arm/dts/zynqmp-sm-k26-revA.dts @@ -107,7 +107,7 @@ pwm-fan { compatible = "pwm-fan"; status = "okay";
pwms = <&ttc0 2 40000 0>;
}; };pwms = <&ttc0 2 40000 1>;
Applied. M
participants (1)
-
Michal Simek