public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/9] i2c: riic: driver cleanup and improvements
@ 2025-01-03  9:18 Prabhakar
  2025-01-03  9:18 ` [PATCH v4 1/9] i2c: riic: Introduce a separate variable for IRQ Prabhakar
                   ` (9 more replies)
  0 siblings, 10 replies; 29+ messages in thread
From: Prabhakar @ 2025-01-03  9:18 UTC (permalink / raw)
  To: Chris Brandt, Andi Shyti, Geert Uytterhoeven, Wolfram Sang,
	Andy Shevchenko, Philipp Zabel
  Cc: linux-renesas-soc, linux-i2c, linux-kernel, Prabhakar, Biju Das,
	Fabrizio Castro, Lad Prabhakar

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Simplify and modernize the RIIC I2C driver with the following changes:

1. Refactor error handling in `riic_i2c_probe()` and `riic_init_hw()` by
   replacing `dev_err()` with `dev_err_probe()` and using a local `dev`
   pointer.
2. Use `BIT()` and `GENMASK()` macros for consistent and clear bit
   handling.
3. Manage reset lines with `devm_reset_control_get_exclusive()` to
   simplify resource handling.
4. Mark `riic_irqs` as `const` and simplify clock tick calculations with
   predefined macros.
5. Add `riic_bus_barrier()` to check bus availability and improve
   reliability.

v3->v4
-> Created new patch 1/9
-> Dropped RB/TB tags from patch 8/9
-> Dropped `unsigned long` cast and updated the format specifier while
   printing bus frequency
-> Included required headers
-> Propogated the error

Cheers,
Prabhakar

Lad Prabhakar (9):
  i2c: riic: Introduce a separate variable for IRQ
  i2c: riic: Use dev_err_probe in probe and riic_init_hw functions
  i2c: riic: Use local `dev` pointer in `dev_err_probe()`
  i2c: riic: Use BIT macro consistently
  i2c: riic: Use GENMASK() macro for bitmask definitions
  i2c: riic: Make use of devres helper to request deasserted reset line
  i2c: riic: Mark riic_irqs array as const
  i2c: riic: Use predefined macro and simplify clock tick calculation
  i2c: riic: Add `riic_bus_barrier()` to check bus availability

 drivers/i2c/busses/i2c-riic.c | 137 ++++++++++++++++++----------------
 1 file changed, 72 insertions(+), 65 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2025-01-13  8:10 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-03  9:18 [PATCH v4 0/9] i2c: riic: driver cleanup and improvements Prabhakar
2025-01-03  9:18 ` [PATCH v4 1/9] i2c: riic: Introduce a separate variable for IRQ Prabhakar
2025-01-03 10:47   ` Geert Uytterhoeven
2025-01-03 12:21     ` Lad, Prabhakar
2025-01-03  9:18 ` [PATCH v4 2/9] i2c: riic: Use dev_err_probe in probe and riic_init_hw functions Prabhakar
2025-01-03  9:18 ` [PATCH v4 3/9] i2c: riic: Use local `dev` pointer in `dev_err_probe()` Prabhakar
2025-01-03  9:18 ` [PATCH v4 4/9] i2c: riic: Use BIT macro consistently Prabhakar
2025-01-12 14:24   ` Andy Shevchenko
2025-01-13  8:09     ` Geert Uytterhoeven
2025-01-03  9:18 ` [PATCH v4 5/9] i2c: riic: Use GENMASK() macro for bitmask definitions Prabhakar
2025-01-12 14:25   ` Andy Shevchenko
2025-01-03  9:18 ` [PATCH v4 6/9] i2c: riic: Make use of devres helper to request deasserted reset line Prabhakar
2025-01-09  9:36   ` Wolfram Sang
2025-01-03  9:18 ` [PATCH v4 7/9] i2c: riic: Mark riic_irqs array as const Prabhakar
2025-01-09  9:36   ` Wolfram Sang
2025-01-03  9:18 ` [PATCH v4 8/9] i2c: riic: Use predefined macro and simplify clock tick calculation Prabhakar
2025-01-03 15:55   ` Geert Uytterhoeven
2025-01-09  9:41   ` Wolfram Sang
2025-01-09  9:45     ` Wolfram Sang
2025-01-12 14:29     ` Andy Shevchenko
2025-01-03  9:19 ` [PATCH v4 9/9] i2c: riic: Add `riic_bus_barrier()` to check bus availability Prabhakar
2025-01-03 16:09   ` Geert Uytterhoeven
2025-01-03 16:12     ` Lad, Prabhakar
2025-01-03 23:54 ` [PATCH v4 0/9] i2c: riic: driver cleanup and improvements Andi Shyti
2025-01-04  8:15   ` Lad, Prabhakar
2025-01-09 14:44     ` Andi Shyti
2025-01-09 14:50       ` Lad, Prabhakar
2025-01-12 14:27       ` Andy Shevchenko
2025-01-12 14:31         ` Andy Shevchenko

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