From: Lee Jones <lee.jones@linaro.org>
To: Suman Anna <s-anna@ti.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
Tony Lindgren <tony@atomide.com>,
"ohad@wizery.com" <ohad@wizery.com>,
"kernel@stlinux.com" <kernel@stlinux.com>,
"linux-remoteproc@vger.kernel.org"
<linux-remoteproc@vger.kernel.org>,
"patrice.chotard@st.com" <patrice.chotard@st.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"ludovic.barre@st.com" <ludovic.barre@st.com>,
"ssantosh@kernel.org" <ssantosh@kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Dave Gerlach <d-gerlach@ti.com>
Subject: Re: [PATCH 1/2] remoteproc: core: Add rproc OF look-up functions
Date: Thu, 11 Aug 2016 08:31:22 +0100 [thread overview]
Message-ID: <20160811073122.GA1715@dell> (raw)
In-Reply-To: <b1a01567-7a5d-20de-a2b5-b673b9ce67ec@ti.com>
On Wed, 10 Aug 2016, Suman Anna wrote:
> On 08/10/2016 04:19 PM, Bjorn Andersson wrote:
> > On Wed 10 Aug 14:04 PDT 2016, Suman Anna wrote:
> >
> >> On 08/10/2016 03:40 PM, Bjorn Andersson wrote:
> >>> On Wed 10 Aug 12:37 PDT 2016, Suman Anna wrote:
> >>>
> >>>> Hi Lee, Bjorn,
> >>>>
> >>>> On 08/10/2016 12:40 PM, Bjorn Andersson wrote:
> >>>>> On Tue 19 Jul 08:49 PDT 2016, Lee Jones wrote:
> >>>>>
> >>>>>> - of_rproc_by_index(): look-up and obtain a reference to a rproc
> >>>>>> using the DT phandle "rprocs" and a index.
> >>>>>>
> >>>>>> - of_rproc_by_name(): lookup and obtain a reference to a rproc
> >>>>>> using the DT phandle "rprocs" and "rproc-names".
> >>>>>>
> >>>>>> Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
> >>>>>> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> >>>>>> ---
> >>>>>
> >>>>> I'm happy with this, so I whipped up a binding document describing our
> >>>>> two new properties. Waiting for an opinion on that before I merge this.
> >>>>
> >>>> Yeah, I like the two new API too, I have just about run into the need
> >>>> for the same on my product trees. We can probably make it less
> >>>> complicated than what the current series is. The wkup_m3_ipc usage was
> >>>> before there was any standardization on the property names, so we went
> >>>> with a ti, prefixed property specific to the wkup_m3_ipc node and a
> >>>> general API that is agnostic of property name. We don't have all the
> >>>> pieces for PM on AM335x/AM437x SoCs on upstream kernel yet, so we should
> >>>> be able to switch over to using the new property as we cannot achieve
> >>>> the desired functionality even though we can boot the wkup_m3.
> >>>>
> >>>
> >>> Glad to hear you're onboard with dropping the old property name, even if
> >>> it's later.
> >>>
> >>>> Here's what I propose:
> >>>> 1. Let's not burden the new of_get_rproc_by_index() API with having to
> >>>> fall-back and look for ti,rprocs. The rproc_get_by_phandle() core logic
> >>>> of looking up against the rproc list is self-contained, and the API
> >>>> usage is limited to just the wkup_m3_ipc driver at the moment.
> >>>> 2. Keep the rproc_get_by_phandle API as is but mark it as deprecated.
> >>>> IMHO, the rename of this API to of_get_rproc_by_phandle() in Patch 2 but
> >>>> using a device node pointer as input argument doesn't add any value.
> >>>> 3. Provide a fallback in wkup_m3_ipc driver to look for both rprocs and
> >>>> ti,rproc property, while switching over the node to use rprocs property.
> >>>> 4. We can get rid of the rproc_get_by_phandle() API after the
> >>>> wkup_m3_ipc transition is done to use of_get_rproc_by_index() API.
> >>>>
> >>>
> >>> I don't fancy the idea of leaving the kernel builds with a deprecation
> >>> warning for some time and I don't feel the cost of carrying those 2
> >>> extra statements is a bigger issue than keeping a deprecated API around.
> >>> And it will be less than the dance we have to do in wkup_m3_ipc.
> >>>
> >>> So I think that we should merge these patches and if it can be concluded
> >>> that we don't need backwards compatibility with the old DT property we
> >>> can drop the inner conditional in the API.
> >>
> >> Yeah, I am fine with dropping the inner ti,rproc processing in the new
> >> of_rproc_get_by_index() API and keeping it clean. What's not clear to me
> >> is why we would still need a get_by_phandle API alongside the two new
> >> API once the wkup_m3_ipc is converted to the new API? Or is it just to
> >> clean up the consumer interface? If latter, I will fixup the wkup_m3_ipc
> >> driver without the need for remoteproc core changes, and switch over to
> >> the new API.
> >>
> >
> > of_get_rproc_by_phandle() is just a convenience for not having to get by
> > index 0, as most drivers is only having one rproc.
>
> OK, then better to name this as simply of_rproc_get(), the _by_phandle()
> does not match up with the other two of_get_rproc_xxx API.
I'm not opposed to changing the call to of_rproc_get(). However, I'm
not sure what you mean about it not matching the other OF functions.
The nomenclature should be the same of_get_rproc_*(), no?
> Suggest also a rename from of_get_rproc_xxx to of_rproc_get_xxx like in
> other subsystems.
This suggestion does the opposite and does not fit in with the
majority of the of_* calls scattered around in other subsystems:
of_get_drm
of_get_coresight
of_get_fb
of_get_i2c
of_get_regulator
of_get_gpio
of_get_mac
of_get_display
of_get_videomode
Vs
of_irq_get
of_reset_get
of_graph_get
of_msi_get
of_usb_get
of_genpd_get
These guys have both oddly.
of_get_dma, of_dma_get
of_get_pci, of_pci_get
of_get_phy, of_phy_get
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
WARNING: multiple messages have this Message-ID (diff)
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] remoteproc: core: Add rproc OF look-up functions
Date: Thu, 11 Aug 2016 08:31:22 +0100 [thread overview]
Message-ID: <20160811073122.GA1715@dell> (raw)
In-Reply-To: <b1a01567-7a5d-20de-a2b5-b673b9ce67ec@ti.com>
On Wed, 10 Aug 2016, Suman Anna wrote:
> On 08/10/2016 04:19 PM, Bjorn Andersson wrote:
> > On Wed 10 Aug 14:04 PDT 2016, Suman Anna wrote:
> >
> >> On 08/10/2016 03:40 PM, Bjorn Andersson wrote:
> >>> On Wed 10 Aug 12:37 PDT 2016, Suman Anna wrote:
> >>>
> >>>> Hi Lee, Bjorn,
> >>>>
> >>>> On 08/10/2016 12:40 PM, Bjorn Andersson wrote:
> >>>>> On Tue 19 Jul 08:49 PDT 2016, Lee Jones wrote:
> >>>>>
> >>>>>> - of_rproc_by_index(): look-up and obtain a reference to a rproc
> >>>>>> using the DT phandle "rprocs" and a index.
> >>>>>>
> >>>>>> - of_rproc_by_name(): lookup and obtain a reference to a rproc
> >>>>>> using the DT phandle "rprocs" and "rproc-names".
> >>>>>>
> >>>>>> Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
> >>>>>> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> >>>>>> ---
> >>>>>
> >>>>> I'm happy with this, so I whipped up a binding document describing our
> >>>>> two new properties. Waiting for an opinion on that before I merge this.
> >>>>
> >>>> Yeah, I like the two new API too, I have just about run into the need
> >>>> for the same on my product trees. We can probably make it less
> >>>> complicated than what the current series is. The wkup_m3_ipc usage was
> >>>> before there was any standardization on the property names, so we went
> >>>> with a ti, prefixed property specific to the wkup_m3_ipc node and a
> >>>> general API that is agnostic of property name. We don't have all the
> >>>> pieces for PM on AM335x/AM437x SoCs on upstream kernel yet, so we should
> >>>> be able to switch over to using the new property as we cannot achieve
> >>>> the desired functionality even though we can boot the wkup_m3.
> >>>>
> >>>
> >>> Glad to hear you're onboard with dropping the old property name, even if
> >>> it's later.
> >>>
> >>>> Here's what I propose:
> >>>> 1. Let's not burden the new of_get_rproc_by_index() API with having to
> >>>> fall-back and look for ti,rprocs. The rproc_get_by_phandle() core logic
> >>>> of looking up against the rproc list is self-contained, and the API
> >>>> usage is limited to just the wkup_m3_ipc driver at the moment.
> >>>> 2. Keep the rproc_get_by_phandle API as is but mark it as deprecated.
> >>>> IMHO, the rename of this API to of_get_rproc_by_phandle() in Patch 2 but
> >>>> using a device node pointer as input argument doesn't add any value.
> >>>> 3. Provide a fallback in wkup_m3_ipc driver to look for both rprocs and
> >>>> ti,rproc property, while switching over the node to use rprocs property.
> >>>> 4. We can get rid of the rproc_get_by_phandle() API after the
> >>>> wkup_m3_ipc transition is done to use of_get_rproc_by_index() API.
> >>>>
> >>>
> >>> I don't fancy the idea of leaving the kernel builds with a deprecation
> >>> warning for some time and I don't feel the cost of carrying those 2
> >>> extra statements is a bigger issue than keeping a deprecated API around.
> >>> And it will be less than the dance we have to do in wkup_m3_ipc.
> >>>
> >>> So I think that we should merge these patches and if it can be concluded
> >>> that we don't need backwards compatibility with the old DT property we
> >>> can drop the inner conditional in the API.
> >>
> >> Yeah, I am fine with dropping the inner ti,rproc processing in the new
> >> of_rproc_get_by_index() API and keeping it clean. What's not clear to me
> >> is why we would still need a get_by_phandle API alongside the two new
> >> API once the wkup_m3_ipc is converted to the new API? Or is it just to
> >> clean up the consumer interface? If latter, I will fixup the wkup_m3_ipc
> >> driver without the need for remoteproc core changes, and switch over to
> >> the new API.
> >>
> >
> > of_get_rproc_by_phandle() is just a convenience for not having to get by
> > index 0, as most drivers is only having one rproc.
>
> OK, then better to name this as simply of_rproc_get(), the _by_phandle()
> does not match up with the other two of_get_rproc_xxx API.
I'm not opposed to changing the call to of_rproc_get(). However, I'm
not sure what you mean about it not matching the other OF functions.
The nomenclature should be the same of_get_rproc_*(), no?
> Suggest also a rename from of_get_rproc_xxx to of_rproc_get_xxx like in
> other subsystems.
This suggestion does the opposite and does not fit in with the
majority of the of_* calls scattered around in other subsystems:
of_get_drm
of_get_coresight
of_get_fb
of_get_i2c
of_get_regulator
of_get_gpio
of_get_mac
of_get_display
of_get_videomode
Vs
of_irq_get
of_reset_get
of_graph_get
of_msi_get
of_usb_get
of_genpd_get
These guys have both oddly.
of_get_dma, of_dma_get
of_get_pci, of_pci_get
of_get_phy, of_phy_get
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2016-08-11 7:31 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 15:49 [PATCH 1/2] remoteproc: core: Add rproc OF look-up functions Lee Jones
2016-07-19 15:49 ` Lee Jones
2016-07-19 15:49 ` [PATCH 2/2] remoteproc: core: Rework obtaining a rproc from a DT phandle Lee Jones
2016-07-19 15:49 ` Lee Jones
2016-08-10 17:15 ` Bjorn Andersson
2016-08-10 17:15 ` Bjorn Andersson
2016-08-10 18:27 ` Santosh Shilimkar
2016-08-10 18:27 ` Santosh Shilimkar
2016-08-10 20:31 ` Bjorn Andersson
2016-08-10 20:31 ` Bjorn Andersson
2016-08-11 18:40 ` Bjorn Andersson
2016-08-11 18:40 ` Bjorn Andersson
2016-08-10 17:40 ` [PATCH 1/2] remoteproc: core: Add rproc OF look-up functions Bjorn Andersson
2016-08-10 17:40 ` Bjorn Andersson
2016-08-10 19:37 ` Suman Anna
2016-08-10 19:37 ` Suman Anna
2016-08-10 20:40 ` Bjorn Andersson
2016-08-10 20:40 ` Bjorn Andersson
2016-08-10 21:04 ` Suman Anna
2016-08-10 21:04 ` Suman Anna
2016-08-10 21:19 ` Bjorn Andersson
2016-08-10 21:19 ` Bjorn Andersson
2016-08-10 22:44 ` Suman Anna
2016-08-10 22:44 ` Suman Anna
2016-08-11 7:31 ` Lee Jones [this message]
2016-08-11 7:31 ` Lee Jones
2016-08-11 16:04 ` Suman Anna
2016-08-11 16:04 ` Suman Anna
2016-08-11 16:23 ` Suman Anna
2016-08-11 16:23 ` Suman Anna
2016-08-12 16:37 ` Suman Anna
2016-08-12 16:37 ` Suman Anna
2016-08-12 18:07 ` Bjorn Andersson
2016-08-12 18:07 ` Bjorn Andersson
2016-08-12 18:45 ` Suman Anna
2016-08-12 18:45 ` Suman Anna
2016-08-15 13:55 ` Lee Jones
2016-08-15 13:55 ` Lee Jones
2016-08-11 18:23 ` Bjorn Andersson
2016-08-11 18:23 ` Bjorn Andersson
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=20160811073122.GA1715@dell \
--to=lee.jones@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=d-gerlach@ti.com \
--cc=kernel@stlinux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=ludovic.barre@st.com \
--cc=ohad@wizery.com \
--cc=patrice.chotard@st.com \
--cc=s-anna@ti.com \
--cc=ssantosh@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.