From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] voltage regulator updates for 2.6.31-rc1
Date: Mon, 15 Jun 2009 18:17:20 +0100 [thread overview]
Message-ID: <20090615171720.GH6106@sirena.org.uk> (raw)
In-Reply-To: <alpine.LFD.2.01.0906150927390.3305@localhost.localdomain>
On Mon, Jun 15, 2009 at 09:29:54AM -0700, Linus Torvalds wrote:
> On Mon, 15 Jun 2009, Liam Girdwood wrote:
> > include/linux/regulator/lp3971.h | 51 +++
> Why the heck would "lp3971.h" be under "include/linux"? That makes no
> sense what-so-ever.
> Why isn't it just
> drivers/regulator/lp3971.c
> drivers/regulator/lp3971.h
It defines a platform data structure for the architecture code which
instantiates the driver to use to pass configuration to the driver. If
the header were in drivers/regulator then any system using one of these
regulators would need to peer into drivers/regulator in order to set up
the driver.
> instead? There is never any reason for anything but the lp3971 driver to
> include its own header file, they should _not_ be split up to be in two
> different places.
All the driver-internal definitions are included in the driver itself,
the regulator drivers have been good about not exposing this.
> In fact, why do we have a "include/linux/regulator/" at all? Does anybody
> else ever care? I doubt it.
At the minute the regulator API makes at least some platform data
mandatory for regulators (in order to tell the API what configuration
can safely be done on the regulator on a given board). This could be
changed but it seems to be working well at the minute and provides a
fairly simple and direct way of matching the configuration to the
correct regulator.
Even if the regulator API were reorganised to not require this a
noticable proportion of regulators require some tuning for things like
the passive components surrounding the regulator which would need
platform data.
next prev parent reply other threads:[~2009-06-15 17:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-15 11:24 [GIT PULL] voltage regulator updates for 2.6.31-rc1 Liam Girdwood
2009-06-15 16:29 ` Linus Torvalds
2009-06-15 17:17 ` Mark Brown [this message]
2009-06-15 17:28 ` Linus Torvalds
2009-06-15 18:04 ` 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=20090615171720.GH6106@sirena.org.uk \
--to=broonie@opensource.wolfsonmicro.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=torvalds@linux-foundation.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