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]
Date:	Mon, 15 Jun 2009 18:17:20 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Liam Girdwood <lrg@...mlogic.co.uk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL] voltage regulator updates for 2.6.31-rc1

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.
--
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