lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 27 Jun 2019 14:06:32 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Mike Looijmans <mike.looijmans@...ic.nl>, linux-clk@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, mturquette@...libre.com,
        robh+dt@...nel.org, Mike Looijmans <mike.looijmans@...ic.nl>
Subject: Re: [PATCH v3] clk: Add Si5341/Si5340 driver

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@...ic.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);
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ