From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Haas Subject: Re: Re: [PATCH v2 2/6] mfd: axp20x: Add register bits for axp20x-ac-power Date: Sun, 1 May 2016 16:24:20 +0200 Message-ID: <70789f3b-32c2-7d9c-1091-e4fd40b9a754@computerlinguist.org> References: <1462093047-7885-1-git-send-email-haas@computerlinguist.org> <1462093047-7885-3-git-send-email-haas@computerlinguist.org> Reply-To: haas-bdq14YP6qtSV9CzYT+GlPGD2FQJk+8+b@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org In-Reply-To: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: wens-jdAy2FN1RRM@public.gmane.org Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Maxime Ripard , Lee Jones , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Hans De Goede , =?UTF-8?Q?Bruno_Pr=c3=a9mont?= , devicetree , linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Russell King - ARM Linux , linux-sunxi List-Id: linux-pm@vger.kernel.org On 05/01/2016 11:48 AM, Chen-Yu Tsai wrote: > Hi, > > On Sun, May 1, 2016 at 4:57 PM, Michael Haas wrote: >> This change adds some register bit definitions used by the >> axp20x-ac-power driver. >> >> Signed-off-by: Michael Haas >> --- >> include/linux/mfd/axp20x.h | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h >> index d82e7d5..c4c6dfa 100644 >> --- a/include/linux/mfd/axp20x.h >> +++ b/include/linux/mfd/axp20x.h >> @@ -90,6 +90,17 @@ enum { >> #define AXP22X_ALDO3_V_OUT 0x2a >> #define AXP22X_CHRG_CTRL3 0x35 >> >> + >> +/* Fields of AXP20X_PWR_INPUT_STATUS */ >> +#define AXP20X_PWR_STATUS_AC_PRESENT BIT(7) >> +#define AXP20X_PWR_STATUS_AC_AVAILABLE BIT(6) >> +#define AXP20X_PWR_STATUS_AC_VBUS_SHORT BIT(1) >> +#define AXP20X_PWR_STATUS_AC_VBUS_SEL BIT(0) >> + >> +/* Fields of AXP20X_ADC_EN1 */ >> +#define AXP20X_ADC_EN1_ACIN_VOLT BIT(5) >> +#define AXP20X_ADC_EN1_ACIN_CURR BIT(4) >> + > > We keep the bit definitions of each register in each separate driver. > The drivers only define the ones they use. > > ChenYu Hi ChenYu, i believe Maxime Ripard requested that these defines be moved to the header: https://groups.google.com/d/msg/linux-sunxi/nEUg87cV6KI/TvdB6MBZBAAJ What do you think? Thanks for the review! Michael