[PATCH 2/3] pwm: meson: Use separate chip data struct for g12a-ee-pwm

George Stark posted 3 patches 1 month, 3 weeks ago
There is a newer version of this series
[PATCH 2/3] pwm: meson: Use separate chip data struct for g12a-ee-pwm
Posted by George Stark 1 month, 3 weeks ago
PWM module of g12a SoC family has different set of features than meson8
so use separate chip data struct for it.

Signed-off-by: George Stark <gnstark@salutedevices.com>
---
 drivers/pwm/pwm-meson.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index 5d51404bdce3..6701738c55e3 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -578,6 +578,11 @@ static const struct meson_pwm_data pwm_axg_ao_data = {
 	.channels_init = meson_pwm_init_channels_meson8b_legacy,
 };
 
+static const struct meson_pwm_data pwm_g12a_ee_data = {
+	.parent_names = { "xtal", NULL, "fclk_div4", "fclk_div3" },
+	.channels_init = meson_pwm_init_channels_meson8b_legacy,
+};
+
 static const struct meson_pwm_data pwm_g12a_ao_ab_data = {
 	.parent_names = { "xtal", "g12a_ao_clk81", "fclk_div4", "fclk_div5" },
 	.channels_init = meson_pwm_init_channels_meson8b_legacy,
@@ -624,7 +629,7 @@ static const struct of_device_id meson_pwm_matches[] = {
 	},
 	{
 		.compatible = "amlogic,meson-g12a-ee-pwm",
-		.data = &pwm_meson8b_data
+		.data = &pwm_g12a_ee_data
 	},
 	{
 		.compatible = "amlogic,meson-g12a-ao-pwm-ab",
-- 
2.25.1
Re: [PATCH 2/3] pwm: meson: Use separate chip data struct for g12a-ee-pwm
Posted by neil.armstrong@linaro.org 1 month, 2 weeks ago
On 07/10/2024 21:32, George Stark wrote:
> PWM module of g12a SoC family has different set of features than meson8
> so use separate chip data struct for it.
> 
> Signed-off-by: George Stark <gnstark@salutedevices.com>
> ---
>   drivers/pwm/pwm-meson.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
> index 5d51404bdce3..6701738c55e3 100644
> --- a/drivers/pwm/pwm-meson.c
> +++ b/drivers/pwm/pwm-meson.c
> @@ -578,6 +578,11 @@ static const struct meson_pwm_data pwm_axg_ao_data = {
>   	.channels_init = meson_pwm_init_channels_meson8b_legacy,
>   };
>   
> +static const struct meson_pwm_data pwm_g12a_ee_data = {
> +	.parent_names = { "xtal", NULL, "fclk_div4", "fclk_div3" },
> +	.channels_init = meson_pwm_init_channels_meson8b_legacy,
> +};
> +
>   static const struct meson_pwm_data pwm_g12a_ao_ab_data = {
>   	.parent_names = { "xtal", "g12a_ao_clk81", "fclk_div4", "fclk_div5" },
>   	.channels_init = meson_pwm_init_channels_meson8b_legacy,
> @@ -624,7 +629,7 @@ static const struct of_device_id meson_pwm_matches[] = {
>   	},
>   	{
>   		.compatible = "amlogic,meson-g12a-ee-pwm",
> -		.data = &pwm_meson8b_data
> +		.data = &pwm_g12a_ee_data
>   	},
>   	{
>   		.compatible = "amlogic,meson-g12a-ao-pwm-ab",

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>