diff mbox series

regulator: raa215300: Change rate from 32000->32768

Message ID 20230818133117.290897-1-biju.das.jz@bp.renesas.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series regulator: raa215300: Change rate from 32000->32768 | expand

Commit Message

Biju Das Aug. 18, 2023, 1:31 p.m. UTC
Replace the rate 32000->32768 in devm_clk_hw_register_fixed_rate() as the
32kHz frequency mentioned in the hardware manual is actually 32.768kHz.

While at it, add the missing space in the comment block and also add
module description to Kconfig.

Reported-by: Pavel Machek <pavel@denx.de>
Closes: https://lore.kernel.org/all/ZN3%2FSjL50ls+3dnD@duo.ucw.cz/
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/regulator/Kconfig     | 7 ++++++-
 drivers/regulator/raa215300.c | 4 ++--
 2 files changed, 8 insertions(+), 3 deletions(-)

Comments

Mark Brown Aug. 18, 2023, 1:34 p.m. UTC | #1
On Fri, Aug 18, 2023 at 02:31:17PM +0100, Biju Das wrote:
> Replace the rate 32000->32768 in devm_clk_hw_register_fixed_rate() as the
> 32kHz frequency mentioned in the hardware manual is actually 32.768kHz.
> 
> While at it, add the missing space in the comment block and also add
> module description to Kconfig.

These are clearly unrelated changes, the Kconfig change is not even in
the same file, and so should be separate patches as per
submitting-patches.rst.
Biju Das Aug. 18, 2023, 1:36 p.m. UTC | #2
Hi Mark,

Thanks for the feedback.

> Subject: Re: [PATCH] regulator: raa215300: Change rate from 32000->32768
> 
> On Fri, Aug 18, 2023 at 02:31:17PM +0100, Biju Das wrote:
> > Replace the rate 32000->32768 in devm_clk_hw_register_fixed_rate() as
> > the 32kHz frequency mentioned in the hardware manual is actually
> 32.768kHz.
> >
> > While at it, add the missing space in the comment block and also add
> > module description to Kconfig.
> 
> These are clearly unrelated changes, the Kconfig change is not even in the
> same file, and so should be separate patches as per submitting-patches.rst.

OK, will create separate patches for these changes.

Cheers,
Biju
diff mbox series

Patch

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 086596239356..e02b21c40416 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -1072,7 +1072,12 @@  config REGULATOR_RAA215300
 	depends on COMMON_CLK
 	depends on I2C
 	help
-	  Support for the Renesas RAA215300 PMIC.
+	  If you say yes to this option, support will be included for the
+	  regulators found in Renesas RAA215300 PMICs.
+
+	  Say M here if you want to include support for the regulators on the
+	  Renesas RAA215300 PMICs as a module. The module will be named
+	  "raa215300".
 
 config REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY
 	tristate "Raspberry Pi 7-inch touchscreen panel ATTINY regulator"
diff --git a/drivers/regulator/raa215300.c b/drivers/regulator/raa215300.c
index bdbf1e4ce468..6982565c8aa4 100644
--- a/drivers/regulator/raa215300.c
+++ b/drivers/regulator/raa215300.c
@@ -86,7 +86,7 @@  static int raa215300_i2c_probe(struct i2c_client *client)
 	val &= RAA215300_REG_BLOCK_EN_RTC_EN;
 	regmap_write(regmap, RAA215300_REG_BLOCK_EN, val);
 
-	/*Clear the latched registers */
+	/* Clear the latched registers */
 	regmap_read(regmap, RAA215300_FAULT_LATCHED_STATUS_1, &val);
 	regmap_write(regmap, RAA215300_FAULT_LATCHED_STATUS_1, val);
 	regmap_read(regmap, RAA215300_FAULT_LATCHED_STATUS_2, &val);
@@ -127,7 +127,7 @@  static int raa215300_i2c_probe(struct i2c_client *client)
 		struct clk_hw *hw;
 		ssize_t size;
 
-		hw = devm_clk_hw_register_fixed_rate(dev, clk_name, NULL, 0, 32000);
+		hw = devm_clk_hw_register_fixed_rate(dev, clk_name, NULL, 0, 32768);
 		if (IS_ERR(hw))
 			return PTR_ERR(hw);