public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] i2c: Use devm_clk_get_enabled() helpers
@ 2024-08-23  3:51 Rong Qianfeng
  2024-08-23  3:51 ` [PATCH v3 1/4] i2c: emev2: " Rong Qianfeng
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Rong Qianfeng @ 2024-08-23  3:51 UTC (permalink / raw)
  To: 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().

While at it, no need to save clk pointer, drop sclk from struct
em_i2c_device.

-v3:
 *Add another patch to use dev_err_probe() in jz4780_i2c_probe().

-v2:
 *Add another patch to drop sclk from struct em_i2c_device.

Rong Qianfeng (4):
  i2c: emev2: Use devm_clk_get_enabled() helpers
  i2c: emev2: drop sclk from struct em_i2c_device
  i2c: jz4780: Use devm_clk_get_enabled() helpers
  i2c: jz4780: Use dev_err_probe()

 drivers/i2c/busses/i2c-emev2.c  | 23 +++++++----------------
 drivers/i2c/busses/i2c-jz4780.c | 33 +++++++++++----------------------
 2 files changed, 18 insertions(+), 38 deletions(-)

-- 
2.39.0


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

end of thread, other threads:[~2024-08-26 11:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23  3:51 [PATCH v3 0/4] i2c: Use devm_clk_get_enabled() helpers Rong Qianfeng
2024-08-23  3:51 ` [PATCH v3 1/4] i2c: emev2: " Rong Qianfeng
2024-08-23 15:30   ` Andy Shevchenko
2024-08-23  3:51 ` [PATCH v3 2/4] i2c: emev2: drop sclk from struct em_i2c_device Rong Qianfeng
2024-08-26  9:09   ` Wolfram Sang
2024-08-26  9:29     ` Rong Qianfeng
2024-08-23  3:51 ` [PATCH v3 3/4] i2c: jz4780: Use devm_clk_get_enabled() helpers Rong Qianfeng
2024-08-23 15:33   ` Andy Shevchenko
2024-08-26  3:03     ` Rong Qianfeng
2024-08-26 10:33       ` Andy Shevchenko
2024-08-26 11:56         ` Rong Qianfeng
2024-08-23  3:51 ` [PATCH v3 4/4] i2c: jz4780: Use dev_err_probe() Rong Qianfeng
2024-08-23 15:36   ` Andy Shevchenko
2024-08-26  1:55     ` Rong Qianfeng

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