public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Zhi Mao <zhi.mao@mediatek.com>
To: John Crispin <john@phrozen.org>
Cc: "Thierry Reding" <thierry.reding@gmail.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>,
	"Zhenbao Liu (刘振宝)" <Zhenbao.Liu@mediatek.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	srv_heupstream <srv_heupstream@mediatek.com>,
	"Sean Wang (王志亘)" <sean.wang@mediatek.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"YT Shen (沈岳霆)" <Yt.Shen@mediatek.com>,
	"Yingjoe Chen (??英洲)" <Yingjoe.Chen@mediatek.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH RESEND 4/4] pwm: mediatek: add MT2712/MT7622 support
Date: Thu, 22 Jun 2017 14:09:36 +0800	[thread overview]
Message-ID: <1498111776.18841.10.camel@mhfsdcap03> (raw)
In-Reply-To: <4600cf23-5e59-df02-37dc-056cb4a9744c@phrozen.org>

[-- Attachment #1: Type: text/plain, Size: 2560 bytes --]

Hi John,

Thanks for your review the code and feedback.
There are 3 issues in this patch:
1.adds PWM_CLK_DIV_MAX which really should go into its own patch
2.adds mtk_pwm_com_reg which should also go into its own patch
3.remove comments inline /*===*/

for #1 and #3, I will modify them in the next release.
but for #2, I want to discuss with you, 
adding the structure  "mtk_pwm_com_reg" is only for the registers of
MT2712 PWM8, 
so we want to keep this modification in this patch.

what's your opinion about it? 
Any reply is welcome.


Regards
Zhi





On Wed, 2017-06-21 at 20:22 +0800, John Crispin wrote:

> 
> 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);
> >   
> 



[-- Attachment #2: Type: text/html, Size: 3119 bytes --]

  reply	other threads:[~2017-06-22  6:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-21  8:11 [PATCH RESEND 0/4] mediatek: pwm driver add MT2712/MT7622 support Zhi Mao
     [not found] ` <1498032672-7172-1-git-send-email-zhi.mao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-06-21  8:11   ` [PATCH RESEND 1/4] pwm: kconfig: modify mediatek information Zhi Mao
2017-06-21  8:11 ` [PATCH RESEND 2/4] pwm: mediatek: fix clk issue Zhi Mao
2017-06-21 12:07   ` John Crispin
2017-06-22 12:48     ` Zhi Mao
2017-06-21  8:11 ` [PATCH RESEND 3/4] pwm: bindings: add MT2712/MT7622 information Zhi Mao
2017-06-21  8:11 ` [PATCH RESEND 4/4] pwm: mediatek: add MT2712/MT7622 support Zhi Mao
2017-06-21 12:22   ` John Crispin
2017-06-22  6:09     ` Zhi Mao [this message]
2017-06-22  6:12       ` John Crispin
2017-06-22  6:52       ` John Crispin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1498111776.18841.10.camel@mhfsdcap03 \
    --to=zhi.mao@mediatek.com \
    --cc=Yingjoe.Chen@mediatek.com \
    --cc=Yt.Shen@mediatek.com \
    --cc=Zhenbao.Liu@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=john@phrozen.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sean.wang@mediatek.com \
    --cc=srv_heupstream@mediatek.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox