mfd: palmas: is_palmas_charger needed by multiple drivers
PATCH 1/1 mfd: palmas: is_palmas_charger needed by multiple drivers
is_palmas_charger checks for the presence of charging functionality in the device
--- include/linux/mfd/palmas.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
include/linux/mfd/palmas.h +5 -0
@@ -26,6 +26,11 @@/* The ID_REVISION NUMBERS */ #define PALMAS_CHIP_OLD_ID 0x0000#define PALMAS_CHIP_ID 0xC035 +#define PALMAS_CHIP_CHARGER_ID 0xC036 + +#define is_palmas (a) (((a) == PALMAS_CHIP_OLD_ID) || \ + ((a) == PALMAS_CHIP_ID)) +#define is_palmas_charger (a) ((a) == PALMAS_CHIP_CHARGER_ID)struct palmas_pmic ;struct palmas_gpadc ;
Signature · 1 line
1.7.0.4
Quoted 14 lines · Ian Lartey
is_palmas_chargerchecks for the presence of charging functionality in the deviceSigned-off-by Graeme Gregory <[email protected]>Signed-off-by Ian Lartey <[email protected]>--- include/linux/mfd/palmas.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)include/linux/mfd/palmas.h +0
-0
include/linux/mfd/palmas.h line 34
Quoted 9 lines
include/linux/mfd/palmas.h +5
-0@@ -26,6 +26,11 @@/* The ID_REVISION NUMBERS */ #define PALMAS_CHIP_OLD_ID 0x0000#define PALMAS_CHIP_ID 0xC035 +#define PALMAS_CHIP_CHARGER_ID 0xC036 + +#define is_palmas (a) (((a) == PALMAS_CHIP_OLD_ID) || \ + ((a) == PALMAS_CHIP_ID)) +#define is_palmas_charger (a) ((a) == PALMAS_CHIP_CHARGER_ID)
TI says this as TPS80036 and original palma as TPS65913/TPS65914. Not sure whether palma_charger is correct or not here.
But above change looks good.
Quoted 28 lines · Laxman Dewangan
Quoted 14 lines · Ian Lartey
is_palmas_chargerchecks for the presence of charging functionality in the deviceSigned-off-by Graeme Gregory <[email protected]>Signed-off-by Ian Lartey <[email protected]>--- include/linux/mfd/palmas.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)include/linux/mfd/palmas.h +0
-0include/linux/mfd/palmas.h line 34
Quoted 9 lines
include/linux/mfd/palmas.h +5
-0@@ -26,6 +26,11 @@/* The ID_REVISION NUMBERS */ #define PALMAS_CHIP_OLD_ID 0x0000#define PALMAS_CHIP_ID 0xC035 +#define PALMAS_CHIP_CHARGER_ID 0xC036 + +#define is_palmas (a) (((a) == PALMAS_CHIP_OLD_ID) || \ + ((a) == PALMAS_CHIP_ID)) +#define is_palmas_charger (a) ((a) == PALMAS_CHIP_CHARGER_ID)TI says this as TPS80036 and original palma as TPS65913/TPS65914. Not sure whether
palma_chargeris correct or not here.
Quoted 3 lines
But above change looks good.
Acked-by Laxman Dewangan<[email protected]>
I can confirm that the generic name of TPS80036 is palmas-charger as decided at TI!
Graeme