From 8421ff101745201f029f34e9826829a76140625b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E6=99=B4?= Date: Thu, 5 Jun 2014 16:32:51 +0800 Subject: [PATCH] rk3288:pmic:act8846:support power off when charger;ricoh619:add protect for i2c error --- arch/arm/boot/dts/rk3288-tb.dts | 8 ++++---- drivers/mfd/ricoh619.c | 1 + drivers/regulator/act8846.c | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) mode change 100644 => 100755 drivers/mfd/ricoh619.c diff --git a/arch/arm/boot/dts/rk3288-tb.dts b/arch/arm/boot/dts/rk3288-tb.dts index a317900dd824..41667e7f5885 100755 --- a/arch/arm/boot/dts/rk3288-tb.dts +++ b/arch/arm/boot/dts/rk3288-tb.dts @@ -1090,7 +1090,7 @@ rockchip,power_type = ; regulator-initial-state = <3>; regulator-state-mem { regulator-state-enabled; - regulator-state-uv = <3300000>; + regulator-state-uv = <1000000>; }; }; ricoh619_ldo8_reg: regulator@12 { @@ -1100,7 +1100,7 @@ rockchip,power_type = ; regulator-initial-state = <3>; regulator-state-mem { regulator-state-enabled; - regulator-state-uv = <3300000>; + regulator-state-uv = <1800000>; }; }; ricoh619_ldo9_reg: regulator@13 { @@ -1110,7 +1110,7 @@ rockchip,power_type = ; regulator-initial-state = <3>; regulator-state-mem { regulator-state-enabled; - regulator-state-uv = <3300000>; + regulator-state-uv = <1000000>; }; }; ricoh619_ldo10_reg: regulator@14 { @@ -1120,7 +1120,7 @@ rockchip,power_type = ; regulator-initial-state = <3>; regulator-state-mem { regulator-state-enabled; - regulator-state-uv = <3300000>; + regulator-state-uv = <1800000>; }; }; ricoh619_ldortc1_reg: regulator@15 { diff --git a/drivers/mfd/ricoh619.c b/drivers/mfd/ricoh619.c old mode 100644 new mode 100755 index 971dfe0f73d3..feb23c8c96e8 --- a/drivers/mfd/ricoh619.c +++ b/drivers/mfd/ricoh619.c @@ -838,6 +838,7 @@ static int ricoh619_i2c_probe(struct i2c_client *client, } else{ do{ + ret = ricoh619_write(ricoh619->dev, 0xff, 0x00); ret = ricoh619_read(ricoh619->dev, 0x36, &control); i += 1; printk(KERN_INFO "##################:read ricoh619 0x36 error retry %08x %d\n",control,ret); diff --git a/drivers/regulator/act8846.c b/drivers/regulator/act8846.c index ef247c24259c..158f491b4044 100755 --- a/drivers/regulator/act8846.c +++ b/drivers/regulator/act8846.c @@ -34,6 +34,7 @@ #include #include #include +#include #if 0 #define DBG(x...) printk(KERN_INFO x) @@ -802,7 +803,9 @@ int act8846_device_shutdown(void) #if 1 if (act8846->pmic_hold_gpio) { gpio_direction_output(act8846->pmic_hold_gpio,0); + arm_pm_restart('h', "charge"); } + #else ret = act8846_reg_read(act8846,0xc3); ret = act8846_set_bits(act8846, 0xc3,(0x1<<3),(0x1<<3)); -- 2.34.1