lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101005180703.GD21399@core.coreip.homeip.net>
Date:	Tue, 5 Oct 2010 11:07:03 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Igor Grinberg <grinberg@...pulab.co.il>,
	Marek Vasut <marek.vasut@...il.com>,
	linux-arm-kernel@...ts.infradead.org, vapier@...too.org,
	khilman@...prootsystems.com, linux-kernel@...r.kernel.org,
	pavel@....cz, linux-input@...r.kernel.org, eric.y.miao@...il.com,
	akpm@...ux-foundation.org
Subject: Re: [PATCH v2] Input: Make ADS7846 independent on regulator

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ