linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Mike Looijmans <mike.looijmans@topic.nl>, linux-clk@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, mturquette@baylibre.com,
	robh+dt@kernel.org, Mike Looijmans <mike.looijmans@topic.nl>
Subject: Re: [PATCH v3] clk: Add Si5341/Si5340 driver
Date: Thu, 27 Jun 2019 14:06:32 -0700	[thread overview]
Message-ID: <20190627210633.A21EC2075E@mail.kernel.org> (raw)
In-Reply-To: <20190517132352.31221-1-mike.looijmans@topic.nl>

Quoting Mike Looijmans (2019-05-17 06:23:52)
> Adds a driver for the Si5341 and Si5340 chips. The driver does not fully
> support all features of these chips, but allows the chip to be used
> without any support from the "clockbuilder pro" software.
> 
> If the chip is preprogrammed, that is, you bought one with some defaults
> burned in, or you programmed the NVM in some way, the driver will just
> take over the current settings and only change them on demand. Otherwise
> the input must be a fixed XTAL in its most basic configuration (no
> predividers, no feedback, etc.).
> 
> The driver supports dynamic changes of multisynth, output dividers and
> enabling or powering down outputs and multisynths.
> 
> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
> ---

Applied to clk-next + some fixes. I'm not super thrilled about the kHz
thing but we don't have a solution for it right now so might as well
come back to it later.

diff --git a/drivers/clk/clk-si5341.c b/drivers/clk/clk-si5341.c
index 1a310835b53c..72424eb7e5f8 100644
--- a/drivers/clk/clk-si5341.c
+++ b/drivers/clk/clk-si5341.c
@@ -374,7 +374,7 @@ static unsigned long si5341_clk_recalc_rate(struct clk_hw *hw,
 	 */
 	shift = 0;
 	res = m_num;
-	while (res & 0xffff00000000) {
+	while (res & 0xffff00000000ULL) {
 		++shift;
 		res >>= 1;
 	}
@@ -921,7 +921,7 @@ static int si5341_write_multiple(struct clk_si5341 *data,
 	return 0;
 }
 
-const struct si5341_reg_default si5341_preamble[] = {
+static const struct si5341_reg_default si5341_preamble[] = {
 	{ 0x0B25, 0x00 },
 	{ 0x0502, 0x01 },
 	{ 0x0505, 0x03 },
@@ -994,7 +994,7 @@ static const struct regmap_range si5341_regmap_volatile_range[] = {
 	regmap_reg_range(SI5341_SYNTH_N_UPD(4), SI5341_SYNTH_N_UPD(4)),
 };
 
-const struct regmap_access_table si5341_regmap_volatile = {
+static const struct regmap_access_table si5341_regmap_volatile = {
 	.yes_ranges = si5341_regmap_volatile_range,
 	.n_yes_ranges = ARRAY_SIZE(si5341_regmap_volatile_range),
 };
@@ -1016,7 +1016,6 @@ static const struct regmap_config si5341_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 	.cache_type = REGCACHE_RBTREE,
-	.max_register = 0,
 	.ranges = si5341_regmap_ranges,
 	.num_ranges = ARRAY_SIZE(si5341_regmap_ranges),
 	.max_register = SI5341_REGISTER_MAX,
@@ -1328,7 +1327,7 @@ MODULE_DEVICE_TABLE(i2c, si5341_id);
 static const struct of_device_id clk_si5341_of_match[] = {
 	{ .compatible = "silabs,si5340" },
 	{ .compatible = "silabs,si5341" },
-	{ },
+	{ }
 };
 MODULE_DEVICE_TABLE(of, clk_si5341_of_match);
 


  reply	other threads:[~2019-06-27 21:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24  9:00 [PATCH] clk: Add Si5341/Si5340 driver Mike Looijmans
2019-04-25  6:42 ` Mike Looijmans
2019-04-25 23:36 ` Stephen Boyd
2019-04-26  7:53   ` Mike Looijmans
2019-05-17 13:23   ` [PATCH v3] " Mike Looijmans
2019-06-27 21:06     ` Stephen Boyd [this message]
2019-06-28  6:42       ` Mike Looijmans
2019-06-28 20:25         ` Stephen Boyd

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=20190627210633.A21EC2075E@mail.kernel.org \
    --to=sboyd@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.looijmans@topic.nl \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).