CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_ACT8846=y
+CONFIG_ACT8846_SUPPORT_RESET=y
CONFIG_ROCKCHIP_PWM_REGULATOR=y
CONFIG_REGULATOR_SYR82X=y
CONFIG_REGULATOR_RICOH619=y
if (!gpio_is_valid(gpio))
printk("invalid gpio: %d\n",gpio);
pdata->pmic_hold_gpio = gpio;
+ pdata->pm_off = of_property_read_bool(act8846_pmic_np,"act8846,system-power-controller");
return pdata;
}
struct act8846 *act8846 = g_act8846;
printk("%s\n",__func__);
-
+#if 1
+ if (act8846->pmic_hold_gpio) {
+ gpio_direction_output(act8846->pmic_hold_gpio,0);
+ }
+#else
ret = act8846_reg_read(act8846,0xc3);
ret = act8846_set_bits(act8846, 0xc3,(0x1<<3),(0x1<<3));
ret = act8846_set_bits(act8846, 0xc3,(0x1<<4),(0x1<<4));
printk("act8846 set 0xc3 error!\n");
return err;
}
+#endif
return 0;
}
EXPORT_SYMBOL_GPL(act8846_device_shutdown);
}
gpio_direction_output(act8846->pmic_hold_gpio,1);
ret = gpio_get_value(act8846->pmic_hold_gpio);
- gpio_free(act8846->pmic_hold_gpio);
+ // gpio_free(act8846->pmic_hold_gpio);
printk("%s: act8846_pmic_hold=%x\n", __func__, ret);
}
#endif
act8846->rdev[i] = act_rdev;
}
}
+
+ if (pdev->pm_off && !pm_power_off) {
+ pm_power_off = act8846_device_shutdown;
+ }
#ifdef CONFIG_HAS_EARLYSUSPEND
act8846->act8846_suspend.suspend = act8846_early_suspend,