Re: [RFC][PATCH 10/11] LEDS module of the device driver for DA9052 (Resend)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jonathan Cameron
Date: Wednesday, July 14, 2010 - 4:42 am

On 07/14/10 11:18, Dajun Chen wrote:
Hi Dajun,

I'm afraid quite a few comments in this review are fairly
general kernel coding issues that you will need to apply
to all of your patch set.

Don't suppose you can make the datasheet for this part easily
available. It would make reviewing this code much easier!
Sorry if I have missed it somewhere else in your patch set.

If not could you clarify what we have here. How are these
leds connected and controlled?  It looks to me like you have
some multipurpose pins (not gpio's as they have pwm controls)

These definitely need to be platform data rather
than defines in this file.
May be a silly question, but why are your only led's 4 and 5?
What happened to 1,2 and 3?  Based on your reg defs, these are
have extra features.  If you don't want to implement them now
then please state this somewhere.
These defines are far too generically named.
Please prefix with DA9052_ as then you'll be much
less likely to have a naming clash.

Actually looking at how you use them, they look like more
platform data elements rather than stuff that should be
defined here. These are particular choices relevant to a
particular design.

I would imagine these defines are not used elsewhere in your
driver set. If they aren't please move these led specific bits into
your led.h header. That will make this module more self contained
and easier to review.
Perhaps some comments would clarify what is hapenning here.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC][PATCH 10/11] LEDS module of the device driver fo ..., Jonathan Cameron, (Wed Jul 14, 4:42 am)