mfd: palmas: add PMU reset to be called from other driver.
Hyongbin Kim [Mon, 22 Apr 2013 10:45:57 +0000 (19:45 +0900)]
In some case, device need to PMU reset instead of PMU power off.

Bug 1242042

Change-Id: I4981bcf8aa52e46a6b3a6bcd347aa5d9c0185973
Signed-off-by: Hyongbin Kim <hyongbink@nvidia.com>
Reviewed-on: http://git-master/r/221551
Reviewed-by: Riham Haidar <rhaidar@nvidia.com>
Tested-by: Riham Haidar <rhaidar@nvidia.com>

drivers/mfd/palmas.c
include/linux/mfd/palmas.h

index 70407b3..be2e256 100644 (file)
@@ -890,6 +890,15 @@ static void palmas_power_off(void)
        palmas_control_update(palmas_dev, PALMAS_DEV_CTRL, 1, 0);
 }
 
+void palmas_reset(void)
+{
+       if (!palmas_dev)
+               return;
+
+       palmas_control_update(palmas_dev, PALMAS_DEV_CTRL, 2, 2);
+}
+EXPORT_SYMBOL(palmas_reset);
+
 static int palmas_read_version_information(struct palmas *palmas)
 {
        unsigned int sw_rev, des_rev;
index db06ebd..5bad75c 100644 (file)
@@ -2937,4 +2937,6 @@ static inline int palmas_is_es_version_or_less(struct palmas *palmas,
 
        return false;
 }
+
+extern void palmas_reset(void);
 #endif /*  __LINUX_MFD_PALMAS_H */