public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] i2c: Use devm_clk_get_enabled() helpers
@ 2024-08-27  3:48 Rong Qianfeng
  2024-08-27  3:48 ` [PATCH v4 1/3] i2c: emev2: " Rong Qianfeng
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Rong Qianfeng @ 2024-08-27  3:48 UTC (permalink / raw)
  To: andriy.shevchenko, biju.das.jz, Wolfram Sang, Andi Shyti,
	Paul Cercueil, linux-renesas-soc, linux-i2c, linux-kernel,
	linux-mips
  Cc: opensource.kernel, Rong Qianfeng

The devm_clk_get_enabled() helpers:
    - call devm_clk_get()
    - call clk_prepare_enable() and register what is needed in order to
     call clk_disable_unprepare() when needed, as a managed resource.

This simplifies the code and avoids the calls to clk_disable_unprepare().

-v4:
 *Use struct dev *dev to replace &pdev->dev to further simplify
  the code according to Andy Shevchenko.
 *Use HZ_PER_KHZ to replace 1000 according to Andy Shevchenko.
 *Add or reduce blank lines in some places to make the code more
  compliant as suggested by Andy Shevchenko.

-v3:
 *Add another patch to use dev_err_probe() in jz4780_i2c_probe()
  according to Biju and Paul.

-v2:
 *drop sclk from struct em_i2c_device according to Biju.

Rong Qianfeng (3):
  i2c: emev2: Use devm_clk_get_enabled() helpers
  i2c: jz4780: Use devm_clk_get_enabled() helpers
  i2c: jz4780: Use dev_err_probe()

 drivers/i2c/busses/i2c-emev2.c  | 25 +++++----------
 drivers/i2c/busses/i2c-jz4780.c | 54 ++++++++++++++-------------------
 2 files changed, 31 insertions(+), 48 deletions(-)

-- 
2.39.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-09-10  2:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27  3:48 [PATCH v4 0/3] i2c: Use devm_clk_get_enabled() helpers Rong Qianfeng
2024-08-27  3:48 ` [PATCH v4 1/3] i2c: emev2: " Rong Qianfeng
2024-08-27  6:39   ` Geert Uytterhoeven
2024-09-07 19:36   ` Wolfram Sang
2024-08-27  3:48 ` [PATCH v4 2/3] i2c: jz4780: " Rong Qianfeng
2024-08-27  3:48 ` [PATCH v4 3/3] i2c: jz4780: Use dev_err_probe() Rong Qianfeng
2024-09-09  8:23   ` Andi Shyti
2024-09-09  8:58     ` Rong Qianfeng
2024-09-09 19:24       ` Andi Shyti
2024-09-10  2:06         ` Rong Qianfeng
2024-09-09  9:16     ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox