Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1672325

Re: [PATCH RESEND 4/4] pwm: mediatek: add MT2712/MT7622 support

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From John Crispin <john@phrozen.org>
Newsgroups linux.kernel
Subject Re: [PATCH RESEND 4/4] pwm: mediatek: add MT2712/MT7622 support
Date Thu, 22 Jun 2017 08:20:02 +0200
Message-ID <tV3Db-L3-7@gated-at.bofh.it> (permalink)
References <tUJ1M-3E2-13@gated-at.bofh.it> <tUJ1M-3E2-11@gated-at.bofh.it> <tUMVI-61A-19@gated-at.bofh.it> <tV3Dc-L3-9@gated-at.bofh.it>
X-Original-To Zhi Mao <zhi.mao@mediatek.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0
MIME-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 99
Organization linux.* mail to news gateway
X-Original-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>
X-Original-Date Thu, 22 Jun 2017 08:12:47 +0200
X-Original-Message-ID <05b53007-44de-a236-f592-aea8e75ced44@phrozen.org>
X-Original-References <1498032672-7172-1-git-send-email-zhi.mao@mediatek.com> <1498032672-7172-5-git-send-email-zhi.mao@mediatek.com> <4600cf23-5e59-df02-37dc-056cb4a9744c@phrozen.org> <1498111776.18841.10.camel@mhfsdcap03>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1672325

Show key headers only | View raw



On 22/06/17 08:09, Zhi Mao wrote:
> 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
>
>
>
>

Hi Zhi,

I just had another look and noticed that the CON registers are not at a 
fixed offset of 0x40 for the new pwm8 register so having 2) inside this 
patch makes sense. please explain in the description that this is the case

     John

>
> 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 <mailto: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


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