rk3288:pmic:act8846:support power off when charger;ricoh619:add protect for i2c error
author张晴 <zhangqing@rock-chips.com>
Thu, 5 Jun 2014 08:32:51 +0000 (16:32 +0800)
committer张晴 <zhangqing@rock-chips.com>
Thu, 5 Jun 2014 08:32:51 +0000 (16:32 +0800)
arch/arm/boot/dts/rk3288-tb.dts
drivers/mfd/ricoh619.c [changed mode: 0644->0755]
drivers/regulator/act8846.c

index a317900dd824217382dab36673e5827987b9993f..41667e7f588599ad40489ee4351d368cb6ac59a8 100755 (executable)
@@ -1090,7 +1090,7 @@ rockchip,power_type = <GPIO>;
                        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 = <GPIO>;
                        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 = <GPIO>;
                        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 = <GPIO>;
                        regulator-initial-state = <3>;
                        regulator-state-mem {
                                regulator-state-enabled;
-                               regulator-state-uv = <3300000>;
+                               regulator-state-uv = <1800000>;
                        };
                };
                ricoh619_ldortc1_reg: regulator@15  {
old mode 100644 (file)
new mode 100755 (executable)
index 971dfe0..feb23c8
@@ -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);
index ef247c24259c2cf0e780dc1a055e01d609130f38..158f491b4044d71691c747763a7dd754403d3bce 100755 (executable)
@@ -34,6 +34,7 @@
 #include <linux/regulator/driver.h>
 #include <linux/regulator/machine.h>
 #include <linux/regmap.h>
+#include <asm/system_misc.h>
 
 #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));