Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH v2 1/2] mfd: dt: tps6586x: Add power off control

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


bilhuang at nvidia

Aug 19, 2012, 6:07 PM

Post #1 of 7 (93 views)
Permalink
[PATCH v2 1/2] mfd: dt: tps6586x: Add power off control

Add DT property "ti,system-power-controller" telling whether or not this
pmic is in charge of controlling the system power, so the power off
routine can be hooked up to system call "pm_power_off".

Based on the work by:
Dan Willemsen <dwillemsen [at] nvidia>

Signed-off-by: Bill Huang <bilhuang [at] nvidia>
Tested-by: Stephen Warren <swarren [at] wwwdotorg>
---
.../devicetree/bindings/regulator/tps6586x.txt | 6 ++++++
drivers/mfd/tps6586x.c | 19 +++++++++++++++++++
include/linux/mfd/tps6586x.h | 1 +
3 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/regulator/tps6586x.txt b/Documentation/devicetree/bindings/regulator/tps6586x.txt
index d156e1b..03dfa4e 100644
--- a/Documentation/devicetree/bindings/regulator/tps6586x.txt
+++ b/Documentation/devicetree/bindings/regulator/tps6586x.txt
@@ -18,6 +18,10 @@ Required properties:
- vinldo678-supply: The input supply for the LDO6, LDO7 and LDO8
- vinldo9-supply: The input supply for the LDO9

+Optional properties:
+- ti,system-power-controller: Telling whether or not this pmic is controlling
+ the system power.
+
Each regulator is defined using the standard binding for regulators.

Example:
@@ -30,6 +34,8 @@ Example:
#gpio-cells = <2>;
gpio-controller;

+ ti,system-power-controller;
+
sm0-supply = <&some_reg>;
sm1-supply = <&some_reg>;
sm2-supply = <&some_reg>;
diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c
index 353c348..d08f59c 100644
--- a/drivers/mfd/tps6586x.c
+++ b/drivers/mfd/tps6586x.c
@@ -29,6 +29,10 @@
#include <linux/mfd/core.h>
#include <linux/mfd/tps6586x.h>

+#define TPS6586X_SUPPLYENE 0x14
+#define EXITSLREQ_BIT BIT(1)
+#define SLEEP_MODE_BIT BIT(3)
+
/* interrupt control registers */
#define TPS6586X_INT_ACK1 0xb5
#define TPS6586X_INT_ACK2 0xb6
@@ -409,6 +413,7 @@ static struct tps6586x_platform_data *tps6586x_parse_dt(struct i2c_client *clien
pdata->subdevs = devs;
pdata->gpio_base = -1;
pdata->irq_base = -1;
+ pdata->pm_off = of_property_read_bool(np, "ti,system-power-controller");

return pdata;
}
@@ -441,6 +446,15 @@ static const struct regmap_config tps6586x_regmap_config = {
.cache_type = REGCACHE_RBTREE,
};

+static struct device *tps6586x_dev;
+static void tps6586x_power_off(void)
+{
+ if (tps6586x_clr_bits(tps6586x_dev, TPS6586X_SUPPLYENE, EXITSLREQ_BIT))
+ return;
+
+ tps6586x_set_bits(tps6586x_dev, TPS6586X_SUPPLYENE, SLEEP_MODE_BIT);
+}
+
static int __devinit tps6586x_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
@@ -505,6 +519,11 @@ static int __devinit tps6586x_i2c_probe(struct i2c_client *client,
goto err_add_devs;
}

+ if (pdata->pm_off && !pm_power_off) {
+ tps6586x_dev = &client->dev;
+ pm_power_off = tps6586x_power_off;
+ }
+
return 0;

err_add_devs:
diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h
index f350fd0..08f109f 100644
--- a/include/linux/mfd/tps6586x.h
+++ b/include/linux/mfd/tps6586x.h
@@ -77,6 +77,7 @@ struct tps6586x_platform_data {

int gpio_base;
int irq_base;
+ bool pm_off;
};

/*
--
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


thierry.reding at avionic-design

Aug 20, 2012, 4:34 AM

Post #2 of 7 (82 views)
Permalink
Re: [PATCH v2 1/2] mfd: dt: tps6586x: Add power off control [In reply to]

On Sun, Aug 19, 2012 at 06:07:55PM -0700, Bill Huang wrote:
> Add DT property "ti,system-power-controller" telling whether or not this
> pmic is in charge of controlling the system power, so the power off
> routine can be hooked up to system call "pm_power_off".
>
> Based on the work by:
> Dan Willemsen <dwillemsen [at] nvidia>
>
> Signed-off-by: Bill Huang <bilhuang [at] nvidia>
> Tested-by: Stephen Warren <swarren [at] wwwdotorg>
> ---
> .../devicetree/bindings/regulator/tps6586x.txt | 6 ++++++
> drivers/mfd/tps6586x.c | 19 +++++++++++++++++++
> include/linux/mfd/tps6586x.h | 1 +
> 3 files changed, 26 insertions(+), 0 deletions(-)

Hi,

I've seen the following while trying this patch applied on top of next-20120817:

[ 40.581151] Power down.
[ 41.583160] ------------[ cut here ]------------
[ 41.587784] WARNING: at /home/thierry.reding/src/kernel/linux-ipmp.git/drivers/i2c/busses/i2c-tegra.c:525 tegra_i2c_xfer+0x21c/0x29c()
[ 41.599850] Modules linked in:
[ 41.602927] [<c0014074>] (unwind_backtrace+0x0/0xf8) from [<c00265a8>] (warn_slowpath_common+0x4c/0x64)
[ 41.612304] [<c00265a8>] (warn_slowpath_common+0x4c/0x64) from [<c00265dc>] (warn_slowpath_null+0x1c/0x24)
[ 41.621947] [<c00265dc>] (warn_slowpath_null+0x1c/0x24) from [<c02a2944>] (tegra_i2c_xfer+0x21c/0x29c)
[ 41.631244] [<c02a2944>] (tegra_i2c_xfer+0x21c/0x29c) from [<c029f5e8>] (__i2c_transfer+0x44/0x80)
[ 41.640192] [<c029f5e8>] (__i2c_transfer+0x44/0x80) from [<c02a0698>] (i2c_transfer+0x7c/0xb8)
[ 41.648796] [<c02a0698>] (i2c_transfer+0x7c/0xb8) from [<c0232a60>] (regmap_i2c_read+0x48/0x64)
[ 41.657485] [<c0232a60>] (regmap_i2c_read+0x48/0x64) from [<c0230304>] (_regmap_raw_read+0x90/0x98)
[ 41.666518] [<c0230304>] (_regmap_raw_read+0x90/0x98) from [<c023035c>] (_regmap_read+0x50/0xa8)
[ 41.675290] [<c023035c>] (_regmap_read+0x50/0xa8) from [<c02300c4>] (_regmap_update_bits+0x24/0x64)
[ 41.684322] [<c02300c4>] (_regmap_update_bits+0x24/0x64) from [<c0230b88>] (regmap_update_bits+0x3c/0x58)
[ 41.693885] [<c0230b88>] (regmap_update_bits+0x3c/0x58) from [<c0237c30>] (tps6586x_power_off+0x18/0x38)
[ 41.703362] [<c0237c30>] (tps6586x_power_off+0x18/0x38) from [<c000edf4>] (machine_power_off+0x1c/0x24)
[ 41.712749] [<c000edf4>] (machine_power_off+0x1c/0x24) from [<c0037ca4>] (sys_reboot+0x138/0x1b0)
[ 41.721612] [<c0037ca4>] (sys_reboot+0x138/0x1b0) from [<c000e000>] (ret_fast_syscall+0x0/0x30)
[ 41.730293] ---[ end trace 9af366974fefa459 ]---
[ 41.734906] tegra-i2c tegra-i2c.3: i2c transfer timed out
[ 41.740689] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
[ 41.740689]
[ 41.749823] [<c0014074>] (unwind_backtrace+0x0/0xf8) from [<c03e7090>] (panic+0x8c/0x1d8)
[ 41.757993] [<c03e7090>] (panic+0x8c/0x1d8) from [<c002b7b8>] (do_exit+0x694/0x750)
[ 41.765636] [<c002b7b8>] (do_exit+0x694/0x750) from [<c002bad0>] (do_group_exit+0x3c/0xb0)
[ 41.773884] [<c002bad0>] (do_group_exit+0x3c/0xb0) from [<c002bb54>] (__wake_up_parent+0x0/0x18)

Thierry


bilhuang at nvidia

Aug 22, 2012, 5:07 AM

Post #3 of 7 (81 views)
Permalink
RE: [PATCH v2 1/2] mfd: dt: tps6586x: Add power off control [In reply to]

nvpublic
> On Sun, Aug 19, 2012 at 06:07:55PM -0700, Bill Huang wrote:
> > Add DT property "ti,system-power-controller" telling whether or not
> > this pmic is in charge of controlling the system power, so the power
> > off routine can be hooked up to system call "pm_power_off".
> >
> > Based on the work by:
> > Dan Willemsen <dwillemsen [at] nvidia>
> >
> > Signed-off-by: Bill Huang <bilhuang [at] nvidia>
> > Tested-by: Stephen Warren <swarren [at] wwwdotorg>
> > ---
> > .../devicetree/bindings/regulator/tps6586x.txt | 6 ++++++
> > drivers/mfd/tps6586x.c | 19 +++++++++++++++++++
> > include/linux/mfd/tps6586x.h | 1 +
> > 3 files changed, 26 insertions(+), 0 deletions(-)
>
> Hi,
>
> I've seen the following while trying this patch applied on top of next-20120817:
>
> [ 40.581151] Power down.
> [ 41.583160] ------------[ cut here ]------------
> [ 41.587784] WARNING: at /home/thierry.reding/src/kernel/linux-ipmp.git/drivers/i2c/busses/i2c-
> tegra.c:525 tegra_i2c_xfer+0x21c/0x29c()
> [ 41.599850] Modules linked in:
> [ 41.602927] [<c0014074>] (unwind_backtrace+0x0/0xf8) from [<c00265a8>]
> (warn_slowpath_common+0x4c/0x64)
> [ 41.612304] [<c00265a8>] (warn_slowpath_common+0x4c/0x64) from [<c00265dc>]
> (warn_slowpath_null+0x1c/0x24)
> [ 41.621947] [<c00265dc>] (warn_slowpath_null+0x1c/0x24) from [<c02a2944>]
> (tegra_i2c_xfer+0x21c/0x29c)
> [ 41.631244] [<c02a2944>] (tegra_i2c_xfer+0x21c/0x29c) from [<c029f5e8>] (__i2c_transfer+0x44/0x80)
> [ 41.640192] [<c029f5e8>] (__i2c_transfer+0x44/0x80) from [<c02a0698>] (i2c_transfer+0x7c/0xb8)
> [ 41.648796] [<c02a0698>] (i2c_transfer+0x7c/0xb8) from [<c0232a60>] (regmap_i2c_read+0x48/0x64)
> [ 41.657485] [<c0232a60>] (regmap_i2c_read+0x48/0x64) from [<c0230304>] (_regmap_raw_read+0x90/0x98)
> [ 41.666518] [<c0230304>] (_regmap_raw_read+0x90/0x98) from [<c023035c>] (_regmap_read+0x50/0xa8)
> [ 41.675290] [<c023035c>] (_regmap_read+0x50/0xa8) from [<c02300c4>] (_regmap_update_bits+0x24/0x64)
> [ 41.684322] [<c02300c4>] (_regmap_update_bits+0x24/0x64) from [<c0230b88>]
> (regmap_update_bits+0x3c/0x58)
> [ 41.693885] [<c0230b88>] (regmap_update_bits+0x3c/0x58) from [<c0237c30>]
> (tps6586x_power_off+0x18/0x38)
> [ 41.703362] [<c0237c30>] (tps6586x_power_off+0x18/0x38) from [<c000edf4>]
> (machine_power_off+0x1c/0x24)
> [ 41.712749] [<c000edf4>] (machine_power_off+0x1c/0x24) from [<c0037ca4>] (sys_reboot+0x138/0x1b0)
> [ 41.721612] [<c0037ca4>] (sys_reboot+0x138/0x1b0) from [<c000e000>] (ret_fast_syscall+0x0/0x30)
> [ 41.730293] ---[ end trace 9af366974fefa459 ]---
> [ 41.734906] tegra-i2c tegra-i2c.3: i2c transfer timed out
> [ 41.740689] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
> [ 41.740689]
> [ 41.749823] [<c0014074>] (unwind_backtrace+0x0/0xf8) from [<c03e7090>] (panic+0x8c/0x1d8)
> [ 41.757993] [<c03e7090>] (panic+0x8c/0x1d8) from [<c002b7b8>] (do_exit+0x694/0x750)
> [ 41.765636] [<c002b7b8>] (do_exit+0x694/0x750) from [<c002bad0>] (do_group_exit+0x3c/0xb0)
> [ 41.773884] [<c002bad0>] (do_group_exit+0x3c/0xb0) from [<c002bb54>] (__wake_up_parent+0x0/0x18)

Thanks Thierry, I can repro this on Tegra20 inconsistently and found, if current cpu is not cpu0 when doing "machine_shutdown" (it will call "smp_send_stop"), i2c controller will failed to do any transaction (looks like gic interrupt will be disabled), I'll debug further to find out the root cause.

By the way, Tegra30 is good since it will always be cpu0 when doing "machine_shutdown", I still don't know why it makes the difference against Tegra20 since I'm not familiar with those cpu stuffs and what make it behave differently, I'll study a bit, thanks.

>
> Thierry
>
> * Unknown Key
> * 0x7F3EB3A1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


bilhuang at nvidia

Aug 24, 2012, 5:36 PM

Post #4 of 7 (76 views)
Permalink
RE: [PATCH v2 1/2] mfd: dt: tps6586x: Add power off control [In reply to]

nvpublic
> > On Sun, Aug 19, 2012 at 06:07:55PM -0700, Bill Huang wrote:
> > > Add DT property "ti,system-power-controller" telling whether or not
> > > this pmic is in charge of controlling the system power, so the power
> > > off routine can be hooked up to system call "pm_power_off".
> > >
> > > Based on the work by:
> > > Dan Willemsen <dwillemsen [at] nvidia>
> > >
> > > Signed-off-by: Bill Huang <bilhuang [at] nvidia>
> > > Tested-by: Stephen Warren <swarren [at] wwwdotorg>
> > > ---
> > > .../devicetree/bindings/regulator/tps6586x.txt | 6 ++++++
> > > drivers/mfd/tps6586x.c | 19 +++++++++++++++++++
> > > include/linux/mfd/tps6586x.h | 1 +
> > > 3 files changed, 26 insertions(+), 0 deletions(-)
> >
> > Hi,
> >
> > I've seen the following while trying this patch applied on top of next-20120817:
> >
> > [ 40.581151] Power down.
> > [ 41.583160] ------------[ cut here ]------------
> > [ 41.587784] WARNING: at /home/thierry.reding/src/kernel/linux-ipmp.git/drivers/i2c/busses/i2c-
> > tegra.c:525 tegra_i2c_xfer+0x21c/0x29c()
> > [ 41.599850] Modules linked in:
> > [ 41.602927] [<c0014074>] (unwind_backtrace+0x0/0xf8) from [<c00265a8>]
> > (warn_slowpath_common+0x4c/0x64)
> > [ 41.612304] [<c00265a8>] (warn_slowpath_common+0x4c/0x64) from [<c00265dc>]
> > (warn_slowpath_null+0x1c/0x24)
> > [ 41.621947] [<c00265dc>] (warn_slowpath_null+0x1c/0x24) from [<c02a2944>]
> > (tegra_i2c_xfer+0x21c/0x29c)
> > [ 41.631244] [<c02a2944>] (tegra_i2c_xfer+0x21c/0x29c) from [<c029f5e8>] (__i2c_transfer+0x44/0x80)
> > [ 41.640192] [<c029f5e8>] (__i2c_transfer+0x44/0x80) from [<c02a0698>] (i2c_transfer+0x7c/0xb8)
> > [ 41.648796] [<c02a0698>] (i2c_transfer+0x7c/0xb8) from [<c0232a60>] (regmap_i2c_read+0x48/0x64)
> > [ 41.657485] [<c0232a60>] (regmap_i2c_read+0x48/0x64) from [<c0230304>]
> (_regmap_raw_read+0x90/0x98)
> > [ 41.666518] [<c0230304>] (_regmap_raw_read+0x90/0x98) from [<c023035c>] (_regmap_read+0x50/0xa8)
> > [ 41.675290] [<c023035c>] (_regmap_read+0x50/0xa8) from [<c02300c4>]
> (_regmap_update_bits+0x24/0x64)
> > [ 41.684322] [<c02300c4>] (_regmap_update_bits+0x24/0x64) from [<c0230b88>]
> > (regmap_update_bits+0x3c/0x58)
> > [ 41.693885] [<c0230b88>] (regmap_update_bits+0x3c/0x58) from [<c0237c30>]
> > (tps6586x_power_off+0x18/0x38)
> > [ 41.703362] [<c0237c30>] (tps6586x_power_off+0x18/0x38) from [<c000edf4>]
> > (machine_power_off+0x1c/0x24)
> > [ 41.712749] [<c000edf4>] (machine_power_off+0x1c/0x24) from [<c0037ca4>] (sys_reboot+0x138/0x1b0)
> > [ 41.721612] [<c0037ca4>] (sys_reboot+0x138/0x1b0) from [<c000e000>] (ret_fast_syscall+0x0/0x30)
> > [ 41.730293] ---[ end trace 9af366974fefa459 ]---
> > [ 41.734906] tegra-i2c tegra-i2c.3: i2c transfer timed out
> > [ 41.740689] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000
> > [ 41.740689]
> > [ 41.749823] [<c0014074>] (unwind_backtrace+0x0/0xf8) from [<c03e7090>] (panic+0x8c/0x1d8)
> > [ 41.757993] [<c03e7090>] (panic+0x8c/0x1d8) from [<c002b7b8>] (do_exit+0x694/0x750)
> > [ 41.765636] [<c002b7b8>] (do_exit+0x694/0x750) from [<c002bad0>] (do_group_exit+0x3c/0xb0)
> > [ 41.773884] [<c002bad0>] (do_group_exit+0x3c/0xb0) from [<c002bb54>] (__wake_up_parent+0x0/0x18)
>
> Thanks Thierry, I can repro this on Tegra20 inconsistently and found, if current cpu is not cpu0 when
> doing "machine_shutdown" (it will call "smp_send_stop"), i2c controller will failed to do any
> transaction (looks like gic interrupt will be disabled), I'll debug further to find out the root cause.
>
> By the way, Tegra30 is good since it will always be cpu0 when doing "machine_shutdown", I still don't
> know why it makes the difference against Tegra20 since I'm not familiar with those cpu stuffs and what
> make it behave differently, I'll study a bit, thanks.
>
I've sent the shutdown issue for discussion in ARM list: Shutdown problem in SMP system happened on Tegra20.
The cause of the i2c timeout is pretty clear now and it is not directly related to this patch, so is this
patch series acceptable? Any thoughts or comment? Thanks.

> >
> > Thierry
> >
> > * Unknown Key
> > * 0x7F3EB3A1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


swarren at wwwdotorg

Aug 24, 2012, 8:34 PM

Post #5 of 7 (73 views)
Permalink
Re: [PATCH v2 1/2] mfd: dt: tps6586x: Add power off control [In reply to]

On 08/24/2012 06:36 PM, Bill Huang wrote:
>>> On Sun, Aug 19, 2012 at 06:07:55PM -0700, Bill Huang wrote:
>>>> Add DT property "ti,system-power-controller" telling whether or not
>>>> this pmic is in charge of controlling the system power, so the power
>>>> off routine can be hooked up to system call "pm_power_off".
...
>>> I've seen the following while trying this patch applied on top of next-20120817:
>>>
>>> [ 40.581151] Power down.
>>> [ 41.583160] ------------[ cut here ]------------
>>> [ 41.587784] WARNING: at /home/thierry.reding/src/kernel/linux-ipmp.git/drivers/i2c/busses/i2c-
>>> tegra.c:525 tegra_i2c_xfer+0x21c/0x29c()
...
>> Thanks Thierry, I can repro this on Tegra20 inconsistently and found, if current cpu is not cpu0 when
>> doing "machine_shutdown" (it will call "smp_send_stop"), i2c controller will failed to do any
>> transaction (looks like gic interrupt will be disabled), I'll debug further to find out the root cause.
>>
>> By the way, Tegra30 is good since it will always be cpu0 when doing "machine_shutdown", I still don't
>> know why it makes the difference against Tegra20 since I'm not familiar with those cpu stuffs and what
>> make it behave differently, I'll study a bit, thanks.
>
> I've sent the shutdown issue for discussion in ARM list: Shutdown problem in SMP system happened on Tegra20.
> The cause of the i2c timeout is pretty clear now and it is not directly related to this patch, so is this
> patch series acceptable? Any thoughts or comment? Thanks.

I tend to agree; power off never worked without this patch, and
sometimes does with the patch, due to nothing wrong with this patch.

Bill, please do follow up on getting the underlying Tegra issue solved
somehow though. IIRC, Joseph Lo or Prashant has a patch which enabled
the config option that Russell mentioned, so the fix may just be to wait
for that patch to get finalized, but please double-check that solves it.
Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


bilhuang at nvidia

Aug 26, 2012, 10:40 PM

Post #6 of 7 (72 views)
Permalink
RE: [PATCH v2 1/2] mfd: dt: tps6586x: Add power off control [In reply to]

nvpublic
> On 08/24/2012 06:36 PM, Bill Huang wrote:
> >>> On Sun, Aug 19, 2012 at 06:07:55PM -0700, Bill Huang wrote:
> >>>> Add DT property "ti,system-power-controller" telling whether or not
> >>>> this pmic is in charge of controlling the system power, so the
> >>>> power off routine can be hooked up to system call "pm_power_off".
> ...
> >>> I've seen the following while trying this patch applied on top of next-20120817:
> >>>
> >>> [ 40.581151] Power down.
> >>> [ 41.583160] ------------[ cut here ]------------
> >>> [ 41.587784] WARNING: at /home/thierry.reding/src/kernel/linux-ipmp.git/drivers/i2c/busses/i2c-
> >>> tegra.c:525 tegra_i2c_xfer+0x21c/0x29c()
> ...
> >> Thanks Thierry, I can repro this on Tegra20 inconsistently and found,
> >> if current cpu is not cpu0 when doing "machine_shutdown" (it will
> >> call "smp_send_stop"), i2c controller will failed to do any transaction (looks like gic interrupt
> will be disabled), I'll debug further to find out the root cause.
> >>
> >> By the way, Tegra30 is good since it will always be cpu0 when doing
> >> "machine_shutdown", I still don't know why it makes the difference
> >> against Tegra20 since I'm not familiar with those cpu stuffs and what make it behave differently,
> I'll study a bit, thanks.
> >
> > I've sent the shutdown issue for discussion in ARM list: Shutdown problem in SMP system happened on
> Tegra20.
> > The cause of the i2c timeout is pretty clear now and it is not
> > directly related to this patch, so is this patch series acceptable? Any thoughts or comment? Thanks.
>
> I tend to agree; power off never worked without this patch, and sometimes does with the patch, due to
> nothing wrong with this patch.
>
> Bill, please do follow up on getting the underlying Tegra issue solved somehow though. IIRC, Joseph Lo
> or Prashant has a patch which enabled the config option that Russell mentioned, so the fix may just be
> to wait for that patch to get finalized, but please double-check that solves it.
> Thanks!

As per the shutdown issue discussion, enabling CONFIG_PM_SLEEP_SMP is the only solution and I've confirmed that fix the issue, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


bilhuang at nvidia

Sep 4, 2012, 5:28 PM

Post #7 of 7 (49 views)
Permalink
RE: [PATCH v2 1/2] mfd: dt: tps6586x: Add power off control [In reply to]

> nvpublic
> > On 08/24/2012 06:36 PM, Bill Huang wrote:
> > >>> On Sun, Aug 19, 2012 at 06:07:55PM -0700, Bill Huang wrote:
> > >>>> Add DT property "ti,system-power-controller" telling whether or
> > >>>> not this pmic is in charge of controlling the system power, so
> > >>>> the power off routine can be hooked up to system call "pm_power_off".
> > ...
> > >>> I've seen the following while trying this patch applied on top of next-20120817:
> > >>>
> > >>> [ 40.581151] Power down.
> > >>> [ 41.583160] ------------[ cut here ]------------
> > >>> [ 41.587784] WARNING: at /home/thierry.reding/src/kernel/linux-
> ipmp.git/drivers/i2c/busses/i2c-
> > >>> tegra.c:525 tegra_i2c_xfer+0x21c/0x29c()
> > ...
> > >> Thanks Thierry, I can repro this on Tegra20 inconsistently and
> > >> found, if current cpu is not cpu0 when doing "machine_shutdown" (it
> > >> will call "smp_send_stop"), i2c controller will failed to do any
> > >> transaction (looks like gic interrupt
> > will be disabled), I'll debug further to find out the root cause.
> > >>
> > >> By the way, Tegra30 is good since it will always be cpu0 when doing
> > >> "machine_shutdown", I still don't know why it makes the difference
> > >> against Tegra20 since I'm not familiar with those cpu stuffs and
> > >> what make it behave differently,
> > I'll study a bit, thanks.
> > >
> > > I've sent the shutdown issue for discussion in ARM list: Shutdown
> > > problem in SMP system happened on
> > Tegra20.
> > > The cause of the i2c timeout is pretty clear now and it is not
> > > directly related to this patch, so is this patch series acceptable? Any thoughts or comment?
> Thanks.
> >
> > I tend to agree; power off never worked without this patch, and
> > sometimes does with the patch, due to nothing wrong with this patch.
> >
> > Bill, please do follow up on getting the underlying Tegra issue solved
> > somehow though. IIRC, Joseph Lo or Prashant has a patch which enabled
> > the config option that Russell mentioned, so the fix may just be to wait for that patch to get
> finalized, but please double-check that solves it.
> > Thanks!
>
> As per the shutdown issue discussion, enabling CONFIG_PM_SLEEP_SMP is the only solution and I've
> confirmed that fix the issue, thanks.

Hi sameo,

Is there any concern on this patch series?

Thanks,
Bill
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.