Message ID | 1466058085-19353-1-git-send-email-oss@buserror.net (mailing list archive) |
---|---|
State | Deferred, archived |
Headers | show |
Hi, This patch is acked by clock maintainer. If no comments from anyone else, we will merge it in next week. Thanks, Yuantian > -----Original Message----- > From: Scott Wood [mailto:oss@buserror.net] > Sent: Thursday, June 16, 2016 2:21 PM > To: Russell King <linux@armlinux.org.uk>; Michael Turquette > <mturquette@baylibre.com>; Stephen Boyd <sboyd@codeaurora.org>; > Viresh Kumar <viresh.kumar@linaro.org>; Rafael J. Wysocki > <rjw@rjwysocki.net> > Cc: linux-clk@vger.kernel.org; linux-pm@vger.kernel.org; linuxppc- > dev@lists.ozlabs.org; Yuantian Tang <yuantian.tang@nxp.com>; Yang-Leo Li > <leoyang.li@nxp.com>; Xiaofeng Ren <xiaofeng.ren@nxp.com>; Scott Wood > <scottwood@freescale.com> > Subject: [PATCH v3 1/2] clk: Add consumer APIs for discovering possible > parent clocks > > From: Scott Wood <scottwood@freescale.com> > > Commit fc4a05d4b0eb ("clk: Remove unused provider APIs") removed > __clk_get_num_parents() and clk_hw_get_parent_by_index(), leaving only > true provider API versions that operate on struct clk_hw. > > qoriq-cpufreq needs these functions in order to determine the options it has > for calling clk_set_parent() and thus populate the cpufreq table, so revive > them as legitimate consumer APIs. > > Signed-off-by: Scott Wood <scottwood@freescale.com> > --- > v2: Add missing 'static inline' to stub functions. > > v3: no changes > > drivers/clk/clk.c | 19 +++++++++++++++++++ > include/linux/clk.h | 31 +++++++++++++++++++++++++++++++ > 2 files changed, 50 insertions(+) > > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index d584004..d61a3fe 100644 > --- a/drivers/clk/clk.c > +++ b/drivers/clk/clk.c > @@ -290,6 +290,12 @@ struct clk_hw *__clk_get_hw(struct clk *clk) } > EXPORT_SYMBOL_GPL(__clk_get_hw); > > +unsigned int clk_get_num_parents(struct clk *clk) { > + return !clk ? 0 : clk->core->num_parents; } > +EXPORT_SYMBOL_GPL(clk_get_num_parents); > + > unsigned int clk_hw_get_num_parents(const struct clk_hw *hw) { > return hw->core->num_parents; > @@ -358,6 +364,19 @@ static struct clk_core > *clk_core_get_parent_by_index(struct clk_core *core, > return core->parents[index]; > } > > +struct clk *clk_get_parent_by_index(struct clk *clk, unsigned int > +index) { > + struct clk_core *parent; > + > + if (!clk) > + return NULL; > + > + parent = clk_core_get_parent_by_index(clk->core, index); > + > + return !parent ? NULL : parent->hw->clk; } > +EXPORT_SYMBOL_GPL(clk_get_parent_by_index); > + > struct clk_hw * > clk_hw_get_parent_by_index(const struct clk_hw *hw, unsigned int index) > { diff --git a/include/linux/clk.h b/include/linux/clk.h index 0df4a51..acd115f > 100644 > --- a/include/linux/clk.h > +++ b/include/linux/clk.h > @@ -392,6 +392,26 @@ int clk_set_parent(struct clk *clk, struct clk *parent); > struct clk *clk_get_parent(struct clk *clk); > > /** > + * clk_get_parent_by_index - get a possible parent clock by index > + * @clk: clock source > + * @index: index into the array of possible parents of this clock > + * > + * Returns struct clk corresponding to the requested possible > + * parent clock source, or NULL. > + */ > +struct clk *clk_get_parent_by_index(struct clk *clk, > + unsigned int index); > + > +/** > + * clk_get_num_parents - get number of possible parents > + * @clk: clock source > + * > + * Returns the number of possible parents of this clock, > + * which can then be enumerated using clk_get_parent_by_index(). > + */ > +unsigned int clk_get_num_parents(struct clk *clk); > + > +/** > * clk_get_sys - get a clock based upon the device name > * @dev_id: device name > * @con_id: connection ID > @@ -461,6 +481,17 @@ static inline struct clk *clk_get_parent(struct clk *clk) > return NULL; > } > > +static inline struct clk *clk_get_parent_by_index(struct clk *clk, > + unsigned int index) > +{ > + return NULL; > +} > + > +static inline unsigned int clk_get_num_parents(struct clk *clk) { > + return 0; > +} > + > #endif > > /* clk_prepare_enable helps cases using clk_enable in non-atomic context. > */ > -- > 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wednesday, June 29, 2016 05:50:26 AM Yuantian Tang wrote: > Hi, > > This patch is acked by clock maintainer. If no comments from anyone else, we will merge it in next week. There is a cpufreq commit depending on it. Are you going to handle that one too? Thanks, Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBSYWZhZWwgSi4gV3lzb2NraSBb bWFpbHRvOnJqd0Byand5c29ja2kubmV0XQ0KPiBTZW50OiBUaHVyc2RheSwgSnVuZSAzMCwgMjAx NiA5OjQ3IEFNDQo+IFRvOiBZdWFudGlhbiBUYW5nIDx5dWFudGlhbi50YW5nQG54cC5jb20+DQo+ IENjOiBTY290dCBXb29kIDxvc3NAYnVzZXJyb3IubmV0PjsgUnVzc2VsbCBLaW5nIDxsaW51eEBh cm1saW51eC5vcmcudWs+Ow0KPiBNaWNoYWVsIFR1cnF1ZXR0ZSA8bXR1cnF1ZXR0ZUBiYXlsaWJy ZS5jb20+OyBTdGVwaGVuIEJveWQNCj4gPHNib3lkQGNvZGVhdXJvcmEub3JnPjsgVmlyZXNoIEt1 bWFyIDx2aXJlc2gua3VtYXJAbGluYXJvLm9yZz47IGxpbnV4LQ0KPiBjbGtAdmdlci5rZXJuZWwu b3JnOyBsaW51eC1wbUB2Z2VyLmtlcm5lbC5vcmc7IGxpbnV4cHBjLQ0KPiBkZXZAbGlzdHMub3ps YWJzLm9yZzsgWWFuZy1MZW8gTGkgPGxlb3lhbmcubGlAbnhwLmNvbT47IFhpYW9mZW5nIFJlbg0K PiA8eGlhb2ZlbmcucmVuQG54cC5jb20+OyBTY290dCBXb29kIDxzY290dHdvb2RAZnJlZXNjYWxl LmNvbT4NCj4gU3ViamVjdDogUmU6IFtQQVRDSCB2MyAxLzJdIGNsazogQWRkIGNvbnN1bWVyIEFQ SXMgZm9yIGRpc2NvdmVyaW5nIHBvc3NpYmxlDQo+IHBhcmVudCBjbG9ja3MNCj4gDQo+IE9uIFdl ZG5lc2RheSwgSnVuZSAyOSwgMjAxNiAwNTo1MDoyNiBBTSBZdWFudGlhbiBUYW5nIHdyb3RlOg0K PiA+IEhpLA0KPiA+DQo+ID4gVGhpcyBwYXRjaCBpcyBhY2tlZCBieSBjbG9jayBtYWludGFpbmVy LiBJZiBubyBjb21tZW50cyBmcm9tIGFueW9uZSBlbHNlLA0KPiB3ZSB3aWxsIG1lcmdlIGl0IGlu IG5leHQgd2Vlay4NCj4gDQo+IFRoZXJlIGlzIGEgY3B1ZnJlcSBjb21taXQgZGVwZW5kaW5nIG9u IGl0LiAgQXJlIHlvdSBnb2luZyB0byBoYW5kbGUgdGhhdCBvbmUNCj4gdG9vPw0KPiANClRoYXQg b25lIGhhcyBiZWVuIGFja2VkIGJ5IGNwdWZyZXEgbWFpbnRhaW5lci4gWW91IGNhbiBnZXQgdGhp cyBmcm9tIHBhdGNoIGNvbW1lbnRzLg0KDQpSZWdhcmRzLA0KWXVhbnRpYW4NCg0KUmUNCj4gVGhh bmtzLA0KPiBSYWZhZWwNCg0K -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thursday, June 30, 2016 01:47:09 AM Yuantian Tang wrote: > > -----Original Message----- > > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > > Sent: Thursday, June 30, 2016 9:47 AM > > To: Yuantian Tang <yuantian.tang@nxp.com> > > Cc: Scott Wood <oss@buserror.net>; Russell King <linux@armlinux.org.uk>; > > Michael Turquette <mturquette@baylibre.com>; Stephen Boyd > > <sboyd@codeaurora.org>; Viresh Kumar <viresh.kumar@linaro.org>; linux- > > clk@vger.kernel.org; linux-pm@vger.kernel.org; linuxppc- > > dev@lists.ozlabs.org; Yang-Leo Li <leoyang.li@nxp.com>; Xiaofeng Ren > > <xiaofeng.ren@nxp.com>; Scott Wood <scottwood@freescale.com> > > Subject: Re: [PATCH v3 1/2] clk: Add consumer APIs for discovering possible > > parent clocks > > > > On Wednesday, June 29, 2016 05:50:26 AM Yuantian Tang wrote: > > > Hi, > > > > > > This patch is acked by clock maintainer. If no comments from anyone else, > > we will merge it in next week. > > > > There is a cpufreq commit depending on it. Are you going to handle that one > > too? > > > That one has been acked by cpufreq maintainer. You can get this from patch comments. I know that it has been ACKed. My question is whether or not you are going to apply it along the [1/2]. If not, it will have to be deferred until the [1/2] is merged and then applied which may not be desirable. Thanks, Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> -----Original Message----- > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > Sent: Thursday, June 30, 2016 10:24 AM > To: Yuantian Tang <yuantian.tang@nxp.com> > Cc: Scott Wood <oss@buserror.net>; Russell King <linux@armlinux.org.uk>; > Michael Turquette <mturquette@baylibre.com>; Stephen Boyd > <sboyd@codeaurora.org>; Viresh Kumar <viresh.kumar@linaro.org>; linux- > clk@vger.kernel.org; linux-pm@vger.kernel.org; linuxppc- > dev@lists.ozlabs.org; Yang-Leo Li <leoyang.li@nxp.com>; Xiaofeng Ren > <xiaofeng.ren@nxp.com>; Scott Wood <scottwood@freescale.com> > Subject: Re: [PATCH v3 1/2] clk: Add consumer APIs for discovering possible > parent clocks > > On Thursday, June 30, 2016 01:47:09 AM Yuantian Tang wrote: > > > -----Original Message----- > > > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > > > Sent: Thursday, June 30, 2016 9:47 AM > > > To: Yuantian Tang <yuantian.tang@nxp.com> > > > Cc: Scott Wood <oss@buserror.net>; Russell King > > > <linux@armlinux.org.uk>; Michael Turquette > > > <mturquette@baylibre.com>; Stephen Boyd <sboyd@codeaurora.org>; > > > Viresh Kumar <viresh.kumar@linaro.org>; linux- clk@vger.kernel.org; > > > linux-pm@vger.kernel.org; linuxppc- dev@lists.ozlabs.org; Yang-Leo > > > Li <leoyang.li@nxp.com>; Xiaofeng Ren <xiaofeng.ren@nxp.com>; Scott > > > Wood <scottwood@freescale.com> > > > Subject: Re: [PATCH v3 1/2] clk: Add consumer APIs for discovering > > > possible parent clocks > > > > > > On Wednesday, June 29, 2016 05:50:26 AM Yuantian Tang wrote: > > > > Hi, > > > > > > > > This patch is acked by clock maintainer. If no comments from > > > > anyone else, > > > we will merge it in next week. > > > > > > There is a cpufreq commit depending on it. Are you going to handle > > > that one too? > > > > > That one has been acked by cpufreq maintainer. You can get this from > patch comments. > > I know that it has been ACKed. > > My question is whether or not you are going to apply it along the [1/2]. > > If not, it will have to be deferred until the [1/2] is merged and then applied > which may not be desirable. > I hope we can apply both at same time. Seems Scott has a few concerns. What you think about this patch? Can you apply it? If you have applied this patch, then I can push CPUfreq maintainer to apply another one which will be delayed. Regards, Yuantian > Thanks, > Rafael
On 06/29/2016 10:02 PM, Yuantian Tang wrote: >> -----Original Message----- >> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] >> Sent: Thursday, June 30, 2016 10:24 AM >> To: Yuantian Tang <yuantian.tang@nxp.com> >> Cc: Scott Wood <oss@buserror.net>; Russell King <linux@armlinux.org.uk>; >> Michael Turquette <mturquette@baylibre.com>; Stephen Boyd >> <sboyd@codeaurora.org>; Viresh Kumar <viresh.kumar@linaro.org>; linux- >> clk@vger.kernel.org; linux-pm@vger.kernel.org; linuxppc- >> dev@lists.ozlabs.org; Yang-Leo Li <leoyang.li@nxp.com>; Xiaofeng Ren >> <xiaofeng.ren@nxp.com>; Scott Wood <scottwood@freescale.com> >> Subject: Re: [PATCH v3 1/2] clk: Add consumer APIs for discovering possible >> parent clocks >> >> On Thursday, June 30, 2016 01:47:09 AM Yuantian Tang wrote: >>>> -----Original Message----- >>>> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] >>>> Sent: Thursday, June 30, 2016 9:47 AM >>>> To: Yuantian Tang <yuantian.tang@nxp.com> >>>> Cc: Scott Wood <oss@buserror.net>; Russell King >>>> <linux@armlinux.org.uk>; Michael Turquette >>>> <mturquette@baylibre.com>; Stephen Boyd <sboyd@codeaurora.org>; >>>> Viresh Kumar <viresh.kumar@linaro.org>; linux- clk@vger.kernel.org; >>>> linux-pm@vger.kernel.org; linuxppc- dev@lists.ozlabs.org; Yang-Leo >>>> Li <leoyang.li@nxp.com>; Xiaofeng Ren <xiaofeng.ren@nxp.com>; Scott >>>> Wood <scottwood@freescale.com> >>>> Subject: Re: [PATCH v3 1/2] clk: Add consumer APIs for discovering >>>> possible parent clocks >>>> >>>> On Wednesday, June 29, 2016 05:50:26 AM Yuantian Tang wrote: >>>>> Hi, >>>>> >>>>> This patch is acked by clock maintainer. If no comments from >>>>> anyone else, >>>> we will merge it in next week. >>>> >>>> There is a cpufreq commit depending on it. Are you going to handle >>>> that one too? >>>> >>> That one has been acked by cpufreq maintainer. You can get this from >> patch comments. >> >> I know that it has been ACKed. >> >> My question is whether or not you are going to apply it along the [1/2]. >> >> If not, it will have to be deferred until the [1/2] is merged and then applied >> which may not be desirable. >> > I hope we can apply both at same time. Seems Scott has a few concerns. > > What you think about this patch? Can you apply it? > If you have applied this patch, then I can push CPUfreq maintainer to apply another one which will be delayed. My only concern was getting an ack for this patch (1/2) -- did I miss it somewhere? -Scott -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thursday, June 30, 2016 05:46:42 AM Scott Wood wrote: > On 06/29/2016 10:02 PM, Yuantian Tang wrote: > >> -----Original Message----- > >> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > >> Sent: Thursday, June 30, 2016 10:24 AM > >> To: Yuantian Tang <yuantian.tang@nxp.com> > >> Cc: Scott Wood <oss@buserror.net>; Russell King <linux@armlinux.org.uk>; > >> Michael Turquette <mturquette@baylibre.com>; Stephen Boyd > >> <sboyd@codeaurora.org>; Viresh Kumar <viresh.kumar@linaro.org>; linux- > >> clk@vger.kernel.org; linux-pm@vger.kernel.org; linuxppc- > >> dev@lists.ozlabs.org; Yang-Leo Li <leoyang.li@nxp.com>; Xiaofeng Ren > >> <xiaofeng.ren@nxp.com>; Scott Wood <scottwood@freescale.com> > >> Subject: Re: [PATCH v3 1/2] clk: Add consumer APIs for discovering possible > >> parent clocks > >> > >> On Thursday, June 30, 2016 01:47:09 AM Yuantian Tang wrote: > >>>> -----Original Message----- > >>>> From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > >>>> Sent: Thursday, June 30, 2016 9:47 AM > >>>> To: Yuantian Tang <yuantian.tang@nxp.com> > >>>> Cc: Scott Wood <oss@buserror.net>; Russell King > >>>> <linux@armlinux.org.uk>; Michael Turquette > >>>> <mturquette@baylibre.com>; Stephen Boyd <sboyd@codeaurora.org>; > >>>> Viresh Kumar <viresh.kumar@linaro.org>; linux- clk@vger.kernel.org; > >>>> linux-pm@vger.kernel.org; linuxppc- dev@lists.ozlabs.org; Yang-Leo > >>>> Li <leoyang.li@nxp.com>; Xiaofeng Ren <xiaofeng.ren@nxp.com>; Scott > >>>> Wood <scottwood@freescale.com> > >>>> Subject: Re: [PATCH v3 1/2] clk: Add consumer APIs for discovering > >>>> possible parent clocks > >>>> > >>>> On Wednesday, June 29, 2016 05:50:26 AM Yuantian Tang wrote: > >>>>> Hi, > >>>>> > >>>>> This patch is acked by clock maintainer. If no comments from > >>>>> anyone else, > >>>> we will merge it in next week. > >>>> > >>>> There is a cpufreq commit depending on it. Are you going to handle > >>>> that one too? > >>>> > >>> That one has been acked by cpufreq maintainer. You can get this from > >> patch comments. > >> > >> I know that it has been ACKed. > >> > >> My question is whether or not you are going to apply it along the [1/2]. > >> > >> If not, it will have to be deferred until the [1/2] is merged and then applied > >> which may not be desirable. > >> > > I hope we can apply both at same time. Seems Scott has a few concerns. > > > > What you think about this patch? Can you apply it? > > If you have applied this patch, then I can push CPUfreq maintainer to apply another one which will be delayed. > > My only concern was getting an ack for this patch (1/2) -- did I miss it > somewhere? OK, so who's going to apply the series? Thanks, Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 2016-06-30 at 15:29 +0200, Rafael J. Wysocki wrote: > On Thursday, June 30, 2016 05:46:42 AM Scott Wood wrote: > > > > On 06/29/2016 10:02 PM, Yuantian Tang wrote: > > > > > > > > > > > -----Original Message----- > > > > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > > > > Sent: Thursday, June 30, 2016 10:24 AM > > > > To: Yuantian Tang <yuantian.tang@nxp.com> > > > > Cc: Scott Wood <oss@buserror.net>; Russell King <linux@armlinux.org.uk > > > > >; > > > > Michael Turquette <mturquette@baylibre.com>; Stephen Boyd > > > > <sboyd@codeaurora.org>; Viresh Kumar <viresh.kumar@linaro.org>; linux- > > > > clk@vger.kernel.org; linux-pm@vger.kernel.org; linuxppc- > > > > dev@lists.ozlabs.org; Yang-Leo Li <leoyang.li@nxp.com>; Xiaofeng Ren > > > > <xiaofeng.ren@nxp.com>; Scott Wood <scottwood@freescale.com> > > > > Subject: Re: [PATCH v3 1/2] clk: Add consumer APIs for discovering > > > > possible > > > > parent clocks > > > > > > > > On Thursday, June 30, 2016 01:47:09 AM Yuantian Tang wrote: > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > > > > > > Sent: Thursday, June 30, 2016 9:47 AM > > > > > > To: Yuantian Tang <yuantian.tang@nxp.com> > > > > > > Cc: Scott Wood <oss@buserror.net>; Russell King > > > > > > <linux@armlinux.org.uk>; Michael Turquette > > > > > > <mturquette@baylibre.com>; Stephen Boyd <sboyd@codeaurora.org>; > > > > > > Viresh Kumar <viresh.kumar@linaro.org>; linux- clk@vger.kernel.org > > > > > > ; > > > > > > linux-pm@vger.kernel.org; linuxppc- dev@lists.ozlabs.org; Yang-Leo > > > > > > Li <leoyang.li@nxp.com>; Xiaofeng Ren <xiaofeng.ren@nxp.com>; > > > > > > Scott > > > > > > Wood <scottwood@freescale.com> > > > > > > Subject: Re: [PATCH v3 1/2] clk: Add consumer APIs for discovering > > > > > > possible parent clocks > > > > > > > > > > > > On Wednesday, June 29, 2016 05:50:26 AM Yuantian Tang wrote: > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > This patch is acked by clock maintainer. If no comments from > > > > > > > anyone else, > > > > > > we will merge it in next week. > > > > > > > > > > > > There is a cpufreq commit depending on it. Are you going to > > > > > > handle > > > > > > that one too? > > > > > > > > > > > That one has been acked by cpufreq maintainer. You can get this from > > > > patch comments. > > > > > > > > I know that it has been ACKed. > > > > > > > > My question is whether or not you are going to apply it along the > > > > [1/2]. > > > > > > > > If not, it will have to be deferred until the [1/2] is merged and then > > > > applied > > > > which may not be desirable. > > > > > > > I hope we can apply both at same time. Seems Scott has a few concerns. > > > > > > What you think about this patch? Can you apply it? > > > If you have applied this patch, then I can push CPUfreq maintainer to > > > apply another one which will be delayed. > > My only concern was getting an ack for this patch (1/2) -- did I miss it > > somewhere? > OK, so who's going to apply the series? Ideally it should go via the cpufreq tree. -Scott -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Friday, July 01, 2016 01:55:46 AM Scott Wood wrote: > On Thu, 2016-06-30 at 15:29 +0200, Rafael J. Wysocki wrote: > > On Thursday, June 30, 2016 05:46:42 AM Scott Wood wrote: > > > > > > On 06/29/2016 10:02 PM, Yuantian Tang wrote: > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > > > > > Sent: Thursday, June 30, 2016 10:24 AM > > > > > To: Yuantian Tang <yuantian.tang@nxp.com> > > > > > Cc: Scott Wood <oss@buserror.net>; Russell King <linux@armlinux.org.uk > > > > > >; > > > > > Michael Turquette <mturquette@baylibre.com>; Stephen Boyd > > > > > <sboyd@codeaurora.org>; Viresh Kumar <viresh.kumar@linaro.org>; linux- > > > > > clk@vger.kernel.org; linux-pm@vger.kernel.org; linuxppc- > > > > > dev@lists.ozlabs.org; Yang-Leo Li <leoyang.li@nxp.com>; Xiaofeng Ren > > > > > <xiaofeng.ren@nxp.com>; Scott Wood <scottwood@freescale.com> > > > > > Subject: Re: [PATCH v3 1/2] clk: Add consumer APIs for discovering > > > > > possible > > > > > parent clocks > > > > > > > > > > On Thursday, June 30, 2016 01:47:09 AM Yuantian Tang wrote: > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > > > > > > > Sent: Thursday, June 30, 2016 9:47 AM > > > > > > > To: Yuantian Tang <yuantian.tang@nxp.com> > > > > > > > Cc: Scott Wood <oss@buserror.net>; Russell King > > > > > > > <linux@armlinux.org.uk>; Michael Turquette > > > > > > > <mturquette@baylibre.com>; Stephen Boyd <sboyd@codeaurora.org>; > > > > > > > Viresh Kumar <viresh.kumar@linaro.org>; linux- clk@vger.kernel.org > > > > > > > ; > > > > > > > linux-pm@vger.kernel.org; linuxppc- dev@lists.ozlabs.org; Yang-Leo > > > > > > > Li <leoyang.li@nxp.com>; Xiaofeng Ren <xiaofeng.ren@nxp.com>; > > > > > > > Scott > > > > > > > Wood <scottwood@freescale.com> > > > > > > > Subject: Re: [PATCH v3 1/2] clk: Add consumer APIs for discovering > > > > > > > possible parent clocks > > > > > > > > > > > > > > On Wednesday, June 29, 2016 05:50:26 AM Yuantian Tang wrote: > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > This patch is acked by clock maintainer. If no comments from > > > > > > > > anyone else, > > > > > > > we will merge it in next week. > > > > > > > > > > > > > > There is a cpufreq commit depending on it. Are you going to > > > > > > > handle > > > > > > > that one too? > > > > > > > > > > > > > That one has been acked by cpufreq maintainer. You can get this from > > > > > patch comments. > > > > > > > > > > I know that it has been ACKed. > > > > > > > > > > My question is whether or not you are going to apply it along the > > > > > [1/2]. > > > > > > > > > > If not, it will have to be deferred until the [1/2] is merged and then > > > > > applied > > > > > which may not be desirable. > > > > > > > > > I hope we can apply both at same time. Seems Scott has a few concerns. > > > > > > > > What you think about this patch? Can you apply it? > > > > If you have applied this patch, then I can push CPUfreq maintainer to > > > > apply another one which will be delayed. > > > My only concern was getting an ack for this patch (1/2) -- did I miss it > > > somewhere? > > OK, so who's going to apply the series? > > Ideally it should go via the cpufreq tree. OK, I'll apply both, then. Who exactly has ACKed the [1/2] from the clk side? Thanks, Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, 2016-07-01 at 22:53 +0200, Rafael J. Wysocki wrote: > On Friday, July 01, 2016 01:55:46 AM Scott Wood wrote: > > > > On Thu, 2016-06-30 at 15:29 +0200, Rafael J. Wysocki wrote: > > > > > > On Thursday, June 30, 2016 05:46:42 AM Scott Wood wrote: > > > > > > > > > > > > On 06/29/2016 10:02 PM, Yuantian Tang wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > > > > > > Sent: Thursday, June 30, 2016 10:24 AM > > > > > > To: Yuantian Tang <yuantian.tang@nxp.com> > > > > > > Cc: Scott Wood <oss@buserror.net>; Russell King <linux@armlinux.or > > > > > > g.uk > > > > > > > > > > > > > > ; > > > > > > Michael Turquette <mturquette@baylibre.com>; Stephen Boyd > > > > > > <sboyd@codeaurora.org>; Viresh Kumar <viresh.kumar@linaro.org>; > > > > > > linux- > > > > > > clk@vger.kernel.org; linux-pm@vger.kernel.org; linuxppc- > > > > > > dev@lists.ozlabs.org; Yang-Leo Li <leoyang.li@nxp.com>; Xiaofeng > > > > > > Ren > > > > > > <xiaofeng.ren@nxp.com>; Scott Wood <scottwood@freescale.com> > > > > > > Subject: Re: [PATCH v3 1/2] clk: Add consumer APIs for discovering > > > > > > possible > > > > > > parent clocks > > > > > > > > > > > > On Thursday, June 30, 2016 01:47:09 AM Yuantian Tang wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > > > > > > > > Sent: Thursday, June 30, 2016 9:47 AM > > > > > > > > To: Yuantian Tang <yuantian.tang@nxp.com> > > > > > > > > Cc: Scott Wood <oss@buserror.net>; Russell King > > > > > > > > <linux@armlinux.org.uk>; Michael Turquette > > > > > > > > <mturquette@baylibre.com>; Stephen Boyd <sboyd@codeaurora.org> > > > > > > > > ; > > > > > > > > Viresh Kumar <viresh.kumar@linaro.org>; linux- clk@vger.kernel > > > > > > > > .org > > > > > > > > ; > > > > > > > > linux-pm@vger.kernel.org; linuxppc- dev@lists.ozlabs.org; > > > > > > > > Yang-Leo > > > > > > > > Li <leoyang.li@nxp.com>; Xiaofeng Ren <xiaofeng.ren@nxp.com>; > > > > > > > > Scott > > > > > > > > Wood <scottwood@freescale.com> > > > > > > > > Subject: Re: [PATCH v3 1/2] clk: Add consumer APIs for > > > > > > > > discovering > > > > > > > > possible parent clocks > > > > > > > > > > > > > > > > On Wednesday, June 29, 2016 05:50:26 AM Yuantian Tang wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > This patch is acked by clock maintainer. If no comments from > > > > > > > > > anyone else, > > > > > > > > we will merge it in next week. > > > > > > > > > > > > > > > > There is a cpufreq commit depending on it. Are you going to > > > > > > > > handle > > > > > > > > that one too? > > > > > > > > > > > > > > > That one has been acked by cpufreq maintainer. You can get this > > > > > > > from > > > > > > patch comments. > > > > > > > > > > > > I know that it has been ACKed. > > > > > > > > > > > > My question is whether or not you are going to apply it along the > > > > > > [1/2]. > > > > > > > > > > > > If not, it will have to be deferred until the [1/2] is merged and > > > > > > then > > > > > > applied > > > > > > which may not be desirable. > > > > > > > > > > > I hope we can apply both at same time. Seems Scott has a few > > > > > concerns. > > > > > > > > > > What you think about this patch? Can you apply it? > > > > > If you have applied this patch, then I can push CPUfreq maintainer > > > > > to > > > > > apply another one which will be delayed. > > > > My only concern was getting an ack for this patch (1/2) -- did I miss > > > > it > > > > somewhere? > > > OK, so who's going to apply the series? > > Ideally it should go via the cpufreq tree. > OK, I'll apply both, then. > > Who exactly has ACKed the [1/2] from the clk side? That's the problem. I'm not sure what ACK Yuantian is referring to. The last I've heard from a clock maintainer was https://lkml.org/lkml/2015/9/18/816 des pite repeated attempts to get Russell King to respond as clock API maintainer. -Scott -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index d584004..d61a3fe 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -290,6 +290,12 @@ struct clk_hw *__clk_get_hw(struct clk *clk) } EXPORT_SYMBOL_GPL(__clk_get_hw); +unsigned int clk_get_num_parents(struct clk *clk) +{ + return !clk ? 0 : clk->core->num_parents; +} +EXPORT_SYMBOL_GPL(clk_get_num_parents); + unsigned int clk_hw_get_num_parents(const struct clk_hw *hw) { return hw->core->num_parents; @@ -358,6 +364,19 @@ static struct clk_core *clk_core_get_parent_by_index(struct clk_core *core, return core->parents[index]; } +struct clk *clk_get_parent_by_index(struct clk *clk, unsigned int index) +{ + struct clk_core *parent; + + if (!clk) + return NULL; + + parent = clk_core_get_parent_by_index(clk->core, index); + + return !parent ? NULL : parent->hw->clk; +} +EXPORT_SYMBOL_GPL(clk_get_parent_by_index); + struct clk_hw * clk_hw_get_parent_by_index(const struct clk_hw *hw, unsigned int index) { diff --git a/include/linux/clk.h b/include/linux/clk.h index 0df4a51..acd115f 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -392,6 +392,26 @@ int clk_set_parent(struct clk *clk, struct clk *parent); struct clk *clk_get_parent(struct clk *clk); /** + * clk_get_parent_by_index - get a possible parent clock by index + * @clk: clock source + * @index: index into the array of possible parents of this clock + * + * Returns struct clk corresponding to the requested possible + * parent clock source, or NULL. + */ +struct clk *clk_get_parent_by_index(struct clk *clk, + unsigned int index); + +/** + * clk_get_num_parents - get number of possible parents + * @clk: clock source + * + * Returns the number of possible parents of this clock, + * which can then be enumerated using clk_get_parent_by_index(). + */ +unsigned int clk_get_num_parents(struct clk *clk); + +/** * clk_get_sys - get a clock based upon the device name * @dev_id: device name * @con_id: connection ID @@ -461,6 +481,17 @@ static inline struct clk *clk_get_parent(struct clk *clk) return NULL; } +static inline struct clk *clk_get_parent_by_index(struct clk *clk, + unsigned int index) +{ + return NULL; +} + +static inline unsigned int clk_get_num_parents(struct clk *clk) +{ + return 0; +} + #endif /* clk_prepare_enable helps cases using clk_enable in non-atomic context. */