All of lore.kernel.org
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] clk: wm831x: Add initial WM831x clock driver
Date: Thu, 22 Mar 2012 12:26:13 +0100	[thread overview]
Message-ID: <20120322112613.GA3852@pengutronix.de> (raw)
In-Reply-To: <20120322111531.GA3091@opensource.wolfsonmicro.com>

On Thu, Mar 22, 2012 at 11:15:31AM +0000, Mark Brown wrote:
> On Wed, Mar 21, 2012 at 11:26:22PM +0100, Sascha Hauer wrote:
> > On Wed, Mar 21, 2012 at 08:01:22PM +0000, Mark Brown wrote:
> 
> > > +	if (!clk_register(&pdev->dev, "xtal", &wm831x_xtal_ops,
> > > +			  &clkdata->xtal_hw, NULL, 0, CLK_IS_ROOT))
> > > +		return -EINVAL;
> 
> > The clock names are unique identifiers for the clock, so clocks in
> > drivers should probably have dev_name encoded into them.
> 
> No, that's not sensible.  We shouldn't be open coding this into each
> individual driver that provides clocks, and we shouldn't have clock
> users having to guess at what scheme the driver author used to dedupe
> the clocks.  As a driver author you would assume that the reason we're
> providing the struct device to the registration function in the first
> place is so that the core has the information it needs to do that.
> 
> I did provide patches to do what you suggest in the core for one of the
> earlier versions of the API, I have to say I didn't check to see if they
> got dropped during the general lulls.

It seems they got dropped. Currently the clock framework does nothing
with the device argument. But right, it could use this argument to
generate a suitable name.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

WARNING: multiple messages have this Message-ID (diff)
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Mike Turquette <mturquette@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Russell King <linux@arm.linux.org.uk>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 4/4] clk: wm831x: Add initial WM831x clock driver
Date: Thu, 22 Mar 2012 12:26:13 +0100	[thread overview]
Message-ID: <20120322112613.GA3852@pengutronix.de> (raw)
In-Reply-To: <20120322111531.GA3091@opensource.wolfsonmicro.com>

On Thu, Mar 22, 2012 at 11:15:31AM +0000, Mark Brown wrote:
> On Wed, Mar 21, 2012 at 11:26:22PM +0100, Sascha Hauer wrote:
> > On Wed, Mar 21, 2012 at 08:01:22PM +0000, Mark Brown wrote:
> 
> > > +	if (!clk_register(&pdev->dev, "xtal", &wm831x_xtal_ops,
> > > +			  &clkdata->xtal_hw, NULL, 0, CLK_IS_ROOT))
> > > +		return -EINVAL;
> 
> > The clock names are unique identifiers for the clock, so clocks in
> > drivers should probably have dev_name encoded into them.
> 
> No, that's not sensible.  We shouldn't be open coding this into each
> individual driver that provides clocks, and we shouldn't have clock
> users having to guess at what scheme the driver author used to dedupe
> the clocks.  As a driver author you would assume that the reason we're
> providing the struct device to the registration function in the first
> place is so that the core has the information it needs to do that.
> 
> I did provide patches to do what you suggest in the core for one of the
> earlier versions of the API, I have to say I didn't check to see if they
> got dropped during the general lulls.

It seems they got dropped. Currently the clock framework does nothing
with the device argument. But right, it could use this argument to
generate a suitable name.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2012-03-22 11:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21 20:01 [PATCH 1/4] clk: fixed-rate: Don't open code kstrdup() Mark Brown
2012-03-21 20:01 ` Mark Brown
2012-03-21 20:01 ` [PATCH 2/4] clk: Constify parent name arrays Mark Brown
2012-03-21 20:01   ` Mark Brown
2012-03-21 20:01 ` [PATCH 3/4] clk: Provide dummy clk_unregister() Mark Brown
2012-03-21 20:01   ` Mark Brown
2012-03-21 20:36   ` Turquette, Mike
2012-03-21 20:36     ` Turquette, Mike
2012-03-21 20:01 ` [PATCH 4/4] clk: wm831x: Add initial WM831x clock driver Mark Brown
2012-03-21 20:01   ` Mark Brown
2012-03-21 22:26   ` Sascha Hauer
2012-03-21 22:26     ` Sascha Hauer
2012-03-22 11:15     ` Mark Brown
2012-03-22 11:15       ` Mark Brown
2012-03-22 11:26       ` Sascha Hauer [this message]
2012-03-22 11:26         ` Sascha Hauer
2012-03-22 11:33         ` Mark Brown
2012-03-22 11:33           ` Mark Brown
2012-03-22 18:35           ` Turquette, Mike
2012-03-22 18:35             ` Turquette, Mike
2012-03-22 18:44             ` Mark Brown
2012-03-22 18:44               ` Mark Brown
2012-03-21 20:32 ` [PATCH 1/4] clk: fixed-rate: Don't open code kstrdup() Turquette, Mike
2012-03-21 20:32   ` 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=20120322112613.GA3852@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.