2014-04-28 15:01:08

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 2/3] pwm: ftm-pwm: Convert to direct regmap API usage.

On Fri, Mar 21, 2014 at 12:53:09PM +0800, Xiubo Li wrote:
> Signed-off-by: Xiubo Li <[email protected]>
> ---
> drivers/pwm/pwm-fsl-ftm.c | 83 +++++++++++++++++++++++++----------------------
> 1 file changed, 44 insertions(+), 39 deletions(-)

This could explain the advantages of converting to regmap. Looking at
this diffstat above, it's not immediately obvious that there's an
advantage because you end up adding 5 lines.

Again I'm guessing this is in preparation to add endianess support, and
it will be really easy to add that using regmap, so the gains will only
become obvious later on.

That's the kind of thing I'd like to see in the patch description. It
tells me why this patch makes sense.

Thierry


Attachments:
(No filename) (719.00 B)
(No filename) (836.00 B)
Download all attachments

2014-04-28 15:14:36

by Xiubo Li

[permalink] [raw]
Subject: RE: [PATCH 2/3] pwm: ftm-pwm: Convert to direct regmap API usage.


> > drivers/pwm/pwm-fsl-ftm.c | 83 +++++++++++++++++++++++++----------------------
> > 1 file changed, 44 insertions(+), 39 deletions(-)
>
> This could explain the advantages of converting to regmap. Looking at
> this diffstat above, it's not immediately obvious that there's an
> advantage because you end up adding 5 lines.
>
> Again I'm guessing this is in preparation to add endianess support, and
> it will be really easy to add that using regmap, so the gains will only
> become obvious later on.
>
> That's the kind of thing I'd like to see in the patch description. It
> tells me why this patch makes sense.
>

Yes, That`s why converting to use the regmap.

I`ll update this as you have mentioned.

Thanks,
BRs
Xiubo