From: Mark Brown <broonie@kernel.org>
To: "Opensource [Anthony Olech]" <anthony.olech.opensource@diasemi.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
Arnd Bergmann <arnd@arndb.de>,
Mauro Carvalho Chehab <mchehab@redhat.com>,
Steven Toth <stoth@kernellabs.com>,
Michael Krufky <mkrufky@kernellabs.com>,
LKML <linux-kernel@vger.kernel.org>,
David Dajun Chen <david.chen@diasemi.com>
Subject: Re: [NEW DRIVER V6 1/7] drivers/mfd: DA9058 MFD core driver
Date: Tue, 23 Apr 2013 11:22:04 +0100 [thread overview]
Message-ID: <20130423102204.GC5019@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <24DF37198A1E704D9811D8F72B87EB514191F6B6@NB-EX-MBX02.diasemi.com>
[-- Attachment #1: Type: text/plain, Size: 2176 bytes --]
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.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2013-04-23 10:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 16:56 [NEW DRIVER V6 1/7] drivers/mfd: DA9058 MFD core driver Anthony Olech
2013-04-22 13:34 ` Mark Brown
2013-04-23 5:08 ` Opensource [Anthony Olech]
2013-04-23 10:22 ` Mark Brown [this message]
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=20130423102204.GC5019@opensource.wolfsonmicro.com \
--to=broonie@kernel.org \
--cc=anthony.olech.opensource@diasemi.com \
--cc=arnd@arndb.de \
--cc=david.chen@diasemi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=mkrufky@kernellabs.com \
--cc=sameo@linux.intel.com \
--cc=stoth@kernellabs.com \
/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