int pm_off = 0;
int ret;
int i;
+ int on_source, off_source;
if (!of_id) {
dev_err(&client->dev, "Failed to find matching dt id\n");
return -EINVAL;
}
+ if (strcmp(pdata->name, "rk818") == 0) {
+ ret = regmap_read(rk808->regmap, RK818_ON_SOURCE_REG, &on_source);
+ if (ret)
+ dev_err(&client->dev, "read reg:0x%x failed\n", RK818_ON_SOURCE_REG);
+ ret = regmap_read(rk808->regmap, RK818_OFF_SOURCE_REG, &off_source);
+ if (ret)
+ dev_err(&client->dev, "read reg:0x%x failed\n", RK818_OFF_SOURCE_REG);
+ dev_info(&client->dev, "ON_SOURCE:0x%02x OFF_SOURCE:0x%02x\n",
+ on_source, off_source);
+ }
+
for (i = 0; i < pdata->reg_num; i++) {
ret = regmap_update_bits(rk808->regmap,
pdata->rk8xx_pre_init_reg[i].addr,