Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-26 Thread Sergey Senozhatsky
On (20/08/26 17:34), Andy Shevchenko wrote: > > Oh, sure, will do. Is that OK if I'll base my patch on linux-next? > > I'm also going to test the patch on more devices here on my side. > > Today's one includes above mentioned patches, I think it's okay. Right, just noticed that as well. Thanks.

Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-26 Thread Andy Shevchenko
On Wed, Aug 26, 2020 at 11:18:10PM +0900, Sergey Senozhatsky wrote: > On (20/08/26 13:23), Wolfram Sang wrote: > > 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 Senozhats

Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-26 Thread Sergey Senozhatsky
On (20/08/26 13:23), Wolfram Sang wrote: > 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 ->

Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-26 Thread kernel test robot
Hi Sergey, I love your patch! Perhaps something to improve: [auto build test WARNING on v5.9-rc2] [cannot apply to wsa/i2c/for-next next-20200826] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https:/

Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-26 Thread kernel test robot
Hi Sergey, I love your patch! Yet something to improve: [auto build test ERROR on v5.9-rc2] [cannot apply to wsa/i2c/for-next next-20200826] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-s

Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-26 Thread Wolfram Sang
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 p

Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-26 Thread Andy Shevchenko
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 se

Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-26 Thread Sergey Senozhatsky
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: --- diff --git a/drivers/i

Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-26 Thread Sergey Senozhatsky
On (20/08/26 12:56), Andy Shevchenko wrote: > > You probably meant simply: > > > > if (!i2c_device_match(dev, dev->driver)) { > > > > > status = -ENODEV; > > > goto put_sync_adapter; > > > } > > > > On the first glance it will work the same way but sli

Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-26 Thread Sergey Senozhatsky
On (20/08/26 12:53), Andy Shevchenko wrote: > On Wed, Aug 26, 2020 at 02:25:44PM +0900, Sergey Senozhatsky wrote: > > On (20/08/26 07:08), Wolfram Sang wrote: > > > On Wed, Aug 26, 2020 at 01:29:37PM +0900, Sergey Senozhatsky wrote: [..] > > > > i2c_of_match_device() depends on CONFIG_OF and, thus

Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-26 Thread Andy Shevchenko
On Wed, Aug 26, 2020 at 12:53:56PM +0300, Andy Shevchenko wrote: > On Wed, Aug 26, 2020 at 02:25:44PM +0900, Sergey Senozhatsky wrote: > > On (20/08/26 07:08), Wolfram Sang wrote: ... > You probably meant simply: > > if (!i2c_device_match(dev, dev->driver)) { > > > status

Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-26 Thread Andy Shevchenko
On Wed, Aug 26, 2020 at 02:25:44PM +0900, Sergey Senozhatsky wrote: > On (20/08/26 07:08), Wolfram Sang wrote: > > On Wed, Aug 26, 2020 at 01:29:37PM +0900, Sergey Senozhatsky wrote: > > > Unlike acpi_match_device(), acpi_driver_match_device() does > > > consider devices that provide of_match_table

Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-26 Thread kernel test robot
Hi Sergey, I love your patch! Yet something to improve: [auto build test ERROR on v5.9-rc2] [also build test ERROR on next-20200825] [cannot apply to wsa/i2c/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as

Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-25 Thread Sergey Senozhatsky
On (20/08/26 07:08), Wolfram Sang wrote: > On Wed, Aug 26, 2020 at 01:29:37PM +0900, Sergey Senozhatsky wrote: > > Unlike acpi_match_device(), acpi_driver_match_device() does > > consider devices that provide of_match_table and performs > > of_compatible() matching for such devices. The key point h

Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-25 Thread Wolfram Sang
On Wed, Aug 26, 2020 at 01:29:37PM +0900, Sergey Senozhatsky wrote: > Unlike acpi_match_device(), acpi_driver_match_device() does > consider devices that provide of_match_table and performs > of_compatible() matching for such devices. The key point here is > that ACPI of_compatible() matching - acp

Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing

2020-08-25 Thread Sergey Senozhatsky
On (20/08/26 13:29), Sergey Senozhatsky wrote: > Unlike acpi_match_device(), acpi_driver_match_device() does > consider devices that provide of_match_table and performs > of_compatible() matching for such devices. The key point here is > that ACPI of_compatible() matching - acpi_of_match_device() -