From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Igor Grinberg <grinberg@compulab.co.il>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Marek Vasut <marek.vasut@gmail.com>,
linux-arm-kernel@lists.infradead.org, vapier@gentoo.org,
khilman@deeprootsystems.com, linux-kernel@vger.kernel.org,
pavel@ucw.cz, linux-input@vger.kernel.org, eric.y.miao@gmail.com,
akpm@linux-foundation.org
Subject: Re: [PATCH v2] Input: Make ADS7846 independent on regulator
Date: Tue, 5 Oct 2010 09:16:08 -0700 [thread overview]
Message-ID: <20101005161608.GD19730@core.coreip.homeip.net> (raw)
In-Reply-To: <4CAACA63.6090202@compulab.co.il>
On Tue, Oct 05, 2010 at 08:49:07AM +0200, Igor Grinberg wrote:
> On 09/09/10 12:41, Mark Brown wrote:
> > On Thu, Sep 09, 2010 at 10:27:17AM +0200, Marek Vasut wrote:
> >> Dne Út 7. září 2010 14:53:35 Mark Brown napsal(a):
> >>> From a regulator API usage point of view a separate implementation of
> >>> the same thing was nacked - there are regulator API facilties for hiding
> >>> missing regulators from drivers when needed to get systems going, unless
> >>> the device genuinely can cope without supplies it should be relying on
> >>> those.
>
> I actually, don't see why ads7846 is strictly relying on the regulator
> and I don't understand, why ads7846 driver has to bail out if the regulator
> is not found? Why shouldn't the driver try to continue?
> I think it should bail out only in case communicating with the device failed.
>
> >> Maybe these platforms should have been fixed prior to applying the patch adding
> >> regulator goo into ads7846 driver then. What's the way to go now then ?
> > Fix the platforms and use the dummy regulators to keep them going until
> > that happens. It's trivial to do the hookup in the platforms.
>
> 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.
>
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.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-10-05 16:16 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 [this message]
2010-10-05 16:40 ` Mark Brown
2010-10-05 18:07 ` Dmitry Torokhov
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=20101005161608.GD19730@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=eric.y.miao@gmail.com \
--cc=grinberg@compulab.co.il \
--cc=khilman@deeprootsystems.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marek.vasut@gmail.com \
--cc=pavel@ucw.cz \
--cc=vapier@gentoo.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).