> Actually it should even be:
>
> #define FTM_CSC(channel) \
> (FTM_CSC_BASE + ((channel) * 8))
>
Well, yes, It should be, as Sascha has comment about this before, I have
already revise it.
> > Firstly, we should be clear that the fpc->clk is chip's work clock.
> > If so,
On Mon, Aug 26, 2013 at 07:32:23AM +, Xiubo Li-B47053 wrote:
> > > +#define FTM_CSC_BASE0x0C
> > > +#define FTM_CSC(_CHANNEL) \
> > > + (FTM_CSC_BASE + (_CHANNEL * 0x08))
> >
> > I prefer lowercase variables in macros:
> >
> > #define FTM_CSC(channel) \
> > (FTM_CSC_BA
Hi Thierry,
See the comments below.
> I think the correct capitalizations are: "Freescale", "FTM" and "PWM".
> There are other occurrences in the rest of the driver that I haven't
> explicitly pointed out.
>
Yes, that's much better.
> > +config PWM_FTM
>
> Perhaps name this PWM_FSL_FTM to m
On Wed, Aug 21, 2013 at 11:07:39AM +0800, Xiubo Li wrote:
> Add freescale ftm pwm driver support. The ftm pwm device
I think the correct capitalizations are: "Freescale", "FTM" and "PWM".
There are other occurrences in the rest of the driver that I haven't
explicitly pointed out.
> diff --git a/d
On Wed, Aug 21, 2013 at 11:50:49AM +0200, Sascha Hauer wrote:
> On Wed, Aug 21, 2013 at 09:24:56AM +, Xiubo Li-B47053 wrote:
> > TO Sascha,
> >
> > > > +
> > > > + fpc = to_fsl_chip(chip);
> > > > +
> > > > + if (WARN_ON(!test_bit(PWMF_REQUESTED, &pwm->flags)))
> > > > +
TO Sascha,
Thanks very much for your quick reply.
> > > > + fpc = to_fsl_chip(chip);
> > > > +
> > > > + if (WARN_ON(!test_bit(PWMF_REQUESTED, &pwm->flags)))
> > > > + return -ESHUTDOWN;
> > > > +
> > > > + statename = kasprintf(GFP_KERNEL, "en%d", pwm->hwpwm);
>
On Wed, Aug 21, 2013 at 09:24:56AM +, Xiubo Li-B47053 wrote:
> TO Sascha,
>
> > > +
> > > + fpc = to_fsl_chip(chip);
> > > +
> > > + if (WARN_ON(!test_bit(PWMF_REQUESTED, &pwm->flags)))
> > > + return -ESHUTDOWN;
> > > +
> > > + statename = kasprintf(GFP_KERNEL, "en%d", pwm->hwpwm);
>
TO Sascha,
Thanks very much for your comments.
> Subject: Re: [PATCH 1/4] pwm: add freescale ftm pwm driver support
>
> On Wed, Aug 21, 2013 at 11:07:39AM +0800, Xiubo Li wrote:
> > +
> > +#define FTM_CSC_BASE0x0C
> > +#define FTM_CSC(_CHANNEL) \
> &
On Wed, Aug 21, 2013 at 11:07:39AM +0800, Xiubo Li wrote:
> +
> +#define FTM_CSC_BASE0x0C
> +#define FTM_CSC(_CHANNEL) \
> + (FTM_CSC_BASE + (_CHANNEL * 0x08))
I see this more and more in FSL code. This is unsafe! Consider what
happens when we call FTM_CSC(1 + 1). The result is certain
9 matches
Mail list logo