Skip to contentSkip to conversation

backlight: ktz8866: Convert to i2c's .probe_new()

PATCH Applied Uwe Kleine-König 3 participants 11 messages Jan 27, 2023 – Feb 22, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 backlight: ktz8866: Convert to i2c's .probe_new()

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

---
Hello,

there is an ongoing effort to convert all drivers to .probe_new to eventually drop .probe with the i2c_device_id parameter. This driver currently sits in next so wasn't on my radar before.

My plan is to tackle that after the next merge window. So I ask you to either apply this patch during the next merge window or accept that it will go in via the i2c tree together with the patch that drops .probe().

Best regards
Uwe

 drivers/video/backlight/ktz8866.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/video/backlight/ktz8866.c +2 -3
index 97b723719e13..d38c13ad39c7 100644
@@ -124,8 +124,7 @@ static void ktz8866_init(struct ktz8866 *ktz)
 		ktz8866_write(ktz, LCD_BIAS_CFG1, LCD_BIAS_EN);
 }
 
-static int ktz8866_probe(struct i2c_client *client,
-			 const struct i2c_device_id *id)
+static int ktz8866_probe(struct i2c_client *client)
 {
 	struct backlight_device *backlight_dev;
 	struct backlight_properties props;
@@ -197,7 +196,7 @@ static struct i2c_driver ktz8866_driver = {
 		.name = "ktz8866",
 		.of_match_table = ktz8866_match_table,
 	},
-	.probe = ktz8866_probe,
+	.probe_new = ktz8866_probe,
 	.remove = ktz8866_remove,
 	.id_table = ktz8866_ids,
 };

base-commit: 2241ab53cbb5cdb08a6b2d4688feb13971058f65
prerequisite-patch-id: 2e7d7db8c0a90b8cd1deb6bbc51ead4c89c89b62

Signature · 1 line
2.39.0
maintainer
#1 lore raw
Quoted 36 lines · Uwe Kleine-König

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

---
Hello,

there is an ongoing effort to convert all drivers to .probe_new to eventually drop .probe with the i2c_device_id parameter. This driver currently sits in next so wasn't on my radar before.

My plan is to tackle that after the next merge window. So I ask you to either apply this patch during the next merge window or accept that it will go in via the i2c tree together with the patch that drops .probe().

Best regards
Uwe

 drivers/video/backlight/ktz8866.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/video/backlight/ktz8866.c +1 -2
index 97b723719e13..d38c13ad39c7 100644
@@ -124,8 +124,7 @@ static void ktz8866_init(struct ktz8866 *ktz)
 		ktz8866_write(ktz, LCD_BIAS_CFG1, LCD_BIAS_EN);
 }
 
-static int ktz8866_probe(struct i2c_client *client,
-			 const struct i2c_device_id *id)
+static int ktz8866_probe(struct i2c_client *client)
 {
 	struct backlight_device *backlight_dev;
 	struct backlight_properties props;

drivers/video/backlight/ktz8866.c static struct i2c_driver ktz8866_driver = { · line 199

Quoted 5 lines
drivers/video/backlight/ktz8866.c +1 -1
@@ -197,7 +196,7 @@ static struct i2c_driver ktz8866_driver = {
 		.name = "ktz8866",
 		.of_match_table = ktz8866_match_table,
 	},
-	.probe = ktz8866_probe,
+	.probe_new = ktz8866_probe,

I think .probe_new() will be renamed to new .probe() again when there are patches dropping old .probe(). I prefer that you pack this commit to the i2c-tree commit that drops old .probe().

Quoted 9 lines
drivers/video/backlight/ktz8866.c +0 -0
 	.remove = ktz8866_remove,
 	.id_table = ktz8866_ids,
 };

base-commit: 2241ab53cbb5cdb08a6b2d4688feb13971058f65
prerequisite-patch-id: 2e7d7db8c0a90b8cd1deb6bbc51ead4c89c89b62

Signature · 1 line
2.39.0
#2 lore raw

Hello,

Quoted 30 lines · Jianhua Lu
Quoted 29 lines · Uwe Kleine-König

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

---
Hello,

there is an ongoing effort to convert all drivers to .probe_new to eventually drop .probe with the i2c_device_id parameter. This driver currently sits in next so wasn't on my radar before.

My plan is to tackle that after the next merge window. So I ask you to either apply this patch during the next merge window or accept that it will go in via the i2c tree together with the patch that drops .probe().

Best regards
Uwe

 drivers/video/backlight/ktz8866.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/video/backlight/ktz8866.c +0 -0
index 97b723719e13..d38c13ad39c7 100644
@@ -124,8 +124,7 @@ static void ktz8866_init(struct ktz8866 *ktz)
 		ktz8866_write(ktz, LCD_BIAS_CFG1, LCD_BIAS_EN);
 }
 
Quoted 15 lines

drivers/video/backlight/ktz8866.c static struct i2c_driver ktz8866_driver = { · line 199

Quoted 12 lines
drivers/video/backlight/ktz8866.c +2 -3
-static int ktz8866_probe(struct i2c_client *client,
-			 const struct i2c_device_id *id)
+static int ktz8866_probe(struct i2c_client *client)
 {
 	struct backlight_device *backlight_dev;
 	struct backlight_properties props;
@@ -197,7 +196,7 @@ static struct i2c_driver ktz8866_driver = {
 		.name = "ktz8866",
 		.of_match_table = ktz8866_match_table,
 	},
-	.probe = ktz8866_probe,
+	.probe_new = ktz8866_probe,

I think .probe_new() will be renamed to new .probe() again when there are patches dropping old .probe().

Right, the plan is to reintroduce .probe with the prototype that .probe_new has today.

Quoted 2 lines

I prefer that you pack this commit to the i2c-tree commit that drops old .probe().

That's fine for me. Can I interpret this as an Ack for this patch?

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
maintainer
#3 lore raw
Quoted 49 lines · Uwe Kleine-König

Hello,

Quoted 30 lines · Jianhua Lu
Quoted 29 lines · Uwe Kleine-König

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

---
Hello,

there is an ongoing effort to convert all drivers to .probe_new to eventually drop .probe with the i2c_device_id parameter. This driver currently sits in next so wasn't on my radar before.

My plan is to tackle that after the next merge window. So I ask you to either apply this patch during the next merge window or accept that it will go in via the i2c tree together with the patch that drops .probe().

Best regards
Uwe

 drivers/video/backlight/ktz8866.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/video/backlight/ktz8866.c +0 -0
index 97b723719e13..d38c13ad39c7 100644
@@ -124,8 +124,7 @@ static void ktz8866_init(struct ktz8866 *ktz)
 		ktz8866_write(ktz, LCD_BIAS_CFG1, LCD_BIAS_EN);
 }
 
Quoted 15 lines

drivers/video/backlight/ktz8866.c static struct i2c_driver ktz8866_driver = { · line 199

Quoted 12 lines
drivers/video/backlight/ktz8866.c +2 -3
-static int ktz8866_probe(struct i2c_client *client,
-			 const struct i2c_device_id *id)
+static int ktz8866_probe(struct i2c_client *client)
 {
 	struct backlight_device *backlight_dev;
 	struct backlight_properties props;
@@ -197,7 +196,7 @@ static struct i2c_driver ktz8866_driver = {
 		.name = "ktz8866",
 		.of_match_table = ktz8866_match_table,
 	},
-	.probe = ktz8866_probe,
+	.probe_new = ktz8866_probe,

I think .probe_new() will be renamed to new .probe() again when there are patches dropping old .probe().

Quoted 7 lines

Right, the plan is to reintroduce .probe with the prototype that .probe_new has today.

Quoted 2 lines

I prefer that you pack this commit to the i2c-tree commit that drops old .probe().

That's fine for me. Can I interpret this as an Ack for this patch?

Yes, but can't get my A-b directly, this patch should be ignored and resend it within the i2c-tree patch series or split it to two patch series.

Quoted 7 lines

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
#4 lore raw

Hello,

Quoted 10 lines · Jianhua Lu
Quoted 5 lines · Uwe Kleine-König
Quoted 2 lines · Jianhua Lu

I prefer that you pack this commit to the i2c-tree commit that drops old .probe().

That's fine for me. Can I interpret this as an Ack for this patch?

Yes, but can't get my A-b directly, this patch should be ignored and resend it within the i2c-tree patch series or split it to two patch series.

I'm not sure if I understand you correctly. Up to know I though you want the patch as is go in together with the patch that modifies struct i2c_driver such that the PR has in two separate commits:

i2c: Modify .probe() to not take an id parameter
backlight: ktz8866: Convert to i2c's .probe_new()

Did I understand that right?

In that case an Ack by you would be fine and welcome.

I don't want to squash the changes to the ktz8866 driver into the patch that modifies struct i2c_driver, as this needlessly clutters the commit, if it's that what you wanted. (There are more than 1000 i2c drivers and the others are not converted in a single lockstep, too.)

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
maintainer
#5 lore raw
Quoted 14 lines · Uwe Kleine-König

Hello,

Quoted 10 lines · Jianhua Lu
Quoted 5 lines · Uwe Kleine-König
Quoted 2 lines · Jianhua Lu

I prefer that you pack this commit to the i2c-tree commit that drops old .probe().

That's fine for me. Can I interpret this as an Ack for this patch?

Yes, but can't get my A-b directly, this patch should be ignored and resend it within the i2c-tree patch series or split it to two patch series.

Quoted 6 lines

I'm not sure if I understand you correctly. Up to know I though you want the patch as is go in together with the patch that modifies struct i2c_driver such that the PR has in two separate commits:

i2c: Modify .probe() to not take an id parameter
backlight: ktz8866: Convert to i2c's .probe_new()

This is case 1, the case 2 should be:
Patch 1: i2c: Modify .probe() to not take an id parameter
Patch 2: backlight: ktz8866: Convert to i2c's .probe_new()
'subsystem': 'i2c driver name': Convert to i2c's .probe_new()
...

Quoted 9 lines

Did I understand that right?

In that case an Ack by you would be fine and welcome.

I don't want to squash the changes to the ktz8866 driver into the patch that modifies struct i2c_driver, as this needlessly clutters the commit, if it's that what you wanted. (There are more than 1000 i2c drivers and the others are not converted in a single lockstep, too.)

Do't squash this patch, I'd like you send a series patch instead of a single patch.

Quoted 7 lines

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
#6 lore raw

Hello,

Quoted 8 lines · Jianhua Lu
Quoted 4 lines · Uwe Kleine-König

I don't want to squash the changes to the ktz8866 driver into the patch that modifies struct i2c_driver, as this needlessly clutters the commit, if it's that what you wanted. (There are more than 1000 i2c drivers and the others are not converted in a single lockstep, too.)

Do't squash this patch, I'd like you send a series patch instead of a single patch.

This series was already sent before. However that happend based on a tree that didn't contain the ktz8866 backlight driver, so this patch came later (and I didn't resend the whole series for the two drivers that were added since then :-). See
https://lore.kernel.org/lkml/[email protected].
for the original post.

Letting this patch go in via the i2c tree together with the commit changing i2c_driver is fine for me, it won't be the only one.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
maintainer
#7 lore raw
Quoted 12 lines · Uwe Kleine-König

Hello,

Quoted 8 lines · Jianhua Lu
Quoted 4 lines · Uwe Kleine-König

I don't want to squash the changes to the ktz8866 driver into the patch that modifies struct i2c_driver, as this needlessly clutters the commit, if it's that what you wanted. (There are more than 1000 i2c drivers and the others are not converted in a single lockstep, too.)

Do't squash this patch, I'd like you send a series patch instead of a single patch.

Quoted 6 lines

This series was already sent before. However that happend based on a tree that didn't contain the ktz8866 backlight driver, so this patch came later (and I didn't resend the whole series for the two drivers that were added since then :-). See
https://lore.kernel.org/lkml/[email protected].
for the original post.

Thanks for explanation.

Quoted 3 lines

Letting this patch go in via the i2c tree together with the commit changing i2c_driver is fine for me, it won't be the only one.

I think so too.

Quoted 7 lines

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
maintainer Applied
#8 lore raw
In reply to Uwe Kleine-König
Quoted 11 lines · Uwe Kleine-König

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

---
Hello,

there is an ongoing effort to convert all drivers to .probe_new to eventually drop .probe with the i2c_device_id parameter. This driver currently sits in next so wasn't on my radar before.

Quoted 6 lines

My plan is to tackle that after the next merge window. So I ask you to either apply this patch during the next merge window or accept that it will go in via the i2c tree together with the patch that drops .probe().

 drivers/video/backlight/ktz8866.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Applied, thanks

Signature · 1 line
Lee Jones [李琼斯]
#9 lore raw

Hello Lee,

Quoted 13 lines · Lee Jones
Quoted 11 lines · Uwe Kleine-König

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

---
Hello,

there is an ongoing effort to convert all drivers to .probe_new to eventually drop .probe with the i2c_device_id parameter. This driver currently sits in next so wasn't on my radar before.

Quoted 8 lines
Quoted 6 lines

My plan is to tackle that after the next merge window. So I ask you to either apply this patch during the next merge window or accept that it will go in via the i2c tree together with the patch that drops .probe().

 drivers/video/backlight/ktz8866.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Applied, thanks

Thanks, this patch didn't make it into next yet though. Is there a problem other than pending tests before you publish it in your tree that gets pulled into next?

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
maintainer
#10 lore raw
Quoted 20 lines · Uwe Kleine-König

Hello Lee,

Quoted 17 lines · Lee Jones
Quoted 15 lines · Uwe Kleine-König

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

---
Hello,

there is an ongoing effort to convert all drivers to .probe_new to eventually drop .probe with the i2c_device_id parameter. This driver currently sits in next so wasn't on my radar before.

My plan is to tackle that after the next merge window. So I ask you to either apply this patch during the next merge window or accept that it will go in via the i2c tree together with the patch that drops .probe().

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
 drivers/video/backlight/ktz8866.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Applied, thanks

Thanks, this patch didn't make it into next yet though. Is there a problem other than pending tests before you publish it in your tree that gets pulled into next?

It's queued, ready to be submitted tomorrow. Don't worry.

Signature · 1 line
Lee Jones [李琼斯]