From: Saravana Kannan <skannan@codeaurora.org>
To: Greg KH <greg@kroah.com>
Cc: Mike Turquette <mturquette@linaro.org>,
linaro-dev@lists.linaro.org, eric.miao@linaro.org,
grant.likely@secretlab.ca, jeremy.kerr@canonical.com,
Mike Turquette <mturquette@ti.com>,
linux@arm.linux.org.uk, sboyd@quicinc.com, magnus.damm@gmail.com,
dsaxena@linaro.org, linux-arm-kernel@lists.infradead.org,
arnd.bergmann@linaro.org, patches@linaro.org, tglx@linutronix.de,
linux-omap@vger.kernel.org, richard.zhao@linaro.org,
shawn.guo@freescale.com, paul@pwsan.com,
linus.walleij@stericsson.com,
broonie@opensource.wolfsonmicro.com,
linux-kernel@vger.kernel.org, amit.kucheria@linaro.org,
skannan@quicinc.com
Subject: Re: [PATCH v3 5/5] clk: export tree topology and clk data via sysfs
Date: Tue, 22 Nov 2011 19:48:52 -0800 [thread overview]
Message-ID: <4ECC6D24.9030509@codeaurora.org> (raw)
In-Reply-To: <20111122191347.GB4844@kroah.com>
On 11/22/2011 11:13 AM, Greg KH wrote:
> On Tue, Nov 22, 2011 at 09:57:41AM -0800, Mike Turquette wrote:
>>> Ah, comments like this warm my heart.
>>>
>>> Come on, no abusing the kobject code please, if have problems with how
>>> the kernel core works, and it doesn't do things you want it to, then why
>>> not change it to work properly for you, or at the least, ASK ME!!!
>>
>> Ok, I'm asking you now. There are two ways to solve this problem:
>>
>> 1) have kobject core create the lists linking the objects but defer
>> allocations and any interactions with sysfs until later in the boot
>> sequence, OR
>>
>> 2) my code can create a list of clks (the same way that clkdev does)
>> and defer kobject/sysfs stuff until later, which walks the list made
>> during early-boot
>>
>> #1 is most closely aligned with the code I have here, #2 presents
>> challenges that I haven't really though through. I know that OMAP
>> uses the clk framework VERY early in it's boot sequence, but as long
>> as the per-clk data is properly initialized then it should be OK.
>>
>> What do you think?
>
> #3 - use debugfs and don't try to create a sysfs interface for the clock
> structures :)
I would prefer debugfs too, but for my own selfish reasons. In our
current implementation, we have debugfs files: turn on/off a clock, to
measure a clock (yeah, we have a "measuring" hw block inside the SoC),
list the supported rates of a clock, etc. We use these files to test the
clock driver. These certainly would not be acceptable candidates for sysfs.
If the common clock framework uses sysfs for the tree, then the mach-msm
will have to have its own implementation of debugfs. That's not so nice
for two reasons:
1. I think these files would be useful for other arch/machs too, but it
would be odd for the common clock code to expose sysfs and debugfs files
for each clock.
2. Since it won't be in the common code, each arch/mach will be
repeating the debugfs code to expose their own enable/disable files.
To me, the ideal choice would be for each clocks to have a directory
under /debug/clk/ without following the clock topology. Then, inside
each clock specific directory, there will be an enable, rate, parent
(symlink to parent clock dir under /debug/clk/) files.
The clock specific drivers will be able to get the handle to the clk
specific debugfs directory and add their own extra files. Or could be
made to pass a list of file/ops/perms as part of the
clock_init/registration.
Thanks,
Saravana
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2011-11-23 3:48 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 1:40 [PATCH v3 0/5] common clk framework Mike Turquette
2011-11-22 1:40 ` [PATCH v3 1/5] clk: Kconfig: add entry for HAVE_CLK_PREPARE Mike Turquette
2011-11-26 0:51 ` Shawn Guo
2011-11-22 1:40 ` [PATCH v3 2/5] Documentation: common clk API Mike Turquette
2011-11-23 2:03 ` Saravana Kannan
2011-11-23 20:33 ` Turquette, Mike
2011-11-26 8:47 ` Shawn Guo
2011-11-27 1:43 ` Turquette, Mike
2011-11-22 1:40 ` [PATCH v3 3/5] clk: introduce the common clock framework Mike Turquette
2011-11-23 3:12 ` Saravana Kannan
2011-11-23 21:30 ` Turquette, Mike
2011-11-26 13:22 ` Shawn Guo
2011-11-27 6:00 ` Turquette, Mike
2011-12-01 1:20 ` Paul Walmsley
2011-12-01 5:53 ` Turquette, Mike
2011-12-01 6:39 ` Paul Walmsley
2011-12-01 14:42 ` Mark Brown
2011-12-01 18:25 ` Turquette, Mike
2011-12-01 18:30 ` Paul Walmsley
2011-12-01 18:32 ` Mark Brown
2011-12-01 22:03 ` Russell King - ARM Linux
2011-12-03 1:04 ` Paul Walmsley
2011-12-01 8:45 ` Russell King - ARM Linux
2011-12-02 17:13 ` Paul Walmsley
2011-12-02 20:23 ` Russell King - ARM Linux
2011-12-02 20:32 ` Uwe Kleine-König
2011-12-01 2:13 ` Paul Walmsley
2011-12-05 21:15 ` Paul Walmsley
2011-12-05 23:48 ` Russell King - ARM Linux
2011-12-06 1:37 ` Paul Walmsley
2011-12-06 6:28 ` Paul Walmsley
2011-12-05 23:40 ` Turquette, Mike
2011-11-22 1:40 ` [PATCH v3 4/5] clk: basic gateable and fixed-rate clks Mike Turquette
2011-11-22 13:11 ` Arnd Bergmann
2011-11-22 15:03 ` Mark Salter
2011-11-22 15:49 ` Arnd Bergmann
2011-11-26 13:48 ` Shawn Guo
2011-11-27 6:03 ` Turquette, Mike
2011-11-27 0:09 ` Shawn Guo
2011-11-22 1:40 ` [PATCH v3 5/5] clk: export tree topology and clk data via sysfs Mike Turquette
2011-11-22 13:07 ` Arnd Bergmann
2011-11-22 17:42 ` Mike Turquette
2011-11-22 15:49 ` Greg KH
2011-11-22 17:57 ` Mike Turquette
2011-11-22 19:13 ` Greg KH
2011-11-23 3:48 ` Saravana Kannan [this message]
2011-11-23 20:43 ` Turquette, Mike
2011-11-23 16:59 ` Tony Lindgren
2011-11-23 18:06 ` Russell King - ARM Linux
2011-11-23 18:55 ` Tony Lindgren
2011-11-23 19:09 ` Mark Brown
2011-11-23 19:19 ` Tony Lindgren
2011-11-23 22:42 ` Russell King - ARM Linux
2011-11-24 1:08 ` Tony Lindgren
[not found] ` <CACxGe6sOd6MiyYaok6BsihJtp-NNsm3WQf+aUPGMRFRpSLw2mQ@mail.gmail.com>
2011-11-22 18:01 ` Mike Turquette
2011-11-22 19:19 ` Grant Likely
2011-11-22 20:02 ` Arnd Bergmann
2011-11-22 20:19 ` Turquette, Mike
2011-11-22 15:42 ` [PATCH v3 0/5] common clk framework Greg KH
2011-11-22 17:45 ` Russell King - ARM Linux
2011-11-22 18:09 ` Mike Turquette
2011-11-22 19:12 ` Greg KH
2011-11-22 19:30 ` Mark Brown
2011-11-26 7:06 ` Shawn Guo
2011-11-27 1:12 ` Turquette, Mike
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=4ECC6D24.9030509@codeaurora.org \
--to=skannan@codeaurora.org \
--cc=amit.kucheria@linaro.org \
--cc=arnd.bergmann@linaro.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dsaxena@linaro.org \
--cc=eric.miao@linaro.org \
--cc=grant.likely@secretlab.ca \
--cc=greg@kroah.com \
--cc=jeremy.kerr@canonical.com \
--cc=linaro-dev@lists.linaro.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=magnus.damm@gmail.com \
--cc=mturquette@linaro.org \
--cc=mturquette@ti.com \
--cc=patches@linaro.org \
--cc=paul@pwsan.com \
--cc=richard.zhao@linaro.org \
--cc=sboyd@quicinc.com \
--cc=shawn.guo@freescale.com \
--cc=skannan@quicinc.com \
--cc=tglx@linutronix.de \
/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