From: Maxime Coquelin <maxime.coquelin@st.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org
Cc: mark.rutland@arm.com, mturquette@linaro.org,
gregkh@linuxfoundation.org, t.figa@samsung.com,
sw0312.kim@samsung.com, linux-kernel@vger.kernel.org,
kyungmin.park@samsung.com, robh+dt@kernel.org,
galak@codeaurora.org, grant.likely@linaro.org,
linux@arm.linux.org.uk, m.szyprowski@samsung.com
Subject: Re: [RFC PATCH v2 0/2] clk: Support for DT assigned clock parents and rates
Date: Thu, 6 Mar 2014 14:45:55 +0100 [thread overview]
Message-ID: <53187C13.3040202@st.com> (raw)
In-Reply-To: <1393870533-20845-1-git-send-email-s.nawrocki@samsung.com>
Hi Sylwester,
I like the principle of your implementation, but I have two questions:
1 - How can we manage PM with this solution, as the parent/rate will be
set only once at probe time?
2 - How to set the parent of a parent clock (which can be shared with
other devices)? Same question about the parent rates.
Thanks,
Maxime
On 03/03/2014 07:15 PM, Sylwester Nawrocki wrote:
> This patch set adds a DT binding documentation for new 'clock-parents'
> and 'clock-rates' DT properties and a helper function to parse them.
> The helper is now being called from within the driver core, similarly
> as it is done for the pins configuration binding to a device.
>
> Patch 1/2 adds a variant of of_clk_get() function which accepts name of
> a DT property containing list of phandle + clock specifier pairs, as
> opposed to hard coded "clocks" property name in of_clk_get().
> As Mike suggested I've renamed this function to of_clk_get_by_property().
>
> Patch 2/2 actually adds the code searching for related DT properties at
> device node and performing re-parenting and/or clock frequency setting
> as specified.
>
> Changes since v1:
> - updated DT binding documentation,
> - dropped the platform bus notifier, the clock setup routine is now
> being called directly from the driver core before a driver probe() call;
> this has an advantage such as all bus types are handled and any errors
> are propagated, so that, for instance a driver probe() can be deferred
> also when resources specified by clock-parents/clock-rates properties
> are not yet available; an alternative would be to let drivers call
> of_clk_device_setup() directly,
> - dropped the patch adding a macro definition for maximum DT property
> name length for now.
>
> Open issues:
> - handling of errors from of_clk_get_by_property() could be improved,
> currently ENOENT is returned by this function not only for a null
> entry.
>
> This series has been tested on ARM, on Exynos4412 Trats2 board.
> RFC v1 can be found at:
> http://www.spinics.net/lists/arm-kernel/msg309241.html
>
> Sylwester Nawrocki (2):
> clk: Add function parsing arbitrary clock list DT property
> clk: Add handling of clk parent and rate assigned from DT
>
> .../devicetree/bindings/clock/clock-bindings.txt | 23 ++++++
> drivers/base/dd.c | 5 ++
> drivers/clk/clk.c | 77 ++++++++++++++++++++
> drivers/clk/clk.h | 3 +
> drivers/clk/clkdev.c | 25 ++++++-
> include/linux/clk-provider.h | 6 ++
> 6 files changed, 135 insertions(+), 4 deletions(-)
>
> --
> 1.7.9.5
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
next prev parent reply other threads:[~2014-03-06 13:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-03 18:15 [RFC PATCH v2 0/2] clk: Support for DT assigned clock parents and rates Sylwester Nawrocki
2014-03-03 18:22 ` [RFC PATCH v2 1/2] clk: Add function parsing arbitrary clock list DT property Sylwester Nawrocki
[not found] ` <1393870533-20845-1-git-send-email-s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-03 18:22 ` [RFC PATCH v2 2/2] clk: Add handling of clk parent and rate assigned from DT Sylwester Nawrocki
[not found] ` <1393870975-21020-1-git-send-email-s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-25 11:19 ` Sylwester Nawrocki
[not found] ` <5331664E.2050008-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-25 22:54 ` Mike Turquette
2014-03-31 11:39 ` Sylwester Nawrocki
2014-03-06 13:45 ` Maxime Coquelin [this message]
[not found] ` <53187C13.3040202-qxv4g6HH51o@public.gmane.org>
2014-03-20 12:42 ` [RFC PATCH v2 0/2] clk: Support for DT assigned clock parents and rates Sylwester Nawrocki
[not found] ` <532AE239.9000800-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-21 1:45 ` Mike Turquette
2014-03-21 14:09 ` Maxime Coquelin
[not found] ` <532C4816.2080102-qxv4g6HH51o@public.gmane.org>
2014-03-24 21:57 ` Mike Turquette
2014-03-24 22:07 ` Eric Boxer
2014-03-21 11:20 ` Maxime Coquelin
[not found] ` <532C206E.1020907-qxv4g6HH51o@public.gmane.org>
2014-03-21 14:56 ` Sylwester Nawrocki
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=53187C13.3040202@st.com \
--to=maxime.coquelin@st.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=m.szyprowski@samsung.com \
--cc=mark.rutland@arm.com \
--cc=mturquette@linaro.org \
--cc=robh+dt@kernel.org \
--cc=s.nawrocki@samsung.com \
--cc=sw0312.kim@samsung.com \
--cc=t.figa@samsung.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).