Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-18 Thread Andy Shevchenko
On Tue, 2017-01-17 at 01:14 +0200, Vladimir Zapolskiy wrote: > review comments then, for example it is not obvious that on a platform > with both CONFIG_ACPI and CONFIG_OF enabled there should be an > exclusive > selection of only one of two possible branches as in your code etc. ACPI and DT

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-18 Thread Andy Shevchenko
On Tue, 2017-01-17 at 01:14 +0200, Vladimir Zapolskiy wrote: > review comments then, for example it is not obvious that on a platform > with both CONFIG_ACPI and CONFIG_OF enabled there should be an > exclusive > selection of only one of two possible branches as in your code etc. ACPI and DT

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-16 Thread Vladimir Zapolskiy
Hello Luis, On 01/16/2017 12:32 PM, Luis Oliveira wrote: > On 12-Jan-17 17:01, Andy Shevchenko wrote: >> On Sat, 2017-01-07 at 03:24 +0200, Vladimir Zapolskiy wrote: >>> On 01/07/2017 02:19 AM, Andy Shevchenko wrote: On Sat, Jan 7, 2017 at 1:43 AM, Vladimir Zapolskiy

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-16 Thread Vladimir Zapolskiy
Hello Luis, On 01/16/2017 12:32 PM, Luis Oliveira wrote: > On 12-Jan-17 17:01, Andy Shevchenko wrote: >> On Sat, 2017-01-07 at 03:24 +0200, Vladimir Zapolskiy wrote: >>> On 01/07/2017 02:19 AM, Andy Shevchenko wrote: On Sat, Jan 7, 2017 at 1:43 AM, Vladimir Zapolskiy wrote: > On

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-16 Thread Luis Oliveira
On 12-Jan-17 17:01, Andy Shevchenko wrote: > On Sat, 2017-01-07 at 03:24 +0200, Vladimir Zapolskiy wrote: >> On 01/07/2017 02:19 AM, Andy Shevchenko wrote: >>> On Sat, Jan 7, 2017 at 1:43 AM, Vladimir Zapolskiy >>> wrote: On 01/07/2017 12:45 AM, Andy Shevchenko wrote: >

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-16 Thread Luis Oliveira
On 12-Jan-17 17:01, Andy Shevchenko wrote: > On Sat, 2017-01-07 at 03:24 +0200, Vladimir Zapolskiy wrote: >> On 01/07/2017 02:19 AM, Andy Shevchenko wrote: >>> On Sat, Jan 7, 2017 at 1:43 AM, Vladimir Zapolskiy >>> wrote: On 01/07/2017 12:45 AM, Andy Shevchenko wrote: > > +

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-12 Thread Andy Shevchenko
On Sat, 2017-01-07 at 03:24 +0200, Vladimir Zapolskiy wrote: > On 01/07/2017 02:19 AM, Andy Shevchenko wrote: > > On Sat, Jan 7, 2017 at 1:43 AM, Vladimir Zapolskiy > > wrote: > > > On 01/07/2017 12:45 AM, Andy Shevchenko wrote: > > > > + } > > > > > > + } else if

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-12 Thread Andy Shevchenko
On Sat, 2017-01-07 at 03:24 +0200, Vladimir Zapolskiy wrote: > On 01/07/2017 02:19 AM, Andy Shevchenko wrote: > > On Sat, Jan 7, 2017 at 1:43 AM, Vladimir Zapolskiy > > wrote: > > > On 01/07/2017 12:45 AM, Andy Shevchenko wrote: > > > > + } > > > > > > + } else if

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Vladimir Zapolskiy
On 01/07/2017 02:19 AM, Andy Shevchenko wrote: > On Sat, Jan 7, 2017 at 1:43 AM, Vladimir Zapolskiy wrote: >> On 01/07/2017 12:45 AM, Andy Shevchenko wrote: >>> On Fri, Jan 6, 2017 at 11:46 PM, Vladimir Zapolskiy wrote: > + if (IS_BUILTIN(CONFIG_OF) &&

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Vladimir Zapolskiy
On 01/07/2017 02:19 AM, Andy Shevchenko wrote: > On Sat, Jan 7, 2017 at 1:43 AM, Vladimir Zapolskiy wrote: >> On 01/07/2017 12:45 AM, Andy Shevchenko wrote: >>> On Fri, Jan 6, 2017 at 11:46 PM, Vladimir Zapolskiy wrote: > + if (IS_BUILTIN(CONFIG_OF) && dev->of_node) {

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Andy Shevchenko
On Sat, Jan 7, 2017 at 1:43 AM, Vladimir Zapolskiy wrote: > On 01/07/2017 12:45 AM, Andy Shevchenko wrote: >> On Fri, Jan 6, 2017 at 11:46 PM, Vladimir Zapolskiy wrote: + if (IS_BUILTIN(CONFIG_OF) && dev->of_node) { >>> >>> IS_BUILTIN(CONFIG_OF) looks

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Andy Shevchenko
On Sat, Jan 7, 2017 at 1:43 AM, Vladimir Zapolskiy wrote: > On 01/07/2017 12:45 AM, Andy Shevchenko wrote: >> On Fri, Jan 6, 2017 at 11:46 PM, Vladimir Zapolskiy wrote: + if (IS_BUILTIN(CONFIG_OF) && dev->of_node) { >>> >>> IS_BUILTIN(CONFIG_OF) looks excessive, check for non-NULL

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Vladimir Zapolskiy
On 01/07/2017 12:45 AM, Andy Shevchenko wrote: > On Fri, Jan 6, 2017 at 11:46 PM, Vladimir Zapolskiy wrote: >>> + if (IS_BUILTIN(CONFIG_OF) && dev->of_node) { >> >> IS_BUILTIN(CONFIG_OF) looks excessive, check for non-NULL dev->of_node >> should be sufficient. > > Sorry, but

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Vladimir Zapolskiy
On 01/07/2017 12:45 AM, Andy Shevchenko wrote: > On Fri, Jan 6, 2017 at 11:46 PM, Vladimir Zapolskiy wrote: >>> + if (IS_BUILTIN(CONFIG_OF) && dev->of_node) { >> >> IS_BUILTIN(CONFIG_OF) looks excessive, check for non-NULL dev->of_node >> should be sufficient. > > Sorry, but you missed the

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Andy Shevchenko
On Fri, Jan 6, 2017 at 11:46 PM, Vladimir Zapolskiy wrote: >> + if (IS_BUILTIN(CONFIG_OF) && dev->of_node) { > > IS_BUILTIN(CONFIG_OF) looks excessive, check for non-NULL dev->of_node > should be sufficient. Sorry, but you missed the point. This will enable compile time

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Andy Shevchenko
On Fri, Jan 6, 2017 at 11:46 PM, Vladimir Zapolskiy wrote: >> + if (IS_BUILTIN(CONFIG_OF) && dev->of_node) { > > IS_BUILTIN(CONFIG_OF) looks excessive, check for non-NULL dev->of_node > should be sufficient. Sorry, but you missed the point. This will enable compile time optimization and

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Vladimir Zapolskiy
Hello Luis, On 01/05/2017 07:24 PM, Luis Oliveira wrote: > This function has the purpose of mode detection by checking the > device nodes for a reg matching with the I2C_OWN_SLAVE_ADDREESS flag. > Currently only checks using OF functions (ACPI slave not supported yet). > > Signed-off-by: Luis

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Vladimir Zapolskiy
Hello Luis, On 01/05/2017 07:24 PM, Luis Oliveira wrote: > This function has the purpose of mode detection by checking the > device nodes for a reg matching with the I2C_OWN_SLAVE_ADDREESS flag. > Currently only checks using OF functions (ACPI slave not supported yet). > > Signed-off-by: Luis

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Andy Shevchenko
On Fri, Jan 6, 2017 at 7:46 PM, Luis Oliveira wrote: > On 06-Jan-17 17:17, Andy Shevchenko wrote: >> On Fri, Jan 6, 2017 at 7:15 PM, Luis Oliveira >> wrote: >>> On 06-Jan-17 16:29, Andy Shevchenko wrote: On Thu, Jan 5, 2017 at 7:24 PM,

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Andy Shevchenko
On Fri, Jan 6, 2017 at 7:46 PM, Luis Oliveira wrote: > On 06-Jan-17 17:17, Andy Shevchenko wrote: >> On Fri, Jan 6, 2017 at 7:15 PM, Luis Oliveira >> wrote: >>> On 06-Jan-17 16:29, Andy Shevchenko wrote: On Thu, Jan 5, 2017 at 7:24 PM, Luis Oliveira >> Please, add kernel doc

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Luis Oliveira
On 06-Jan-17 17:17, Andy Shevchenko wrote: > On Fri, Jan 6, 2017 at 7:15 PM, Luis Oliveira > wrote: >> On 06-Jan-17 16:29, Andy Shevchenko wrote: >>> On Thu, Jan 5, 2017 at 7:24 PM, Luis Oliveira > >>> Please, add kernel doc description here, important thing is to

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Luis Oliveira
On 06-Jan-17 17:17, Andy Shevchenko wrote: > On Fri, Jan 6, 2017 at 7:15 PM, Luis Oliveira > wrote: >> On 06-Jan-17 16:29, Andy Shevchenko wrote: >>> On Thu, Jan 5, 2017 at 7:24 PM, Luis Oliveira > >>> Please, add kernel doc description here, important thing is to explain >>> return codes in

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Andy Shevchenko
On Fri, Jan 6, 2017 at 7:15 PM, Luis Oliveira wrote: > On 06-Jan-17 16:29, Andy Shevchenko wrote: >> On Thu, Jan 5, 2017 at 7:24 PM, Luis Oliveira >> Please, add kernel doc description here, important thing is to explain >> return codes in Return: section of it. >>

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Andy Shevchenko
On Fri, Jan 6, 2017 at 7:15 PM, Luis Oliveira wrote: > On 06-Jan-17 16:29, Andy Shevchenko wrote: >> On Thu, Jan 5, 2017 at 7:24 PM, Luis Oliveira >> Please, add kernel doc description here, important thing is to explain >> return codes in Return: section of it. >> >>> +int

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Luis Oliveira
On 06-Jan-17 16:29, Andy Shevchenko wrote: > On Thu, Jan 5, 2017 at 7:24 PM, Luis Oliveira > wrote: >> This function has the purpose of mode detection by checking the >> device nodes for a reg matching with the I2C_OWN_SLAVE_ADDREESS flag. >> Currently only checks

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Luis Oliveira
On 06-Jan-17 16:29, Andy Shevchenko wrote: > On Thu, Jan 5, 2017 at 7:24 PM, Luis Oliveira > wrote: >> This function has the purpose of mode detection by checking the >> device nodes for a reg matching with the I2C_OWN_SLAVE_ADDREESS flag. >> Currently only checks using OF functions (ACPI slave

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Luis Oliveira
On 06-Jan-17 16:35, Rob Herring wrote: > On Thu, Jan 5, 2017 at 11:24 AM, Luis Oliveira > wrote: >> This function has the purpose of mode detection by checking the >> device nodes for a reg matching with the I2C_OWN_SLAVE_ADDREESS flag. >> Currently only checks using

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Luis Oliveira
On 06-Jan-17 16:35, Rob Herring wrote: > On Thu, Jan 5, 2017 at 11:24 AM, Luis Oliveira > wrote: >> This function has the purpose of mode detection by checking the >> device nodes for a reg matching with the I2C_OWN_SLAVE_ADDREESS flag. >> Currently only checks using OF functions (ACPI slave not

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Rob Herring
On Thu, Jan 5, 2017 at 11:24 AM, Luis Oliveira wrote: > This function has the purpose of mode detection by checking the > device nodes for a reg matching with the I2C_OWN_SLAVE_ADDREESS flag. > Currently only checks using OF functions (ACPI slave not supported yet). >

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Rob Herring
On Thu, Jan 5, 2017 at 11:24 AM, Luis Oliveira wrote: > This function has the purpose of mode detection by checking the > device nodes for a reg matching with the I2C_OWN_SLAVE_ADDREESS flag. > Currently only checks using OF functions (ACPI slave not supported yet). > > Signed-off-by: Luis

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Andy Shevchenko
On Thu, Jan 5, 2017 at 7:24 PM, Luis Oliveira wrote: > This function has the purpose of mode detection by checking the > device nodes for a reg matching with the I2C_OWN_SLAVE_ADDREESS flag. > Currently only checks using OF functions (ACPI slave not supported yet).

Re: [PATCH] i2c: core: helper function to detect slave mode

2017-01-06 Thread Andy Shevchenko
On Thu, Jan 5, 2017 at 7:24 PM, Luis Oliveira wrote: > This function has the purpose of mode detection by checking the > device nodes for a reg matching with the I2C_OWN_SLAVE_ADDREESS flag. > Currently only checks using OF functions (ACPI slave not supported yet). The code looks good, one

[PATCH] i2c: core: helper function to detect slave mode

2017-01-05 Thread Luis Oliveira
This function has the purpose of mode detection by checking the device nodes for a reg matching with the I2C_OWN_SLAVE_ADDREESS flag. Currently only checks using OF functions (ACPI slave not supported yet). Signed-off-by: Luis Oliveira --- Due to the need of checking if the

[PATCH] i2c: core: helper function to detect slave mode

2017-01-05 Thread Luis Oliveira
This function has the purpose of mode detection by checking the device nodes for a reg matching with the I2C_OWN_SLAVE_ADDREESS flag. Currently only checks using OF functions (ACPI slave not supported yet). Signed-off-by: Luis Oliveira --- Due to the need of checking if the I2C slave address is