From: dmitry.torokhov@gmail.com (Dmitry Torokhov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] Input: Make ADS7846 independent on regulator
Date: Tue, 5 Oct 2010 11:07:03 -0700 [thread overview]
Message-ID: <20101005180703.GD21399@core.coreip.homeip.net> (raw)
In-Reply-To: <20101005164037.GA20555@opensource.wolfsonmicro.com>
On Tue, Oct 05, 2010 at 09:40:38AM -0700, Mark Brown wrote:
> On Tue, Oct 05, 2010 at 09:16:08AM -0700, Dmitry Torokhov wrote:
> > On Tue, Oct 05, 2010 at 08:49:07AM +0200, Igor Grinberg wrote:
>
> > > You want each platform, that does not have a special regulated power supply
> > > for the ads7846, to define a dummy regulator just to cope with that artificial
> > > dependency of the device driver?
> > > I think it is a waste and big code duplication in each platform
> > > that does not have that special regulator.
>
> It's a pretty good fit for most current systems - with current hardware
> you will normally have some software control for the vast majority of
> the regulators on the board if you have regulator control at all since
> that's the way PMICs have gone. Having a complete map of the regulator
> usage in the system is useful since it allows us to do optimisations
> like powering down idle regulators much more readily.
>
> > I tend to agree, however I think that original patch that simply ignored
> > failures from regulator_get() is not the best option either. Can we have
> > a flag in platform data indicating that the board does not employ a
> > regulator? Then we could retain the hard failure in cases when we expect
> > regulator to be present while allowing to continue on boards that do not
> > have it.
>
> I really don't think it's a good idea to add this code to every single
> regulator using driver - this seems like an enormous waste of time and
> code complexity cost. I have suggested several times that we should
> extend the dummy regulator mode so that boards can enable it from code
> as well as users enable it from Kconfig, I'm not sure why everyone is so
> keen on bodging this in drivers.
It all depends on what instances you expect to encounted more often -
drivers or boards without regulators...
--
Dmitry
next prev parent reply other threads:[~2010-10-05 18:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-31 7:09 [PATCH v2] Input: Make ADS7846 independent on regulator Marek Vasut
2010-09-07 12:23 ` Igor Grinberg
2010-09-07 12:53 ` Mark Brown
2010-09-09 8:27 ` Marek Vasut
2010-09-09 9:41 ` Mark Brown
2010-10-01 0:20 ` Marek Vasut
2010-10-05 6:49 ` Igor Grinberg
2010-10-05 8:21 ` Marek Vasut
2010-10-05 16:16 ` Dmitry Torokhov
2010-10-05 16:40 ` Mark Brown
2010-10-05 18:07 ` Dmitry Torokhov [this message]
2010-10-05 18:59 ` Mark Brown
2010-10-05 19:35 ` Alan Cox
2010-10-05 20:42 ` Mark Brown
2010-10-05 22:09 ` Linus Walleij
2010-10-05 22:52 ` Mark Brown
2010-10-06 8:01 ` Linus Walleij
2010-10-06 15:14 ` Mark Brown
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=20101005180703.GD21399@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).