From: Sylwester Nawrocki <snjw23@gmail.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-media@vger.kernel.org
Subject: Re: [PATCHv2] adp1653: make ->power() method optional
Date: Fri, 19 Aug 2011 22:30:27 +0200 [thread overview]
Message-ID: <4E4EC7E3.8030500@gmail.com> (raw)
In-Reply-To: <4E4E8C7B.7090806@iki.fi>
On 08/19/2011 06:16 PM, Sakari Ailus wrote:
> Sylwester Nawrocki wrote:
>> On 08/18/2011 09:02 PM, Sakari Ailus wrote:
>>>>>>>
>>>>>>> He-h, I guess you are not going to apply this one.
>>>>>>> The patch breaks init logic of the device. If we have no ->power(), we
>>>>>>> still need to bring the device to the known state. I have no good idea
>>>>>>> how to do this.
>>>>>>
>>>>>> I don't think it breaks anything actually. Albeit in practice one is still
>>>>>> likely to put the adp1653 reset line to the board since that lowers its power
>>>>>> consumption significantly.
>>>>> Yeah, even in practice we might see various ways of a chip connection.
>>>>>
>>>>>> Instead of being in power-up state after opening the flash subdev, it will
>>>>>> reach this state already when the system is powered up. At subdev open all
>>>>>> the relevant registers are written to anyway, so I don't see an issue here.
>>>>> You mean at first writing to the V4L2 value, do you? Because ->open()
>>>>> uses set_power() which will be skipped in case of no ->power method
>>>>> defined.
>>>>>
>>>>>> I think either this one, or one should check in probe() that the power()
>>>>>> callback is non-NULL.
>>>>>> The board code is going away in the near future so this callback will
>>>>>> disappear eventually anyway.
>>>>> So, it's up to you to include or not my last patch.
>>>>>
>>>>>> The gpio code in the board file should likely
>>>>>> be moved to the driver itself.
>>>>> The line could be different, the hw could be used in environment w/o
>>>>> gpio, but with (for example) external gate, and so on. I think current
>>>>> generic driver is pretty okay.
>>>>
>>>> Would it make sense to use the regulator API in place of the platform_data
>>>> callback? If there is only one GPIO then it's easy to create a 'fixed voltage
>>>> regulator' for this.
>>>
>>> I don't know the regulator framework very well, but do you mean creating a new
>>> regulator which just controls a gpio? It would be preferable that this wouldn't
>>> create a new driver nor add any board core.
>>
>> I'm afraid your requirements are too demanding :)
>> Yes, I meant creating a new regulator. In case the ADP1635 voltage regulator
>> is inhibited through a GPIO at a host processor such regulator would in fact
>> be only flipping a GPIO (and its driver would request the GPIO and set it into
>> a default inactive state during its initialization). But the LDO for ADP1635
>
> Thinking about this again, I think we'd need a regulator and reset gpio.
> The reset line probably can't be really modelled as a power supply, as
> the voltage provided to the chip is different from the reset line. Both
> may exist on some boards.
>
> The regulator might be a dummy one, too, as well as the reset line.
Yes, this would make the driver most complete I guess.
And the gpio API seems a natural choice for the reset signal. If there is
some 'non-standard' circuit to drive the ADP1635 pin possibly it can be
handled by some existing or dedicated gpio driver.
--
Regards,
Sylwester
next prev parent reply other threads:[~2011-08-19 20:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-18 8:53 [PATCH] adp1653: make ->power() method optional Andy Shevchenko
2011-08-18 9:21 ` Sakari Ailus
2011-08-18 10:30 ` Andy Shevchenko
2011-08-18 10:53 ` Sakari Ailus
2011-08-18 11:00 ` Andy Shevchenko
2011-08-18 11:22 ` [PATCHv2] " Andy Shevchenko
2011-08-18 11:32 ` Andy Shevchenko
2011-08-18 11:51 ` Sakari Ailus
2011-08-18 13:32 ` Andy Shevchenko
2011-08-18 13:55 ` Sakari Ailus
2011-08-18 14:08 ` Sakari Ailus
2011-08-18 17:13 ` Sylwester Nawrocki
2011-08-18 19:02 ` Sakari Ailus
2011-08-18 20:59 ` Sylwester Nawrocki
2011-08-19 16:16 ` Sakari Ailus
2011-08-19 20:24 ` Sakari Ailus
2011-08-19 20:30 ` Sylwester Nawrocki [this message]
2011-09-06 13:09 ` Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E4EC7E3.8030500@gmail.com \
--to=snjw23@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox