From: Mark Brown <broonie@kernel.org>
To: Tim Bird <tim.bird@sonymobile.com>
Cc: "lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"\"Andersson, Björn\"" <Bjorn.Andersson@sonymobile.com>
Subject: Re: [PATCH] regulator: Support different config and dev of_nodes in regulator_register
Date: Thu, 5 Feb 2015 19:27:40 +0000 [thread overview]
Message-ID: <20150205192740.GL21293@sirena.org.uk> (raw)
In-Reply-To: <54D3B858.9060103@sonymobile.com>
[-- Attachment #1: Type: text/plain, Size: 2030 bytes --]
On Thu, Feb 05, 2015 at 10:37:12AM -0800, Tim Bird wrote:
> On 02/05/2015 09:43 AM, Mark Brown wrote:
> >> Sorry - what is the "Linux MFD structure"?
> > The way we split things up into subsystems via drivers/mfd. Our set of
> > subsystems is neither fixed nor authorative.
> I'm not doing anything in drivers/mfd? Should I be?
> The charger driver is currently in drivers/power, but should it be
> moved to drivers/mfd if it's going to expose regulators as
> well as power supplies? I'm sorry, but I'm not following
> your point here. I associated this regulator with the charger
Possibly not. My reply was explaining the sorts of breakage that
allowing the DT node to be overridden is usually intended to support,
the sort of thoughtless bindings for MFDs that I'm describing is one
typical example.
> So you're saying I should have a "regulators" child node of the charger
> node, and then define the chg_otg and boost regulators under that, each
> with it's own compatible string, so that the DT code can instantiate
No, absolutely not - you should not need to put compatible strings for
individual regulators within a single device in the device tree. Please
take a look at how other devices do this - there are plenty of bindings
for existing devices in tree with matching code in the kernel.
> Or is this instantiation something I do manually in the charger probe
> routine? (That's what I'm doing now, but open coding each regulator
> individually.)
Given the way you're talking separately about there being a charger
driver and a regulator driver here it sounds like you should be creating
a MFD. The MFD subsystem exists to provide a way of mapping a single
physical device into multiple kernel subsystems which sounds like it
will be what you're trying to do here.
> Can you recommend a driver to look at that does (properly) what
> you're describing?
Most of drivers/mfd is PMICs doing this, anything recently added should
be reasonable to look at. Most of the Maxim or Wolfson devices for
example.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-02-05 19:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-04 23:19 Tim Bird
2015-02-05 1:59 ` Mark Brown
2015-02-05 17:33 ` Tim Bird
2015-02-05 17:43 ` Mark Brown
2015-02-05 18:37 ` Tim Bird
2015-02-05 19:27 ` Mark Brown [this message]
2015-02-05 22:08 ` Bjorn Andersson
2015-02-06 0:32 ` Mark Brown
2015-02-06 0:52 ` Bjorn Andersson
2015-02-06 11:49 ` Mark Brown
2015-02-06 19:56 ` Tim Bird
2015-02-11 17:21 ` Tim Bird
2015-02-12 2:32 ` 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=20150205192740.GL21293@sirena.org.uk \
--to=broonie@kernel.org \
--cc=Bjorn.Andersson@sonymobile.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tim.bird@sonymobile.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
all inboxes | Powered by JetHome®