All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, Lars-Peter Clausen <lars@metafoo.de>,
	kernel@pengutronix.de
Subject: Re: [PATCH] iio: Switch i2c drivers back to use .probe()
Date: Fri, 26 May 2023 17:51:19 +0200	[thread overview]
Message-ID: <20230526155119.frh5ewjjeod2t2j6@pengutronix.de> (raw)
In-Reply-To: <20230521185625.5b2ce65d@jic23-huawei>

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

Hello,

On Sun, May 21, 2023 at 06:56:25PM +0100, Jonathan Cameron wrote:
> On Sat, 20 May 2023 19:13:00 +0200
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> 
> > Hello Jonathan,
> > 
> > On Sat, May 20, 2023 at 04:43:40PM +0100, Jonathan Cameron wrote:
> > > On Mon, 15 May 2023 22:50:48 +0200
> > > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > >   
> > > > After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
> > > > call-back type"), all drivers being converted to .probe_new() and then
> > > > 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>  
> > > Some fuzz due to other patches being queued up already, but otherwise
> > > LGTM and applied to the togreg branch of iio.git which is initially pushed
> > > out as testing for 0-day to give it a whirl.  
> > 
> > Looks good, thanks!
> > 
> > Your tree has a few new drivers that still use .probe_new(). To convert
> > these we'd need:
> > 
> > diff --git a/drivers/iio/light/opt4001.c b/drivers/iio/light/opt4001.c
> > index feb57cb99aa4..502946bf9f94 100644
> > --- a/drivers/iio/light/opt4001.c
> > +++ b/drivers/iio/light/opt4001.c
> > @@ -457,7 +457,7 @@ static struct i2c_driver opt4001_driver = {
> >  		.name = "opt4001",
> >  		.of_match_table = opt4001_of_match,
> >  	},
> > -	.probe_new = opt4001_probe,
> > +	.probe = opt4001_probe,
> >  	.id_table = opt4001_id,
> >  };
> >  module_i2c_driver(opt4001_driver);
> > diff --git a/drivers/iio/light/rohm-bu27008.c b/drivers/iio/light/rohm-bu27008.c
> > index adac4cd8d905..489902bed7f0 100644
> > --- a/drivers/iio/light/rohm-bu27008.c
> > +++ b/drivers/iio/light/rohm-bu27008.c
> > @@ -1016,7 +1016,7 @@ static struct i2c_driver bu27008_i2c_driver = {
> >  		.of_match_table = bu27008_of_match,
> >  		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
> >  	},
> > -	.probe_new = bu27008_probe,
> > +	.probe = bu27008_probe,
> >  };
> >  module_i2c_driver(bu27008_i2c_driver);
> >  
> > diff --git a/drivers/iio/pressure/mprls0025pa.c b/drivers/iio/pressure/mprls0025pa.c
> > index 06f40e47c68e..30fb2de36821 100644
> > --- a/drivers/iio/pressure/mprls0025pa.c
> > +++ b/drivers/iio/pressure/mprls0025pa.c
> > @@ -436,7 +436,7 @@ static const struct i2c_device_id mpr_id[] = {
> >  MODULE_DEVICE_TABLE(i2c, mpr_id);
> >  
> >  static struct i2c_driver mpr_driver = {
> > -	.probe_new	= mpr_probe,
> > +	.probe		= mpr_probe,
> >  	.id_table	= mpr_id,
> >  	.driver		= {
> >  		.name		= "mprls0025pa",
> > 
> > At some point I'd need to address these. What is your preferred way to
> > handle these? I can send a proper follow up patch, you can squash the
> > above diff into be8e2ed93211 ... just tell me your preference. If you
> > don't I will send a patch at some point.
> 
> Good point. I wasn't paying attention.  Some of these at least are after
> your patch in my tree, so I've fixed those up at introduction rather than
> messing around with a follow on patch.
> 
> I squashed the opt4001 into this patch as that driver is now upstream.
> 
> So should all look good now.  I'll probably miss some more later in the
> series though so if you notice, do point them out! Takes a while for
> my review brain to pick up on function name changes ;)
> 
> New version of testing pushed out just now.

Just for the record:
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing (as
of commit f3ae82534ab2 "iio: imu: inv_icm42600: avoid frequent timestamp
jitter") looks good. All drivers are properly converted to .probe()
there.

Best regards

-- 
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 --]

      reply	other threads:[~2023-05-26 15:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15 20:50 [PATCH] iio: Switch i2c drivers back to use .probe() Uwe Kleine-König
     [not found] ` <20230520164340.25360292@jic23-huawei>
2023-05-20 16:54   ` Jonathan Cameron
2023-05-20 17:13   ` Uwe Kleine-König
2023-05-21 17:56     ` Jonathan Cameron
2023-05-26 15:51       ` Uwe Kleine-König [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230526155119.frh5ewjjeod2t2j6@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=jic23@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.