aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini2024-06-16 09:09:07 -0600
committerTom Rini2024-06-16 09:09:07 -0600
commitd8c213c9c7f827a9de0096bb4e5247c9a07bb248 (patch)
tree72b152c80c01dabc42ec92dc0fa9d23f36bd01ee /drivers
parent46b6a3e6c71de8622634d5aa8dca6a216148981b (diff)
parentae4aaa44977cbe522e9f38f2ac2ac07a784bf867 (diff)
Merge tag 'u-boot-rockchip-next-20240615' of https://source.denx.de/u-boot/custodians/u-boot-rockchip into next
CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/21113 - New board: Theobroma Systems SOM-RK3588-Q7 Tiger, ArmSoM Sige7 Rk3588; - PX30 dts migrate to OF_UPSTREAM; - Some other update on board or config;
Diffstat (limited to 'drivers')
-rw-r--r--drivers/power/pmic/rk8xx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c
index 12ff26a0855..617bb511e4e 100644
--- a/drivers/power/pmic/rk8xx.c
+++ b/drivers/power/pmic/rk8xx.c
@@ -6,6 +6,7 @@
#include <dm.h>
#include <dm/lists.h>
+#include <bitfield.h>
#include <errno.h>
#include <log.h>
#include <linux/bitfield.h>
@@ -277,10 +278,9 @@ static int rk8xx_probe(struct udevice *dev)
return ret;
priv->variant = ((msb << 8) | lsb) & RK8XX_ID_MSK;
- show_variant = priv->variant;
+ show_variant = bitfield_extract_by_mask(priv->variant, RK8XX_ID_MSK);
switch (priv->variant) {
case RK808_ID:
- show_variant = 0x808; /* RK808 hardware ID is 0 */
break;
case RK805_ID:
case RK816_ID:
@@ -311,7 +311,7 @@ static int rk8xx_probe(struct udevice *dev)
init_data_num = ARRAY_SIZE(rk806_init_reg);
break;
default:
- printf("Unknown PMIC: RK%x!!\n", priv->variant);
+ printf("Unknown PMIC: RK%x!!\n", show_variant);
return -EINVAL;
}