From: Quentin Schulz <quentin.sch...@cherry.de> The val (the bits to set) is the second member of the reg_data structure and mask the third one. We obviously want to clear bits 6 and 7 in order to only set bit 7 in there instead of only clearing bit 7 in order to write bits 6 and 7 (which makes no sense).
Fortunately, according to the datasheet, bit 6 value doesn't matter when bit 7 is set so this is essentially just a cosmetic change, no intended change in behavior. Fixes: f172575d92cd ("power: rk8xx: add support for RK806") Signed-off-by: Quentin Schulz <quentin.sch...@cherry.de> --- I'm planning on adding support for customizing the RST_FUN value in a later patch series. I'm currently working[1] on bringing this up to the Linux kernel first to have a stable DT implementation. [1] https://lore.kernel.org/linux-rockchip/20250526-rk8xx-rst-fun-v1-0-ea894d947...@cherry.de/ --- drivers/power/pmic/rk8xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c index a14555cf472f80daed70eab174c2e9b980603580..3bc696d4caaa68f87fd49810682616c34bafb23b 100644 --- a/drivers/power/pmic/rk8xx.c +++ b/drivers/power/pmic/rk8xx.c @@ -91,7 +91,7 @@ void rk8xx_off_for_plugin(struct udevice *dev) static struct reg_data rk806_init_reg[] = { /* RST_FUN */ - { RK806_REG_SYS_CFG3, GENMASK(7, 6), BIT(7)}, + { RK806_REG_SYS_CFG3, BIT(7), GENMASK(7, 6)}, }; static struct reg_data rk817_init_reg[] = { --- base-commit: e04d137231f2e9e14708a32448c879125b8e308f change-id: 20250528-rk8xx-rst_fun-mask-1d492c3453a4 Best regards, -- Quentin Schulz <quentin.sch...@cherry.de>