Re: [PATCH v5 08/13] dt-bindings: pwm: update bindings for MT7628 SoC

From: Yingjoe Chen
Date: Thu Aug 22 2019 - 09:44:35 EST


On Thu, 2019-08-22 at 14:58 +0800, Sam Shih wrote:
> This updates bindings for MT7628 pwm controller.
>
> Signed-off-by: Sam Shih <sam.shih@xxxxxxxxxxxx>
> ---
> Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
> index ea95b490a913..93980e3da261 100644
> --- a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
> +++ b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
> @@ -21,6 +21,10 @@ Required properties:
> See pinctrl/pinctrl-bindings.txt for details of the property values.
> - num-pwms: the number of PWM channels.
> +
> + Optional properties:
> + - clock-frequency: fix clock frequency, this is only used in MT7628 SoC
> + for period calculation. This SoC has no complex clock tree.

I'm sorry if this has been discussed before.

Would it be simpler if you just provide a fixed-clock as clock in device
tree? This way you don't need this optional properties and don't need to
special handle it in driver code.

After all, the hw is still connected to a simple clock tree.

Joe.C