UPSTREAM: pinctrl: rockchip: Special treatment for RK3288 gpio0 pins' pull
RK3288 pmu_gpio0 pull setting have no higher 16 writing corresponding bits, need to read before write the register. Signed-off-by: David Wu <david.wu@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 69a38f81bb55893a8555c899319305c539226a0a) Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Change-Id: Ie8f94cf1a0b33a24bb32d3de8231b7f2db51ddff
This commit is contained in:
parent
05a5688e53
commit
cfe427fe38
|
|
@ -116,8 +116,15 @@ static int rk3288_set_pull(struct rockchip_pin_bank *bank,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enable the write to the equivalent lower bits */
|
/* bank0 is special, there are no higher 16 bit writing bits */
|
||||||
data = ((1 << ROCKCHIP_PULL_BITS_PER_PIN) - 1) << (bit + 16);
|
if (bank->bank_num == 0) {
|
||||||
|
regmap_read(regmap, reg, &data);
|
||||||
|
data &= ~(((1 << ROCKCHIP_PULL_BITS_PER_PIN) - 1) << bit);
|
||||||
|
} else {
|
||||||
|
/* enable the write to the equivalent lower bits */
|
||||||
|
data = ((1 << ROCKCHIP_PULL_BITS_PER_PIN) - 1) << (bit + 16);
|
||||||
|
}
|
||||||
|
|
||||||
data |= (ret << bit);
|
data |= (ret << bit);
|
||||||
ret = regmap_write(regmap, reg, data);
|
ret = regmap_write(regmap, reg, data);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue