Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1671645
| From | John Crispin <john@phrozen.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RESEND 4/4] pwm: mediatek: add MT2712/MT7622 support |
| Date | 2017-06-21 14:30 +0200 |
| Message-ID | <tUMVI-61A-19@gated-at.bofh.it> (permalink) |
| References | <tUJ1M-3E2-13@gated-at.bofh.it> <tUJ1M-3E2-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 21/06/17 10:11, Zhi Mao wrote:
> support multiple chip(MT2712, MT7622, MT7623)
This patch does more than add extra SoC support. It also
* adds PWM_CLK_DIV_MAX which really should go into its own patch
* adds mtk_pwm_com_reg which should also go into its own patch
more comments inline
>
> Signed-off-by: Zhi Mao <zhi.mao@mediatek.com>
> ---
> drivers/pwm/pwm-mediatek.c | 63 +++++++++++++++++++++++++++++++++++---------
> 1 file changed, 51 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c
> index c803ff6..d520356 100644
> --- a/drivers/pwm/pwm-mediatek.c
> +++ b/drivers/pwm/pwm-mediatek.c
> @@ -16,6 +16,7 @@
> #include <linux/module.h>
> #include <linux/clk.h>
> #include <linux/of.h>
> +#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/pwm.h>
> #include <linux/slab.h>
[...]
> @@ -215,9 +238,25 @@ static int mtk_pwm_remove(struct platform_device *pdev)
> return pwmchip_remove(&pc->chip);
> }
>
> +/*==========================================*/
please remove these comment lines
John
> +static const struct mtk_com_pwm_data mt2712_pwm_data = {
> + .pwm_nums = 8,
> +};
> +
> +static const struct mtk_com_pwm_data mt7622_pwm_data = {
> + .pwm_nums = 6,
> +};
> +
> +static const struct mtk_com_pwm_data mt7623_pwm_data = {
> + .pwm_nums = 5,
> +};
> +/*==========================================*/
> +
> static const struct of_device_id mtk_pwm_of_match[] = {
> - { .compatible = "mediatek,mt7623-pwm" },
> - { }
> + {.compatible = "mediatek,mt2712-pwm", .data = &mt2712_pwm_data},
> + {.compatible = "mediatek,mt7622-pwm", .data = &mt7622_pwm_data},
> + {.compatible = "mediatek,mt7623-pwm", .data = &mt7623_pwm_data},
> + {},
> };
> MODULE_DEVICE_TABLE(of, mtk_pwm_of_match);
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH RESEND 4/4] pwm: mediatek: add MT2712/MT7622 support Zhi Mao <zhi.mao@mediatek.com> - 2017-06-21 10:20 +0200
Re: [PATCH RESEND 4/4] pwm: mediatek: add MT2712/MT7622 support John Crispin <john@phrozen.org> - 2017-06-21 14:30 +0200
Re: [PATCH RESEND 4/4] pwm: mediatek: add MT2712/MT7622 support John Crispin <john@phrozen.org> - 2017-06-22 08:20 +0200
Re: [PATCH RESEND 4/4] pwm: mediatek: add MT2712/MT7622 support John Crispin <john@phrozen.org> - 2017-06-22 09:00 +0200
csiph-web