mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter De Schrijver <pdeschrijver@nvidia.com>
To: Mike Turquette <mturquette@linaro.org>
Cc: "Emilio López" <emilio@elopez.com.ar>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Sören Brinkmann" <soren.brinkmann@xilinx.com>
Subject: Re: [PATCH RFC] clk: Introduce userspace clock driver
Date: Mon, 13 May 2013 11:31:03 +0300	[thread overview]
Message-ID: <20130513083103.GC7949@tbergstrom-lnx.Nvidia.com> (raw)
In-Reply-To: <CAPtuhTgsP4gvMAFoQb3icXAZw3ucSg4dfrAdJMho-VxNmNTvwg@mail.gmail.com>


> >>>
> >>> For debugging purposes, being able to change parents would be nice too.
> >> This is difficult and I don't have a good solution for it, hence it's
> >> missing. A clock consumer like a device driver or this driver, just
> >> knows about it's input clock, but not about the topology further up.
> >> Therefore it is pretty much impossible to implement reparent operations
> >> in a clock consumer, IMHO.
> >> IOW: For a given input clock, how do you figure out it's possible
> >> parents?
> >
> > The parent is just a number
> >
> > int (*set_parent)(struct clk_hw *hw, u8 index);
> > u8 (*get_parent)(struct clk_hw *hw);
> >
> > If you are debugging, you know what the possible parents are, and you
> > can reparent with that information.
> >
> > After checking the clk code however, I didn't find any exposed way to
> > reparent with just the parent indexes. Maybe an interface that takes a n
> > arbitrary string representing the parent name, and gets that clock and
> > then sets the parent would fit.
> >
> >>
> >>> Maybe this belongs to debugfs instead of sysfs though.
> >> Well, the more generic use-case probably. My Zynq use-case rather not,
> >> IMHO.
> >
> > The framework already exposes some information on debugfs, maybe
> > expanding that instead of implementing it as a consumer on sysfs would
> > be best for the debugging use case. @Mike, what's your thoughts on this?
> >
> 
> In the previous thread on this topic we discussed a generic approach
> to exposing clock controls via debugfs.
> 
> One way to do it is to introduce a new config option,
> CONFIG_COMMON_CLK_DEBUG_CONTROL that would expose the controls for
> every clock in the existing debugfs infrastructure.  The downside to
> this approach is that it would get abused and ship in millions of
> Android products using horrible userspace hacks to control clocks.
> Maybe that's not our problem to solve, maybe it is.
> 

We are doing the same. I don't think we can prevent people from abusing this.
If we don't provide it, they will just implement it themselves :)

> If CONFIG_COMMON_CLK_DEBUG_CONTROL existed it might be a good idea to
> intentionally break the abi compatibility with every new release.
> That would certainly reinforce that this is not a condoned or stable
> api (which is true for all debugfs).
> 

:) I would rather not have to change our automated tests for every new release
though...

Cheers,

Peter.

  parent reply	other threads:[~2013-05-13  8:31 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-10 17:31 [PATCH RFC] User space " Soren Brinkmann
2013-05-10 17:31 ` [PATCH RFC] clk: Introduce userspace " Soren Brinkmann
2013-05-10 17:44   ` Emilio López
2013-05-10 18:15     ` Sören Brinkmann
2013-05-10 18:49       ` Emilio López
2013-05-10 22:18         ` Mike Turquette
2013-05-10 23:01           ` Saravana Kannan
2013-05-10 23:06             ` Sören Brinkmann
2013-05-10 23:25               ` Saravana Kannan
2013-05-10 23:36                 ` Sören Brinkmann
2013-05-11 14:21             ` Mark Brown
2013-05-16  4:23               ` Saravana Kannan
2013-05-16 18:21                 ` Mark Brown
2013-05-10 23:08           ` Sören Brinkmann
2013-05-13  8:31           ` Peter De Schrijver [this message]
     [not found]   ` <CAHp75Vcr10d=XesGQvrC_v+ijdp3nK+m=w5E7d6GCo1Z9ogWnw@mail.gmail.com>
2013-05-10 18:03     ` Sören Brinkmann
2013-05-10 21:24   ` Mark Brown
2013-05-11 16:54     ` Sören Brinkmann
2013-05-12 14:33       ` Mark Brown
2013-05-12 19:05         ` Sören Brinkmann
2013-05-13  5:21           ` Mark Brown
2013-05-13 16:09             ` Sören Brinkmann
2013-05-13 16:21               ` Sebastian Hesselbarth
2013-05-13 17:24                 ` Sören Brinkmann
2013-05-13 17:37                   ` Sebastian Hesselbarth
2013-05-13 17:58                     ` Sören Brinkmann
2013-05-13 18:18                       ` Sebastian Hesselbarth
2013-05-14 16:46                       ` Mike Turquette
2013-05-14 18:09                         ` Philip Balister
2013-05-15  4:46                           ` Mark Brown
2013-05-16  4:28                             ` Saravana Kannan
2013-05-16 14:44                               ` Philip Balister
2013-05-16 17:26                                 ` Mark Brown
2013-05-16 18:55                                   ` Sören Brinkmann
2013-05-17 11:02                                     ` Mark Brown
2013-05-13 18:16                 ` Mark Brown
2013-05-13 18:20                   ` Sebastian Hesselbarth
2013-05-13 18:44                     ` Mark Brown

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=20130513083103.GC7949@tbergstrom-lnx.Nvidia.com \
    --to=pdeschrijver@nvidia.com \
    --cc=emilio@elopez.com.ar \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=soren.brinkmann@xilinx.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

all inboxes | Powered by JetHome®