From: Mark Brown <broonie@kernel.org>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: tony@atomide.com, lgirdwood@gmail.com,
linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
grygorii.strashko@ti.com, nsekhar@ti.com, stable@vger.kernel.org,
Tero Kristo <t-kristo@ti.com>
Subject: Re: [PATCH 1/2] regulator: pbias: use untranslated address to program pbias regulator
Date: Thu, 20 Aug 2015 10:42:52 -0700 [thread overview]
Message-ID: <20150820174252.GF12027@sirena.org.uk> (raw)
In-Reply-To: <55D56ACA.1030309@ti.com>
[-- Attachment #1: Type: text/plain, Size: 2010 bytes --]
On Thu, Aug 20, 2015 at 11:21:06AM +0530, Kishon Vijay Abraham I wrote:
> On Wednesday 19 August 2015 11:41 PM, Mark Brown wrote:
> > On Tue, Aug 18, 2015 at 11:23:54AM +0530, Kishon Vijay Abraham I wrote:
Please fix your mail client to word wrap within paragraphs.
> >> platform_get_resource can be used if we need the absolute address but here we
> >> need only the offset.
> > So substract this address from the start of the resource to get the
> That would mean from the offset (provided in dt) get the absolute address and
> then again from the absolute address get the offset.
Sure, that's how the Linux APIs work right now and why I'm suggesting
you might want a wrapper.
> > offset? Or provide a wrapper function in the resource code which does
> Why not use 'of_get_address' which does the same thing? Moreover it's not a
> resource we are dealing with here. It's a resource only for the syscon driver.
This is how the OF description you've done is intended to be parsed and
hence is interpreted by the generic code, it's just a detail of the
syscon implementation that you need to translate it into an offset.
> > that. What you're saying above is pretty much "this happens to work"
> > but my concern is that the solution that happens to work isn't really
> > what we want to do.
> Not just makes this work, this is also the most reasonable solution available IMHO.
In general moving to a lower level inteface is not usually a step
forward. As far as I can tell the driver already has all the
information it needs from the more generic APIs, it's just not
interpreting it in the way that the APIs it's trying to use wants. It
just needs to fix the way it interprets the data it's passing through.
> The most ideal way would have been to use something like what Grygorii
> mentioned to use syscon = <&scm_conf 0xe00> and then use the phandle to get the
> offset. But then with this we'll be breaking older dtbs.
There is no need to break older DTs, that would clearly be a bad idea.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2015-08-20 17:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1437996250-2913-1-git-send-email-kishon@ti.com>
2015-07-27 11:24 ` [PATCH 1/2] regulator: pbias: use untranslated address to program pbias regulator Kishon Vijay Abraham I
2015-07-29 8:57 ` Grygorii Strashko
2015-08-05 9:47 ` Tony Lindgren
2015-08-05 14:56 ` Kishon Vijay Abraham I
2015-08-06 6:26 ` Tony Lindgren
2015-08-06 9:58 ` Grygorii Strashko
2015-08-14 18:00 ` Mark Brown
2015-08-18 5:53 ` Kishon Vijay Abraham I
2015-08-19 18:11 ` Mark Brown
2015-08-20 5:51 ` Kishon Vijay Abraham I
2015-08-20 17:42 ` 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=20150820174252.GF12027@sirena.org.uk \
--to=broonie@kernel.org \
--cc=grygorii.strashko@ti.com \
--cc=kishon@ti.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=stable@vger.kernel.org \
--cc=t-kristo@ti.com \
--cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).