[PATCH v4 4/4] pwm: meson: Add support for Amlogic S7

Uwe Kleine-König ukleinek at kernel.org
Mon Nov 30 00:57:59 PST 2026


On Thu, Aug 27, 2026 at 08:40:13AM +0000, Xianwei Zhao via B4 Relay wrote:
> From: Xianwei Zhao <xianwei.zhao at amlogic.com>
> 
> Add support for Amlogic S7 PWM. Amlogic S7 different from the previous
> SoCs, a controller includes one pwm, at the same time,the controller has
> only one input clock source.

nitpick: s/,/, /

> Also use the kernel coding style for the empty of_device_id terminator.
> 
> Signed-off-by: Xianwei Zhao <xianwei.zhao at amlogic.com>
> ---
>  drivers/pwm/pwm-meson.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
> index 6f151464d7cc..2da958231719 100644
> --- a/drivers/pwm/pwm-meson.c
> +++ b/drivers/pwm/pwm-meson.c
> @@ -595,6 +595,13 @@ static const struct meson_pwm_data pwm_s4_data = {
>  	.npwm = 2,
>  };
>  
> +static const struct meson_pwm_data pwm_s7_data = {
> +	.channels_init = meson_pwm_init_channels_per_channel_clk,
> +	.has_constant = true,
> +	.has_polarity = true,
> +	.npwm = 1,
> +};
> +
>  static const struct of_device_id meson_pwm_matches[] = {
>  	{
>  		.compatible = "amlogic,meson8-pwm-v2",
> @@ -645,7 +652,11 @@ static const struct of_device_id meson_pwm_matches[] = {
>  		.compatible = "amlogic,meson-s4-pwm",
>  		.data = &pwm_s4_data
>  	},
> -	{},
> +	{
> +		.compatible = "amlogic,s7-pwm",
> +		.data = &pwm_s7_data

Missing , after the assignment to .data, but that is a pre-existing
inconsistency. If you want address it in a separate patch together with
consistently using `}, {` (or if you prefer `},\n\t{`) between the
entries.

> +	},
> +	{ }

Further above there is a note:

        /* The following compatibles are obsolete */

I guess that doesn't apply to this new compatible and thus it should
better be added above that comment.

Best regards
Uwe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20261130/89e171f1/attachment-0001.sig>


More information about the linux-arm-kernel mailing list