All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/6] mfd: twl4030-power: Enable off-idle configuration when booted with device tree
@ 2014-05-27 18:08 ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-27 18:08 UTC (permalink / raw)
  To: lee.jones-QSEj5FYQhm4dnm+yROfE0A
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi Lee,

Here are these patches for you again as you requested.
I left out the last patch in the series containing the
related .dts changes to enable these features as
that I can apply separately.

Regards,

Tony


Tony Lindgren (6):
  mfd: twl4030-power: Fix hang on reboot if sleep configuration was
    loaded earlier
  mfd: twl4030-power: Fix some defines for SW_EVENTS
  mfd: twl4030-power: Add generic reset configuration
  mfd: twl4030-power: Add recommended idle configuration
  mfd: twl4030-power: Add support for board specific configuration
  mfd: twl4030-power: Add a configuration to turn off oscillator during
    off-idle

 .../devicetree/bindings/mfd/twl4030-power.txt      |  17 +-
 drivers/mfd/twl4030-power.c                        | 286 +++++++++++++++++++--
 include/linux/i2c/twl.h                            |   4 +
 3 files changed, 281 insertions(+), 26 deletions(-)

-- 
1.8.1.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [PATCH v3 0/6] mfd: twl4030-power: Enable off-idle configuration when booted with device tree
@ 2014-05-27 18:08 ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-27 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Lee,

Here are these patches for you again as you requested.
I left out the last patch in the series containing the
related .dts changes to enable these features as
that I can apply separately.

Regards,

Tony


Tony Lindgren (6):
  mfd: twl4030-power: Fix hang on reboot if sleep configuration was
    loaded earlier
  mfd: twl4030-power: Fix some defines for SW_EVENTS
  mfd: twl4030-power: Add generic reset configuration
  mfd: twl4030-power: Add recommended idle configuration
  mfd: twl4030-power: Add support for board specific configuration
  mfd: twl4030-power: Add a configuration to turn off oscillator during
    off-idle

 .../devicetree/bindings/mfd/twl4030-power.txt      |  17 +-
 drivers/mfd/twl4030-power.c                        | 286 +++++++++++++++++++--
 include/linux/i2c/twl.h                            |   4 +
 3 files changed, 281 insertions(+), 26 deletions(-)

-- 
1.8.1.1

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [PATCH 1/6] mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier
  2014-05-27 18:08 ` Tony Lindgren
@ 2014-05-27 18:08   ` Tony Lindgren
  -1 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-27 18:08 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-arm-kernel, linux-omap, devicetree, Peter Ujfalusi

Looks like we can still hit the issue of wrong load order of
twl4030 configuration. If we have a sleep configuration loaded,
and do a warm reset, the device can hang while initializing the
wakeup12 sequence. We do have a warning message about wrong order
of twl4030 configuration, but in this case it does not help as
the sleep configuration was loaded during the previous boot and
the state of twl4030 is maintained throughout the warm reset.

Fix the issue by clearing any existing sleep configuration
before we load the warm reset configuration.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/mfd/twl4030-power.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 96162b6..1b30d8a 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -421,6 +421,12 @@ static int load_twl4030_script(struct twl4030_script *tscript,
 			goto out;
 	}
 	if (tscript->flags & TWL4030_WAKEUP12_SCRIPT) {
+		/* Reset any existing sleep script to avoid hangs on reboot */
+		err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, END_OF_SCRIPT,
+				       R_SEQ_ADD_A2S);
+		if (err)
+			goto out;
+
 		err = twl4030_config_wakeup12_sequence(address);
 		if (err)
 			goto out;
-- 
1.8.1.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 1/6] mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier
@ 2014-05-27 18:08   ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-27 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

Looks like we can still hit the issue of wrong load order of
twl4030 configuration. If we have a sleep configuration loaded,
and do a warm reset, the device can hang while initializing the
wakeup12 sequence. We do have a warning message about wrong order
of twl4030 configuration, but in this case it does not help as
the sleep configuration was loaded during the previous boot and
the state of twl4030 is maintained throughout the warm reset.

Fix the issue by clearing any existing sleep configuration
before we load the warm reset configuration.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/mfd/twl4030-power.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 96162b6..1b30d8a 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -421,6 +421,12 @@ static int load_twl4030_script(struct twl4030_script *tscript,
 			goto out;
 	}
 	if (tscript->flags & TWL4030_WAKEUP12_SCRIPT) {
+		/* Reset any existing sleep script to avoid hangs on reboot */
+		err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, END_OF_SCRIPT,
+				       R_SEQ_ADD_A2S);
+		if (err)
+			goto out;
+
 		err = twl4030_config_wakeup12_sequence(address);
 		if (err)
 			goto out;
-- 
1.8.1.1

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 2/6] mfd: twl4030-power: Fix some defines for SW_EVENTS
  2014-05-27 18:08 ` Tony Lindgren
@ 2014-05-27 18:08   ` Tony Lindgren
  -1 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-27 18:08 UTC (permalink / raw)
  To: lee.jones; +Cc: linux-arm-kernel, linux-omap, devicetree, Peter Ujfalusi

We have these bits partially defined in two different
places, so let's fix them up and add defines for the
missing bits. These bits are the same for P1_SW_EVENTS,
P2_SW_EVENTS and P3_SW_EVENTS.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/mfd/twl4030-power.c | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 1b30d8a..0b037dc 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -34,8 +34,15 @@
 
 static u8 twl4030_start_script_address = 0x2b;
 
-#define PWR_P1_SW_EVENTS	0x10
-#define PWR_DEVOFF		(1 << 0)
+/* Register bits for P1, P2 and P3_SW_EVENTS */
+#define PWR_STOPON_PRWON	BIT(6)
+#define PWR_STOPON_SYSEN	BIT(5)
+#define PWR_ENABLE_WARMRESET	BIT(4)
+#define PWR_LVL_WAKEUP		BIT(3)
+#define PWR_DEVACT		BIT(2)
+#define PWR_DEVSLP		BIT(1)
+#define PWR_DEVOFF		BIT(0)
+
 #define SEQ_OFFSYNC		(1 << 0)
 
 #define PHY_TO_OFF_PM_MASTER(p)		(p - 0x36)
@@ -52,10 +59,6 @@ static u8 twl4030_start_script_address = 0x2b;
 #define R_CFG_P2_TRANSITION	PHY_TO_OFF_PM_MASTER(0x37)
 #define R_CFG_P3_TRANSITION	PHY_TO_OFF_PM_MASTER(0x38)
 
-#define LVL_WAKEUP	0x08
-
-#define ENABLE_WARMRESET (1<<4)
-
 #define END_OF_SCRIPT		0x3f
 
 #define R_SEQ_ADD_A2S		PHY_TO_OFF_PM_MASTER(0x55)
@@ -196,7 +199,7 @@ static int twl4030_config_wakeup3_sequence(u8 address)
 	err = twl_i2c_read_u8(TWL_MODULE_PM_MASTER, &data, R_P3_SW_EVENTS);
 	if (err)
 		goto out;
-	data |= LVL_WAKEUP;
+	data |= PWR_LVL_WAKEUP;
 	err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, data, R_P3_SW_EVENTS);
 out:
 	if (err)
@@ -219,7 +222,7 @@ static int twl4030_config_wakeup12_sequence(u8 address)
 	if (err)
 		goto out;
 
-	data |= LVL_WAKEUP;
+	data |= PWR_LVL_WAKEUP;
 	err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, data, R_P1_SW_EVENTS);
 	if (err)
 		goto out;
@@ -228,7 +231,7 @@ static int twl4030_config_wakeup12_sequence(u8 address)
 	if (err)
 		goto out;
 
-	data |= LVL_WAKEUP;
+	data |= PWR_LVL_WAKEUP;
 	err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, data, R_P2_SW_EVENTS);
 	if (err)
 		goto out;
@@ -281,7 +284,7 @@ static int twl4030_config_warmreset_sequence(u8 address)
 	if (err)
 		goto out;
 
-	rd_data |= ENABLE_WARMRESET;
+	rd_data |= PWR_ENABLE_WARMRESET;
 	err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, rd_data, R_P1_SW_EVENTS);
 	if (err)
 		goto out;
@@ -290,7 +293,7 @@ static int twl4030_config_warmreset_sequence(u8 address)
 	if (err)
 		goto out;
 
-	rd_data |= ENABLE_WARMRESET;
+	rd_data |= PWR_ENABLE_WARMRESET;
 	err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, rd_data, R_P2_SW_EVENTS);
 	if (err)
 		goto out;
@@ -299,7 +302,7 @@ static int twl4030_config_warmreset_sequence(u8 address)
 	if (err)
 		goto out;
 
-	rd_data |= ENABLE_WARMRESET;
+	rd_data |= PWR_ENABLE_WARMRESET;
 	err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, rd_data, R_P3_SW_EVENTS);
 out:
 	if (err)
-- 
1.8.1.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 2/6] mfd: twl4030-power: Fix some defines for SW_EVENTS
@ 2014-05-27 18:08   ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-27 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

We have these bits partially defined in two different
places, so let's fix them up and add defines for the
missing bits. These bits are the same for P1_SW_EVENTS,
P2_SW_EVENTS and P3_SW_EVENTS.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/mfd/twl4030-power.c | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 1b30d8a..0b037dc 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -34,8 +34,15 @@
 
 static u8 twl4030_start_script_address = 0x2b;
 
-#define PWR_P1_SW_EVENTS	0x10
-#define PWR_DEVOFF		(1 << 0)
+/* Register bits for P1, P2 and P3_SW_EVENTS */
+#define PWR_STOPON_PRWON	BIT(6)
+#define PWR_STOPON_SYSEN	BIT(5)
+#define PWR_ENABLE_WARMRESET	BIT(4)
+#define PWR_LVL_WAKEUP		BIT(3)
+#define PWR_DEVACT		BIT(2)
+#define PWR_DEVSLP		BIT(1)
+#define PWR_DEVOFF		BIT(0)
+
 #define SEQ_OFFSYNC		(1 << 0)
 
 #define PHY_TO_OFF_PM_MASTER(p)		(p - 0x36)
@@ -52,10 +59,6 @@ static u8 twl4030_start_script_address = 0x2b;
 #define R_CFG_P2_TRANSITION	PHY_TO_OFF_PM_MASTER(0x37)
 #define R_CFG_P3_TRANSITION	PHY_TO_OFF_PM_MASTER(0x38)
 
-#define LVL_WAKEUP	0x08
-
-#define ENABLE_WARMRESET (1<<4)
-
 #define END_OF_SCRIPT		0x3f
 
 #define R_SEQ_ADD_A2S		PHY_TO_OFF_PM_MASTER(0x55)
@@ -196,7 +199,7 @@ static int twl4030_config_wakeup3_sequence(u8 address)
 	err = twl_i2c_read_u8(TWL_MODULE_PM_MASTER, &data, R_P3_SW_EVENTS);
 	if (err)
 		goto out;
-	data |= LVL_WAKEUP;
+	data |= PWR_LVL_WAKEUP;
 	err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, data, R_P3_SW_EVENTS);
 out:
 	if (err)
@@ -219,7 +222,7 @@ static int twl4030_config_wakeup12_sequence(u8 address)
 	if (err)
 		goto out;
 
-	data |= LVL_WAKEUP;
+	data |= PWR_LVL_WAKEUP;
 	err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, data, R_P1_SW_EVENTS);
 	if (err)
 		goto out;
@@ -228,7 +231,7 @@ static int twl4030_config_wakeup12_sequence(u8 address)
 	if (err)
 		goto out;
 
-	data |= LVL_WAKEUP;
+	data |= PWR_LVL_WAKEUP;
 	err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, data, R_P2_SW_EVENTS);
 	if (err)
 		goto out;
@@ -281,7 +284,7 @@ static int twl4030_config_warmreset_sequence(u8 address)
 	if (err)
 		goto out;
 
-	rd_data |= ENABLE_WARMRESET;
+	rd_data |= PWR_ENABLE_WARMRESET;
 	err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, rd_data, R_P1_SW_EVENTS);
 	if (err)
 		goto out;
@@ -290,7 +293,7 @@ static int twl4030_config_warmreset_sequence(u8 address)
 	if (err)
 		goto out;
 
-	rd_data |= ENABLE_WARMRESET;
+	rd_data |= PWR_ENABLE_WARMRESET;
 	err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, rd_data, R_P2_SW_EVENTS);
 	if (err)
 		goto out;
@@ -299,7 +302,7 @@ static int twl4030_config_warmreset_sequence(u8 address)
 	if (err)
 		goto out;
 
-	rd_data |= ENABLE_WARMRESET;
+	rd_data |= PWR_ENABLE_WARMRESET;
 	err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, rd_data, R_P3_SW_EVENTS);
 out:
 	if (err)
-- 
1.8.1.1

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 3/6] mfd: twl4030-power: Add generic reset configuration
  2014-05-27 18:08 ` Tony Lindgren
@ 2014-05-27 18:08   ` Tony Lindgren
  -1 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-27 18:08 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-arm-kernel, linux-omap, devicetree, Matthias Brugger,
	Robert Nelson, Peter De Schrijver, Samuel Ortiz

The twl4030 PMIC needs to be configured properly for things like
warm reset and deeper idle states so the PMIC manages the regulators
properly based on the hardware triggers from the SoC. Earlier
we have configured twl4030 using platform data, but we want to
do it for device tree based booting also.

In some cases configuring twl4030 is needed for things to work.
For example, when rebooting an OMAP3530 at 125 MHz, it hangs.
With this patch, TWL4030 will be reset when a warm reset occures,
and OMAP3530 does not hang on reboot.

Let's add device tree support and configure things for warm reset
as the default when compatible = "ti,twl4030-power". More
complicated configurations can be added to the driver based on
other compatible flags.

Note we now also make the pdata const like it should be.
This allows use it for match->data with the device tree
related functions.

Based on earlier patch by Matthias Brugger <matthias.bgg@gmail.com>
and Lesly A M <leslyam@ti.com>.

Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Robert Nelson <robertcnelson@gmail.com>
Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 .../devicetree/bindings/mfd/twl4030-power.txt      |   7 +-
 drivers/mfd/twl4030-power.c                        | 109 ++++++++++++++++++---
 include/linux/i2c/twl.h                            |   3 +
 3 files changed, 105 insertions(+), 14 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
index 8e15ec3..b906116 100644
--- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt
+++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
@@ -5,7 +5,12 @@ to control the power resources, including power scripts. For now, the
 binding only supports the complete shutdown of the system after poweroff.
 
 Required properties:
-- compatible : must be "ti,twl4030-power"
+- compatible : must be one of the following
+	"ti,twl4030-power"
+	"ti,twl4030-power-reset"
+
+The use of ti,twl4030-power-reset is recommended at least on
+3530 that needs a special configuration for warm reset to work.
 
 Optional properties:
 - ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 0b037dc..cb5b0cb 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -29,6 +29,7 @@
 #include <linux/i2c/twl.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
+#include <linux/of_device.h>
 
 #include <asm/mach-types.h>
 
@@ -128,6 +129,40 @@ static u8 res_config_addrs[] = {
 	[RES_MAIN_REF]	= 0x94,
 };
 
+/*
+ * Usable values for .remap_sleep and .remap_off
+ * Based on table "5.3.3 Resource Operating modes"
+ */
+enum {
+	TWL_REMAP_OFF = 0,
+	TWL_REMAP_SLEEP = 8,
+	TWL_REMAP_ACTIVE = 9,
+};
+
+/*
+ * Macros to configure the PM register states for various resources.
+ * Note that we can make MSG_SINGULAR etc private to this driver once
+ * omap3 has been made DT only.
+ */
+#define TWL_DFLT_DELAY		2	/* typically 2 32 KiHz cycles */
+#define TWL_RESOURCE_SET(res, state)					\
+	{ MSG_SINGULAR(DEV_GRP_NULL, (res), (state)), TWL_DFLT_DELAY }
+#define TWL_RESOURCE_ON(res)	TWL_RESOURCE_SET(res, RES_STATE_ACTIVE)
+#define TWL_RESOURCE_OFF(res)	TWL_RESOURCE_SET(res, RES_STATE_OFF)
+#define TWL_RESOURCE_RESET(res)	TWL_RESOURCE_SET(res, RES_STATE_WRST)
+/*
+ * It seems that type1 and type2 is just the resource init order
+ * number for the type1 and type2 group.
+ */
+#define TWL_RESOURCE_GROUP_RESET(group, type1, type2)			\
+	{ MSG_BROADCAST(DEV_GRP_NULL, (group), (type1), (type2),	\
+		RES_STATE_WRST), TWL_DFLT_DELAY }
+#define TWL_REMAP_SLEEP(res, devgrp, typ, typ2)				\
+	{ .resource = (res), .devgroup = (devgrp),			\
+	  .type = (typ), .type2 = (typ2),				\
+	  .remap_off = TWL_REMAP_OFF,					\
+	  .remap_sleep = TWL_REMAP_SLEEP, }
+
 static int twl4030_write_script_byte(u8 address, u8 byte)
 {
 	int err;
@@ -502,7 +537,8 @@ int twl4030_remove_script(u8 flags)
 	return err;
 }
 
-static int twl4030_power_configure_scripts(struct twl4030_power_data *pdata)
+static int
+twl4030_power_configure_scripts(const struct twl4030_power_data *pdata)
 {
 	int err;
 	int i;
@@ -518,7 +554,8 @@ static int twl4030_power_configure_scripts(struct twl4030_power_data *pdata)
 	return 0;
 }
 
-static int twl4030_power_configure_resources(struct twl4030_power_data *pdata)
+static int
+twl4030_power_configure_resources(const struct twl4030_power_data *pdata)
 {
 	struct twl4030_resconfig *resconfig = pdata->resource_config;
 	int err;
@@ -550,7 +587,7 @@ void twl4030_power_off(void)
 		pr_err("TWL4030 Unable to power off\n");
 }
 
-static bool twl4030_power_use_poweroff(struct twl4030_power_data *pdata,
+static bool twl4030_power_use_poweroff(const struct twl4030_power_data *pdata,
 					struct device_node *node)
 {
 	if (pdata && pdata->use_poweroff)
@@ -562,10 +599,60 @@ static bool twl4030_power_use_poweroff(struct twl4030_power_data *pdata,
 	return false;
 }
 
+#ifdef CONFIG_OF
+
+/* Generic warm reset configuration for omap3 */
+
+static struct twl4030_ins omap3_wrst_seq[] = {
+	TWL_RESOURCE_OFF(RES_NRES_PWRON),
+	TWL_RESOURCE_OFF(RES_RESET),
+	TWL_RESOURCE_RESET(RES_MAIN_REF),
+	TWL_RESOURCE_GROUP_RESET(RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2),
+	TWL_RESOURCE_RESET(RES_VUSB_3V1),
+	TWL_RESOURCE_GROUP_RESET(RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R1),
+	TWL_RESOURCE_GROUP_RESET(RES_GRP_RC, RES_TYPE_ALL, RES_TYPE2_R0),
+	TWL_RESOURCE_ON(RES_RESET),
+	TWL_RESOURCE_ON(RES_NRES_PWRON),
+};
+
+static struct twl4030_script omap3_wrst_script = {
+	.script	= omap3_wrst_seq,
+	.size	= ARRAY_SIZE(omap3_wrst_seq),
+	.flags	= TWL4030_WRST_SCRIPT,
+};
+
+static struct twl4030_script *omap3_reset_scripts[] = {
+	&omap3_wrst_script,
+};
+
+static struct twl4030_resconfig omap3_rconfig[] = {
+	TWL_REMAP_SLEEP(RES_HFCLKOUT, DEV_GRP_P3, -1, -1),
+	TWL_REMAP_SLEEP(RES_VDD1, DEV_GRP_P1, -1, -1),
+	TWL_REMAP_SLEEP(RES_VDD2, DEV_GRP_P1, -1, -1),
+	{ 0, 0 },
+};
+
+static struct twl4030_power_data omap3_reset = {
+	.scripts		= omap3_reset_scripts,
+	.num			= ARRAY_SIZE(omap3_reset_scripts),
+	.resource_config	= omap3_rconfig,
+};
+
+static struct of_device_id twl4030_power_of_match[] = {
+	{
+		.compatible = "ti,twl4030-power-reset",
+		.data = &omap3_reset,
+	},
+	{ },
+};
+MODULE_DEVICE_TABLE(of, twl4030_power_of_match);
+#endif	/* CONFIG_OF */
+
 static int twl4030_power_probe(struct platform_device *pdev)
 {
-	struct twl4030_power_data *pdata = dev_get_platdata(&pdev->dev);
+	const struct twl4030_power_data *pdata = dev_get_platdata(&pdev->dev);
 	struct device_node *node = pdev->dev.of_node;
+	const struct of_device_id *match;
 	int err = 0;
 	int err2 = 0;
 	u8 val;
@@ -586,8 +673,12 @@ static int twl4030_power_probe(struct platform_device *pdev)
 		return err;
 	}
 
+	match = of_match_device(of_match_ptr(twl4030_power_of_match),
+				&pdev->dev);
+	if (match && match->data)
+		pdata = match->data;
+
 	if (pdata) {
-		/* TODO: convert to device tree */
 		err = twl4030_power_configure_scripts(pdata);
 		if (err) {
 			pr_err("TWL4030 failed to load scripts\n");
@@ -637,14 +728,6 @@ static int twl4030_power_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_OF
-static const struct of_device_id twl4030_power_of_match[] = {
-	{.compatible = "ti,twl4030-power", },
-	{ },
-};
-MODULE_DEVICE_TABLE(of, twl4030_power_of_match);
-#endif
-
 static struct platform_driver twl4030_power_driver = {
 	.driver = {
 		.name	= "twl4030_power",
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index ade1c06..5fe0313 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -486,7 +486,10 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot)
 #define RES_GRP_ALL		0x7	/* All resource groups */
 
 #define RES_TYPE2_R0		0x0
+#define RES_TYPE2_R1		0x1
+#define RES_TYPE2_R2		0x2
 
+#define RES_TYPE_R0		0x0
 #define RES_TYPE_ALL		0x7
 
 /* Resource states */
-- 
1.8.1.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 3/6] mfd: twl4030-power: Add generic reset configuration
@ 2014-05-27 18:08   ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-27 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

The twl4030 PMIC needs to be configured properly for things like
warm reset and deeper idle states so the PMIC manages the regulators
properly based on the hardware triggers from the SoC. Earlier
we have configured twl4030 using platform data, but we want to
do it for device tree based booting also.

In some cases configuring twl4030 is needed for things to work.
For example, when rebooting an OMAP3530 at 125 MHz, it hangs.
With this patch, TWL4030 will be reset when a warm reset occures,
and OMAP3530 does not hang on reboot.

Let's add device tree support and configure things for warm reset
as the default when compatible = "ti,twl4030-power". More
complicated configurations can be added to the driver based on
other compatible flags.

Note we now also make the pdata const like it should be.
This allows use it for match->data with the device tree
related functions.

Based on earlier patch by Matthias Brugger <matthias.bgg@gmail.com>
and Lesly A M <leslyam@ti.com>.

Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Robert Nelson <robertcnelson@gmail.com>
Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 .../devicetree/bindings/mfd/twl4030-power.txt      |   7 +-
 drivers/mfd/twl4030-power.c                        | 109 ++++++++++++++++++---
 include/linux/i2c/twl.h                            |   3 +
 3 files changed, 105 insertions(+), 14 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
index 8e15ec3..b906116 100644
--- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt
+++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
@@ -5,7 +5,12 @@ to control the power resources, including power scripts. For now, the
 binding only supports the complete shutdown of the system after poweroff.
 
 Required properties:
-- compatible : must be "ti,twl4030-power"
+- compatible : must be one of the following
+	"ti,twl4030-power"
+	"ti,twl4030-power-reset"
+
+The use of ti,twl4030-power-reset is recommended at least on
+3530 that needs a special configuration for warm reset to work.
 
 Optional properties:
 - ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 0b037dc..cb5b0cb 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -29,6 +29,7 @@
 #include <linux/i2c/twl.h>
 #include <linux/platform_device.h>
 #include <linux/of.h>
+#include <linux/of_device.h>
 
 #include <asm/mach-types.h>
 
@@ -128,6 +129,40 @@ static u8 res_config_addrs[] = {
 	[RES_MAIN_REF]	= 0x94,
 };
 
+/*
+ * Usable values for .remap_sleep and .remap_off
+ * Based on table "5.3.3 Resource Operating modes"
+ */
+enum {
+	TWL_REMAP_OFF = 0,
+	TWL_REMAP_SLEEP = 8,
+	TWL_REMAP_ACTIVE = 9,
+};
+
+/*
+ * Macros to configure the PM register states for various resources.
+ * Note that we can make MSG_SINGULAR etc private to this driver once
+ * omap3 has been made DT only.
+ */
+#define TWL_DFLT_DELAY		2	/* typically 2 32 KiHz cycles */
+#define TWL_RESOURCE_SET(res, state)					\
+	{ MSG_SINGULAR(DEV_GRP_NULL, (res), (state)), TWL_DFLT_DELAY }
+#define TWL_RESOURCE_ON(res)	TWL_RESOURCE_SET(res, RES_STATE_ACTIVE)
+#define TWL_RESOURCE_OFF(res)	TWL_RESOURCE_SET(res, RES_STATE_OFF)
+#define TWL_RESOURCE_RESET(res)	TWL_RESOURCE_SET(res, RES_STATE_WRST)
+/*
+ * It seems that type1 and type2 is just the resource init order
+ * number for the type1 and type2 group.
+ */
+#define TWL_RESOURCE_GROUP_RESET(group, type1, type2)			\
+	{ MSG_BROADCAST(DEV_GRP_NULL, (group), (type1), (type2),	\
+		RES_STATE_WRST), TWL_DFLT_DELAY }
+#define TWL_REMAP_SLEEP(res, devgrp, typ, typ2)				\
+	{ .resource = (res), .devgroup = (devgrp),			\
+	  .type = (typ), .type2 = (typ2),				\
+	  .remap_off = TWL_REMAP_OFF,					\
+	  .remap_sleep = TWL_REMAP_SLEEP, }
+
 static int twl4030_write_script_byte(u8 address, u8 byte)
 {
 	int err;
@@ -502,7 +537,8 @@ int twl4030_remove_script(u8 flags)
 	return err;
 }
 
-static int twl4030_power_configure_scripts(struct twl4030_power_data *pdata)
+static int
+twl4030_power_configure_scripts(const struct twl4030_power_data *pdata)
 {
 	int err;
 	int i;
@@ -518,7 +554,8 @@ static int twl4030_power_configure_scripts(struct twl4030_power_data *pdata)
 	return 0;
 }
 
-static int twl4030_power_configure_resources(struct twl4030_power_data *pdata)
+static int
+twl4030_power_configure_resources(const struct twl4030_power_data *pdata)
 {
 	struct twl4030_resconfig *resconfig = pdata->resource_config;
 	int err;
@@ -550,7 +587,7 @@ void twl4030_power_off(void)
 		pr_err("TWL4030 Unable to power off\n");
 }
 
-static bool twl4030_power_use_poweroff(struct twl4030_power_data *pdata,
+static bool twl4030_power_use_poweroff(const struct twl4030_power_data *pdata,
 					struct device_node *node)
 {
 	if (pdata && pdata->use_poweroff)
@@ -562,10 +599,60 @@ static bool twl4030_power_use_poweroff(struct twl4030_power_data *pdata,
 	return false;
 }
 
+#ifdef CONFIG_OF
+
+/* Generic warm reset configuration for omap3 */
+
+static struct twl4030_ins omap3_wrst_seq[] = {
+	TWL_RESOURCE_OFF(RES_NRES_PWRON),
+	TWL_RESOURCE_OFF(RES_RESET),
+	TWL_RESOURCE_RESET(RES_MAIN_REF),
+	TWL_RESOURCE_GROUP_RESET(RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2),
+	TWL_RESOURCE_RESET(RES_VUSB_3V1),
+	TWL_RESOURCE_GROUP_RESET(RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R1),
+	TWL_RESOURCE_GROUP_RESET(RES_GRP_RC, RES_TYPE_ALL, RES_TYPE2_R0),
+	TWL_RESOURCE_ON(RES_RESET),
+	TWL_RESOURCE_ON(RES_NRES_PWRON),
+};
+
+static struct twl4030_script omap3_wrst_script = {
+	.script	= omap3_wrst_seq,
+	.size	= ARRAY_SIZE(omap3_wrst_seq),
+	.flags	= TWL4030_WRST_SCRIPT,
+};
+
+static struct twl4030_script *omap3_reset_scripts[] = {
+	&omap3_wrst_script,
+};
+
+static struct twl4030_resconfig omap3_rconfig[] = {
+	TWL_REMAP_SLEEP(RES_HFCLKOUT, DEV_GRP_P3, -1, -1),
+	TWL_REMAP_SLEEP(RES_VDD1, DEV_GRP_P1, -1, -1),
+	TWL_REMAP_SLEEP(RES_VDD2, DEV_GRP_P1, -1, -1),
+	{ 0, 0 },
+};
+
+static struct twl4030_power_data omap3_reset = {
+	.scripts		= omap3_reset_scripts,
+	.num			= ARRAY_SIZE(omap3_reset_scripts),
+	.resource_config	= omap3_rconfig,
+};
+
+static struct of_device_id twl4030_power_of_match[] = {
+	{
+		.compatible = "ti,twl4030-power-reset",
+		.data = &omap3_reset,
+	},
+	{ },
+};
+MODULE_DEVICE_TABLE(of, twl4030_power_of_match);
+#endif	/* CONFIG_OF */
+
 static int twl4030_power_probe(struct platform_device *pdev)
 {
-	struct twl4030_power_data *pdata = dev_get_platdata(&pdev->dev);
+	const struct twl4030_power_data *pdata = dev_get_platdata(&pdev->dev);
 	struct device_node *node = pdev->dev.of_node;
+	const struct of_device_id *match;
 	int err = 0;
 	int err2 = 0;
 	u8 val;
@@ -586,8 +673,12 @@ static int twl4030_power_probe(struct platform_device *pdev)
 		return err;
 	}
 
+	match = of_match_device(of_match_ptr(twl4030_power_of_match),
+				&pdev->dev);
+	if (match && match->data)
+		pdata = match->data;
+
 	if (pdata) {
-		/* TODO: convert to device tree */
 		err = twl4030_power_configure_scripts(pdata);
 		if (err) {
 			pr_err("TWL4030 failed to load scripts\n");
@@ -637,14 +728,6 @@ static int twl4030_power_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_OF
-static const struct of_device_id twl4030_power_of_match[] = {
-	{.compatible = "ti,twl4030-power", },
-	{ },
-};
-MODULE_DEVICE_TABLE(of, twl4030_power_of_match);
-#endif
-
 static struct platform_driver twl4030_power_driver = {
 	.driver = {
 		.name	= "twl4030_power",
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index ade1c06..5fe0313 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -486,7 +486,10 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot)
 #define RES_GRP_ALL		0x7	/* All resource groups */
 
 #define RES_TYPE2_R0		0x0
+#define RES_TYPE2_R1		0x1
+#define RES_TYPE2_R2		0x2
 
+#define RES_TYPE_R0		0x0
 #define RES_TYPE_ALL		0x7
 
 /* Resource states */
-- 
1.8.1.1

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 4/6] mfd: twl4030-power: Add recommended idle configuration
  2014-05-27 18:08 ` Tony Lindgren
@ 2014-05-27 18:08   ` Tony Lindgren
  -1 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-27 18:08 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-arm-kernel, linux-omap, devicetree, Peter De Schrijver,
	Samuel Ortiz

These settings are based on the "Recommended Sleep Sequences for
the Zoom Platform".

The settings assume most of the regulators are under control of
Linux, and twl4030 only cuts off VDD1 and VDD2 during off-idle as
Linux cannot do it.

For any board specific changes to these, let's patch them in as
changes to the generic data in the follow-up patches. This keeps
the board specific changes small.

Note that this does not consider the twl5030 errata 27 and 28.
That can be added later on after it has been tested. For more
information about errata 27 and 28.

Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 .../devicetree/bindings/mfd/twl4030-power.txt      |   4 +
 drivers/mfd/twl4030-power.c                        | 106 +++++++++++++++++++++
 2 files changed, 110 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
index b906116..bbd6603 100644
--- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt
+++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
@@ -8,10 +8,14 @@ Required properties:
 - compatible : must be one of the following
 	"ti,twl4030-power"
 	"ti,twl4030-power-reset"
+	"ti,twl4030-power-idle"
 
 The use of ti,twl4030-power-reset is recommended at least on
 3530 that needs a special configuration for warm reset to work.
 
+When using ti,twl4030-power-idle, the TI recommended configuration
+for idle modes is loaded to the tlw4030 PMIC.
+
 Optional properties:
 - ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or
 		   SLEEP-to-OFF transition when the system poweroffs.
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index cb5b0cb..2bfbb40 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -145,6 +145,7 @@ enum {
  * omap3 has been made DT only.
  */
 #define TWL_DFLT_DELAY		2	/* typically 2 32 KiHz cycles */
+#define TWL_DEV_GRP_P123	(DEV_GRP_P1 | DEV_GRP_P2 | DEV_GRP_P3)
 #define TWL_RESOURCE_SET(res, state)					\
 	{ MSG_SINGULAR(DEV_GRP_NULL, (res), (state)), TWL_DFLT_DELAY }
 #define TWL_RESOURCE_ON(res)	TWL_RESOURCE_SET(res, RES_STATE_ACTIVE)
@@ -154,14 +155,26 @@ enum {
  * It seems that type1 and type2 is just the resource init order
  * number for the type1 and type2 group.
  */
+#define TWL_RESOURCE_SET_ACTIVE(res, state)			       	\
+	{ MSG_SINGULAR(DEV_GRP_NULL, (res), RES_STATE_ACTIVE), (state) }
 #define TWL_RESOURCE_GROUP_RESET(group, type1, type2)			\
 	{ MSG_BROADCAST(DEV_GRP_NULL, (group), (type1), (type2),	\
 		RES_STATE_WRST), TWL_DFLT_DELAY }
+#define TWL_RESOURCE_GROUP_SLEEP(group, type, type2)			\
+	{ MSG_BROADCAST(DEV_GRP_NULL, (group), (type), (type2),		\
+		RES_STATE_SLEEP), TWL_DFLT_DELAY }
+#define TWL_RESOURCE_GROUP_ACTIVE(group, type, type2)			\
+	{ MSG_BROADCAST(DEV_GRP_NULL, (group), (type), (type2),		\
+		RES_STATE_ACTIVE), TWL_DFLT_DELAY }
 #define TWL_REMAP_SLEEP(res, devgrp, typ, typ2)				\
 	{ .resource = (res), .devgroup = (devgrp),			\
 	  .type = (typ), .type2 = (typ2),				\
 	  .remap_off = TWL_REMAP_OFF,					\
 	  .remap_sleep = TWL_REMAP_SLEEP, }
+#define TWL_REMAP_OFF(res, devgrp, typ, typ2)				\
+	{ .resource = (res), .devgroup = (devgrp),			\
+	  .type = (typ), .type2 = (typ2),				\
+	  .remap_off = TWL_REMAP_OFF, .remap_sleep = TWL_REMAP_OFF, }
 
 static int twl4030_write_script_byte(u8 address, u8 byte)
 {
@@ -638,11 +651,104 @@ static struct twl4030_power_data omap3_reset = {
 	.resource_config	= omap3_rconfig,
 };
 
+/* Recommended generic default idle configuration for off-idle */
+
+/* Broadcast message to put res to sleep */
+static struct twl4030_ins omap3_idle_sleep_on_seq[] = {
+	TWL_RESOURCE_GROUP_SLEEP(RES_GRP_ALL, RES_TYPE_ALL, 0),
+};
+
+static struct twl4030_script omap3_idle_sleep_on_script = {
+	.script	= omap3_idle_sleep_on_seq,
+	.size	= ARRAY_SIZE(omap3_idle_sleep_on_seq),
+	.flags	= TWL4030_SLEEP_SCRIPT,
+};
+
+/* Broadcast message to put res to active */
+static struct twl4030_ins omap3_idle_wakeup_p12_seq[] = {
+	TWL_RESOURCE_GROUP_ACTIVE(RES_GRP_ALL, RES_TYPE_ALL, 0),
+};
+
+static struct twl4030_script omap3_idle_wakeup_p12_script = {
+	.script	= omap3_idle_wakeup_p12_seq,
+	.size	= ARRAY_SIZE(omap3_idle_wakeup_p12_seq),
+	.flags	= TWL4030_WAKEUP12_SCRIPT,
+};
+
+/* Broadcast message to put res to active */
+static struct twl4030_ins omap3_idle_wakeup_p3_seq[] = {
+	TWL_RESOURCE_SET_ACTIVE(RES_CLKEN, 0x37),
+	TWL_RESOURCE_GROUP_ACTIVE(RES_GRP_ALL, RES_TYPE_ALL, 0),
+};
+
+static struct twl4030_script omap3_idle_wakeup_p3_script = {
+	.script	= omap3_idle_wakeup_p3_seq,
+	.size	= ARRAY_SIZE(omap3_idle_wakeup_p3_seq),
+	.flags	= TWL4030_WAKEUP3_SCRIPT,
+};
+
+static struct twl4030_script *omap3_idle_scripts[] = {
+	&omap3_idle_wakeup_p12_script,
+	&omap3_idle_wakeup_p3_script,
+	&omap3_wrst_script,
+	&omap3_idle_sleep_on_script,
+};
+
+/*
+ * Recommended configuration based on "Recommended Sleep
+ * Sequences for the Zoom Platform":
+ * http://omappedia.com/wiki/File:Recommended_Sleep_Sequences_Zoom.pdf
+ * Note that the type1 and type2 seem to be just the init order number
+ * for type1 and type2 groups as specified in the document mentioned
+ * above.
+ */
+static struct twl4030_resconfig omap3_idle_rconfig[] = {
+	TWL_REMAP_SLEEP(RES_VAUX1, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VAUX2, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VAUX3, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VAUX4, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VMMC1, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VMMC2, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_OFF(RES_VPLL1, DEV_GRP_P1, 3, 1),
+	TWL_REMAP_SLEEP(RES_VPLL2, DEV_GRP_P1, 0, 0),
+	TWL_REMAP_SLEEP(RES_VSIM, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VDAC, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VINTANA1, TWL_DEV_GRP_P123, 1, 2),
+	TWL_REMAP_SLEEP(RES_VINTANA2, TWL_DEV_GRP_P123, 0, 2),
+	TWL_REMAP_SLEEP(RES_VINTDIG, TWL_DEV_GRP_P123, 1, 2),
+	TWL_REMAP_SLEEP(RES_VIO, TWL_DEV_GRP_P123, 2, 2),
+	TWL_REMAP_OFF(RES_VDD1, DEV_GRP_P1, 4, 1),
+	TWL_REMAP_OFF(RES_VDD2, DEV_GRP_P1, 3, 1),
+	TWL_REMAP_SLEEP(RES_VUSB_1V5, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VUSB_1V8, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VUSB_3V1, TWL_DEV_GRP_P123, 0, 0),
+	/* Resource #20 USB charge pump skipped */
+	TWL_REMAP_SLEEP(RES_REGEN, TWL_DEV_GRP_P123, 2, 1),
+	TWL_REMAP_SLEEP(RES_NRES_PWRON, TWL_DEV_GRP_P123, 0, 1),
+	TWL_REMAP_SLEEP(RES_CLKEN, TWL_DEV_GRP_P123, 3, 2),
+	TWL_REMAP_SLEEP(RES_SYSEN, TWL_DEV_GRP_P123, 6, 1),
+	TWL_REMAP_SLEEP(RES_HFCLKOUT, DEV_GRP_P3, 0, 2),
+	TWL_REMAP_SLEEP(RES_32KCLKOUT, TWL_DEV_GRP_P123, 0, 0),
+	TWL_REMAP_SLEEP(RES_RESET, TWL_DEV_GRP_P123, 6, 0),
+	TWL_REMAP_SLEEP(RES_MAIN_REF, TWL_DEV_GRP_P123, 0, 0),
+	{ /* Terminator */ },
+};
+
+static struct twl4030_power_data omap3_idle = {
+	.scripts		= omap3_idle_scripts,
+	.num			= ARRAY_SIZE(omap3_idle_scripts),
+	.resource_config	= omap3_idle_rconfig,
+};
+
 static struct of_device_id twl4030_power_of_match[] = {
 	{
 		.compatible = "ti,twl4030-power-reset",
 		.data = &omap3_reset,
 	},
+	{
+		.compatible = "ti,twl4030-power-idle",
+		.data = &omap3_idle,
+	},
 	{ },
 };
 MODULE_DEVICE_TABLE(of, twl4030_power_of_match);
-- 
1.8.1.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 4/6] mfd: twl4030-power: Add recommended idle configuration
@ 2014-05-27 18:08   ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-27 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

These settings are based on the "Recommended Sleep Sequences for
the Zoom Platform".

The settings assume most of the regulators are under control of
Linux, and twl4030 only cuts off VDD1 and VDD2 during off-idle as
Linux cannot do it.

For any board specific changes to these, let's patch them in as
changes to the generic data in the follow-up patches. This keeps
the board specific changes small.

Note that this does not consider the twl5030 errata 27 and 28.
That can be added later on after it has been tested. For more
information about errata 27 and 28.

Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 .../devicetree/bindings/mfd/twl4030-power.txt      |   4 +
 drivers/mfd/twl4030-power.c                        | 106 +++++++++++++++++++++
 2 files changed, 110 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
index b906116..bbd6603 100644
--- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt
+++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
@@ -8,10 +8,14 @@ Required properties:
 - compatible : must be one of the following
 	"ti,twl4030-power"
 	"ti,twl4030-power-reset"
+	"ti,twl4030-power-idle"
 
 The use of ti,twl4030-power-reset is recommended at least on
 3530 that needs a special configuration for warm reset to work.
 
+When using ti,twl4030-power-idle, the TI recommended configuration
+for idle modes is loaded to the tlw4030 PMIC.
+
 Optional properties:
 - ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or
 		   SLEEP-to-OFF transition when the system poweroffs.
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index cb5b0cb..2bfbb40 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -145,6 +145,7 @@ enum {
  * omap3 has been made DT only.
  */
 #define TWL_DFLT_DELAY		2	/* typically 2 32 KiHz cycles */
+#define TWL_DEV_GRP_P123	(DEV_GRP_P1 | DEV_GRP_P2 | DEV_GRP_P3)
 #define TWL_RESOURCE_SET(res, state)					\
 	{ MSG_SINGULAR(DEV_GRP_NULL, (res), (state)), TWL_DFLT_DELAY }
 #define TWL_RESOURCE_ON(res)	TWL_RESOURCE_SET(res, RES_STATE_ACTIVE)
@@ -154,14 +155,26 @@ enum {
  * It seems that type1 and type2 is just the resource init order
  * number for the type1 and type2 group.
  */
+#define TWL_RESOURCE_SET_ACTIVE(res, state)			       	\
+	{ MSG_SINGULAR(DEV_GRP_NULL, (res), RES_STATE_ACTIVE), (state) }
 #define TWL_RESOURCE_GROUP_RESET(group, type1, type2)			\
 	{ MSG_BROADCAST(DEV_GRP_NULL, (group), (type1), (type2),	\
 		RES_STATE_WRST), TWL_DFLT_DELAY }
+#define TWL_RESOURCE_GROUP_SLEEP(group, type, type2)			\
+	{ MSG_BROADCAST(DEV_GRP_NULL, (group), (type), (type2),		\
+		RES_STATE_SLEEP), TWL_DFLT_DELAY }
+#define TWL_RESOURCE_GROUP_ACTIVE(group, type, type2)			\
+	{ MSG_BROADCAST(DEV_GRP_NULL, (group), (type), (type2),		\
+		RES_STATE_ACTIVE), TWL_DFLT_DELAY }
 #define TWL_REMAP_SLEEP(res, devgrp, typ, typ2)				\
 	{ .resource = (res), .devgroup = (devgrp),			\
 	  .type = (typ), .type2 = (typ2),				\
 	  .remap_off = TWL_REMAP_OFF,					\
 	  .remap_sleep = TWL_REMAP_SLEEP, }
+#define TWL_REMAP_OFF(res, devgrp, typ, typ2)				\
+	{ .resource = (res), .devgroup = (devgrp),			\
+	  .type = (typ), .type2 = (typ2),				\
+	  .remap_off = TWL_REMAP_OFF, .remap_sleep = TWL_REMAP_OFF, }
 
 static int twl4030_write_script_byte(u8 address, u8 byte)
 {
@@ -638,11 +651,104 @@ static struct twl4030_power_data omap3_reset = {
 	.resource_config	= omap3_rconfig,
 };
 
+/* Recommended generic default idle configuration for off-idle */
+
+/* Broadcast message to put res to sleep */
+static struct twl4030_ins omap3_idle_sleep_on_seq[] = {
+	TWL_RESOURCE_GROUP_SLEEP(RES_GRP_ALL, RES_TYPE_ALL, 0),
+};
+
+static struct twl4030_script omap3_idle_sleep_on_script = {
+	.script	= omap3_idle_sleep_on_seq,
+	.size	= ARRAY_SIZE(omap3_idle_sleep_on_seq),
+	.flags	= TWL4030_SLEEP_SCRIPT,
+};
+
+/* Broadcast message to put res to active */
+static struct twl4030_ins omap3_idle_wakeup_p12_seq[] = {
+	TWL_RESOURCE_GROUP_ACTIVE(RES_GRP_ALL, RES_TYPE_ALL, 0),
+};
+
+static struct twl4030_script omap3_idle_wakeup_p12_script = {
+	.script	= omap3_idle_wakeup_p12_seq,
+	.size	= ARRAY_SIZE(omap3_idle_wakeup_p12_seq),
+	.flags	= TWL4030_WAKEUP12_SCRIPT,
+};
+
+/* Broadcast message to put res to active */
+static struct twl4030_ins omap3_idle_wakeup_p3_seq[] = {
+	TWL_RESOURCE_SET_ACTIVE(RES_CLKEN, 0x37),
+	TWL_RESOURCE_GROUP_ACTIVE(RES_GRP_ALL, RES_TYPE_ALL, 0),
+};
+
+static struct twl4030_script omap3_idle_wakeup_p3_script = {
+	.script	= omap3_idle_wakeup_p3_seq,
+	.size	= ARRAY_SIZE(omap3_idle_wakeup_p3_seq),
+	.flags	= TWL4030_WAKEUP3_SCRIPT,
+};
+
+static struct twl4030_script *omap3_idle_scripts[] = {
+	&omap3_idle_wakeup_p12_script,
+	&omap3_idle_wakeup_p3_script,
+	&omap3_wrst_script,
+	&omap3_idle_sleep_on_script,
+};
+
+/*
+ * Recommended configuration based on "Recommended Sleep
+ * Sequences for the Zoom Platform":
+ * http://omappedia.com/wiki/File:Recommended_Sleep_Sequences_Zoom.pdf
+ * Note that the type1 and type2 seem to be just the init order number
+ * for type1 and type2 groups as specified in the document mentioned
+ * above.
+ */
+static struct twl4030_resconfig omap3_idle_rconfig[] = {
+	TWL_REMAP_SLEEP(RES_VAUX1, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VAUX2, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VAUX3, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VAUX4, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VMMC1, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VMMC2, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_OFF(RES_VPLL1, DEV_GRP_P1, 3, 1),
+	TWL_REMAP_SLEEP(RES_VPLL2, DEV_GRP_P1, 0, 0),
+	TWL_REMAP_SLEEP(RES_VSIM, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VDAC, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VINTANA1, TWL_DEV_GRP_P123, 1, 2),
+	TWL_REMAP_SLEEP(RES_VINTANA2, TWL_DEV_GRP_P123, 0, 2),
+	TWL_REMAP_SLEEP(RES_VINTDIG, TWL_DEV_GRP_P123, 1, 2),
+	TWL_REMAP_SLEEP(RES_VIO, TWL_DEV_GRP_P123, 2, 2),
+	TWL_REMAP_OFF(RES_VDD1, DEV_GRP_P1, 4, 1),
+	TWL_REMAP_OFF(RES_VDD2, DEV_GRP_P1, 3, 1),
+	TWL_REMAP_SLEEP(RES_VUSB_1V5, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VUSB_1V8, DEV_GRP_NULL, 0, 0),
+	TWL_REMAP_SLEEP(RES_VUSB_3V1, TWL_DEV_GRP_P123, 0, 0),
+	/* Resource #20 USB charge pump skipped */
+	TWL_REMAP_SLEEP(RES_REGEN, TWL_DEV_GRP_P123, 2, 1),
+	TWL_REMAP_SLEEP(RES_NRES_PWRON, TWL_DEV_GRP_P123, 0, 1),
+	TWL_REMAP_SLEEP(RES_CLKEN, TWL_DEV_GRP_P123, 3, 2),
+	TWL_REMAP_SLEEP(RES_SYSEN, TWL_DEV_GRP_P123, 6, 1),
+	TWL_REMAP_SLEEP(RES_HFCLKOUT, DEV_GRP_P3, 0, 2),
+	TWL_REMAP_SLEEP(RES_32KCLKOUT, TWL_DEV_GRP_P123, 0, 0),
+	TWL_REMAP_SLEEP(RES_RESET, TWL_DEV_GRP_P123, 6, 0),
+	TWL_REMAP_SLEEP(RES_MAIN_REF, TWL_DEV_GRP_P123, 0, 0),
+	{ /* Terminator */ },
+};
+
+static struct twl4030_power_data omap3_idle = {
+	.scripts		= omap3_idle_scripts,
+	.num			= ARRAY_SIZE(omap3_idle_scripts),
+	.resource_config	= omap3_idle_rconfig,
+};
+
 static struct of_device_id twl4030_power_of_match[] = {
 	{
 		.compatible = "ti,twl4030-power-reset",
 		.data = &omap3_reset,
 	},
+	{
+		.compatible = "ti,twl4030-power-idle",
+		.data = &omap3_idle,
+	},
 	{ },
 };
 MODULE_DEVICE_TABLE(of, twl4030_power_of_match);
-- 
1.8.1.1

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 5/6] mfd: twl4030-power: Add support for board specific configuration
  2014-05-27 18:08 ` Tony Lindgren
@ 2014-05-27 18:08   ` Tony Lindgren
  -1 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-27 18:08 UTC (permalink / raw)
  To: lee.jones
  Cc: linux-arm-kernel, linux-omap, devicetree, Peter De Schrijver,
	Samuel Ortiz

With the recommended twl4030 configuration added, we can now add
board specific changes as modifications to the recommended
configuration.

Note that the data is private to this driver, and the data must
always have a NULL resource in the sentinel.

Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/mfd/twl4030-power.c | 21 +++++++++++++++++++++
 include/linux/i2c/twl.h     |  1 +
 2 files changed, 22 insertions(+)

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 2bfbb40..4846c7b 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -567,13 +567,34 @@ twl4030_power_configure_scripts(const struct twl4030_power_data *pdata)
 	return 0;
 }
 
+static void twl4030_patch_rconfig(struct twl4030_resconfig *common,
+				  struct twl4030_resconfig *board)
+{
+	while (common->resource) {
+		struct twl4030_resconfig *b = board;
+
+		while (b->resource) {
+			if (b->resource == common->resource) {
+				*common = *b;
+				break;
+			}
+			b++;
+		}
+		common++;
+	}
+}
+
 static int
 twl4030_power_configure_resources(const struct twl4030_power_data *pdata)
 {
 	struct twl4030_resconfig *resconfig = pdata->resource_config;
+	struct twl4030_resconfig *boardconf = pdata->board_config;
 	int err;
 
 	if (resconfig) {
+		if (boardconf)
+			twl4030_patch_rconfig(resconfig, boardconf);
+
 		while (resconfig->resource) {
 			err = twl4030_configure_resource(resconfig);
 			if (err)
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index 5fe0313..57fe782 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -662,6 +662,7 @@ struct twl4030_power_data {
 	struct twl4030_script **scripts;
 	unsigned num;
 	struct twl4030_resconfig *resource_config;
+	struct twl4030_resconfig *board_config;
 #define TWL4030_RESCONFIG_UNDEF	((u8)-1)
 	bool use_poweroff;	/* Board is wired for TWL poweroff */
 };
-- 
1.8.1.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 5/6] mfd: twl4030-power: Add support for board specific configuration
@ 2014-05-27 18:08   ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-27 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

With the recommended twl4030 configuration added, we can now add
board specific changes as modifications to the recommended
configuration.

Note that the data is private to this driver, and the data must
always have a NULL resource in the sentinel.

Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/mfd/twl4030-power.c | 21 +++++++++++++++++++++
 include/linux/i2c/twl.h     |  1 +
 2 files changed, 22 insertions(+)

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 2bfbb40..4846c7b 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -567,13 +567,34 @@ twl4030_power_configure_scripts(const struct twl4030_power_data *pdata)
 	return 0;
 }
 
+static void twl4030_patch_rconfig(struct twl4030_resconfig *common,
+				  struct twl4030_resconfig *board)
+{
+	while (common->resource) {
+		struct twl4030_resconfig *b = board;
+
+		while (b->resource) {
+			if (b->resource == common->resource) {
+				*common = *b;
+				break;
+			}
+			b++;
+		}
+		common++;
+	}
+}
+
 static int
 twl4030_power_configure_resources(const struct twl4030_power_data *pdata)
 {
 	struct twl4030_resconfig *resconfig = pdata->resource_config;
+	struct twl4030_resconfig *boardconf = pdata->board_config;
 	int err;
 
 	if (resconfig) {
+		if (boardconf)
+			twl4030_patch_rconfig(resconfig, boardconf);
+
 		while (resconfig->resource) {
 			err = twl4030_configure_resource(resconfig);
 			if (err)
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index 5fe0313..57fe782 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -662,6 +662,7 @@ struct twl4030_power_data {
 	struct twl4030_script **scripts;
 	unsigned num;
 	struct twl4030_resconfig *resource_config;
+	struct twl4030_resconfig *board_config;
 #define TWL4030_RESCONFIG_UNDEF	((u8)-1)
 	bool use_poweroff;	/* Board is wired for TWL poweroff */
 };
-- 
1.8.1.1

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 6/6] mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle
  2014-05-27 18:08 ` Tony Lindgren
@ 2014-05-27 18:09     ` Tony Lindgren
  -1 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-27 18:09 UTC (permalink / raw)
  To: lee.jones-QSEj5FYQhm4dnm+yROfE0A
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Peter De Schrijver,
	Samuel Ortiz

Some oscillators can be turned off during off-idle saving few
a little bit power at the cost of the oscillator start up
latency.

If you board can do this, you can now enable it by using the
ti,twl4030-power-idle-osc-off compatible flag.

Cc: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Acked-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Signed-off-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
---
 Documentation/devicetree/bindings/mfd/twl4030-power.txt |  6 ++++++
 drivers/mfd/twl4030-power.c                             | 17 +++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
index bbd6603..b9ee7b9 100644
--- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt
+++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
@@ -9,6 +9,7 @@ Required properties:
 	"ti,twl4030-power"
 	"ti,twl4030-power-reset"
 	"ti,twl4030-power-idle"
+	"ti,twl4030-power-idle-osc-off"
 
 The use of ti,twl4030-power-reset is recommended at least on
 3530 that needs a special configuration for warm reset to work.
@@ -16,6 +17,11 @@ The use of ti,twl4030-power-reset is recommended at least on
 When using ti,twl4030-power-idle, the TI recommended configuration
 for idle modes is loaded to the tlw4030 PMIC.
 
+When using ti,twl4030-power-idle-osc-off, the TI recommended
+configuration is used with the external oscillator being shut
+down during off-idle. Note that this does not work on all boards
+depending on how the external oscillator is wired.
+
 Optional properties:
 - ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or
 		   SLEEP-to-OFF transition when the system poweroffs.
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 4846c7b..3bc969a 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -761,6 +761,19 @@ static struct twl4030_power_data omap3_idle = {
 	.resource_config	= omap3_idle_rconfig,
 };
 
+/* Disable 32 KiHz oscillator during idle */
+static struct twl4030_resconfig osc_off_rconfig[] = {
+	TWL_REMAP_OFF(RES_CLKEN, DEV_GRP_P1 | DEV_GRP_P3, 3, 2),
+	{ /* Terminator */ },
+};
+
+static struct twl4030_power_data osc_off_idle = {
+	.scripts		= omap3_idle_scripts,
+	.num			= ARRAY_SIZE(omap3_idle_scripts),
+	.resource_config	= omap3_idle_rconfig,
+	.board_config		= osc_off_rconfig,
+};
+
 static struct of_device_id twl4030_power_of_match[] = {
 	{
 		.compatible = "ti,twl4030-power-reset",
@@ -770,6 +783,10 @@ static struct of_device_id twl4030_power_of_match[] = {
 		.compatible = "ti,twl4030-power-idle",
 		.data = &omap3_idle,
 	},
+	{
+		.compatible = "ti,twl4030-power-idle-osc-off",
+		.data = &osc_off_idle,
+	},
 	{ },
 };
 MODULE_DEVICE_TABLE(of, twl4030_power_of_match);
-- 
1.8.1.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PATCH 6/6] mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle
@ 2014-05-27 18:09     ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-27 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

Some oscillators can be turned off during off-idle saving few
a little bit power at the cost of the oscillator start up
latency.

If you board can do this, you can now enable it by using the
ti,twl4030-power-idle-osc-off compatible flag.

Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 Documentation/devicetree/bindings/mfd/twl4030-power.txt |  6 ++++++
 drivers/mfd/twl4030-power.c                             | 17 +++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
index bbd6603..b9ee7b9 100644
--- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt
+++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
@@ -9,6 +9,7 @@ Required properties:
 	"ti,twl4030-power"
 	"ti,twl4030-power-reset"
 	"ti,twl4030-power-idle"
+	"ti,twl4030-power-idle-osc-off"
 
 The use of ti,twl4030-power-reset is recommended at least on
 3530 that needs a special configuration for warm reset to work.
@@ -16,6 +17,11 @@ The use of ti,twl4030-power-reset is recommended at least on
 When using ti,twl4030-power-idle, the TI recommended configuration
 for idle modes is loaded to the tlw4030 PMIC.
 
+When using ti,twl4030-power-idle-osc-off, the TI recommended
+configuration is used with the external oscillator being shut
+down during off-idle. Note that this does not work on all boards
+depending on how the external oscillator is wired.
+
 Optional properties:
 - ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or
 		   SLEEP-to-OFF transition when the system poweroffs.
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 4846c7b..3bc969a 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -761,6 +761,19 @@ static struct twl4030_power_data omap3_idle = {
 	.resource_config	= omap3_idle_rconfig,
 };
 
+/* Disable 32 KiHz oscillator during idle */
+static struct twl4030_resconfig osc_off_rconfig[] = {
+	TWL_REMAP_OFF(RES_CLKEN, DEV_GRP_P1 | DEV_GRP_P3, 3, 2),
+	{ /* Terminator */ },
+};
+
+static struct twl4030_power_data osc_off_idle = {
+	.scripts		= omap3_idle_scripts,
+	.num			= ARRAY_SIZE(omap3_idle_scripts),
+	.resource_config	= omap3_idle_rconfig,
+	.board_config		= osc_off_rconfig,
+};
+
 static struct of_device_id twl4030_power_of_match[] = {
 	{
 		.compatible = "ti,twl4030-power-reset",
@@ -770,6 +783,10 @@ static struct of_device_id twl4030_power_of_match[] = {
 		.compatible = "ti,twl4030-power-idle",
 		.data = &omap3_idle,
 	},
+	{
+		.compatible = "ti,twl4030-power-idle-osc-off",
+		.data = &osc_off_idle,
+	},
 	{ },
 };
 MODULE_DEVICE_TABLE(of, twl4030_power_of_match);
-- 
1.8.1.1

^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
  2014-05-27 18:08 ` Tony Lindgren
@ 2014-05-28  7:13   ` Lee Jones
  -1 siblings, 0 replies; 36+ messages in thread
From: Lee Jones @ 2014-05-28  7:13 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-arm-kernel, linux-omap, devicetree

Thanks Tony, here's the pull-request:

The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:

  Linux 3.14 (2014-03-30 20:40:15 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1

for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:

  mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)

----------------------------------------------------------------
Second immutable branch between MFD and OMAP due for the v3.16 merge window.

----------------------------------------------------------------
Tony Lindgren (7):
      mfd: twl-core: Fix idle mode signaling for omaps when booted with device tree
      mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier
      mfd: twl4030-power: Fix some defines for SW_EVENTS
      mfd: twl4030-power: Add generic reset configuration
      mfd: twl4030-power: Add recommended idle configuration
      mfd: twl4030-power: Add support for board specific configuration
      mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle

 .../devicetree/bindings/mfd/twl4030-power.txt      |  17 +-
 arch/arm/mach-omap2/omap_twl.c                     |  60 -----
 drivers/mfd/twl-core.c                             |  15 ++
 drivers/mfd/twl4030-power.c                        | 286 +++++++++++++++++++--
 include/linux/i2c/twl.h                            |   4 +
 5 files changed, 296 insertions(+), 86 deletions(-)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
@ 2014-05-28  7:13   ` Lee Jones
  0 siblings, 0 replies; 36+ messages in thread
From: Lee Jones @ 2014-05-28  7:13 UTC (permalink / raw)
  To: linux-arm-kernel

Thanks Tony, here's the pull-request:

The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:

  Linux 3.14 (2014-03-30 20:40:15 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1

for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:

  mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)

----------------------------------------------------------------
Second immutable branch between MFD and OMAP due for the v3.16 merge window.

----------------------------------------------------------------
Tony Lindgren (7):
      mfd: twl-core: Fix idle mode signaling for omaps when booted with device tree
      mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier
      mfd: twl4030-power: Fix some defines for SW_EVENTS
      mfd: twl4030-power: Add generic reset configuration
      mfd: twl4030-power: Add recommended idle configuration
      mfd: twl4030-power: Add support for board specific configuration
      mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle

 .../devicetree/bindings/mfd/twl4030-power.txt      |  17 +-
 arch/arm/mach-omap2/omap_twl.c                     |  60 -----
 drivers/mfd/twl-core.c                             |  15 ++
 drivers/mfd/twl4030-power.c                        | 286 +++++++++++++++++++--
 include/linux/i2c/twl.h                            |   4 +
 5 files changed, 296 insertions(+), 86 deletions(-)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
  2014-05-28  7:13   ` Lee Jones
@ 2014-05-28 18:06     ` Tony Lindgren
  -1 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-28 18:06 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-arm-kernel, linux-omap, devicetree

* Lee Jones <lee.jones@linaro.org> [140528 00:14]:
> Thanks Tony, here's the pull-request:
> 
> The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:
> 
>   Linux 3.14 (2014-03-30 20:40:15 -0700)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1
> 
> for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:
> 
>   mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)
> 
> ----------------------------------------------------------------
> Second immutable branch between MFD and OMAP due for the v3.16 merge window.

Thanks a lot, this will make it easier for me to chase down potential
PM related regressions ;) I'm merging this for testing only into the
linux-omap master branch, no need for me to include it into any
of my upstream heading branches.

Regards,

Tony

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
@ 2014-05-28 18:06     ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-05-28 18:06 UTC (permalink / raw)
  To: linux-arm-kernel

* Lee Jones <lee.jones@linaro.org> [140528 00:14]:
> Thanks Tony, here's the pull-request:
> 
> The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:
> 
>   Linux 3.14 (2014-03-30 20:40:15 -0700)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1
> 
> for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:
> 
>   mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)
> 
> ----------------------------------------------------------------
> Second immutable branch between MFD and OMAP due for the v3.16 merge window.

Thanks a lot, this will make it easier for me to chase down potential
PM related regressions ;) I'm merging this for testing only into the
linux-omap master branch, no need for me to include it into any
of my upstream heading branches.

Regards,

Tony

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
  2014-05-28 18:06     ` Tony Lindgren
@ 2014-06-02 16:38       ` Tony Lindgren
  -1 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-06-02 16:38 UTC (permalink / raw)
  To: Lee Jones; +Cc: devicetree, linux-omap, linux-arm-kernel

* Tony Lindgren <tony@atomide.com> [140528 11:11]:
> * Lee Jones <lee.jones@linaro.org> [140528 00:14]:
> > Thanks Tony, here's the pull-request:
> > 
> > The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:
> > 
> >   Linux 3.14 (2014-03-30 20:40:15 -0700)
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1
> > 
> > for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:
> > 
> >   mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)
> > 
> > ----------------------------------------------------------------
> > Second immutable branch between MFD and OMAP due for the v3.16 merge window.
> 
> Thanks a lot, this will make it easier for me to chase down potential
> PM related regressions ;) I'm merging this for testing only into the
> linux-omap master branch, no need for me to include it into any
> of my upstream heading branches.

Lee, I'm not seeing this in linux next, did you maybe forget to merge
it into the MFD tree?

Regards,

Tony

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
@ 2014-06-02 16:38       ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-06-02 16:38 UTC (permalink / raw)
  To: linux-arm-kernel

* Tony Lindgren <tony@atomide.com> [140528 11:11]:
> * Lee Jones <lee.jones@linaro.org> [140528 00:14]:
> > Thanks Tony, here's the pull-request:
> > 
> > The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:
> > 
> >   Linux 3.14 (2014-03-30 20:40:15 -0700)
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1
> > 
> > for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:
> > 
> >   mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)
> > 
> > ----------------------------------------------------------------
> > Second immutable branch between MFD and OMAP due for the v3.16 merge window.
> 
> Thanks a lot, this will make it easier for me to chase down potential
> PM related regressions ;) I'm merging this for testing only into the
> linux-omap master branch, no need for me to include it into any
> of my upstream heading branches.

Lee, I'm not seeing this in linux next, did you maybe forget to merge
it into the MFD tree?

Regards,

Tony

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
  2014-06-02 16:38       ` Tony Lindgren
@ 2014-06-03  8:06         ` Lee Jones
  -1 siblings, 0 replies; 36+ messages in thread
From: Lee Jones @ 2014-06-03  8:06 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: devicetree, linux-omap, linux-arm-kernel

On Mon, 02 Jun 2014, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [140528 11:11]:
> > * Lee Jones <lee.jones@linaro.org> [140528 00:14]:
> > > Thanks Tony, here's the pull-request:
> > > 
> > > The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:
> > > 
> > >   Linux 3.14 (2014-03-30 20:40:15 -0700)
> > > 
> > > are available in the git repository at:
> > > 
> > >   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1
> > > 
> > > for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:
> > > 
> > >   mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)
> > > 
> > > ----------------------------------------------------------------
> > > Second immutable branch between MFD and OMAP due for the v3.16 merge window.
> > 
> > Thanks a lot, this will make it easier for me to chase down potential
> > PM related regressions ;) I'm merging this for testing only into the
> > linux-omap master branch, no need for me to include it into any
> > of my upstream heading branches.
> 
> Lee, I'm not seeing this in linux next, did you maybe forget to merge
> it into the MFD tree?

I didn't forget, but I didn't do it either. :)

I have re-merged all of the IBs this morning, so should be in -next
by tomorrow.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
@ 2014-06-03  8:06         ` Lee Jones
  0 siblings, 0 replies; 36+ messages in thread
From: Lee Jones @ 2014-06-03  8:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 02 Jun 2014, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [140528 11:11]:
> > * Lee Jones <lee.jones@linaro.org> [140528 00:14]:
> > > Thanks Tony, here's the pull-request:
> > > 
> > > The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:
> > > 
> > >   Linux 3.14 (2014-03-30 20:40:15 -0700)
> > > 
> > > are available in the git repository at:
> > > 
> > >   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1
> > > 
> > > for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:
> > > 
> > >   mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)
> > > 
> > > ----------------------------------------------------------------
> > > Second immutable branch between MFD and OMAP due for the v3.16 merge window.
> > 
> > Thanks a lot, this will make it easier for me to chase down potential
> > PM related regressions ;) I'm merging this for testing only into the
> > linux-omap master branch, no need for me to include it into any
> > of my upstream heading branches.
> 
> Lee, I'm not seeing this in linux next, did you maybe forget to merge
> it into the MFD tree?

I didn't forget, but I didn't do it either. :)

I have re-merged all of the IBs this morning, so should be in -next
by tomorrow.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PATCH 3/6] mfd: twl4030-power: Add generic reset configuration
  2014-05-27 18:08   ` Tony Lindgren
@ 2014-06-04 13:02     ` Matthias Brugger
  -1 siblings, 0 replies; 36+ messages in thread
From: Matthias Brugger @ 2014-06-04 13:02 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: lee.jones, linux-arm-kernel, linux-omap, devicetree,
	Robert Nelson, Peter De Schrijver, Samuel Ortiz

2014-05-27 20:08 GMT+02:00 Tony Lindgren <tony@atomide.com>:
> The twl4030 PMIC needs to be configured properly for things like
> warm reset and deeper idle states so the PMIC manages the regulators
> properly based on the hardware triggers from the SoC. Earlier
> we have configured twl4030 using platform data, but we want to
> do it for device tree based booting also.
>
> In some cases configuring twl4030 is needed for things to work.
> For example, when rebooting an OMAP3530 at 125 MHz, it hangs.
> With this patch, TWL4030 will be reset when a warm reset occures,
> and OMAP3530 does not hang on reboot.
>
> Let's add device tree support and configure things for warm reset
> as the default when compatible = "ti,twl4030-power". More
> complicated configurations can be added to the driver based on
> other compatible flags.
>
> Note we now also make the pdata const like it should be.
> This allows use it for match->data with the device tree
> related functions.
>
> Based on earlier patch by Matthias Brugger <matthias.bgg@gmail.com>
> and Lesly A M <leslyam@ti.com>.
>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Robert Nelson <robertcnelson@gmail.com>
> Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  .../devicetree/bindings/mfd/twl4030-power.txt      |   7 +-
>  drivers/mfd/twl4030-power.c                        | 109 ++++++++++++++++++---
>  include/linux/i2c/twl.h                            |   3 +
>  3 files changed, 105 insertions(+), 14 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
> index 8e15ec3..b906116 100644
> --- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt
> +++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
> @@ -5,7 +5,12 @@ to control the power resources, including power scripts. For now, the
>  binding only supports the complete shutdown of the system after poweroff.
>
>  Required properties:
> -- compatible : must be "ti,twl4030-power"
> +- compatible : must be one of the following
> +       "ti,twl4030-power"
> +       "ti,twl4030-power-reset"
> +
> +The use of ti,twl4030-power-reset is recommended at least on
> +3530 that needs a special configuration for warm reset to work.
>
>  Optional properties:
>  - ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or
> diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
> index 0b037dc..cb5b0cb 100644
> --- a/drivers/mfd/twl4030-power.c
> +++ b/drivers/mfd/twl4030-power.c
> @@ -29,6 +29,7 @@
>  #include <linux/i2c/twl.h>
>  #include <linux/platform_device.h>
>  #include <linux/of.h>
> +#include <linux/of_device.h>
>
>  #include <asm/mach-types.h>
>
> @@ -128,6 +129,40 @@ static u8 res_config_addrs[] = {
>         [RES_MAIN_REF]  = 0x94,
>  };
>
> +/*
> + * Usable values for .remap_sleep and .remap_off
> + * Based on table "5.3.3 Resource Operating modes"
> + */
> +enum {
> +       TWL_REMAP_OFF = 0,
> +       TWL_REMAP_SLEEP = 8,
> +       TWL_REMAP_ACTIVE = 9,

Do we really need remap active?
As far as I can see it's not used anywhere.

> +};
> +
> +/*
> + * Macros to configure the PM register states for various resources.
> + * Note that we can make MSG_SINGULAR etc private to this driver once
> + * omap3 has been made DT only.
> + */
> +#define TWL_DFLT_DELAY         2       /* typically 2 32 KiHz cycles */
> +#define TWL_RESOURCE_SET(res, state)                                   \
> +       { MSG_SINGULAR(DEV_GRP_NULL, (res), (state)), TWL_DFLT_DELAY }
> +#define TWL_RESOURCE_ON(res)   TWL_RESOURCE_SET(res, RES_STATE_ACTIVE)
> +#define TWL_RESOURCE_OFF(res)  TWL_RESOURCE_SET(res, RES_STATE_OFF)
> +#define TWL_RESOURCE_RESET(res)        TWL_RESOURCE_SET(res, RES_STATE_WRST)
> +/*
> + * It seems that type1 and type2 is just the resource init order
> + * number for the type1 and type2 group.
> + */
> +#define TWL_RESOURCE_GROUP_RESET(group, type1, type2)                  \
> +       { MSG_BROADCAST(DEV_GRP_NULL, (group), (type1), (type2),        \
> +               RES_STATE_WRST), TWL_DFLT_DELAY }
> +#define TWL_REMAP_SLEEP(res, devgrp, typ, typ2)                                \
> +       { .resource = (res), .devgroup = (devgrp),                      \
> +         .type = (typ), .type2 = (typ2),                               \
> +         .remap_off = TWL_REMAP_OFF,                                   \
> +         .remap_sleep = TWL_REMAP_SLEEP, }
> +
>  static int twl4030_write_script_byte(u8 address, u8 byte)
>  {
>         int err;
> @@ -502,7 +537,8 @@ int twl4030_remove_script(u8 flags)
>         return err;
>  }
>
> -static int twl4030_power_configure_scripts(struct twl4030_power_data *pdata)
> +static int
> +twl4030_power_configure_scripts(const struct twl4030_power_data *pdata)
>  {
>         int err;
>         int i;
> @@ -518,7 +554,8 @@ static int twl4030_power_configure_scripts(struct twl4030_power_data *pdata)
>         return 0;
>  }
>
> -static int twl4030_power_configure_resources(struct twl4030_power_data *pdata)
> +static int
> +twl4030_power_configure_resources(const struct twl4030_power_data *pdata)
>  {
>         struct twl4030_resconfig *resconfig = pdata->resource_config;
>         int err;
> @@ -550,7 +587,7 @@ void twl4030_power_off(void)
>                 pr_err("TWL4030 Unable to power off\n");
>  }
>
> -static bool twl4030_power_use_poweroff(struct twl4030_power_data *pdata,
> +static bool twl4030_power_use_poweroff(const struct twl4030_power_data *pdata,
>                                         struct device_node *node)
>  {
>         if (pdata && pdata->use_poweroff)
> @@ -562,10 +599,60 @@ static bool twl4030_power_use_poweroff(struct twl4030_power_data *pdata,
>         return false;
>  }
>
> +#ifdef CONFIG_OF
> +
> +/* Generic warm reset configuration for omap3 */
> +
> +static struct twl4030_ins omap3_wrst_seq[] = {
> +       TWL_RESOURCE_OFF(RES_NRES_PWRON),
> +       TWL_RESOURCE_OFF(RES_RESET),
> +       TWL_RESOURCE_RESET(RES_MAIN_REF),
> +       TWL_RESOURCE_GROUP_RESET(RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2),
> +       TWL_RESOURCE_RESET(RES_VUSB_3V1),
> +       TWL_RESOURCE_GROUP_RESET(RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R1),
> +       TWL_RESOURCE_GROUP_RESET(RES_GRP_RC, RES_TYPE_ALL, RES_TYPE2_R0),
> +       TWL_RESOURCE_ON(RES_RESET),
> +       TWL_RESOURCE_ON(RES_NRES_PWRON),
> +};
> +
> +static struct twl4030_script omap3_wrst_script = {
> +       .script = omap3_wrst_seq,
> +       .size   = ARRAY_SIZE(omap3_wrst_seq),
> +       .flags  = TWL4030_WRST_SCRIPT,
> +};
> +
> +static struct twl4030_script *omap3_reset_scripts[] = {
> +       &omap3_wrst_script,
> +};
> +
> +static struct twl4030_resconfig omap3_rconfig[] = {
> +       TWL_REMAP_SLEEP(RES_HFCLKOUT, DEV_GRP_P3, -1, -1),
> +       TWL_REMAP_SLEEP(RES_VDD1, DEV_GRP_P1, -1, -1),
> +       TWL_REMAP_SLEEP(RES_VDD2, DEV_GRP_P1, -1, -1),
> +       { 0, 0 },
> +};
> +
> +static struct twl4030_power_data omap3_reset = {
> +       .scripts                = omap3_reset_scripts,
> +       .num                    = ARRAY_SIZE(omap3_reset_scripts),
> +       .resource_config        = omap3_rconfig,
> +};
> +
> +static struct of_device_id twl4030_power_of_match[] = {
> +       {
> +               .compatible = "ti,twl4030-power-reset",
> +               .data = &omap3_reset,
> +       },
> +       { },
> +};
> +MODULE_DEVICE_TABLE(of, twl4030_power_of_match);
> +#endif /* CONFIG_OF */
> +
>  static int twl4030_power_probe(struct platform_device *pdev)
>  {
> -       struct twl4030_power_data *pdata = dev_get_platdata(&pdev->dev);
> +       const struct twl4030_power_data *pdata = dev_get_platdata(&pdev->dev);
>         struct device_node *node = pdev->dev.of_node;
> +       const struct of_device_id *match;
>         int err = 0;
>         int err2 = 0;
>         u8 val;
> @@ -586,8 +673,12 @@ static int twl4030_power_probe(struct platform_device *pdev)
>                 return err;
>         }
>
> +       match = of_match_device(of_match_ptr(twl4030_power_of_match),
> +                               &pdev->dev);
> +       if (match && match->data)
> +               pdata = match->data;
> +
>         if (pdata) {
> -               /* TODO: convert to device tree */
>                 err = twl4030_power_configure_scripts(pdata);
>                 if (err) {
>                         pr_err("TWL4030 failed to load scripts\n");
> @@ -637,14 +728,6 @@ static int twl4030_power_remove(struct platform_device *pdev)
>         return 0;
>  }
>
> -#ifdef CONFIG_OF
> -static const struct of_device_id twl4030_power_of_match[] = {
> -       {.compatible = "ti,twl4030-power", },
> -       { },
> -};
> -MODULE_DEVICE_TABLE(of, twl4030_power_of_match);
> -#endif
> -
>  static struct platform_driver twl4030_power_driver = {
>         .driver = {
>                 .name   = "twl4030_power",
> diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
> index ade1c06..5fe0313 100644
> --- a/include/linux/i2c/twl.h
> +++ b/include/linux/i2c/twl.h
> @@ -486,7 +486,10 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot)
>  #define RES_GRP_ALL            0x7     /* All resource groups */
>
>  #define RES_TYPE2_R0           0x0
> +#define RES_TYPE2_R1           0x1
> +#define RES_TYPE2_R2           0x2
>
> +#define RES_TYPE_R0            0x0
>  #define RES_TYPE_ALL           0x7
>
>  /* Resource states */
> --
> 1.8.1.1
>



-- 
motzblog.wordpress.com

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [PATCH 3/6] mfd: twl4030-power: Add generic reset configuration
@ 2014-06-04 13:02     ` Matthias Brugger
  0 siblings, 0 replies; 36+ messages in thread
From: Matthias Brugger @ 2014-06-04 13:02 UTC (permalink / raw)
  To: linux-arm-kernel

2014-05-27 20:08 GMT+02:00 Tony Lindgren <tony@atomide.com>:
> The twl4030 PMIC needs to be configured properly for things like
> warm reset and deeper idle states so the PMIC manages the regulators
> properly based on the hardware triggers from the SoC. Earlier
> we have configured twl4030 using platform data, but we want to
> do it for device tree based booting also.
>
> In some cases configuring twl4030 is needed for things to work.
> For example, when rebooting an OMAP3530 at 125 MHz, it hangs.
> With this patch, TWL4030 will be reset when a warm reset occures,
> and OMAP3530 does not hang on reboot.
>
> Let's add device tree support and configure things for warm reset
> as the default when compatible = "ti,twl4030-power". More
> complicated configurations can be added to the driver based on
> other compatible flags.
>
> Note we now also make the pdata const like it should be.
> This allows use it for match->data with the device tree
> related functions.
>
> Based on earlier patch by Matthias Brugger <matthias.bgg@gmail.com>
> and Lesly A M <leslyam@ti.com>.
>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Robert Nelson <robertcnelson@gmail.com>
> Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  .../devicetree/bindings/mfd/twl4030-power.txt      |   7 +-
>  drivers/mfd/twl4030-power.c                        | 109 ++++++++++++++++++---
>  include/linux/i2c/twl.h                            |   3 +
>  3 files changed, 105 insertions(+), 14 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
> index 8e15ec3..b906116 100644
> --- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt
> +++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
> @@ -5,7 +5,12 @@ to control the power resources, including power scripts. For now, the
>  binding only supports the complete shutdown of the system after poweroff.
>
>  Required properties:
> -- compatible : must be "ti,twl4030-power"
> +- compatible : must be one of the following
> +       "ti,twl4030-power"
> +       "ti,twl4030-power-reset"
> +
> +The use of ti,twl4030-power-reset is recommended at least on
> +3530 that needs a special configuration for warm reset to work.
>
>  Optional properties:
>  - ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or
> diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
> index 0b037dc..cb5b0cb 100644
> --- a/drivers/mfd/twl4030-power.c
> +++ b/drivers/mfd/twl4030-power.c
> @@ -29,6 +29,7 @@
>  #include <linux/i2c/twl.h>
>  #include <linux/platform_device.h>
>  #include <linux/of.h>
> +#include <linux/of_device.h>
>
>  #include <asm/mach-types.h>
>
> @@ -128,6 +129,40 @@ static u8 res_config_addrs[] = {
>         [RES_MAIN_REF]  = 0x94,
>  };
>
> +/*
> + * Usable values for .remap_sleep and .remap_off
> + * Based on table "5.3.3 Resource Operating modes"
> + */
> +enum {
> +       TWL_REMAP_OFF = 0,
> +       TWL_REMAP_SLEEP = 8,
> +       TWL_REMAP_ACTIVE = 9,

Do we really need remap active?
As far as I can see it's not used anywhere.

> +};
> +
> +/*
> + * Macros to configure the PM register states for various resources.
> + * Note that we can make MSG_SINGULAR etc private to this driver once
> + * omap3 has been made DT only.
> + */
> +#define TWL_DFLT_DELAY         2       /* typically 2 32 KiHz cycles */
> +#define TWL_RESOURCE_SET(res, state)                                   \
> +       { MSG_SINGULAR(DEV_GRP_NULL, (res), (state)), TWL_DFLT_DELAY }
> +#define TWL_RESOURCE_ON(res)   TWL_RESOURCE_SET(res, RES_STATE_ACTIVE)
> +#define TWL_RESOURCE_OFF(res)  TWL_RESOURCE_SET(res, RES_STATE_OFF)
> +#define TWL_RESOURCE_RESET(res)        TWL_RESOURCE_SET(res, RES_STATE_WRST)
> +/*
> + * It seems that type1 and type2 is just the resource init order
> + * number for the type1 and type2 group.
> + */
> +#define TWL_RESOURCE_GROUP_RESET(group, type1, type2)                  \
> +       { MSG_BROADCAST(DEV_GRP_NULL, (group), (type1), (type2),        \
> +               RES_STATE_WRST), TWL_DFLT_DELAY }
> +#define TWL_REMAP_SLEEP(res, devgrp, typ, typ2)                                \
> +       { .resource = (res), .devgroup = (devgrp),                      \
> +         .type = (typ), .type2 = (typ2),                               \
> +         .remap_off = TWL_REMAP_OFF,                                   \
> +         .remap_sleep = TWL_REMAP_SLEEP, }
> +
>  static int twl4030_write_script_byte(u8 address, u8 byte)
>  {
>         int err;
> @@ -502,7 +537,8 @@ int twl4030_remove_script(u8 flags)
>         return err;
>  }
>
> -static int twl4030_power_configure_scripts(struct twl4030_power_data *pdata)
> +static int
> +twl4030_power_configure_scripts(const struct twl4030_power_data *pdata)
>  {
>         int err;
>         int i;
> @@ -518,7 +554,8 @@ static int twl4030_power_configure_scripts(struct twl4030_power_data *pdata)
>         return 0;
>  }
>
> -static int twl4030_power_configure_resources(struct twl4030_power_data *pdata)
> +static int
> +twl4030_power_configure_resources(const struct twl4030_power_data *pdata)
>  {
>         struct twl4030_resconfig *resconfig = pdata->resource_config;
>         int err;
> @@ -550,7 +587,7 @@ void twl4030_power_off(void)
>                 pr_err("TWL4030 Unable to power off\n");
>  }
>
> -static bool twl4030_power_use_poweroff(struct twl4030_power_data *pdata,
> +static bool twl4030_power_use_poweroff(const struct twl4030_power_data *pdata,
>                                         struct device_node *node)
>  {
>         if (pdata && pdata->use_poweroff)
> @@ -562,10 +599,60 @@ static bool twl4030_power_use_poweroff(struct twl4030_power_data *pdata,
>         return false;
>  }
>
> +#ifdef CONFIG_OF
> +
> +/* Generic warm reset configuration for omap3 */
> +
> +static struct twl4030_ins omap3_wrst_seq[] = {
> +       TWL_RESOURCE_OFF(RES_NRES_PWRON),
> +       TWL_RESOURCE_OFF(RES_RESET),
> +       TWL_RESOURCE_RESET(RES_MAIN_REF),
> +       TWL_RESOURCE_GROUP_RESET(RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R2),
> +       TWL_RESOURCE_RESET(RES_VUSB_3V1),
> +       TWL_RESOURCE_GROUP_RESET(RES_GRP_ALL, RES_TYPE_R0, RES_TYPE2_R1),
> +       TWL_RESOURCE_GROUP_RESET(RES_GRP_RC, RES_TYPE_ALL, RES_TYPE2_R0),
> +       TWL_RESOURCE_ON(RES_RESET),
> +       TWL_RESOURCE_ON(RES_NRES_PWRON),
> +};
> +
> +static struct twl4030_script omap3_wrst_script = {
> +       .script = omap3_wrst_seq,
> +       .size   = ARRAY_SIZE(omap3_wrst_seq),
> +       .flags  = TWL4030_WRST_SCRIPT,
> +};
> +
> +static struct twl4030_script *omap3_reset_scripts[] = {
> +       &omap3_wrst_script,
> +};
> +
> +static struct twl4030_resconfig omap3_rconfig[] = {
> +       TWL_REMAP_SLEEP(RES_HFCLKOUT, DEV_GRP_P3, -1, -1),
> +       TWL_REMAP_SLEEP(RES_VDD1, DEV_GRP_P1, -1, -1),
> +       TWL_REMAP_SLEEP(RES_VDD2, DEV_GRP_P1, -1, -1),
> +       { 0, 0 },
> +};
> +
> +static struct twl4030_power_data omap3_reset = {
> +       .scripts                = omap3_reset_scripts,
> +       .num                    = ARRAY_SIZE(omap3_reset_scripts),
> +       .resource_config        = omap3_rconfig,
> +};
> +
> +static struct of_device_id twl4030_power_of_match[] = {
> +       {
> +               .compatible = "ti,twl4030-power-reset",
> +               .data = &omap3_reset,
> +       },
> +       { },
> +};
> +MODULE_DEVICE_TABLE(of, twl4030_power_of_match);
> +#endif /* CONFIG_OF */
> +
>  static int twl4030_power_probe(struct platform_device *pdev)
>  {
> -       struct twl4030_power_data *pdata = dev_get_platdata(&pdev->dev);
> +       const struct twl4030_power_data *pdata = dev_get_platdata(&pdev->dev);
>         struct device_node *node = pdev->dev.of_node;
> +       const struct of_device_id *match;
>         int err = 0;
>         int err2 = 0;
>         u8 val;
> @@ -586,8 +673,12 @@ static int twl4030_power_probe(struct platform_device *pdev)
>                 return err;
>         }
>
> +       match = of_match_device(of_match_ptr(twl4030_power_of_match),
> +                               &pdev->dev);
> +       if (match && match->data)
> +               pdata = match->data;
> +
>         if (pdata) {
> -               /* TODO: convert to device tree */
>                 err = twl4030_power_configure_scripts(pdata);
>                 if (err) {
>                         pr_err("TWL4030 failed to load scripts\n");
> @@ -637,14 +728,6 @@ static int twl4030_power_remove(struct platform_device *pdev)
>         return 0;
>  }
>
> -#ifdef CONFIG_OF
> -static const struct of_device_id twl4030_power_of_match[] = {
> -       {.compatible = "ti,twl4030-power", },
> -       { },
> -};
> -MODULE_DEVICE_TABLE(of, twl4030_power_of_match);
> -#endif
> -
>  static struct platform_driver twl4030_power_driver = {
>         .driver = {
>                 .name   = "twl4030_power",
> diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
> index ade1c06..5fe0313 100644
> --- a/include/linux/i2c/twl.h
> +++ b/include/linux/i2c/twl.h
> @@ -486,7 +486,10 @@ static inline int twl6030_mmc_card_detect(struct device *dev, int slot)
>  #define RES_GRP_ALL            0x7     /* All resource groups */
>
>  #define RES_TYPE2_R0           0x0
> +#define RES_TYPE2_R1           0x1
> +#define RES_TYPE2_R2           0x2
>
> +#define RES_TYPE_R0            0x0
>  #define RES_TYPE_ALL           0x7
>
>  /* Resource states */
> --
> 1.8.1.1
>



-- 
motzblog.wordpress.com

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
  2014-06-03  8:06         ` Lee Jones
@ 2014-06-12  5:43           ` Tony Lindgren
  -1 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-06-12  5:43 UTC (permalink / raw)
  To: Lee Jones; +Cc: devicetree, linux-omap, linux-arm-kernel

* Lee Jones <lee.jones@linaro.org> [140603 01:08]:
> On Mon, 02 Jun 2014, Tony Lindgren wrote:
> > * Tony Lindgren <tony@atomide.com> [140528 11:11]:
> > > * Lee Jones <lee.jones@linaro.org> [140528 00:14]:
> > > > Thanks Tony, here's the pull-request:
> > > > 
> > > > The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:
> > > > 
> > > >   Linux 3.14 (2014-03-30 20:40:15 -0700)
> > > > 
> > > > are available in the git repository at:
> > > > 
> > > >   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1
> > > > 
> > > > for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:
> > > > 
> > > >   mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)
> > > > 
> > > > ----------------------------------------------------------------
> > > > Second immutable branch between MFD and OMAP due for the v3.16 merge window.
> > > 
> > > Thanks a lot, this will make it easier for me to chase down potential
> > > PM related regressions ;) I'm merging this for testing only into the
> > > linux-omap master branch, no need for me to include it into any
> > > of my upstream heading branches.
> > 
> > Lee, I'm not seeing this in linux next, did you maybe forget to merge
> > it into the MFD tree?
> 
> I didn't forget, but I didn't do it either. :)
> 
> I have re-merged all of the IBs this morning, so should be in -next
> by tomorrow.

Still not seeing this branch being merged..

Regards,

Tony

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
@ 2014-06-12  5:43           ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-06-12  5:43 UTC (permalink / raw)
  To: linux-arm-kernel

* Lee Jones <lee.jones@linaro.org> [140603 01:08]:
> On Mon, 02 Jun 2014, Tony Lindgren wrote:
> > * Tony Lindgren <tony@atomide.com> [140528 11:11]:
> > > * Lee Jones <lee.jones@linaro.org> [140528 00:14]:
> > > > Thanks Tony, here's the pull-request:
> > > > 
> > > > The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:
> > > > 
> > > >   Linux 3.14 (2014-03-30 20:40:15 -0700)
> > > > 
> > > > are available in the git repository at:
> > > > 
> > > >   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1
> > > > 
> > > > for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:
> > > > 
> > > >   mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)
> > > > 
> > > > ----------------------------------------------------------------
> > > > Second immutable branch between MFD and OMAP due for the v3.16 merge window.
> > > 
> > > Thanks a lot, this will make it easier for me to chase down potential
> > > PM related regressions ;) I'm merging this for testing only into the
> > > linux-omap master branch, no need for me to include it into any
> > > of my upstream heading branches.
> > 
> > Lee, I'm not seeing this in linux next, did you maybe forget to merge
> > it into the MFD tree?
> 
> I didn't forget, but I didn't do it either. :)
> 
> I have re-merged all of the IBs this morning, so should be in -next
> by tomorrow.

Still not seeing this branch being merged..

Regards,

Tony

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
  2014-06-12  5:43           ` Tony Lindgren
@ 2014-06-12  7:47             ` Lee Jones
  -1 siblings, 0 replies; 36+ messages in thread
From: Lee Jones @ 2014-06-12  7:47 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: devicetree, linux-omap, linux-arm-kernel

On Wed, 11 Jun 2014, Tony Lindgren wrote:

> * Lee Jones <lee.jones@linaro.org> [140603 01:08]:
> > On Mon, 02 Jun 2014, Tony Lindgren wrote:
> > > * Tony Lindgren <tony@atomide.com> [140528 11:11]:
> > > > * Lee Jones <lee.jones@linaro.org> [140528 00:14]:
> > > > > Thanks Tony, here's the pull-request:
> > > > > 
> > > > > The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:
> > > > > 
> > > > >   Linux 3.14 (2014-03-30 20:40:15 -0700)
> > > > > 
> > > > > are available in the git repository at:
> > > > > 
> > > > >   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1
> > > > > 
> > > > > for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:
> > > > > 
> > > > >   mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)
> > > > > 
> > > > > ----------------------------------------------------------------
> > > > > Second immutable branch between MFD and OMAP due for the v3.16 merge window.
> > > > 
> > > > Thanks a lot, this will make it easier for me to chase down potential
> > > > PM related regressions ;) I'm merging this for testing only into the
> > > > linux-omap master branch, no need for me to include it into any
> > > > of my upstream heading branches.
> > > 
> > > Lee, I'm not seeing this in linux next, did you maybe forget to merge
> > > it into the MFD tree?
> > 
> > I didn't forget, but I didn't do it either. :)
> > 
> > I have re-merged all of the IBs this morning, so should be in -next
> > by tomorrow.
> 
> Still not seeing this branch being merged..

Oh crap, I see what's happened and it's completely my fault.

If you read the final merge commit carefully:

28fee3f: ("Merge branches 'ib-from-asoc-3.16', 'ib-from-pm-3.16',
'ib-from-regulator-3.16', 'ib-mfd-gpio-3.16' and
'ib-mfd-mmc-memstick-3.16', tags 'ib-mfd-extcon-3.16',
'ib-mfd-omap-3.16' and 'ib-mfd-regulator-3.16' into
ibs-for-mfd-merged")

I appear to have a _branch_ AND a _tag_ called ib-mfd-omap-3.16 and it
looks like Git has taken the tag as a preference. heads/ib-mfd-omap-3.16
is actually at tag/ib-mfd-omap-3.16-1 (notice the appended '-1'),
which contains your most recent patches.  Since I created the MFD-OMAP
shared branch I have changed the naming convention to avoid this sort
of ambiguity.  I'll send a second MFD pull-request to Linus today.

Sorry Tony.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
@ 2014-06-12  7:47             ` Lee Jones
  0 siblings, 0 replies; 36+ messages in thread
From: Lee Jones @ 2014-06-12  7:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 11 Jun 2014, Tony Lindgren wrote:

> * Lee Jones <lee.jones@linaro.org> [140603 01:08]:
> > On Mon, 02 Jun 2014, Tony Lindgren wrote:
> > > * Tony Lindgren <tony@atomide.com> [140528 11:11]:
> > > > * Lee Jones <lee.jones@linaro.org> [140528 00:14]:
> > > > > Thanks Tony, here's the pull-request:
> > > > > 
> > > > > The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:
> > > > > 
> > > > >   Linux 3.14 (2014-03-30 20:40:15 -0700)
> > > > > 
> > > > > are available in the git repository at:
> > > > > 
> > > > >   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1
> > > > > 
> > > > > for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:
> > > > > 
> > > > >   mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)
> > > > > 
> > > > > ----------------------------------------------------------------
> > > > > Second immutable branch between MFD and OMAP due for the v3.16 merge window.
> > > > 
> > > > Thanks a lot, this will make it easier for me to chase down potential
> > > > PM related regressions ;) I'm merging this for testing only into the
> > > > linux-omap master branch, no need for me to include it into any
> > > > of my upstream heading branches.
> > > 
> > > Lee, I'm not seeing this in linux next, did you maybe forget to merge
> > > it into the MFD tree?
> > 
> > I didn't forget, but I didn't do it either. :)
> > 
> > I have re-merged all of the IBs this morning, so should be in -next
> > by tomorrow.
> 
> Still not seeing this branch being merged..

Oh crap, I see what's happened and it's completely my fault.

If you read the final merge commit carefully:

28fee3f: ("Merge branches 'ib-from-asoc-3.16', 'ib-from-pm-3.16',
'ib-from-regulator-3.16', 'ib-mfd-gpio-3.16' and
'ib-mfd-mmc-memstick-3.16', tags 'ib-mfd-extcon-3.16',
'ib-mfd-omap-3.16' and 'ib-mfd-regulator-3.16' into
ibs-for-mfd-merged")

I appear to have a _branch_ AND a _tag_ called ib-mfd-omap-3.16 and it
looks like Git has taken the tag as a preference. heads/ib-mfd-omap-3.16
is actually at tag/ib-mfd-omap-3.16-1 (notice the appended '-1'),
which contains your most recent patches.  Since I created the MFD-OMAP
shared branch I have changed the naming convention to avoid this sort
of ambiguity.  I'll send a second MFD pull-request to Linus today.

Sorry Tony.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
  2014-06-12  7:47             ` Lee Jones
@ 2014-06-12  8:00               ` Tony Lindgren
  -1 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-06-12  8:00 UTC (permalink / raw)
  To: Lee Jones; +Cc: devicetree, linux-omap, linux-arm-kernel

* Lee Jones <lee.jones@linaro.org> [140612 00:48]:
> On Wed, 11 Jun 2014, Tony Lindgren wrote:
> 
> > * Lee Jones <lee.jones@linaro.org> [140603 01:08]:
> > > On Mon, 02 Jun 2014, Tony Lindgren wrote:
> > > > * Tony Lindgren <tony@atomide.com> [140528 11:11]:
> > > > > * Lee Jones <lee.jones@linaro.org> [140528 00:14]:
> > > > > > Thanks Tony, here's the pull-request:
> > > > > > 
> > > > > > The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:
> > > > > > 
> > > > > >   Linux 3.14 (2014-03-30 20:40:15 -0700)
> > > > > > 
> > > > > > are available in the git repository at:
> > > > > > 
> > > > > >   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1
> > > > > > 
> > > > > > for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:
> > > > > > 
> > > > > >   mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)
> > > > > > 
> > > > > > ----------------------------------------------------------------
> > > > > > Second immutable branch between MFD and OMAP due for the v3.16 merge window.
> > > > > 
> > > > > Thanks a lot, this will make it easier for me to chase down potential
> > > > > PM related regressions ;) I'm merging this for testing only into the
> > > > > linux-omap master branch, no need for me to include it into any
> > > > > of my upstream heading branches.
> > > > 
> > > > Lee, I'm not seeing this in linux next, did you maybe forget to merge
> > > > it into the MFD tree?
> > > 
> > > I didn't forget, but I didn't do it either. :)
> > > 
> > > I have re-merged all of the IBs this morning, so should be in -next
> > > by tomorrow.
> > 
> > Still not seeing this branch being merged..
> 
> Oh crap, I see what's happened and it's completely my fault.
> 
> If you read the final merge commit carefully:
> 
> 28fee3f: ("Merge branches 'ib-from-asoc-3.16', 'ib-from-pm-3.16',
> 'ib-from-regulator-3.16', 'ib-mfd-gpio-3.16' and
> 'ib-mfd-mmc-memstick-3.16', tags 'ib-mfd-extcon-3.16',
> 'ib-mfd-omap-3.16' and 'ib-mfd-regulator-3.16' into
> ibs-for-mfd-merged")
> 
> I appear to have a _branch_ AND a _tag_ called ib-mfd-omap-3.16 and it
> looks like Git has taken the tag as a preference. heads/ib-mfd-omap-3.16
> is actually at tag/ib-mfd-omap-3.16-1 (notice the appended '-1'),
> which contains your most recent patches.  Since I created the MFD-OMAP
> shared branch I have changed the naming convention to avoid this sort
> of ambiguity.  I'll send a second MFD pull-request to Linus today.

Heh OK yeah I've hit that also at some point :)
 
> Sorry Tony.

No problem, good to hear you got it figured out.

Regards,

Tony

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
@ 2014-06-12  8:00               ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-06-12  8:00 UTC (permalink / raw)
  To: linux-arm-kernel

* Lee Jones <lee.jones@linaro.org> [140612 00:48]:
> On Wed, 11 Jun 2014, Tony Lindgren wrote:
> 
> > * Lee Jones <lee.jones@linaro.org> [140603 01:08]:
> > > On Mon, 02 Jun 2014, Tony Lindgren wrote:
> > > > * Tony Lindgren <tony@atomide.com> [140528 11:11]:
> > > > > * Lee Jones <lee.jones@linaro.org> [140528 00:14]:
> > > > > > Thanks Tony, here's the pull-request:
> > > > > > 
> > > > > > The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:
> > > > > > 
> > > > > >   Linux 3.14 (2014-03-30 20:40:15 -0700)
> > > > > > 
> > > > > > are available in the git repository at:
> > > > > > 
> > > > > >   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1
> > > > > > 
> > > > > > for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:
> > > > > > 
> > > > > >   mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)
> > > > > > 
> > > > > > ----------------------------------------------------------------
> > > > > > Second immutable branch between MFD and OMAP due for the v3.16 merge window.
> > > > > 
> > > > > Thanks a lot, this will make it easier for me to chase down potential
> > > > > PM related regressions ;) I'm merging this for testing only into the
> > > > > linux-omap master branch, no need for me to include it into any
> > > > > of my upstream heading branches.
> > > > 
> > > > Lee, I'm not seeing this in linux next, did you maybe forget to merge
> > > > it into the MFD tree?
> > > 
> > > I didn't forget, but I didn't do it either. :)
> > > 
> > > I have re-merged all of the IBs this morning, so should be in -next
> > > by tomorrow.
> > 
> > Still not seeing this branch being merged..
> 
> Oh crap, I see what's happened and it's completely my fault.
> 
> If you read the final merge commit carefully:
> 
> 28fee3f: ("Merge branches 'ib-from-asoc-3.16', 'ib-from-pm-3.16',
> 'ib-from-regulator-3.16', 'ib-mfd-gpio-3.16' and
> 'ib-mfd-mmc-memstick-3.16', tags 'ib-mfd-extcon-3.16',
> 'ib-mfd-omap-3.16' and 'ib-mfd-regulator-3.16' into
> ibs-for-mfd-merged")
> 
> I appear to have a _branch_ AND a _tag_ called ib-mfd-omap-3.16 and it
> looks like Git has taken the tag as a preference. heads/ib-mfd-omap-3.16
> is actually at tag/ib-mfd-omap-3.16-1 (notice the appended '-1'),
> which contains your most recent patches.  Since I created the MFD-OMAP
> shared branch I have changed the naming convention to avoid this sort
> of ambiguity.  I'll send a second MFD pull-request to Linus today.

Heh OK yeah I've hit that also at some point :)
 
> Sorry Tony.

No problem, good to hear you got it figured out.

Regards,

Tony

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
  2014-06-12  8:00               ` Tony Lindgren
@ 2014-06-12  8:33                 ` Lee Jones
  -1 siblings, 0 replies; 36+ messages in thread
From: Lee Jones @ 2014-06-12  8:33 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: devicetree, linux-omap, linux-arm-kernel

On Thu, 12 Jun 2014, Tony Lindgren wrote:

> * Lee Jones <lee.jones@linaro.org> [140612 00:48]:
> > On Wed, 11 Jun 2014, Tony Lindgren wrote:
> > 
> > > * Lee Jones <lee.jones@linaro.org> [140603 01:08]:
> > > > On Mon, 02 Jun 2014, Tony Lindgren wrote:
> > > > > * Tony Lindgren <tony@atomide.com> [140528 11:11]:
> > > > > > * Lee Jones <lee.jones@linaro.org> [140528 00:14]:
> > > > > > > Thanks Tony, here's the pull-request:
> > > > > > > 
> > > > > > > The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:
> > > > > > > 
> > > > > > >   Linux 3.14 (2014-03-30 20:40:15 -0700)
> > > > > > > 
> > > > > > > are available in the git repository at:
> > > > > > > 
> > > > > > >   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1
> > > > > > > 
> > > > > > > for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:
> > > > > > > 
> > > > > > >   mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)
> > > > > > > 
> > > > > > > ----------------------------------------------------------------
> > > > > > > Second immutable branch between MFD and OMAP due for the v3.16 merge window.
> > > > > > 
> > > > > > Thanks a lot, this will make it easier for me to chase down potential
> > > > > > PM related regressions ;) I'm merging this for testing only into the
> > > > > > linux-omap master branch, no need for me to include it into any
> > > > > > of my upstream heading branches.
> > > > > 
> > > > > Lee, I'm not seeing this in linux next, did you maybe forget to merge
> > > > > it into the MFD tree?
> > > > 
> > > > I didn't forget, but I didn't do it either. :)
> > > > 
> > > > I have re-merged all of the IBs this morning, so should be in -next
> > > > by tomorrow.
> > > 
> > > Still not seeing this branch being merged..
> > 
> > Oh crap, I see what's happened and it's completely my fault.
> > 
> > If you read the final merge commit carefully:
> > 
> > 28fee3f: ("Merge branches 'ib-from-asoc-3.16', 'ib-from-pm-3.16',
> > 'ib-from-regulator-3.16', 'ib-mfd-gpio-3.16' and
> > 'ib-mfd-mmc-memstick-3.16', tags 'ib-mfd-extcon-3.16',
> > 'ib-mfd-omap-3.16' and 'ib-mfd-regulator-3.16' into
> > ibs-for-mfd-merged")
> > 
> > I appear to have a _branch_ AND a _tag_ called ib-mfd-omap-3.16 and it
> > looks like Git has taken the tag as a preference. heads/ib-mfd-omap-3.16
> > is actually at tag/ib-mfd-omap-3.16-1 (notice the appended '-1'),
> > which contains your most recent patches.  Since I created the MFD-OMAP
> > shared branch I have changed the naming convention to avoid this sort
> > of ambiguity.  I'll send a second MFD pull-request to Linus today.
> 
> Heh OK yeah I've hit that also at some point :)
>  
> > Sorry Tony.
> 
> No problem, good to hear you got it figured out.

Pull-request sent.  Hopefully it's sorted now.

If there are any more issues I'll sort them out as they appear, but I
may be a little slower than usual as I'm currently on holiday in Spain.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
@ 2014-06-12  8:33                 ` Lee Jones
  0 siblings, 0 replies; 36+ messages in thread
From: Lee Jones @ 2014-06-12  8:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 12 Jun 2014, Tony Lindgren wrote:

> * Lee Jones <lee.jones@linaro.org> [140612 00:48]:
> > On Wed, 11 Jun 2014, Tony Lindgren wrote:
> > 
> > > * Lee Jones <lee.jones@linaro.org> [140603 01:08]:
> > > > On Mon, 02 Jun 2014, Tony Lindgren wrote:
> > > > > * Tony Lindgren <tony@atomide.com> [140528 11:11]:
> > > > > > * Lee Jones <lee.jones@linaro.org> [140528 00:14]:
> > > > > > > Thanks Tony, here's the pull-request:
> > > > > > > 
> > > > > > > The following changes since commit 455c6fdbd219161bd09b1165f11699d6d73de11c:
> > > > > > > 
> > > > > > >   Linux 3.14 (2014-03-30 20:40:15 -0700)
> > > > > > > 
> > > > > > > are available in the git repository at:
> > > > > > > 
> > > > > > >   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/mfd-omap-v3.16-1
> > > > > > > 
> > > > > > > for you to fetch changes up to 43fef47f94a1ae46fb2720dada32fa3b5547bee2:
> > > > > > > 
> > > > > > >   mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle (2014-05-28 08:06:18 +0100)
> > > > > > > 
> > > > > > > ----------------------------------------------------------------
> > > > > > > Second immutable branch between MFD and OMAP due for the v3.16 merge window.
> > > > > > 
> > > > > > Thanks a lot, this will make it easier for me to chase down potential
> > > > > > PM related regressions ;) I'm merging this for testing only into the
> > > > > > linux-omap master branch, no need for me to include it into any
> > > > > > of my upstream heading branches.
> > > > > 
> > > > > Lee, I'm not seeing this in linux next, did you maybe forget to merge
> > > > > it into the MFD tree?
> > > > 
> > > > I didn't forget, but I didn't do it either. :)
> > > > 
> > > > I have re-merged all of the IBs this morning, so should be in -next
> > > > by tomorrow.
> > > 
> > > Still not seeing this branch being merged..
> > 
> > Oh crap, I see what's happened and it's completely my fault.
> > 
> > If you read the final merge commit carefully:
> > 
> > 28fee3f: ("Merge branches 'ib-from-asoc-3.16', 'ib-from-pm-3.16',
> > 'ib-from-regulator-3.16', 'ib-mfd-gpio-3.16' and
> > 'ib-mfd-mmc-memstick-3.16', tags 'ib-mfd-extcon-3.16',
> > 'ib-mfd-omap-3.16' and 'ib-mfd-regulator-3.16' into
> > ibs-for-mfd-merged")
> > 
> > I appear to have a _branch_ AND a _tag_ called ib-mfd-omap-3.16 and it
> > looks like Git has taken the tag as a preference. heads/ib-mfd-omap-3.16
> > is actually at tag/ib-mfd-omap-3.16-1 (notice the appended '-1'),
> > which contains your most recent patches.  Since I created the MFD-OMAP
> > shared branch I have changed the naming convention to avoid this sort
> > of ambiguity.  I'll send a second MFD pull-request to Linus today.
> 
> Heh OK yeah I've hit that also at some point :)
>  
> > Sorry Tony.
> 
> No problem, good to hear you got it figured out.

Pull-request sent.  Hopefully it's sorted now.

If there are any more issues I'll sort them out as they appear, but I
may be a little slower than usual as I'm currently on holiday in Spain.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
  2014-06-12  8:33                 ` Lee Jones
@ 2014-06-16 10:17                   ` Lee Jones
  -1 siblings, 0 replies; 36+ messages in thread
From: Lee Jones @ 2014-06-16 10:17 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: devicetree, linux-omap, linux-arm-kernel

> > > > Still not seeing this branch being merged..
> > > 
> > > Oh crap, I see what's happened and it's completely my fault.
> > > 
> > > If you read the final merge commit carefully:
> > > 
> > > 28fee3f: ("Merge branches 'ib-from-asoc-3.16', 'ib-from-pm-3.16',
> > > 'ib-from-regulator-3.16', 'ib-mfd-gpio-3.16' and
> > > 'ib-mfd-mmc-memstick-3.16', tags 'ib-mfd-extcon-3.16',
> > > 'ib-mfd-omap-3.16' and 'ib-mfd-regulator-3.16' into
> > > ibs-for-mfd-merged")
> > > 
> > > I appear to have a _branch_ AND a _tag_ called ib-mfd-omap-3.16 and it
> > > looks like Git has taken the tag as a preference. heads/ib-mfd-omap-3.16
> > > is actually at tag/ib-mfd-omap-3.16-1 (notice the appended '-1'),
> > > which contains your most recent patches.  Since I created the MFD-OMAP
> > > shared branch I have changed the naming convention to avoid this sort
> > > of ambiguity.  I'll send a second MFD pull-request to Linus today.
> > 
> > Heh OK yeah I've hit that also at some point :)
> >  
> > > Sorry Tony.
> > 
> > No problem, good to hear you got it figured out.
> 
> Pull-request sent.  Hopefully it's sorted now.

bae14e7a2dcb726476b5020396923a24ccc4c40b

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
@ 2014-06-16 10:17                   ` Lee Jones
  0 siblings, 0 replies; 36+ messages in thread
From: Lee Jones @ 2014-06-16 10:17 UTC (permalink / raw)
  To: linux-arm-kernel

> > > > Still not seeing this branch being merged..
> > > 
> > > Oh crap, I see what's happened and it's completely my fault.
> > > 
> > > If you read the final merge commit carefully:
> > > 
> > > 28fee3f: ("Merge branches 'ib-from-asoc-3.16', 'ib-from-pm-3.16',
> > > 'ib-from-regulator-3.16', 'ib-mfd-gpio-3.16' and
> > > 'ib-mfd-mmc-memstick-3.16', tags 'ib-mfd-extcon-3.16',
> > > 'ib-mfd-omap-3.16' and 'ib-mfd-regulator-3.16' into
> > > ibs-for-mfd-merged")
> > > 
> > > I appear to have a _branch_ AND a _tag_ called ib-mfd-omap-3.16 and it
> > > looks like Git has taken the tag as a preference. heads/ib-mfd-omap-3.16
> > > is actually at tag/ib-mfd-omap-3.16-1 (notice the appended '-1'),
> > > which contains your most recent patches.  Since I created the MFD-OMAP
> > > shared branch I have changed the naming convention to avoid this sort
> > > of ambiguity.  I'll send a second MFD pull-request to Linus today.
> > 
> > Heh OK yeah I've hit that also at some point :)
> >  
> > > Sorry Tony.
> > 
> > No problem, good to hear you got it figured out.
> 
> Pull-request sent.  Hopefully it's sorted now.

bae14e7a2dcb726476b5020396923a24ccc4c40b

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
  2014-06-16 10:17                   ` Lee Jones
@ 2014-06-16 10:36                     ` Tony Lindgren
  -1 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-06-16 10:36 UTC (permalink / raw)
  To: Lee Jones; +Cc: devicetree, linux-omap, linux-arm-kernel

* Lee Jones <lee.jones@linaro.org> [140616 03:19]:
> > > > > Still not seeing this branch being merged..
> > > > 
> > > > Oh crap, I see what's happened and it's completely my fault.
> > > > 
> > > > If you read the final merge commit carefully:
> > > > 
> > > > 28fee3f: ("Merge branches 'ib-from-asoc-3.16', 'ib-from-pm-3.16',
> > > > 'ib-from-regulator-3.16', 'ib-mfd-gpio-3.16' and
> > > > 'ib-mfd-mmc-memstick-3.16', tags 'ib-mfd-extcon-3.16',
> > > > 'ib-mfd-omap-3.16' and 'ib-mfd-regulator-3.16' into
> > > > ibs-for-mfd-merged")
> > > > 
> > > > I appear to have a _branch_ AND a _tag_ called ib-mfd-omap-3.16 and it
> > > > looks like Git has taken the tag as a preference. heads/ib-mfd-omap-3.16
> > > > is actually at tag/ib-mfd-omap-3.16-1 (notice the appended '-1'),
> > > > which contains your most recent patches.  Since I created the MFD-OMAP
> > > > shared branch I have changed the naming convention to avoid this sort
> > > > of ambiguity.  I'll send a second MFD pull-request to Linus today.
> > > 
> > > Heh OK yeah I've hit that also at some point :)
> > >  
> > > > Sorry Tony.
> > > 
> > > No problem, good to hear you got it figured out.
> > 
> > Pull-request sent.  Hopefully it's sorted now.
> 
> bae14e7a2dcb726476b5020396923a24ccc4c40b

Yes saw that thanks, omap PM tests are now working for
me with v3.16-rc1.

Regards,

Tony

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16
@ 2014-06-16 10:36                     ` Tony Lindgren
  0 siblings, 0 replies; 36+ messages in thread
From: Tony Lindgren @ 2014-06-16 10:36 UTC (permalink / raw)
  To: linux-arm-kernel

* Lee Jones <lee.jones@linaro.org> [140616 03:19]:
> > > > > Still not seeing this branch being merged..
> > > > 
> > > > Oh crap, I see what's happened and it's completely my fault.
> > > > 
> > > > If you read the final merge commit carefully:
> > > > 
> > > > 28fee3f: ("Merge branches 'ib-from-asoc-3.16', 'ib-from-pm-3.16',
> > > > 'ib-from-regulator-3.16', 'ib-mfd-gpio-3.16' and
> > > > 'ib-mfd-mmc-memstick-3.16', tags 'ib-mfd-extcon-3.16',
> > > > 'ib-mfd-omap-3.16' and 'ib-mfd-regulator-3.16' into
> > > > ibs-for-mfd-merged")
> > > > 
> > > > I appear to have a _branch_ AND a _tag_ called ib-mfd-omap-3.16 and it
> > > > looks like Git has taken the tag as a preference. heads/ib-mfd-omap-3.16
> > > > is actually at tag/ib-mfd-omap-3.16-1 (notice the appended '-1'),
> > > > which contains your most recent patches.  Since I created the MFD-OMAP
> > > > shared branch I have changed the naming convention to avoid this sort
> > > > of ambiguity.  I'll send a second MFD pull-request to Linus today.
> > > 
> > > Heh OK yeah I've hit that also at some point :)
> > >  
> > > > Sorry Tony.
> > > 
> > > No problem, good to hear you got it figured out.
> > 
> > Pull-request sent.  Hopefully it's sorted now.
> 
> bae14e7a2dcb726476b5020396923a24ccc4c40b

Yes saw that thanks, omap PM tests are now working for
me with v3.16-rc1.

Regards,

Tony

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2014-06-16 10:36 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-27 18:08 [PATCH v3 0/6] mfd: twl4030-power: Enable off-idle configuration when booted with device tree Tony Lindgren
2014-05-27 18:08 ` Tony Lindgren
2014-05-27 18:08 ` [PATCH 1/6] mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier Tony Lindgren
2014-05-27 18:08   ` Tony Lindgren
2014-05-27 18:08 ` [PATCH 2/6] mfd: twl4030-power: Fix some defines for SW_EVENTS Tony Lindgren
2014-05-27 18:08   ` Tony Lindgren
2014-05-27 18:08 ` [PATCH 3/6] mfd: twl4030-power: Add generic reset configuration Tony Lindgren
2014-05-27 18:08   ` Tony Lindgren
2014-06-04 13:02   ` Matthias Brugger
2014-06-04 13:02     ` Matthias Brugger
2014-05-27 18:08 ` [PATCH 4/6] mfd: twl4030-power: Add recommended idle configuration Tony Lindgren
2014-05-27 18:08   ` Tony Lindgren
2014-05-27 18:08 ` [PATCH 5/6] mfd: twl4030-power: Add support for board specific configuration Tony Lindgren
2014-05-27 18:08   ` Tony Lindgren
     [not found] ` <1401214140-9828-1-git-send-email-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2014-05-27 18:09   ` [PATCH 6/6] mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle Tony Lindgren
2014-05-27 18:09     ` Tony Lindgren
2014-05-28  7:13 ` [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16 Lee Jones
2014-05-28  7:13   ` Lee Jones
2014-05-28 18:06   ` Tony Lindgren
2014-05-28 18:06     ` Tony Lindgren
2014-06-02 16:38     ` Tony Lindgren
2014-06-02 16:38       ` Tony Lindgren
2014-06-03  8:06       ` Lee Jones
2014-06-03  8:06         ` Lee Jones
2014-06-12  5:43         ` Tony Lindgren
2014-06-12  5:43           ` Tony Lindgren
2014-06-12  7:47           ` Lee Jones
2014-06-12  7:47             ` Lee Jones
2014-06-12  8:00             ` Tony Lindgren
2014-06-12  8:00               ` Tony Lindgren
2014-06-12  8:33               ` Lee Jones
2014-06-12  8:33                 ` Lee Jones
2014-06-16 10:17                 ` Lee Jones
2014-06-16 10:17                   ` Lee Jones
2014-06-16 10:36                   ` Tony Lindgren
2014-06-16 10:36                     ` Tony Lindgren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.