[PATCH] mfd mc13xxx: add MC13892_REVISION_2_4

Sascha Hauer s.hauer at pengutronix.de
Sun Aug 21 22:26:26 PDT 2016


On Thu, Aug 18, 2016 at 09:48:21PM +0200, Alexander Kurz wrote:
> 
> 
> On Thu, 18 Aug 2016, Alexander Shiyan wrote:
> 
> > >Четверг, 18 августа 2016, 10:15 +03:00 от Sascha Hauer <s.hauer at pengutronix.de>:
> > >
> > >On Wed, Aug 17, 2016 at 03:12:19PM +0200, Alexander Kurz wrote:
> > >> An MC13892CJ having REV[4:0]=0x14 can be found in the kindle-d01100.
> > >> Add the revision to the list to support this device.
> > >> 
> > >> Signed-off-by: Alexander Kurz < akurz at blala.de >
> > >> ---
> > >>  drivers/mfd/mc13xxx.c |  1 +
> > >>  include/mfd/mc13xxx.h | 13 +++++++------
> > >>  2 files changed, 8 insertions(+), 6 deletions(-)
> > ...
> > >>  #define MC13892_REVISION_2_03
> > >>  #define MC13892_REVISION_2_0a4
> > >>  #define MC13892_REVISION_2_15
> > >> -#define MC13892_REVISION_3_06
> > >> -#define MC13892_REVISION_3_17
> > >> -#define MC13892_REVISION_3_28
> > >> -#define MC13892_REVISION_3_2a9
> > >> -#define MC13892_REVISION_3_310
> > >> -#define MC13892_REVISION_3_511
> > >> +#define MC13892_REVISION_2_46
> > >> +#define MC13892_REVISION_3_07
> > >> +#define MC13892_REVISION_3_18
> > >> +#define MC13892_REVISION_3_29
> > >> +#define MC13892_REVISION_3_2a10
> > >> +#define MC13892_REVISION_3_311
> > >> +#define MC13892_REVISION_3_512
> > 
> > Could this be converted to enum?
> Personally I also prefer the enum since it enables e.g. gdb 
> awareness on the enum elements, depending on compiler and usecase
> it may offer type and value range safety and in this case, the diff
> would be smaller.
> 
> Is there a coding policy for barebox regarding macros vs. enums?

No, not really, but here an enum really looks like a better match.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list