diff mbox series

[431/606] mfd: khadas-mcu: Convert to i2c's .probe_new()

Message ID 20221118224540.619276-432-uwe@kleine-koenig.org (mailing list archive)
State New, archived
Headers show
Series i2c: Complete conversion to i2c_probe_new | expand

Commit Message

Uwe Kleine-König Nov. 18, 2022, 10:42 p.m. UTC
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

The probe function doesn't make use of the i2c_device_id * parameter so it
can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/mfd/khadas-mcu.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Neil Armstrong Nov. 21, 2022, 9:56 a.m. UTC | #1
On 18/11/2022 23:42, Uwe Kleine-König wrote:
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> The probe function doesn't make use of the i2c_device_id * parameter so it
> can be trivially converted.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>   drivers/mfd/khadas-mcu.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mfd/khadas-mcu.c b/drivers/mfd/khadas-mcu.c
> index f3d418810693..7338cc16f327 100644
> --- a/drivers/mfd/khadas-mcu.c
> +++ b/drivers/mfd/khadas-mcu.c
> @@ -84,8 +84,7 @@ static struct mfd_cell khadas_mcu_cells[] = {
>   	{ .name = "khadas-mcu-user-mem", },
>   };
>   
> -static int khadas_mcu_probe(struct i2c_client *client,
> -		       const struct i2c_device_id *id)
> +static int khadas_mcu_probe(struct i2c_client *client)
>   {
>   	struct device *dev = &client->dev;
>   	struct khadas_mcu *ddata;
> @@ -135,7 +134,7 @@ static struct i2c_driver khadas_mcu_driver = {
>   		.name = "khadas-mcu-core",
>   		.of_match_table = of_match_ptr(khadas_mcu_of_match),
>   	},
> -	.probe = khadas_mcu_probe,
> +	.probe_new = khadas_mcu_probe,
>   };
>   module_i2c_driver(khadas_mcu_driver);
>   


Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Lee Jones Nov. 21, 2022, 12:32 p.m. UTC | #2
On Fri, 18 Nov 2022, Uwe Kleine-König wrote:

> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> The probe function doesn't make use of the i2c_device_id * parameter so it
> can be trivially converted.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/mfd/khadas-mcu.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

After a week or so, please collect-up all the tags you have received
and submit a per-subsystem set for me to hoover up, thanks.
Uwe Kleine-König Nov. 21, 2022, 3:08 p.m. UTC | #3
Hello Lee,

On Mon, Nov 21, 2022 at 12:32:10PM +0000, Lee Jones wrote:
> On Fri, 18 Nov 2022, Uwe Kleine-König wrote:
> 
> > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > 
> > The probe function doesn't make use of the i2c_device_id * parameter so it
> > can be trivially converted.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> >  drivers/mfd/khadas-mcu.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> After a week or so, please collect-up all the tags you have received
> and submit a per-subsystem set for me to hoover up, thanks.

For mfd I'd do:

	git checkout mfd/for-next
	b4 am -P 413-481 20221118224540.619276-1-uwe@kleine-koenig.org
	git am ./20221118_uwe_i2c_complete_conversion_to_i2c_probe_new.mbx
	git send-email --to .... --cc .... mfd/for-next

to accomplish that. I can do that, but feel free to do it yourself at a
moment that suits you (of course without the send-email part and maybe
adding -l and -s to b4 am).

For backlight the patch range is 585-593.

Cheers,
Uwe
Lee Jones Nov. 21, 2022, 4:51 p.m. UTC | #4
On Mon, 21 Nov 2022, Uwe Kleine-König wrote:

> Hello Lee,
> 
> On Mon, Nov 21, 2022 at 12:32:10PM +0000, Lee Jones wrote:
> > On Fri, 18 Nov 2022, Uwe Kleine-König wrote:
> > 
> > > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > 
> > > The probe function doesn't make use of the i2c_device_id * parameter so it
> > > can be trivially converted.
> > > 
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > ---
> > >  drivers/mfd/khadas-mcu.c | 5 ++---
> > >  1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > After a week or so, please collect-up all the tags you have received
> > and submit a per-subsystem set for me to hoover up, thanks.
> 
> For mfd I'd do:
> 
> 	git checkout mfd/for-next
> 	b4 am -P 413-481 20221118224540.619276-1-uwe@kleine-koenig.org
> 	git am ./20221118_uwe_i2c_complete_conversion_to_i2c_probe_new.mbx
> 	git send-email --to .... --cc .... mfd/for-next

That's just crazy enough to work.

Thanks for the tip.

> to accomplish that. I can do that, but feel free to do it yourself at a
> moment that suits you (of course without the send-email part and maybe
> adding -l and -s to b4 am).
> 
> For backlight the patch range is 585-593.
> 
> Cheers,
> Uwe
>
Uwe Kleine-König Dec. 6, 2022, 10:59 a.m. UTC | #5
Hey Lee,

On Mon, Nov 21, 2022 at 04:51:21PM +0000, Lee Jones wrote:
> On Mon, 21 Nov 2022, Uwe Kleine-König wrote:
> 
> > Hello Lee,
> > 
> > On Mon, Nov 21, 2022 at 12:32:10PM +0000, Lee Jones wrote:
> > > On Fri, 18 Nov 2022, Uwe Kleine-König wrote:
> > > 
> > > > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > 
> > > > The probe function doesn't make use of the i2c_device_id * parameter so it
> > > > can be trivially converted.
> > > > 
> > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > ---
> > > >  drivers/mfd/khadas-mcu.c | 5 ++---
> > > >  1 file changed, 2 insertions(+), 3 deletions(-)
> > > 
> > > After a week or so, please collect-up all the tags you have received
> > > and submit a per-subsystem set for me to hoover up, thanks.
> > 
> > For mfd I'd do:
> > 
> > 	git checkout mfd/for-next
> > 	b4 am -P 413-481 20221118224540.619276-1-uwe@kleine-koenig.org
> > 	git am ./20221118_uwe_i2c_complete_conversion_to_i2c_probe_new.mbx
> > 	git send-email --to .... --cc .... mfd/for-next
> 
> That's just crazy enough to work.
> 
> Thanks for the tip.

On irc you said you'd care for application of these patches ("I plan to
attempt the b4 solution"), they didn't land in next yet. Do you need a
reminder? Something else?

Best regards
Uwe
Lee Jones Dec. 6, 2022, 4:10 p.m. UTC | #6
On Tue, 06 Dec 2022, Uwe Kleine-König wrote:

> Hey Lee,
> 
> On Mon, Nov 21, 2022 at 04:51:21PM +0000, Lee Jones wrote:
> > On Mon, 21 Nov 2022, Uwe Kleine-König wrote:
> > 
> > > Hello Lee,
> > > 
> > > On Mon, Nov 21, 2022 at 12:32:10PM +0000, Lee Jones wrote:
> > > > On Fri, 18 Nov 2022, Uwe Kleine-König wrote:
> > > > 
> > > > > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > > 
> > > > > The probe function doesn't make use of the i2c_device_id * parameter so it
> > > > > can be trivially converted.
> > > > > 
> > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > > ---
> > > > >  drivers/mfd/khadas-mcu.c | 5 ++---
> > > > >  1 file changed, 2 insertions(+), 3 deletions(-)
> > > > 
> > > > After a week or so, please collect-up all the tags you have received
> > > > and submit a per-subsystem set for me to hoover up, thanks.
> > > 
> > > For mfd I'd do:
> > > 
> > > 	git checkout mfd/for-next
> > > 	b4 am -P 413-481 20221118224540.619276-1-uwe@kleine-koenig.org
> > > 	git am ./20221118_uwe_i2c_complete_conversion_to_i2c_probe_new.mbx
> > > 	git send-email --to .... --cc .... mfd/for-next
> > 
> > That's just crazy enough to work.
> > 
> > Thanks for the tip.
> 
> On irc you said you'd care for application of these patches ("I plan to
> attempt the b4 solution"), they didn't land in next yet. Do you need a
> reminder? Something else?

I applied them, but they fail to build and I haven't had time to
investigate.  I guess they depend on some patches that have been
accepted into another (input?) and are now in -next.  Any idea if they
are available on some immutable branch that I can pull from?
Uwe Kleine-König Dec. 6, 2022, 4:35 p.m. UTC | #7
On Tue, Dec 06, 2022 at 04:10:51PM +0000, Lee Jones wrote:
> On Tue, 06 Dec 2022, Uwe Kleine-König wrote:
> 
> > Hey Lee,
> > 
> > On Mon, Nov 21, 2022 at 04:51:21PM +0000, Lee Jones wrote:
> > > On Mon, 21 Nov 2022, Uwe Kleine-König wrote:
> > > 
> > > > Hello Lee,
> > > > 
> > > > On Mon, Nov 21, 2022 at 12:32:10PM +0000, Lee Jones wrote:
> > > > > On Fri, 18 Nov 2022, Uwe Kleine-König wrote:
> > > > > 
> > > > > > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > > > 
> > > > > > The probe function doesn't make use of the i2c_device_id * parameter so it
> > > > > > can be trivially converted.
> > > > > > 
> > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > > > ---
> > > > > >  drivers/mfd/khadas-mcu.c | 5 ++---
> > > > > >  1 file changed, 2 insertions(+), 3 deletions(-)
> > > > > 
> > > > > After a week or so, please collect-up all the tags you have received
> > > > > and submit a per-subsystem set for me to hoover up, thanks.
> > > > 
> > > > For mfd I'd do:
> > > > 
> > > > 	git checkout mfd/for-next
> > > > 	b4 am -P 413-481 20221118224540.619276-1-uwe@kleine-koenig.org
> > > > 	git am ./20221118_uwe_i2c_complete_conversion_to_i2c_probe_new.mbx
> > > > 	git send-email --to .... --cc .... mfd/for-next
> > > 
> > > That's just crazy enough to work.
> > > 
> > > Thanks for the tip.
> > 
> > On irc you said you'd care for application of these patches ("I plan to
> > attempt the b4 solution"), they didn't land in next yet. Do you need a
> > reminder? Something else?
> 
> I applied them, but they fail to build and I haven't had time to
> investigate.  I guess they depend on some patches that have been
> accepted into another (input?) and are now in -next.  Any idea if they
> are available on some immutable branch that I can pull from?

If in your tree i2c_client_get_device_id() is missing, you want to pull

	https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/client_device_id_helper-immutable

Best regards
Uwe
Lee Jones Dec. 6, 2022, 4:56 p.m. UTC | #8
On Tue, 06 Dec 2022, Uwe Kleine-König wrote:

> On Tue, Dec 06, 2022 at 04:10:51PM +0000, Lee Jones wrote:
> > On Tue, 06 Dec 2022, Uwe Kleine-König wrote:
> > 
> > > Hey Lee,
> > > 
> > > On Mon, Nov 21, 2022 at 04:51:21PM +0000, Lee Jones wrote:
> > > > On Mon, 21 Nov 2022, Uwe Kleine-König wrote:
> > > > 
> > > > > Hello Lee,
> > > > > 
> > > > > On Mon, Nov 21, 2022 at 12:32:10PM +0000, Lee Jones wrote:
> > > > > > On Fri, 18 Nov 2022, Uwe Kleine-König wrote:
> > > > > > 
> > > > > > > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > > > > 
> > > > > > > The probe function doesn't make use of the i2c_device_id * parameter so it
> > > > > > > can be trivially converted.
> > > > > > > 
> > > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > > > > ---
> > > > > > >  drivers/mfd/khadas-mcu.c | 5 ++---
> > > > > > >  1 file changed, 2 insertions(+), 3 deletions(-)
> > > > > > 
> > > > > > After a week or so, please collect-up all the tags you have received
> > > > > > and submit a per-subsystem set for me to hoover up, thanks.
> > > > > 
> > > > > For mfd I'd do:
> > > > > 
> > > > > 	git checkout mfd/for-next
> > > > > 	b4 am -P 413-481 20221118224540.619276-1-uwe@kleine-koenig.org
> > > > > 	git am ./20221118_uwe_i2c_complete_conversion_to_i2c_probe_new.mbx
> > > > > 	git send-email --to .... --cc .... mfd/for-next
> > > > 
> > > > That's just crazy enough to work.
> > > > 
> > > > Thanks for the tip.
> > > 
> > > On irc you said you'd care for application of these patches ("I plan to
> > > attempt the b4 solution"), they didn't land in next yet. Do you need a
> > > reminder? Something else?
> > 
> > I applied them, but they fail to build and I haven't had time to
> > investigate.  I guess they depend on some patches that have been
> > accepted into another (input?) and are now in -next.  Any idea if they
> > are available on some immutable branch that I can pull from?
> 
> If in your tree i2c_client_get_device_id() is missing, you want to pull
> 
> 	https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/client_device_id_helper-immutable

Ideal, thanks.
Uwe Kleine-König Dec. 7, 2022, 11 a.m. UTC | #9
Hello Lee,

On Tue, Dec 06, 2022 at 04:56:59PM +0000, Lee Jones wrote:
> > On Tue, Dec 06, 2022 at 04:10:51PM +0000, Lee Jones wrote:
> > > On Tue, 06 Dec 2022, Uwe Kleine-König wrote:
> > > 
> > > > Hey Lee,
> > > > 
> > > > On Mon, Nov 21, 2022 at 04:51:21PM +0000, Lee Jones wrote:
> > > > > On Mon, 21 Nov 2022, Uwe Kleine-König wrote:
> > > > > 
> > > > > > Hello Lee,
> > > > > > 
> > > > > > On Mon, Nov 21, 2022 at 12:32:10PM +0000, Lee Jones wrote:
> > > > > > > On Fri, 18 Nov 2022, Uwe Kleine-König wrote:
> > > > > > > 
> > > > > > > > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > > > > > 
> > > > > > > > The probe function doesn't make use of the i2c_device_id * parameter so it
> > > > > > > > can be trivially converted.
> > > > > > > > 
> > > > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > > > > > ---
> > > > > > > >  drivers/mfd/khadas-mcu.c | 5 ++---
> > > > > > > >  1 file changed, 2 insertions(+), 3 deletions(-)
> > > > > > > 
> > > > > > > After a week or so, please collect-up all the tags you have received
> > > > > > > and submit a per-subsystem set for me to hoover up, thanks.
> > > > > > 
> > > > > > For mfd I'd do:
> > > > > > 
> > > > > > 	git checkout mfd/for-next
> > > > > > 	b4 am -P 413-481 20221118224540.619276-1-uwe@kleine-koenig.org
> > > > > > 	git am ./20221118_uwe_i2c_complete_conversion_to_i2c_probe_new.mbx
> > > > > > 	git send-email --to .... --cc .... mfd/for-next
> > > > > 
> > > > > That's just crazy enough to work.
> > > > > 
> > > > > Thanks for the tip.
> > > > 
> > > > On irc you said you'd care for application of these patches ("I plan to
> > > > attempt the b4 solution"), they didn't land in next yet. Do you need a
> > > > reminder? Something else?
> > > 
> > > I applied them, but they fail to build and I haven't had time to
> > > investigate.  I guess they depend on some patches that have been
> > > accepted into another (input?) and are now in -next.  Any idea if they
> > > are available on some immutable branch that I can pull from?
> > 
> > If in your tree i2c_client_get_device_id() is missing, you want to pull
> > 
> > 	https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/client_device_id_helper-immutable
> 
> Ideal, thanks.

I see you added my commits to your tree now, however there is a problem:

  $ git log --oneline --graph --boundary linus/master..FETCH_HEAD
  ...
  *   7281458f4396 Merge branches 'ib-i2c-mfd-client_dev_id_helper-6.2' and 'ib-mfd-uwes-i2c-probe_new-6.2' into ibs-for-mfd-merged
  |\  
  | * c066a1632bc3 mfd: wm8994-core: Convert to i2c's .probe_new()
  | * 0f22cf00762d mfd: wm8400-core: Convert to i2c's .probe_new()
  | * 090f49b250ee mfd: wm8350-i2c: Convert to i2c's .probe_new()
  | * 7174af1be41d mfd: wm831x-i2c: Convert to i2c's .probe_new()
  | ...
  | * 63909fec136e mfd: adp5520: Convert to i2c's .probe_new()
  | * 549d4f3207f8 mfd: act8945a: Convert to i2c's .probe_new()
  | * 623f79babaf1 mfd: aat2870-core: Convert to i2c's .probe_new()
  | * ce41e4ae7cac mfd: 88pm805: Convert to i2c's .probe_new()
  | * 02aa483f1f98 mfd: 88pm800: Convert to i2c's .probe_new()
  * | 662233731d66 i2c: core: Introduce i2c_client_get_device_id helper function
  |/
  o 9abf2313adc1 (tag: v6.1-rc1) Linux 6.1-rc1

That means that the commit introducing i2c_client_get_device_id() isn't
an ancestor of the commits that make use of the new function. So
63909fec136e (which is the first commit making use of the new function)
likely won't compile:

	$ git grep i2c_client_get_device_id 63909fec136e
	63909fec136e:drivers/mfd/adp5520.c:     const struct i2c_device_id *id = i2c_client_get_device_id(client);

Starting with 7281458f4396 everything is fine again, but still this
hurts a bisection.

Best regards
Uwe
Lee Jones Dec. 7, 2022, 11:23 a.m. UTC | #10
On Wed, 07 Dec 2022, Uwe Kleine-König wrote:

> Hello Lee,
> 
> On Tue, Dec 06, 2022 at 04:56:59PM +0000, Lee Jones wrote:
> > > On Tue, Dec 06, 2022 at 04:10:51PM +0000, Lee Jones wrote:
> > > > On Tue, 06 Dec 2022, Uwe Kleine-König wrote:
> > > > 
> > > > > Hey Lee,
> > > > > 
> > > > > On Mon, Nov 21, 2022 at 04:51:21PM +0000, Lee Jones wrote:
> > > > > > On Mon, 21 Nov 2022, Uwe Kleine-König wrote:
> > > > > > 
> > > > > > > Hello Lee,
> > > > > > > 
> > > > > > > On Mon, Nov 21, 2022 at 12:32:10PM +0000, Lee Jones wrote:
> > > > > > > > On Fri, 18 Nov 2022, Uwe Kleine-König wrote:
> > > > > > > > 
> > > > > > > > > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > > > > > > 
> > > > > > > > > The probe function doesn't make use of the i2c_device_id * parameter so it
> > > > > > > > > can be trivially converted.
> > > > > > > > > 
> > > > > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > > > > > > ---
> > > > > > > > >  drivers/mfd/khadas-mcu.c | 5 ++---
> > > > > > > > >  1 file changed, 2 insertions(+), 3 deletions(-)
> > > > > > > > 
> > > > > > > > After a week or so, please collect-up all the tags you have received
> > > > > > > > and submit a per-subsystem set for me to hoover up, thanks.
> > > > > > > 
> > > > > > > For mfd I'd do:
> > > > > > > 
> > > > > > > 	git checkout mfd/for-next
> > > > > > > 	b4 am -P 413-481 20221118224540.619276-1-uwe@kleine-koenig.org
> > > > > > > 	git am ./20221118_uwe_i2c_complete_conversion_to_i2c_probe_new.mbx
> > > > > > > 	git send-email --to .... --cc .... mfd/for-next
> > > > > > 
> > > > > > That's just crazy enough to work.
> > > > > > 
> > > > > > Thanks for the tip.
> > > > > 
> > > > > On irc you said you'd care for application of these patches ("I plan to
> > > > > attempt the b4 solution"), they didn't land in next yet. Do you need a
> > > > > reminder? Something else?
> > > > 
> > > > I applied them, but they fail to build and I haven't had time to
> > > > investigate.  I guess they depend on some patches that have been
> > > > accepted into another (input?) and are now in -next.  Any idea if they
> > > > are available on some immutable branch that I can pull from?
> > > 
> > > If in your tree i2c_client_get_device_id() is missing, you want to pull
> > > 
> > > 	https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/client_device_id_helper-immutable
> > 
> > Ideal, thanks.
> 
> I see you added my commits to your tree now, however there is a problem:
> 
>   $ git log --oneline --graph --boundary linus/master..FETCH_HEAD
>   ...
>   *   7281458f4396 Merge branches 'ib-i2c-mfd-client_dev_id_helper-6.2' and 'ib-mfd-uwes-i2c-probe_new-6.2' into ibs-for-mfd-merged
>   |\  
>   | * c066a1632bc3 mfd: wm8994-core: Convert to i2c's .probe_new()
>   | * 0f22cf00762d mfd: wm8400-core: Convert to i2c's .probe_new()
>   | * 090f49b250ee mfd: wm8350-i2c: Convert to i2c's .probe_new()
>   | * 7174af1be41d mfd: wm831x-i2c: Convert to i2c's .probe_new()
>   | ...
>   | * 63909fec136e mfd: adp5520: Convert to i2c's .probe_new()
>   | * 549d4f3207f8 mfd: act8945a: Convert to i2c's .probe_new()
>   | * 623f79babaf1 mfd: aat2870-core: Convert to i2c's .probe_new()
>   | * ce41e4ae7cac mfd: 88pm805: Convert to i2c's .probe_new()
>   | * 02aa483f1f98 mfd: 88pm800: Convert to i2c's .probe_new()
>   * | 662233731d66 i2c: core: Introduce i2c_client_get_device_id helper function
>   |/
>   o 9abf2313adc1 (tag: v6.1-rc1) Linux 6.1-rc1
> 
> That means that the commit introducing i2c_client_get_device_id() isn't
> an ancestor of the commits that make use of the new function. So
> 63909fec136e (which is the first commit making use of the new function)
> likely won't compile:
> 
> 	$ git grep i2c_client_get_device_id 63909fec136e
> 	63909fec136e:drivers/mfd/adp5520.c:     const struct i2c_device_id *id = i2c_client_get_device_id(client);
> 
> Starting with 7281458f4396 everything is fine again, but still this
> hurts a bisection.

Fair point - I'll rebase the my topic branch on top of Wolfram's.
Lee Jones Dec. 7, 2022, 1:34 p.m. UTC | #11
On Wed, 07 Dec 2022, Lee Jones wrote:

> On Wed, 07 Dec 2022, Uwe Kleine-König wrote:
> 
> > Hello Lee,
> > 
> > On Tue, Dec 06, 2022 at 04:56:59PM +0000, Lee Jones wrote:
> > > > On Tue, Dec 06, 2022 at 04:10:51PM +0000, Lee Jones wrote:
> > > > > On Tue, 06 Dec 2022, Uwe Kleine-König wrote:
> > > > > 
> > > > > > Hey Lee,
> > > > > > 
> > > > > > On Mon, Nov 21, 2022 at 04:51:21PM +0000, Lee Jones wrote:
> > > > > > > On Mon, 21 Nov 2022, Uwe Kleine-König wrote:
> > > > > > > 
> > > > > > > > Hello Lee,
> > > > > > > > 
> > > > > > > > On Mon, Nov 21, 2022 at 12:32:10PM +0000, Lee Jones wrote:
> > > > > > > > > On Fri, 18 Nov 2022, Uwe Kleine-König wrote:
> > > > > > > > > 
> > > > > > > > > > From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > > > > > > > 
> > > > > > > > > > The probe function doesn't make use of the i2c_device_id * parameter so it
> > > > > > > > > > can be trivially converted.
> > > > > > > > > > 
> > > > > > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > > > > > > > > ---
> > > > > > > > > >  drivers/mfd/khadas-mcu.c | 5 ++---
> > > > > > > > > >  1 file changed, 2 insertions(+), 3 deletions(-)
> > > > > > > > > 
> > > > > > > > > After a week or so, please collect-up all the tags you have received
> > > > > > > > > and submit a per-subsystem set for me to hoover up, thanks.
> > > > > > > > 
> > > > > > > > For mfd I'd do:
> > > > > > > > 
> > > > > > > > 	git checkout mfd/for-next
> > > > > > > > 	b4 am -P 413-481 20221118224540.619276-1-uwe@kleine-koenig.org
> > > > > > > > 	git am ./20221118_uwe_i2c_complete_conversion_to_i2c_probe_new.mbx
> > > > > > > > 	git send-email --to .... --cc .... mfd/for-next
> > > > > > > 
> > > > > > > That's just crazy enough to work.
> > > > > > > 
> > > > > > > Thanks for the tip.
> > > > > > 
> > > > > > On irc you said you'd care for application of these patches ("I plan to
> > > > > > attempt the b4 solution"), they didn't land in next yet. Do you need a
> > > > > > reminder? Something else?
> > > > > 
> > > > > I applied them, but they fail to build and I haven't had time to
> > > > > investigate.  I guess they depend on some patches that have been
> > > > > accepted into another (input?) and are now in -next.  Any idea if they
> > > > > are available on some immutable branch that I can pull from?
> > > > 
> > > > If in your tree i2c_client_get_device_id() is missing, you want to pull
> > > > 
> > > > 	https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/client_device_id_helper-immutable
> > > 
> > > Ideal, thanks.
> > 
> > I see you added my commits to your tree now, however there is a problem:
> > 
> >   $ git log --oneline --graph --boundary linus/master..FETCH_HEAD
> >   ...
> >   *   7281458f4396 Merge branches 'ib-i2c-mfd-client_dev_id_helper-6.2' and 'ib-mfd-uwes-i2c-probe_new-6.2' into ibs-for-mfd-merged
> >   |\  
> >   | * c066a1632bc3 mfd: wm8994-core: Convert to i2c's .probe_new()
> >   | * 0f22cf00762d mfd: wm8400-core: Convert to i2c's .probe_new()
> >   | * 090f49b250ee mfd: wm8350-i2c: Convert to i2c's .probe_new()
> >   | * 7174af1be41d mfd: wm831x-i2c: Convert to i2c's .probe_new()
> >   | ...
> >   | * 63909fec136e mfd: adp5520: Convert to i2c's .probe_new()
> >   | * 549d4f3207f8 mfd: act8945a: Convert to i2c's .probe_new()
> >   | * 623f79babaf1 mfd: aat2870-core: Convert to i2c's .probe_new()
> >   | * ce41e4ae7cac mfd: 88pm805: Convert to i2c's .probe_new()
> >   | * 02aa483f1f98 mfd: 88pm800: Convert to i2c's .probe_new()
> >   * | 662233731d66 i2c: core: Introduce i2c_client_get_device_id helper function
> >   |/
> >   o 9abf2313adc1 (tag: v6.1-rc1) Linux 6.1-rc1
> > 
> > That means that the commit introducing i2c_client_get_device_id() isn't
> > an ancestor of the commits that make use of the new function. So
> > 63909fec136e (which is the first commit making use of the new function)
> > likely won't compile:
> > 
> > 	$ git grep i2c_client_get_device_id 63909fec136e
> > 	63909fec136e:drivers/mfd/adp5520.c:     const struct i2c_device_id *id = i2c_client_get_device_id(client);
> > 
> > Starting with 7281458f4396 everything is fine again, but still this
> > hurts a bisection.
> 
> Fair point - I'll rebase the my topic branch on top of Wolfram's.

Okay, try now.
Uwe Kleine-König Dec. 7, 2022, 1:57 p.m. UTC | #12
Hello Lee,

On Wed, Dec 07, 2022 at 01:34:01PM +0000, Lee Jones wrote:
> On Wed, 07 Dec 2022, Lee Jones wrote:
> > On Wed, 07 Dec 2022, Uwe Kleine-König wrote:
> > > I see you added my commits to your tree now, however there is a problem:
> > > 
> > >   [...]
> > > 
> > > That means that the commit introducing i2c_client_get_device_id() isn't
> > > an ancestor of the commits that make use of the new function. So
> > > 63909fec136e (which is the first commit making use of the new function)
> > > likely won't compile:
> > > 
> > > 	$ git grep i2c_client_get_device_id 63909fec136e
> > > 	63909fec136e:drivers/mfd/adp5520.c:     const struct i2c_device_id *id = i2c_client_get_device_id(client);
> > > 
> > > Starting with 7281458f4396 everything is fine again, but still this
> > > hurts a bisection.
> > 
> > Fair point - I'll rebase the my topic branch on top of Wolfram's.
> 
> Okay, try now.

Looks good now, thanks!

Uwe
diff mbox series

Patch

diff --git a/drivers/mfd/khadas-mcu.c b/drivers/mfd/khadas-mcu.c
index f3d418810693..7338cc16f327 100644
--- a/drivers/mfd/khadas-mcu.c
+++ b/drivers/mfd/khadas-mcu.c
@@ -84,8 +84,7 @@  static struct mfd_cell khadas_mcu_cells[] = {
 	{ .name = "khadas-mcu-user-mem", },
 };
 
-static int khadas_mcu_probe(struct i2c_client *client,
-		       const struct i2c_device_id *id)
+static int khadas_mcu_probe(struct i2c_client *client)
 {
 	struct device *dev = &client->dev;
 	struct khadas_mcu *ddata;
@@ -135,7 +134,7 @@  static struct i2c_driver khadas_mcu_driver = {
 		.name = "khadas-mcu-core",
 		.of_match_table = of_match_ptr(khadas_mcu_of_match),
 	},
-	.probe = khadas_mcu_probe,
+	.probe_new = khadas_mcu_probe,
 };
 module_i2c_driver(khadas_mcu_driver);