pwm: pwm-mediatek: Add support for MediaTek Helio X10 MT6795
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tue, 3 May 2022 10:54:04 +0000 (12:54 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Fri, 20 May 2022 14:22:15 +0000 (16:22 +0200)
The MediaTek Helio X10 MT6795 SoC has 7 PWMs: add a compatible string
to use the right match data.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-mediatek.c

index 568b13a48717e76d6bda917c86b24ce3824d3b46..28c2d0e5a8acf4defe505c5305120ea6d7beb35f 100644 (file)
@@ -264,6 +264,12 @@ static const struct pwm_mediatek_of_data mt2712_pwm_data = {
        .has_ck_26m_sel = false,
 };
 
+static const struct pwm_mediatek_of_data mt6795_pwm_data = {
+       .num_pwms = 7,
+       .pwm45_fixup = false,
+       .has_ck_26m_sel = false,
+};
+
 static const struct pwm_mediatek_of_data mt7622_pwm_data = {
        .num_pwms = 6,
        .pwm45_fixup = false,
@@ -302,6 +308,7 @@ static const struct pwm_mediatek_of_data mt8516_pwm_data = {
 
 static const struct of_device_id pwm_mediatek_of_match[] = {
        { .compatible = "mediatek,mt2712-pwm", .data = &mt2712_pwm_data },
+       { .compatible = "mediatek,mt6795-pwm", .data = &mt6795_pwm_data },
        { .compatible = "mediatek,mt7622-pwm", .data = &mt7622_pwm_data },
        { .compatible = "mediatek,mt7623-pwm", .data = &mt7623_pwm_data },
        { .compatible = "mediatek,mt7628-pwm", .data = &mt7628_pwm_data },