mfd: wm5110: Add delay before releasing reset line
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Mon, 11 May 2015 12:58:10 +0000 (13:58 +0100)
committerLee Jones <lee.jones@linaro.org>
Mon, 22 Jun 2015 11:25:15 +0000 (12:25 +0100)
On the wm5110 it is important the reset line is held for slightly longer
to ensure the device starts up well. This patch adds a 5mS delay for
this.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/arizona-core.c

index 4f38ce654558edd240dfb91095fdcb682fef8411..cb8a1b2f07f177e1f8d75b4f156fbd2cd2b45afd 100644 (file)
@@ -259,6 +259,16 @@ static inline void arizona_enable_reset(struct arizona *arizona)
 static void arizona_disable_reset(struct arizona *arizona)
 {
        if (arizona->pdata.reset) {
+               switch (arizona->type) {
+               case WM5110:
+               case WM8280:
+                       /* Meet requirements for minimum reset duration */
+                       msleep(5);
+                       break;
+               default:
+                       break;
+               }
+
                gpio_set_value_cansleep(arizona->pdata.reset, 1);
                msleep(1);
        }