All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing
Date: Wed, 26 Aug 2020 13:23:26 +0200	[thread overview]
Message-ID: <20200826112326.GC1081@ninjato> (raw)
In-Reply-To: <20200826105426.GJ1891694@smile.fi.intel.com>

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

On Wed, Aug 26, 2020 at 01:54:26PM +0300, Andy Shevchenko wrote:
> On Wed, Aug 26, 2020 at 07:38:07PM +0900, Sergey Senozhatsky wrote:
> > On (20/08/26 19:24), Sergey Senozhatsky wrote:
> > > > But then the question is why we have this code in the ->probe() at all?
> > > > ->match() is run before probe by bus core, no?
> > > 
> > > That's a good question.
> > 
> > Everything seem to be working OK on my test board with this patch:
> 
> I'm okay with it, but I want to hear Wolfram about this.
> If it gets a green light to go, feel free to add
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Sergey,

Can you send a proper patch (with patch description) and me and Jean
Delvare <jdelvare@suse.de> in the To: field?

The origins of this matching code are pretty old and Jean is more
experienced there than I am. Nonetheless, I will check it, too, of
course.

Thanks for the work!

> 
> > ---
> > 
> > diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
> > index 5ec082e2039d..77eea5c0bc71 100644
> > --- a/drivers/i2c/i2c-core-base.c
> > +++ b/drivers/i2c/i2c-core-base.c
> > @@ -475,17 +475,6 @@ static int i2c_device_probe(struct device *dev)
> >  
> >  	driver = to_i2c_driver(dev->driver);
> >  
> > -	/*
> > -	 * An I2C ID table is not mandatory, if and only if, a suitable OF
> > -	 * or ACPI ID table is supplied for the probing device.
> > -	 */
> > -	if (!driver->id_table &&
> > -	    !acpi_driver_match_device(dev, dev->driver) &&
> > -	    !i2c_of_match_device(dev->driver->of_match_table, client)) {
> > -		status = -ENODEV;
> > -		goto put_sync_adapter;
> > -	}
> > -
> >  	if (client->flags & I2C_CLIENT_WAKE) {
> >  		int wakeirq;
> >  
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

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

  reply	other threads:[~2020-08-26 11:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26  4:29 [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing Sergey Senozhatsky
2020-08-26  4:29 ` [PATCH 2/2] i2c: do not export i2c_of_match_device() symbol Sergey Senozhatsky
2020-08-26  5:07 ` [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing Sergey Senozhatsky
2020-08-26  5:08 ` Wolfram Sang
2020-08-26  5:25   ` Sergey Senozhatsky
2020-08-26  9:53     ` Andy Shevchenko
2020-08-26  9:56       ` Andy Shevchenko
2020-08-26 10:24         ` Sergey Senozhatsky
2020-08-26 10:38           ` Sergey Senozhatsky
2020-08-26 10:54             ` Andy Shevchenko
2020-08-26 11:23               ` Wolfram Sang [this message]
2020-08-26 14:18                 ` Sergey Senozhatsky
2020-08-26 14:34                   ` Andy Shevchenko
2020-08-26 14:50                     ` Sergey Senozhatsky
2020-08-26 10:09       ` Sergey Senozhatsky
2020-08-26  7:19 ` kernel test robot
2020-08-26  7:19   ` kernel test robot
2020-08-26 12:38 ` kernel test robot
2020-08-26 12:38   ` kernel test robot
2020-08-26 12:56 ` kernel test robot
2020-08-26 12:56   ` kernel test robot

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=20200826112326.GC1081@ninjato \
    --to=wsa@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=sergey.senozhatsky@gmail.com \
    /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.