Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter
@ 2023-02-26 22:26 Uwe Kleine-König
  2023-02-26 22:26 ` [PATCH v2 3/9] serial: sc16is7xx: Convert to i2c's .probe_new() Uwe Kleine-König
  2023-03-03 22:08 ` [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
  0 siblings, 2 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2023-02-26 22:26 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Arnd Bergmann, Greg Kroah-Hartman, linux-kernel,
	Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Ajay Gupta, Peter Senna Tschudin, Vladimir Oltean, Luca Ceresoli,
	linux-mtd, Jiri Slaby, linux-serial, Evgeniy Polyakov, Crt Mori,
	Jonathan Cameron, Jean Delvare, Javier Martinez Canillas,
	Shunqian Zheng, Mauro Carvalho Chehab, linux-media,
	Michael Hennerich, Peter Rosin, Guenter Roeck, Lee Jones

Hello,

this is v2 of the series. I send it a bit earlier than I planned to do that
initially because I failed to send v1 completely to the linux-i2c list.

Changes since (implicit) v1:
 - Added Acks for patches #5, #6 and #8
 - Fixed kernel doc as pointed out by Luca Ceresoli (patch #7)
 - Send all patches to linux-i2c mailing list
 - Rebased to current Linus' tree.
   This reduces the list of prerequisite patches to two.

I updated

	https://git.pengutronix.de/git/ukl/linux i2c-probe-new

accordingly.

Best regards
Uwe

Uwe Kleine-König (9):
  misc: ad525x_dpot-i2c: Convert to i2c's .probe_new()
  mtd: maps: pismo: Convert to i2c's .probe_new()
  serial: sc16is7xx: Convert to i2c's .probe_new()
  w1: ds2482: Convert to i2c's .probe_new()
  media: i2c: ov5695: convert to i2c's .probe_new()
  media: i2c: ov2685: convert to i2c's .probe_new()
  i2c: Switch .probe() to not take an id parameter
  i2c: mux: Convert all drivers to new .probe() callback
  i2c: Convert drivers to new .probe() callback

 drivers/i2c/i2c-core-base.c         | 13 +++----------
 drivers/i2c/i2c-slave-eeprom.c      |  2 +-
 drivers/i2c/i2c-slave-testunit.c    |  2 +-
 drivers/i2c/i2c-smbus.c             |  2 +-
 drivers/i2c/muxes/i2c-mux-ltc4306.c |  2 +-
 drivers/i2c/muxes/i2c-mux-pca9541.c |  2 +-
 drivers/i2c/muxes/i2c-mux-pca954x.c |  2 +-
 drivers/media/i2c/ov2685.c          |  5 ++---
 drivers/media/i2c/ov5695.c          |  5 ++---
 drivers/misc/ad525x_dpot-i2c.c      |  6 +++---
 drivers/mtd/maps/pismo.c            |  5 ++---
 drivers/tty/serial/sc16is7xx.c      |  6 +++---
 drivers/w1/masters/ds2482.c         |  5 ++---
 include/linux/i2c.h                 | 18 +++++++++++-------
 14 files changed, 34 insertions(+), 41 deletions(-)


base-commit: f3a2439f20d918930cc4ae8f76fe1c1afd26958f
prerequisite-patch-id: 256857b4eee79540b271b8d4899b9ba0aa3c4c27
prerequisite-patch-id: bb49c9c71311ac1f1056c562f20f26aa356c95a6
-- 
2.39.1


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

* [PATCH v2 3/9] serial: sc16is7xx: Convert to i2c's .probe_new()
  2023-02-26 22:26 [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
@ 2023-02-26 22:26 ` Uwe Kleine-König
  2023-03-03 22:08 ` [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
  1 sibling, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2023-02-26 22:26 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	linux-kernel

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/lkml/20221118224540.619276-572-uwe@kleine-koenig.org
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/tty/serial/sc16is7xx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 29c94be09159..abad091baeea 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1666,9 +1666,9 @@ MODULE_ALIAS("spi:sc16is7xx");
 #endif
 
 #ifdef CONFIG_SERIAL_SC16IS7XX_I2C
-static int sc16is7xx_i2c_probe(struct i2c_client *i2c,
-			       const struct i2c_device_id *id)
+static int sc16is7xx_i2c_probe(struct i2c_client *i2c)
 {
+	const struct i2c_device_id *id = i2c_client_get_device_id(i2c);
 	const struct sc16is7xx_devtype *devtype;
 	struct regmap *regmap;
 
@@ -1709,7 +1709,7 @@ static struct i2c_driver sc16is7xx_i2c_uart_driver = {
 		.name		= SC16IS7XX_NAME,
 		.of_match_table	= sc16is7xx_dt_ids,
 	},
-	.probe		= sc16is7xx_i2c_probe,
+	.probe_new	= sc16is7xx_i2c_probe,
 	.remove		= sc16is7xx_i2c_remove,
 	.id_table	= sc16is7xx_i2c_id_table,
 };
-- 
2.39.1


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

* Re: [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter
  2023-02-26 22:26 [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
  2023-02-26 22:26 ` [PATCH v2 3/9] serial: sc16is7xx: Convert to i2c's .probe_new() Uwe Kleine-König
@ 2023-03-03 22:08 ` Uwe Kleine-König
  2023-03-09 21:12   ` Wolfram Sang
  1 sibling, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2023-03-03 22:08 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Arnd Bergmann, Greg Kroah-Hartman, linux-kernel,
	Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Ajay Gupta, Peter Senna Tschudin, Vladimir Oltean, Luca Ceresoli,
	linux-mtd, Jiri Slaby, linux-serial, Evgeniy Polyakov, Crt Mori,
	Jonathan Cameron, Jean Delvare, Javier Martinez Canillas,
	Shunqian Zheng, Mauro Carvalho Chehab, linux-media,
	Michael Hennerich, Peter Rosin, Guenter Roeck, Lee Jones

[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]

Hello,

On Sun, Feb 26, 2023 at 11:26:45PM +0100, Uwe Kleine-König wrote:
> this is v2 of the series. I send it a bit earlier than I planned to do that
> initially because I failed to send v1 completely to the linux-i2c list.
> 
> Changes since (implicit) v1:
>  - Added Acks for patches #5, #6 and #8
>  - Fixed kernel doc as pointed out by Luca Ceresoli (patch #7)
>  - Send all patches to linux-i2c mailing list
>  - Rebased to current Linus' tree.
>    This reduces the list of prerequisite patches to two.
> 
> I updated
> 
> 	https://git.pengutronix.de/git/ukl/linux i2c-probe-new
> 
> accordingly.

Linus tree now contains all patches that are a prerequisite for this
series. I rebased the above branch again on top of linus/master and now
it contains only the change sets included in this series.

Also no unexpected new usages of .probe() appeared in Linus's tree (nor
in next). Also there are no changes to any of the files touched by this
series in next.

So this series is ready to be applied once Linus cuts -rc1.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter
  2023-03-03 22:08 ` [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
@ 2023-03-09 21:12   ` Wolfram Sang
  2023-03-09 21:19     ` Uwe Kleine-König
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2023-03-09 21:12 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: linux-i2c, Arnd Bergmann, Greg Kroah-Hartman, linux-kernel,
	Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Ajay Gupta, Peter Senna Tschudin, Vladimir Oltean, Luca Ceresoli,
	linux-mtd, Jiri Slaby, linux-serial, Evgeniy Polyakov, Crt Mori,
	Jonathan Cameron, Jean Delvare, Javier Martinez Canillas,
	Shunqian Zheng, Mauro Carvalho Chehab, linux-media,
	Michael Hennerich, Peter Rosin, Guenter Roeck, Lee Jones

[-- Attachment #1: Type: text/plain, Size: 137 bytes --]


> So this series is ready to be applied once Linus cuts -rc1.

I applied it to for-current now and plan to have it in -rc2. Thank you!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter
  2023-03-09 21:12   ` Wolfram Sang
@ 2023-03-09 21:19     ` Uwe Kleine-König
  0 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2023-03-09 21:19 UTC (permalink / raw)
  To: Wolfram Sang, linux-i2c, Arnd Bergmann, Greg Kroah-Hartman,
	linux-kernel, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Ajay Gupta, Peter Senna Tschudin,
	Vladimir Oltean, Luca Ceresoli, linux-mtd, Jiri Slaby,
	linux-serial, Evgeniy Polyakov, Crt Mori, Jonathan Cameron,
	Jean Delvare, Javier Martinez Canillas, Shunqian Zheng,
	Mauro Carvalho Chehab, linux-media, Michael Hennerich,
	Peter Rosin, Guenter Roeck, Lee Jones

[-- Attachment #1: Type: text/plain, Size: 612 bytes --]

On Thu, Mar 09, 2023 at 10:12:14PM +0100, Wolfram Sang wrote:
> 
> > So this series is ready to be applied once Linus cuts -rc1.
> 
> I applied it to for-current now and plan to have it in -rc2. Thank you!

Great, this is even quicker than I anticipated. I thought this will go
into next first and into mainline only during the next merge window.

If you can convince Linus to take that for -rc2, fine for me.

Best regards and thanks,
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2023-03-09 21:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-26 22:26 [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
2023-02-26 22:26 ` [PATCH v2 3/9] serial: sc16is7xx: Convert to i2c's .probe_new() Uwe Kleine-König
2023-03-03 22:08 ` [PATCH v2 0/9] i2c: Switch .probe() to not take an id parameter Uwe Kleine-König
2023-03-09 21:12   ` Wolfram Sang
2023-03-09 21:19     ` Uwe Kleine-König

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