Re: [PATCH RFC] modpost: Support I2C Aliases from OF tables

2019-08-08 Thread Enrico Weigelt, metux IT consult
On 08.08.19 15:24, Andy Shevchenko wrote: On Thu, Aug 08, 2019 at 03:12:47PM +0200, Enrico Weigelt, metux IT consult wrote: On 06.08.19 19:12, Javier Martinez Canillas wrote: Right, we could add a macro for that. Although it should probably be called I2C_OF_MODULE_DEVICE_TABLE() or something

Re: [PATCH RFC] modpost: Support I2C Aliases from OF tables

2019-08-08 Thread Andy Shevchenko
On Thu, Aug 08, 2019 at 03:12:47PM +0200, Enrico Weigelt, metux IT consult wrote: > On 06.08.19 19:12, Javier Martinez Canillas wrote: > > > Right, we could add a macro for that. Although it should probably be called > > I2C_OF_MODULE_DEVICE_TABLE() or something like that since is specific to OF.

Re: [PATCH RFC] modpost: Support I2C Aliases from OF tables

2019-08-08 Thread Enrico Weigelt, metux IT consult
On 06.08.19 19:12, Javier Martinez Canillas wrote: Right, we could add a macro for that. Although it should probably be called I2C_OF_MODULE_DEVICE_TABLE() or something like that since is specific to OF. At that point it should be completely noop when OF is disabled, so we also can get rid of

Re: [PATCH RFC] modpost: Support I2C Aliases from OF tables

2019-08-06 Thread Javier Martinez Canillas
Hello Geert, On 8/6/19 9:30 AM, Geert Uytterhoeven wrote: > On Tue, Aug 6, 2019 at 12:48 AM Javier Martinez Canillas > wrote: >> On 8/1/19 4:17 AM, Masahiro Yamada wrote: >> So I think that we should either: >> >> a) take Kieran's patch or b) remove the i2c_of_match_device_sysfs() fallback >> for

Re: [PATCH RFC] modpost: Support I2C Aliases from OF tables

2019-08-06 Thread Javier Martinez Canillas
Hello Geert, On 8/6/19 9:22 AM, Geert Uytterhoeven wrote: > Hi Javier, > > On Tue, Aug 6, 2019 at 12:25 AM Javier Martinez Canillas > wrote: >> On 7/31/19 9:44 PM, Wolfram Sang wrote: >>> Hi Javier, The other option is to remove i2c_of_match_device() and don't make OF match to fallback

Re: [PATCH RFC] modpost: Support I2C Aliases from OF tables

2019-08-06 Thread Geert Uytterhoeven
On Tue, Aug 6, 2019 at 12:48 AM Javier Martinez Canillas wrote: > On 8/1/19 4:17 AM, Masahiro Yamada wrote: > So I think that we should either: > > a) take Kieran's patch or b) remove the i2c_of_match_device_sysfs() fallback > for OF and require an I2C device table for sysfs instantiation and matc

Re: [PATCH RFC] modpost: Support I2C Aliases from OF tables

2019-08-06 Thread Geert Uytterhoeven
Hi Javier, On Tue, Aug 6, 2019 at 12:25 AM Javier Martinez Canillas wrote: > On 7/31/19 9:44 PM, Wolfram Sang wrote: > > Hi Javier, > >> The other option is to remove i2c_of_match_device() and don't make OF match > >> to fallback to i2c_of_match_device_sysfs(). This is what happens in the > >> A

Re: [PATCH RFC] modpost: Support I2C Aliases from OF tables

2019-08-05 Thread Javier Martinez Canillas
Hello Masahiro-san, On 8/1/19 4:17 AM, Masahiro Yamada wrote: > Hi. > > On Thu, Aug 1, 2019 at 4:44 AM Wolfram Sang wrote: >> >> Hi Javier, >> >> thank you for providing the extra information. >> >> (And Kieran, thanks for the patch!) >> >>> The other option is to remove i2c_of_match_device() an

Re: [PATCH RFC] modpost: Support I2C Aliases from OF tables

2019-08-05 Thread Javier Martinez Canillas
Hello Wolfram, On 7/31/19 9:44 PM, Wolfram Sang wrote: > Hi Javier, > > thank you for providing the extra information. > > (And Kieran, thanks for the patch!) > >> The other option is to remove i2c_of_match_device() and don't make OF match >> to fallback to i2c_of_match_device_sysfs(). This is

Re: [PATCH RFC] modpost: Support I2C Aliases from OF tables

2019-07-31 Thread Masahiro Yamada
Hi. On Thu, Aug 1, 2019 at 4:44 AM Wolfram Sang wrote: > > Hi Javier, > > thank you for providing the extra information. > > (And Kieran, thanks for the patch!) > > > The other option is to remove i2c_of_match_device() and don't make OF match > > to fallback to i2c_of_match_device_sysfs(). This i

Re: [PATCH RFC] modpost: Support I2C Aliases from OF tables

2019-07-31 Thread Wolfram Sang
Hi Javier, thank you for providing the extra information. (And Kieran, thanks for the patch!) > The other option is to remove i2c_of_match_device() and don't make OF match > to fallback to i2c_of_match_device_sysfs(). This is what happens in the ACPI > case, since i2c_device_match() just calls a

Re: [PATCH RFC] modpost: Support I2C Aliases from OF tables

2019-07-22 Thread Javier Martinez Canillas
Hello Kieran, On 7/10/19 9:39 PM, Kieran Bingham wrote: > I2C drivers match against an I2C ID table, an OF table, and an ACPI > table. It is now also possible to match against an OF table entry > without the vendor prefix to support backwards compatibility, and allow > simplification of the i2c pr

[PATCH RFC] modpost: Support I2C Aliases from OF tables

2019-07-10 Thread Kieran Bingham
I2C drivers match against an I2C ID table, an OF table, and an ACPI table. It is now also possible to match against an OF table entry without the vendor prefix to support backwards compatibility, and allow simplification of the i2c probe functions. As part of this matching, the probe function is b