From: Rob Herring <robh@kernel.org>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@codeaurora.org>
Subject: Re: [PATCH v2] clk: add userspace clock consumer
Date: Tue, 23 Feb 2016 15:49:44 -0600 [thread overview]
Message-ID: <20160223214944.GA20852@rob-hp-laptop> (raw)
In-Reply-To: <1456141719-2543-1-git-send-email-akinobu.mita@gmail.com>
On Mon, Feb 22, 2016 at 08:48:39PM +0900, Akinobu Mita wrote:
> This adds userspace consumer for common clock.
>
> This driver is inspired from Userspace regulator consumer
> (REGULATOR_USERSPACE_CONSUMER) and it is useful for test purposes and
> some classes of devices that are controlled entirely from user space.
Whether the kernel handles a clock or userspace does should have nothing
to do with DT. Plus DT does not expose many of the clocks, so any
debug feature needs to expose all clocks and be independent of DT.
Beyond debug, I don't think we should be exposing clock control to
userspace.
>
> Example binding and usages:
>
> clksqw_userspace_consumer {
> compatible = "linux,clock-userspace-consumer";
> clocks = <&clksqw>;
> };
>
> # cd /sys/devices/platform/clksqw_userspace_consumer
> # echo 8192 > rate
> # echo 1 > enable
>
> This also create new COMMON_CLK_DEBUG option and this userspace clock
> consumer depends on it.
>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@codeaurora.org>
> ---
> * v2
> - change compatible property to "linux,clock-userspace-consumer"
> - rename sysfs file from 'state' to 'enable'
While it is good this is under a debug option, it also needs to be under
debugfs, not sysfs.
> - create new COMMON_CLK_DEBUG option
>
> .../bindings/clock/clk-userspace-consumer.txt | 17 +++
> drivers/clk/Kconfig | 9 ++
> drivers/clk/Kconfig.debug | 9 ++
> drivers/clk/Makefile | 1 +
> drivers/clk/clk-userspace-consumer.c | 169 +++++++++++++++++++++
> 5 files changed, 205 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/clock/clk-userspace-consumer.txt
> create mode 100644 drivers/clk/Kconfig.debug
> create mode 100644 drivers/clk/clk-userspace-consumer.c
next prev parent reply other threads:[~2016-02-23 21:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 11:48 [PATCH v2] clk: add userspace clock consumer Akinobu Mita
2016-02-23 21:49 ` Rob Herring [this message]
2016-02-24 22:08 ` Stephen Boyd
2016-02-25 14:40 ` Akinobu Mita
[not found] ` <CAC5umyjs_Q_G4jpcmPWk4Ug16tdwq+7c3UH1kwastj2P1UenqA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-25 23:01 ` Stephen Boyd
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=20160223214944.GA20852@rob-hp-laptop \
--to=robh@kernel.org \
--cc=akinobu.mita@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.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