mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
mfd: palmas: Assign the right powerhold mask for tps65917
The powerhold mask for TPS65917 is different when comapred to the other palmas versions. Hence assign the right mask that enables power off of tps65917 pmic correctly. Signed-off-by: Keerthy <[email protected]> Signed-off-by: Lee Jones <[email protected]>
This commit is contained in:
parent
0a5d79bfc0
commit
572ff4d560
2 changed files with 12 additions and 1 deletions
|
|
@ -430,6 +430,7 @@ static void palmas_power_off(void)
|
|||
{
|
||||
unsigned int addr;
|
||||
int ret, slave;
|
||||
u8 powerhold_mask;
|
||||
struct device_node *np = palmas_dev->dev->of_node;
|
||||
|
||||
if (of_property_read_bool(np, "ti,palmas-override-powerhold")) {
|
||||
|
|
@ -437,8 +438,15 @@ static void palmas_power_off(void)
|
|||
PALMAS_PRIMARY_SECONDARY_PAD2);
|
||||
slave = PALMAS_BASE_TO_SLAVE(PALMAS_PU_PD_OD_BASE);
|
||||
|
||||
if (of_device_is_compatible(np, "ti,tps65917"))
|
||||
powerhold_mask =
|
||||
TPS65917_PRIMARY_SECONDARY_PAD2_GPIO_5_MASK;
|
||||
else
|
||||
powerhold_mask =
|
||||
PALMAS_PRIMARY_SECONDARY_PAD2_GPIO_7_MASK;
|
||||
|
||||
ret = regmap_update_bits(palmas_dev->regmap[slave], addr,
|
||||
PALMAS_PRIMARY_SECONDARY_PAD2_GPIO_7_MASK, 0);
|
||||
powerhold_mask, 0);
|
||||
if (ret)
|
||||
dev_err(palmas_dev->dev,
|
||||
"Unable to write PRIMARY_SECONDARY_PAD2 %d\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue