From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: AB8500 Regulators
Date: Tue, 31 Jul 2012 13:26:12 +0100 [thread overview]
Message-ID: <5017CEE4.5010602@linaro.org> (raw)
In-Reply-To: <20120731110830.GY4468@opensource.wolfsonmicro.com>
On 31/07/12 12:08, Mark Brown wrote:
> On Tue, Jul 31, 2012 at 09:46:28AM +0100, Lee Jones wrote:
>
>> Please listen to what I'm saying as a whole. Breaking that paragraph
>> up takes it entirely out of context. I'm mostly agreeing with what
>> you're saying, and asking you some advice.
>
> That's unfortunately not how it comes over (especially in the context of
> some of the other serieses), it really feels like a lot of work to find
> out what these magic register writes are supposed to do.
This isn't the same context as the other series. Previously I was trying
to reproduce what the platform was doing to get Device Tree up and
running. After you informed me that register bashing was not only the
correct thing do with regards to Device Tree, the platform shouldn't be
doing it either, I took a side-action to come back to it and do it
correctly on both counts. Well, here we are!
>> - I now know how the changing voltage API works
>> - What I don't know is where we'd call it from to initialise them
>> - Can we do that from the ab8500 regulator driver's init() or probe()?
>
> I'm surprised you've managed to miss the existing interfaces:
>
> include/linux/regulator/machine.h
> Documentation/devicetree/bindings/regulator/regulator.txt
I saw the interfaces, I just don't know what's the correct thing to do.
I'm leaving Device Tree for the moment. I'm more concerned about
addressing the problem in the AB8500 Regulator Driver and it's Platform
counterpart.
The only thing of interest that I could see was the regulator_init()
call-back. Is this what you were alluding to in the first link?
>> - WRT the 'valid' registers, I'm not sure what they do. The doc says:
>> "Supply control thru Hardware signal and SysClkReq balls validation."
>> - More comments on what the writes do individually can be seen in [1]
>> - Perhaps we can extend the API thus:
>
> These things don't tie very well. The comments in the sequences look
> reasonably meaningful but you're saying the datasheet doesn't document
> anything at all.
If it does explain what these 'valid' settings do, I can't seem to find
where. The quote a provided is about as close to explanatory as I can
find, and I'm buggered if I know what it means.
>>> + u8 valid_bank;
>>> + u8 valid_reg;
>>> + u8 valid_mask;
>>> + u8 valid_val_enable;
>
>> Then I think most (if not all) of our bases are covered.
>
> No, there's a whole series of problems here. The most serious one is
> that "valid" means nothing, we need *some* effort at semantics here.
> We're also going to run into trouble as soon as we've got to update two
> different registers.
>
> It looks like you're trying to put something vaugely like regmap patches
> into the regulator API, but it seems fairly clear that this stuff is
> board specific configuration rather than things that should be blasted
> in unconditionally on any board.
I guess we're going to have to take a rain-check until I can find
someone who can translate the documentation for me. I just can't seem to
find even a small paragraph or such which can provide me with enough
information to make any decisions.
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2012-07-31 12:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-30 13:49 AB8500 Regulators Lee Jones
2012-07-30 15:26 ` Mark Brown
2012-07-30 16:32 ` Lee Jones
2012-07-30 17:48 ` Mark Brown
2012-07-31 8:46 ` Lee Jones
2012-07-31 11:08 ` Mark Brown
2012-07-31 12:26 ` Lee Jones [this message]
2012-07-31 13:47 ` Mark Brown
2012-07-31 14:21 ` Lee Jones
2012-07-31 14:28 ` 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=5017CEE4.5010602@linaro.org \
--to=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).