linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Dave Gerlach <d-gerlach@ti.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Tero Kristo <t-kristo@ti.com>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Nishanth Menon <nm@ti.com>, Keerthy <j-keerthy@ti.com>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Lokesh Vutla <lokeshvutla@ti.com>
Subject: Re: [PATCH v3 2/4] dt-bindings: Add TI SCI PM Domains
Date: Thu, 26 Jan 2017 10:00:32 -0600	[thread overview]
Message-ID: <CAL_JsqLQrJkJ6Z6fTRdZyxoefDaxistsipf6smt8eG-Lue0Q9A@mail.gmail.com> (raw)
In-Reply-To: <fec2e1b2-df90-e9ba-4925-ecdc12d696b9@ti.com>

On Thu, Jan 26, 2017 at 9:09 AM, Dave Gerlach <d-gerlach@ti.com> wrote:
> On 01/25/2017 04:32 PM, Rob Herring wrote:
>>
>> On Wed, Jan 25, 2017 at 10:59 AM, Dave Gerlach <d-gerlach@ti.com> wrote:

[...]

>>> because genpd_xlate_simple only checks that the phandle is zero so that
>>> it
>>> can fail if it is not, but there's no functional reason it needs to do
>>> this.
>>> The genpd framework works as it did before no matter what the cells are
>>> set
>>> to if using of_genpd_add_provider_simple. Then in the attach_dev callback
>>> inside the ti_sci_pm_domains driver instead of doing
>>>
>>>         ret = of_property_read_u32(np, "ti,sci-id", &idx);
>>>
>>> to read the ti,sc-id for a device into idx we can now do:
>>>
>>>        ret = of_parse_phandle_with_args(np, "power-domains",
>>>                                    "#power-domain-cells", 0, &pd_args);
>>>        idx = pd_args.args[0];
>>>
>>> or even simpler from within our driver
>>>
>>>         ret = of_property_read_u32_index(np, "power-domains", 1, &idx);
>>
>>
>> This you should not be doing. The client driver shouldn't care how
>> many cells or what their values are.
>
>
> Client drivers in other places use xlate functions, like in the
> drivers/reset framework, to interpret the cells. Is doing it this way really
> that different?

Oh, I was thinking the client driver, not the power domain controller
driver. NM.

Rob

  reply	other threads:[~2017-01-26 16:56 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 20:55 [PATCH v3 0/4] ARM: K2G: Add support for TI-SCI Generic PM Domains Dave Gerlach
2017-01-04 20:55 ` [PATCH v3 1/4] PM / Domains: Add generic data pointer to genpd data struct Dave Gerlach
2017-01-04 20:55 ` [PATCH v3 2/4] dt-bindings: Add TI SCI PM Domains Dave Gerlach
2017-01-09 17:50   ` Rob Herring
2017-01-09 17:57     ` Dave Gerlach
2017-01-11 21:34       ` Rob Herring
2017-01-12 15:27         ` Dave Gerlach
2017-01-13 19:25           ` Rob Herring
2017-01-13 20:28             ` Dave Gerlach
2017-01-14  2:40               ` Rob Herring
2017-01-16 22:12                 ` Dave Gerlach
2017-01-17  7:48                   ` Tero Kristo
2017-01-17 23:37                     ` Rob Herring
2017-01-18  0:07                     ` Kevin Hilman
2017-01-18 23:03                       ` Rob Herring
2017-01-20 14:00                         ` Ulf Hansson
2017-01-20 14:18                           ` Sudeep Holla
2017-01-20 14:20                           ` Dave Gerlach
2017-01-20 16:52                             ` Ulf Hansson
2017-01-23 20:11                               ` Dave Gerlach
2017-01-24 10:03                                 ` Ulf Hansson
2017-01-25 16:59                                   ` Dave Gerlach
2017-01-25 21:13                                     ` Ulf Hansson
2017-01-25 22:32                                     ` Rob Herring
2017-01-26 15:09                                       ` Dave Gerlach
2017-01-26 16:00                                         ` Rob Herring [this message]
2017-01-04 20:55 ` [PATCH v3 3/4] soc: ti: Add ti_sci_pm_domains driver Dave Gerlach
2017-01-04 20:55 ` [PATCH v3 4/4] ARM: keystone: Drop PM domain support for k2g Dave Gerlach
2017-01-04 21:54 ` [PATCH v3 0/4] ARM: K2G: Add support for TI-SCI Generic PM Domains Santosh Shilimkar
2017-01-04 22:06   ` Dave Gerlach
2017-01-19 17:51     ` santosh.shilimkar
2017-01-19 18:59       ` Dave Gerlach
2017-01-19 19:04         ` Santosh Shilimkar

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=CAL_JsqLQrJkJ6Z6fTRdZyxoefDaxistsipf6smt8eG-Lue0Q9A@mail.gmail.com \
    --to=robh@kernel.org \
    --cc=d-gerlach@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=j-keerthy@ti.com \
    --cc=khilman@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lokeshvutla@ti.com \
    --cc=nm@ti.com \
    --cc=rjw@rjwysocki.net \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=ssantosh@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=t-kristo@ti.com \
    --cc=ulf.hansson@linaro.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).