w1: ds2482: Switch back to use struct i2c_driver's .probe()

Message ID 20230612072807.839689-1-u.kleine-koenig@pengutronix.de
State New
Headers
Series w1: ds2482: Switch back to use struct i2c_driver's .probe() |

Commit Message

Uwe Kleine-König June 12, 2023, 7:28 a.m. UTC
  After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
commit 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter")
convert back to (the new) .probe() to be able to eventually drop
.probe_new() from struct i2c_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/w1/masters/ds2482.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: ac9a78681b921877518763ba0e89202254349d1b
  

Comments

Krzysztof Kozlowski June 12, 2023, 8:10 p.m. UTC | #1
On 12/06/2023 09:28, Uwe Kleine-König wrote:
> After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
> call-back type"), all drivers being converted to .probe_new() and then
> commit 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter")
> convert back to (the new) .probe() to be able to eventually drop
> .probe_new() from struct i2c_driver.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/w1/masters/ds2482.c | 2 +-

Thank you for the patch.
It is too late in the cycle for me to pick it up. I will take it after
the merge window.


Best regards,
Krzysztof
  
Uwe Kleine-König June 13, 2023, 7:02 a.m. UTC | #2
Hello Krzysztof,

On Mon, Jun 12, 2023 at 10:10:30PM +0200, Krzysztof Kozlowski wrote:
> On 12/06/2023 09:28, Uwe Kleine-König wrote:
> > After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
> > call-back type"), all drivers being converted to .probe_new() and then
> > commit 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter")
> > convert back to (the new) .probe() to be able to eventually drop
> > .probe_new() from struct i2c_driver.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> >  drivers/w1/masters/ds2482.c | 2 +-
> 
> Thank you for the patch.
> It is too late in the cycle for me to pick it up. I will take it after
> the merge window.

This is one of only 19 patches that are still needed on top of what is
currently in next before I can drop .probe_new() which I intended to
tackle after the upcoming merge window. I expect that most of these 19
patches will still be picked up and go into v6.5-rc1.

Assuming there are only less than 10 patches remaining on top of
v6.5-rc1, I intend to create a pull request for Wolfram with the
remaining bits and a patch doing

diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 13a1ce38cb0c..3b2434812611 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -237,7 +237,6 @@ enum i2c_driver_flags {
  * struct i2c_driver - represent an I2C device driver
  * @class: What kind of i2c device we instantiate (for detect)
  * @probe: Callback for device binding
- * @probe_new: Transitional callback for device binding - do not use
  * @remove: Callback for device unbinding
  * @shutdown: Callback for device shutdown
  * @alert: Alert callback, for example for the SMBus alert protocol
@@ -272,16 +271,8 @@ enum i2c_driver_flags {
 struct i2c_driver {
 	unsigned int class;
 
-	union {
 	/* Standard driver model interfaces */
-		int (*probe)(struct i2c_client *client);
-		/*
-		 * Legacy callback that was part of a conversion of .probe().
-		 * Today it has the same semantic as .probe(). Don't use for new
-		 * code.
-		 */
-		int (*probe_new)(struct i2c_client *client);
-	};
+	int (*probe)(struct i2c_client *client);
 	void (*remove)(struct i2c_client *client);
 
 
early after v6.5-rc1.

So an ack from your side would be very welcome.

Best regards
Uwe
  
Andi Shyti June 13, 2023, 8:04 a.m. UTC | #3
Hi Uwe,

On Mon, Jun 12, 2023 at 09:28:07AM +0200, Uwe Kleine-König wrote:
> After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
> call-back type"), all drivers being converted to .probe_new() and then
> commit 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter")
> convert back to (the new) .probe() to be able to eventually drop
> .probe_new() from struct i2c_driver.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

if needed:

Reviewed-by: Andi Shyti <andi.shyti@kernel.org> 

Andi
  
Krzysztof Kozlowski June 13, 2023, 8:06 a.m. UTC | #4
On 13/06/2023 09:02, Uwe Kleine-König wrote:
> Hello Krzysztof,
> 
> On Mon, Jun 12, 2023 at 10:10:30PM +0200, Krzysztof Kozlowski wrote:
>> On 12/06/2023 09:28, Uwe Kleine-König wrote:
>>> After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
>>> call-back type"), all drivers being converted to .probe_new() and then
>>> commit 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter")
>>> convert back to (the new) .probe() to be able to eventually drop
>>> .probe_new() from struct i2c_driver.
>>>
>>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>>> ---
>>>  drivers/w1/masters/ds2482.c | 2 +-
>>
>> Thank you for the patch.
>> It is too late in the cycle for me to pick it up. I will take it after
>> the merge window.
> 
> This is one of only 19 patches that are still needed on top of what is
> currently in next before I can drop .probe_new() which I intended to
> tackle after the upcoming merge window. I expect that most of these 19
> patches will still be picked up and go into v6.5-rc1.
> 
> Assuming there are only less than 10 patches remaining on top of
> v6.5-rc1, I intend to create a pull request for Wolfram with the
> remaining bits and a patch doing

Sure, go ahead:


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
  
Uwe Kleine-König July 20, 2023, 8:52 a.m. UTC | #5
On Tue, Jun 13, 2023 at 10:06:46AM +0200, Krzysztof Kozlowski wrote:
> On 13/06/2023 09:02, Uwe Kleine-König wrote:
> > Hello Krzysztof,
> > 
> > On Mon, Jun 12, 2023 at 10:10:30PM +0200, Krzysztof Kozlowski wrote:
> >> On 12/06/2023 09:28, Uwe Kleine-König wrote:
> >>> After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
> >>> call-back type"), all drivers being converted to .probe_new() and then
> >>> commit 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter")
> >>> convert back to (the new) .probe() to be able to eventually drop
> >>> .probe_new() from struct i2c_driver.
> >>>
> >>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> >>> ---
> >>>  drivers/w1/masters/ds2482.c | 2 +-
> >>
> >> Thank you for the patch.
> >> It is too late in the cycle for me to pick it up. I will take it after
> >> the merge window.
> > 
> > This is one of only 19 patches that are still needed on top of what is
> > currently in next before I can drop .probe_new() which I intended to
> > tackle after the upcoming merge window. I expect that most of these 19
> > patches will still be picked up and go into v6.5-rc1.
> > 
> > Assuming there are only less than 10 patches remaining on top of
> > v6.5-rc1, I intend to create a pull request for Wolfram with the
> > remaining bits and a patch doing
> 
> Sure, go ahead:
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Thanks, but this didn't happen because I missed a few introductions of
new .probe_new. My plan was rescheduled to one merge window later. So if
you want to take this for v6.6-rc1 that would be great.

Best regards
Uwe
  
Krzysztof Kozlowski July 26, 2023, 8:21 a.m. UTC | #6
On 20/07/2023 10:52, Uwe Kleine-König wrote:
> On Tue, Jun 13, 2023 at 10:06:46AM +0200, Krzysztof Kozlowski wrote:
>> On 13/06/2023 09:02, Uwe Kleine-König wrote:
>>> Hello Krzysztof,
>>>
>>> On Mon, Jun 12, 2023 at 10:10:30PM +0200, Krzysztof Kozlowski wrote:
>>>> On 12/06/2023 09:28, Uwe Kleine-König wrote:
>>>>> After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
>>>>> call-back type"), all drivers being converted to .probe_new() and then
>>>>> commit 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter")
>>>>> convert back to (the new) .probe() to be able to eventually drop
>>>>> .probe_new() from struct i2c_driver.
>>>>>
>>>>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>>>>> ---
>>>>>  drivers/w1/masters/ds2482.c | 2 +-
>>>>
>>>> Thank you for the patch.
>>>> It is too late in the cycle for me to pick it up. I will take it after
>>>> the merge window.
>>>
>>> This is one of only 19 patches that are still needed on top of what is
>>> currently in next before I can drop .probe_new() which I intended to
>>> tackle after the upcoming merge window. I expect that most of these 19
>>> patches will still be picked up and go into v6.5-rc1.
>>>
>>> Assuming there are only less than 10 patches remaining on top of
>>> v6.5-rc1, I intend to create a pull request for Wolfram with the
>>> remaining bits and a patch doing
>>
>> Sure, go ahead:
>>
>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> Thanks, but this didn't happen because I missed a few introductions of
> new .probe_new. My plan was rescheduled to one merge window later. So if
> you want to take this for v6.6-rc1 that would be great.
> 

I don't have anything in w1 queue, so it would be easier if you take it
with the rest.

Best regards,
Krzysztof
  
Uwe Kleine-König July 26, 2023, 7:16 p.m. UTC | #7
Hello Krzysztof,

On Wed, Jul 26, 2023 at 10:21:39AM +0200, Krzysztof Kozlowski wrote:
> On 20/07/2023 10:52, Uwe Kleine-König wrote:
> > On Tue, Jun 13, 2023 at 10:06:46AM +0200, Krzysztof Kozlowski wrote:
> >> On 13/06/2023 09:02, Uwe Kleine-König wrote:
> >>> Assuming there are only less than 10 patches remaining on top of
> >>> v6.5-rc1, I intend to create a pull request for Wolfram with the
> >>> remaining bits and a patch doing
> >>
> >> Sure, go ahead:
> >>
> >> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > 
> > Thanks, but this didn't happen because I missed a few introductions of
> > new .probe_new. My plan was rescheduled to one merge window later. So if
> > you want to take this for v6.6-rc1 that would be great.
> 
> I don't have anything in w1 queue, so it would be easier if you take it
> with the rest.

OK, will do.

Thanks
Uwe
  

Patch

diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c
index c1de8a92e144..b2d76c1784bd 100644
--- a/drivers/w1/masters/ds2482.c
+++ b/drivers/w1/masters/ds2482.c
@@ -551,7 +551,7 @@  static struct i2c_driver ds2482_driver = {
 	.driver = {
 		.name	= "ds2482",
 	},
-	.probe_new	= ds2482_probe,
+	.probe		= ds2482_probe,
 	.remove		= ds2482_remove,
 	.id_table	= ds2482_id,
 };