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] [day] [month] [year] [list]
Date:	Tue, 23 Apr 2013 11:22:04 +0100
From:	Mark Brown <broonie@...nel.org>
To:	"Opensource [Anthony Olech]" <anthony.olech.opensource@...semi.com>
Cc:	Samuel Ortiz <sameo@...ux.intel.com>,
	Arnd Bergmann <arnd@...db.de>,
	Mauro Carvalho Chehab <mchehab@...hat.com>,
	Steven Toth <stoth@...nellabs.com>,
	Michael Krufky <mkrufky@...nellabs.com>,
	LKML <linux-kernel@...r.kernel.org>,
	David Dajun Chen <david.chen@...semi.com>
Subject: Re: [NEW DRIVER V6 1/7] drivers/mfd: DA9058 MFD core driver

On Tue, Apr 23, 2013 at 05:08:12AM +0000, Opensource [Anthony Olech] wrote:

> > No, you're totally missing the point here.  Your regulator driver needs
> > to be generic and work on any machine using the device.  This means you
> > can't specify any constraints, the constraints need to come from the
> > system integration.

> As far as I can see there are two types of constraints:-
> 1) the absolute max/min that the PMIC itself is designed for.
> 2) the max/min that the board is designed for, ie system integration.

> Thus constraints type (1) must come from the driver and constraints type (2)
> must come from the machine driver, which for my testing is the mach-smdk6410.

No, this is not the case.  We only have system design constraints in
Linux.  This should be clear from the fact that there's no mechanism for
regulator drivers to supply constraints.

> Also, I believe that two further principles apply:
> A) the machine driver should only specify a constraint if it restricts a value from (1) above.

No, this is not the case.  As you can see from looking at the code the
regulator API will only change the hardware settings if the system
integration code explicitly enables this.

> B) sensible defaults should be specified in the driver so that a system should have some
>    chance of operating in the case that the machine driver provides no constraints/overrides.

No, this is not how the API works.  There is no way to safely guess what
operations can be performed so the API defaults to doing nothing at all.

> Thus, in the case of this PMIC, the big BUCK is designed to provide power to the processor,
> so the only possible sensible default can be "boot_on == 1". It then makes sense that if a
> PMIC is to be used in the situation it is designed for, then the number of system integration 
> constraints should be almost zero.

You can't know that this is how the device has been used in a particular
system, nor can you tell what voltages are supported by the board.

> From your comment it seems that I have missed a point, but what?

You need to redo this so that it works like other regulator drivers.

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ