Skip to content

Commit

Permalink
hardkernel odroidgoa-mfd-rk808-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
scpcom committed Apr 21, 2020
1 parent 6d78e6a commit 121f26f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/mfd/rk808.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,10 +1051,13 @@ static int rk817_reboot_notifier_handler(struct notifier_block *nb,
#ifndef CONFIG_ARCH_ROCKCHIP_ODROIDGO2
int value, power_en_active0, power_en_active1;

data = container_of(nb, struct rk817_reboot_data_t, reboot_notifier);
dev = &data->rk808->i2c->dev;

regmap_read(data->rk808->regmap, RK817_POWER_EN_SAVE0,
&power_en_active0);
&power_en_active0);
regmap_read(data->rk808->regmap, RK817_POWER_EN_SAVE1,
&power_en_active1);
&power_en_active1);
value = power_en_active0 & 0x0f;
regmap_write(data->rk808->regmap, RK817_POWER_EN_REG(0), value | 0xf0);
value = (power_en_active0 & 0xf0) >> 4;
Expand All @@ -1071,8 +1074,10 @@ static int rk817_reboot_notifier_handler(struct notifier_block *nb,
if (!cmd || !strlen(cmd) || !strcmp(cmd, "normal"))
return NOTIFY_OK;

#ifdef CONFIG_ARCH_ROCKCHIP_ODROIDGO2
data = container_of(nb, struct rk817_reboot_data_t, reboot_notifier);
dev = &data->rk808->i2c->dev;
#endif

ret = regmap_update_bits(data->rk808->regmap, RK817_SYS_CFG(3),
RK817_RST_FUNC_MSK, RK817_RST_FUNC_REG);
Expand Down

0 comments on commit 121f26f

Please sign in to comment.