From mboxrd@z Thu Jan 1 00:00:00 1970 From: david.jander@protonic.nl (David Jander) Date: Mon, 6 Dec 2010 11:40:22 +0100 Subject: [PATCH] support PMIC mc13892 In-Reply-To: <1291616735-29645-1-git-send-email-yong.shen@freescale.com> References: <1291616735-29645-1-git-send-email-yong.shen@freescale.com> Message-ID: <20101206114022.249671bc@archvile> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Yong, On Mon, 6 Dec 2010 14:25:35 +0800 wrote: >[...] > --- /dev/null > +++ b/include/linux/mfd/mc13892.h > @@ -0,0 +1,38 @@ > +/* > + * Copyright 2010 Yong Shen > + * > + * This program is free software; you can redistribute it and/or modify it > under > + * the terms of the GNU General Public License version 2 as published by the > + * Free Software Foundation. > + */ > + > +#ifndef __LINUX_MFD_MC13892_H > +#define __LINUX_MFD_MC13892_H > +#include > + > +#define MC13892_SW1 0 > +#define MC13892_SW2 1 > +#define MC13892_SW3 2 > +#define MC13892_SW4 3 > +#define MC13892_SWBST 4 > +#define MC13892_VIOHI 5 > +#define MC13892_VPLL 6 > +#define MC13892_VDIG 7 > +#define MC13892_VSD 8 > +#define MC13892_VUSB2 9 > +#define MC13892_VVIDEO 10 > +#define MC13892_VAUDIO 11 > +#define MC13892_VCAM 12 > +#define MC13892_VGEN1 13 > +#define MC13892_VGEN2 14 > +#define MC13892_VGEN3 15 > +#define MC13892_VUSB 16 > +#define MC13892_GPO1 17 > +#define MC13892_GPO2 18 > +#define MC13892_GPO3 19 > +#define MC13892_GPO4 20 > +#define MC13892_PWGT1SPI 21 > +#define MC13892_PWGT2SPI 22 > +#define MC13892_VCOINCELL 23 > + > +#endif I suppose these are needed outside the driver .c file? If so, can't these go in linux/mfd/mc13xxx.h? The platform-data struct is in there too, so why not put the corresponding defines there also? For other subsystems, those defines that are common are prefixed MC13XXX_ and those that are individual, get MC13892_ or MC13783_. This makes it also easier and less intrusive to add support for future chips in this series.... Best regards, -- David Jander Protonic Holland.