Re: [PATCH] mfd: tps6586x: add api to power off tps6586x

From: Haojian Zhuang
Date: Mon Aug 22 2011 - 01:06:16 EST


On Mon, Aug 22, 2011 at 11:47 AM, Wei Ni <wni@xxxxxxxxxx> wrote:
> Hi, Samuel
> Thanks for your comments.
> Please check the following lines with [Wei Ni]
>
> Thanks
> Wei.
>
>
>>-----Original Message-----
>>From: Samuel Ortiz [mailto:sameo@xxxxxxxxxxxxxxx]
>>Sent: Monday, August 22, 2011 7:05 AM
>>To: Wei Ni
>>Cc: mike@xxxxxxxxxxxxxx; gking@xxxxxxxxxx; Nitin Kumbhar; linux-kernel@xxxxxxxxxxxxxxx
>>Subject: Re: [PATCH] mfd: tps6586x: add api to power off tps6586x
>>
>>Hi Wei,
>>
>>On Thu, Jul 28, 2011 at 02:30:36PM +0800, wni@xxxxxxxxxx wrote:
>>> +static struct i2c_client *tps6586x_i2c_client;
>>That's not vey nice. By doing so, you're preventing anyone to have more than
>>one of those chips in their boards.
> [Wei Ni] oh yes, I didn’t consider this issue. We use i2c_register_board_info()
> to register the tps6586x in the board file, but it didn't return the handle.
> Do you have any ideas?
>>
>>

Since there's no parameter in pm_power_off(), invoking power off
function is a known issue
for i2c devices. And we can't get i2c client in board file.

Maybe we can add a LDO mapping in regulator driver. Since power-off
function is always
customized in board file. We can disable this regulator while
power_off() is called. So even
multiple PMICs is installed in one system, we only handle the real one
to shutdown the
whole system.

Samuel & Mark,
Do you think that it's worth to do?

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