mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-22 15:11:33 +00:00
power: axp209: Define the chip version mask
Use a define for the chip version mask on the axp209. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Signed-off-by: Priit Laes <plaes@plaes.org> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
This commit is contained in:
parent
048447ce4a
commit
f5eebc7925
2 changed files with 3 additions and 4 deletions
|
@ -153,10 +153,7 @@ int axp_init(void)
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
/* Low 4 bits is chip version */
|
if ((ver & AXP209_CHIP_VERSION_MASK) != 0x1)
|
||||||
ver &= 0x0f;
|
|
||||||
|
|
||||||
if (ver != 0x1)
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* Mask all interrupts */
|
/* Mask all interrupts */
|
||||||
|
|
|
@ -25,6 +25,8 @@ enum axp209_reg {
|
||||||
#define AXP209_POWER_STATUS_ON_BY_DC BIT(0)
|
#define AXP209_POWER_STATUS_ON_BY_DC BIT(0)
|
||||||
#define AXP209_POWER_STATUS_VBUS_USABLE BIT(4)
|
#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_EXTEN BIT(0)
|
||||||
#define AXP209_OUTPUT_CTRL_DCDC3 BIT(1)
|
#define AXP209_OUTPUT_CTRL_DCDC3 BIT(1)
|
||||||
#define AXP209_OUTPUT_CTRL_LDO2 BIT(2)
|
#define AXP209_OUTPUT_CTRL_LDO2 BIT(2)
|
||||||
|
|
Loading…
Add table
Reference in a new issue