All of lore.kernel.org
 help / color / mirror / Atom feed
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 4/4] clk: basic clock hardware types
Date: Mon, 5 Mar 2012 11:17:08 +0100	[thread overview]
Message-ID: <20120305101708.GF24858@lunn.ch> (raw)
In-Reply-To: <20120305092948.GV3852@pengutronix.de>

> > I think i can wrap your simple gate clock, to make my "complex" gate
> > clock. What would help is if you would EXPORT_SYMBOL_GPL
> > clk_gate_enable() and clk_gate_disable(), since they do exactly what i
> > want. I can then build my own clk_ops structure, with my own
> > unprepare() function. I would probably use DEFINE_CLK_GATE as is, and
> > then at run time, before calling __clk_init() overwrite the .ops with
> > my own version.
> 
> Maybe I don't get your point, but clk_unprepare should be used when
> you have to sleep to disable your clock. When clk_gate_disable() is
> exactly why do you want to use clk_unprepare instead of clk_disable?

I'm trying to avoid having to implement a new clock provider. The
whole point of the generic clk code is to consolidate code. It seems
silly to create a new clk provider which is 95% identical to Mike's
gated provider, if i can avoid it.

If i stuff it into clk_disable(), it means i cannot use the basic gate
clock Mike provides in the generic clock framework. Which is a shame,
since it does exactly what i want in terms of gating the clock.

If i can use unprepare(), which basic gate does not use, i can use
Mikes code, and just extend it. It is there, it is unused, so why not
use it?

    Andrew

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Lunn <andrew@lunn.ch>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
	"Turquette, Mike" <mturquette@ti.com>,
	Russell King <linux@arm.linux.org.uk>,
	patches@linaro.org, linaro-dev@lists.linaro.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Jeremy Kerr <jeremy.kerr@canonical.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Arnd Bergman <arnd.bergmann@linaro.org>,
	Paul Walmsley <paul@pwsan.com>,
	Shawn Guo <shawn.guo@freescale.com>,
	Jamie Iles <jamie@jamieiles.com>,
	Richard Zhao <richard.zhao@linaro.org>,
	Saravana Kannan <skannan@codeaurora.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Rob Herring <rob.herring@calxeda.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Linus Walleij <linus.walleij@stericsson.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Amit Kucheria <amit.kucheria@linaro.org>,
	Deepak Saxena <dsaxena@linaro.org>,
	Grant Likely <grant.likely@secretlab.ca>,
	"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [PATCH v5 4/4] clk: basic clock hardware types
Date: Mon, 5 Mar 2012 11:17:08 +0100	[thread overview]
Message-ID: <20120305101708.GF24858@lunn.ch> (raw)
In-Reply-To: <20120305092948.GV3852@pengutronix.de>

> > I think i can wrap your simple gate clock, to make my "complex" gate
> > clock. What would help is if you would EXPORT_SYMBOL_GPL
> > clk_gate_enable() and clk_gate_disable(), since they do exactly what i
> > want. I can then build my own clk_ops structure, with my own
> > unprepare() function. I would probably use DEFINE_CLK_GATE as is, and
> > then at run time, before calling __clk_init() overwrite the .ops with
> > my own version.
> 
> Maybe I don't get your point, but clk_unprepare should be used when
> you have to sleep to disable your clock. When clk_gate_disable() is
> exactly why do you want to use clk_unprepare instead of clk_disable?

I'm trying to avoid having to implement a new clock provider. The
whole point of the generic clk code is to consolidate code. It seems
silly to create a new clk provider which is 95% identical to Mike's
gated provider, if i can avoid it.

If i stuff it into clk_disable(), it means i cannot use the basic gate
clock Mike provides in the generic clock framework. Which is a shame,
since it does exactly what i want in terms of gating the clock.

If i can use unprepare(), which basic gate does not use, i can use
Mikes code, and just extend it. It is there, it is unused, so why not
use it?

    Andrew

  reply	other threads:[~2012-03-05 10:17 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-03  8:28 [PATCH v5 0/4] common clk framework Mike Turquette
2012-03-03  8:28 ` Mike Turquette
2012-03-03  8:28 ` [PATCH v5 1/4] Documentation: common clk API Mike Turquette
2012-03-03  8:28   ` Mike Turquette
2012-03-03  8:28 ` [PATCH v5 2/4] clk: Kconfig: add entry for HAVE_CLK_PREPARE Mike Turquette
2012-03-03  8:28   ` Mike Turquette
2012-03-05  2:04   ` Richard Zhao
2012-03-05  2:04     ` Richard Zhao
2012-03-05 19:46     ` Turquette, Mike
2012-03-05 19:46       ` Turquette, Mike
2012-03-03  8:29 ` [PATCH v5 3/4] clk: introduce the common clock framework Mike Turquette
2012-03-03  8:29   ` Mike Turquette
2012-03-03 13:31   ` Sascha Hauer
2012-03-03 13:31     ` Sascha Hauer
2012-03-03 17:14     ` Turquette, Mike
2012-03-03 17:14       ` Turquette, Mike
2012-03-04 11:52       ` Sascha Hauer
2012-03-04 11:52         ` Sascha Hauer
2012-03-05  0:12         ` Turquette, Mike
2012-03-05  0:12           ` Turquette, Mike
2012-03-05  7:38           ` Sascha Hauer
2012-03-05  7:38             ` Sascha Hauer
2012-03-05 20:03             ` Turquette, Mike
2012-03-05 20:03               ` Turquette, Mike
2012-03-06 19:00               ` Sascha Hauer
2012-03-06 19:00                 ` Sascha Hauer
2012-03-07 21:20                 ` Turquette, Mike
2012-03-07 21:20                   ` Turquette, Mike
2012-03-08  6:27                   ` Andrew Lunn
2012-03-08  6:27                     ` Andrew Lunn
2012-03-08 23:25                     ` Sascha Hauer
2012-03-08 23:25                       ` Sascha Hauer
2012-03-09  7:57                       ` Andrew Lunn
2012-03-09  7:57                         ` Andrew Lunn
2012-03-09 18:25                         ` Turquette, Mike
2012-03-09 18:25                           ` Turquette, Mike
2012-03-19  7:01                           ` Shawn Guo
2012-03-19  7:01                             ` Shawn Guo
2012-03-19 11:22                             ` Sascha Hauer
2012-03-19 11:22                               ` Sascha Hauer
2012-03-09 18:18                     ` Turquette, Mike
2012-03-09 18:18                       ` Turquette, Mike
2012-03-09  0:51                   ` Thomas Gleixner
2012-03-09  0:51                     ` Thomas Gleixner
2012-03-17  3:23                   ` Saravana Kannan
2012-03-17  3:23                     ` Saravana Kannan
2012-03-19  5:38                     ` Shawn Guo
2012-03-19  5:38                       ` Shawn Guo
2012-03-19  7:42                     ` Shawn Guo
2012-03-19  7:42                       ` Shawn Guo
2012-03-05  9:22   ` Richard Zhao
2012-03-05  9:22     ` Richard Zhao
2012-03-14  2:03     ` Turquette, Mike
2012-03-14  2:03       ` Turquette, Mike
2012-03-13 11:24   ` Sascha Hauer
2012-03-13 11:24     ` Sascha Hauer
2012-03-13 23:43     ` Turquette, Mike
2012-03-13 23:43       ` Turquette, Mike
2012-03-14  8:48       ` Sascha Hauer
2012-03-14  8:48         ` Sascha Hauer
2012-03-14 20:47         ` Turquette, Mike
2012-03-14 20:47           ` Turquette, Mike
2012-03-14 21:28           ` Thomas Gleixner
2012-03-14 21:28             ` Thomas Gleixner
2012-03-14 22:13             ` Turquette, Mike
2012-03-14 22:13               ` Turquette, Mike
2012-03-14 22:18               ` Thomas Gleixner
2012-03-14 22:18                 ` Thomas Gleixner
2012-03-03  8:29 ` [PATCH v5 4/4] clk: basic clock hardware types Mike Turquette
2012-03-03  8:29   ` Mike Turquette
2012-03-04 14:26   ` Andrew Lunn
2012-03-04 14:26     ` Andrew Lunn
2012-03-04 14:35   ` Andrew Lunn
2012-03-04 14:35     ` Andrew Lunn
2012-03-05  0:15     ` Turquette, Mike
2012-03-05  0:15       ` Turquette, Mike
2012-03-04 17:42   ` Andrew Lunn
2012-03-04 17:42     ` Andrew Lunn
2012-03-05  0:30     ` Turquette, Mike
2012-03-05  0:30       ` Turquette, Mike
2012-03-05  8:48       ` Andrew Lunn
2012-03-05  8:48         ` Andrew Lunn
2012-03-05  9:29         ` Sascha Hauer
2012-03-05  9:29           ` Sascha Hauer
2012-03-05 10:17           ` Andrew Lunn [this message]
2012-03-05 10:17             ` Andrew Lunn
2012-03-09 23:38             ` Turquette, Mike
2012-03-09 23:38               ` Turquette, Mike
2012-03-04 20:33   ` [PATCH] clk: Fix compile errors in DEFINE_CLK_GATE Andrew Lunn
2012-03-04 20:33     ` Andrew Lunn
2012-03-05  0:31     ` Turquette, Mike
2012-03-05  0:31       ` Turquette, Mike
2012-03-07 21:20   ` [PATCH v5 4/4] clk: basic clock hardware types Sascha Hauer
2012-03-07 21:20     ` Sascha Hauer
2012-03-09 22:50     ` Turquette, Mike
2012-03-09 22:50       ` Turquette, Mike
2012-03-09  2:34 ` [PATCH v5 0/4] common clk framework Richard Zhao
2012-03-09  2:34   ` Richard Zhao
2012-03-09  9:19   ` Sascha Hauer
2012-03-09  9:19     ` Sascha Hauer
2012-03-09 18:35   ` Turquette, Mike
2012-03-09 18:35     ` 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=20120305101708.GF24858@lunn.ch \
    --to=andrew@lunn.ch \
    --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.