From: Jaehoon Chung Date: Fri, 21 Apr 2017 17:02:48 +0900 Subject: [U-Boot] [U-Boot, 4/8] power: axp209: Define the chip version mask In-Reply-To: <20170301125224.25994-5-oliver@schinagl.nl> References: <20170301125224.25994-5-oliver@schinagl.nl> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Olliver, On 03/01/2017 09:52 PM, Olliver Schinagl wrote: > Use a define for the chip version mask on the axp209. I missed this patch...Could you resend the patch with other patches? (on latest u-boot version.) There is conflict. Best Regards, Jaehoon Chung > > Signed-off-by: Olliver Schinagl > --- > drivers/power/axp209.c | 5 +---- > include/axp209.h | 2 ++ > 2 files changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/power/axp209.c b/drivers/power/axp209.c > index 731b75e50a..d496f675a1 100644 > --- a/drivers/power/axp209.c > +++ b/drivers/power/axp209.c > @@ -154,10 +154,7 @@ int axp_init(void) > if (rc) > return rc; > > - /* Low 4 bits is chip version */ > - ver &= 0x0f; > - > - if (ver != 0x1) > + if ((ver & AXP209_CHIP_VERSION_MASK) != 0x1) > return -1; > > /* Mask all interrupts */ > diff --git a/include/axp209.h b/include/axp209.h > index 7803300328..51d2e88dd2 100644 > --- a/include/axp209.h > +++ b/include/axp209.h > @@ -26,6 +26,8 @@ enum axp209_reg { > #define AXP209_POWER_STATUS_ON_BY_DC BIT(0) > #define AXP209_POWER_STATUS_VBUS_USABLE BIT(4) > > +#define AXP209_CHIP_VERSION_MASK 0x0f > + > #define AXP209_OUTPUT_CTRL_EXTEN BIT(0) > #define AXP209_OUTPUT_CTRL_DCDC3 BIT(1) > #define AXP209_OUTPUT_CTRL_LDO2 BIT(2) >