All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Brunet <jbrunet@baylibre.com>
To: Stephen Boyd <sboyd@codeaurora.org>,
	Michael Turquette <mturquette@baylibre.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] clk: add helpers for generic clocks
Date: Thu, 18 Jan 2018 12:01:42 +0100	[thread overview]
Message-ID: <20180118110144.30619-1-jbrunet@baylibre.com> (raw)

This series exports an helper providing the divider mask in the generic
divider and helpers to translate the between the index and the register
value in the generic mux.

The goal is to avoid duplicating this code in clock providers deriving
from these generic clocks, something I plan do doing in upcoming
changeset for meson clocks [0]

In patch 1, I have 's/div_mask/clk_div_mask' to avoid the conflict with
tegra's divider, which also defines the macro div_mask() but does not
actually derives from the generic divider.

[0]: https://github.com/jeromebrunet/linux/commit/b1bfb0fc79d1b14cd4b74ec8d1d9167171973af0

Jerome Brunet (2):
  clk: divider: export clk_div_mask() helper
  clk: mux: add helper function for index/value translation

 drivers/clk/clk-divider.c    | 24 +++++++-------
 drivers/clk/clk-mux.c        | 75 +++++++++++++++++++++++++-------------------
 include/linux/clk-provider.h |  5 +++
 3 files changed, 59 insertions(+), 45 deletions(-)

-- 
2.14.3

             reply	other threads:[~2018-01-18 11:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 11:01 Jerome Brunet [this message]
2018-01-18 11:01 ` [PATCH 1/2] clk: divider: export clk_div_mask() helper Jerome Brunet
2018-01-18 11:01 ` [PATCH 2/2] clk: mux: add helper function for index/value translation Jerome Brunet

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=20180118110144.30619-1-jbrunet@baylibre.com \
    --to=jbrunet@baylibre.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@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 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.