Re: [PATCH v6 2/5] i2c: core: add api to provide frequency mode strings

2021-04-07 Thread Wolfram Sang
> > I guess exporting will save few dozens of bytes if the function is used more > > than once. (All strings will be duplicated or multiplied in that case) > > > > yes, that's one concern. since we don't need this to perform fast, an inline > one maybe unnecessary. Exactly. I also don't see an

Re: [PATCH v6 2/5] i2c: core: add api to provide frequency mode strings

2021-04-07 Thread Yicong Yang
On 2021/4/7 18:08, Andy Shevchenko wrote: > On Wed, Apr 07, 2021 at 04:29:29PM +0800, Yicong Yang wrote: >> On 2021/4/7 3:54, Wolfram Sang wrote: >>> diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 10bd0b0..7268180 100644 --- a/include/linux/i2c.h +++

Re: [PATCH v6 2/5] i2c: core: add api to provide frequency mode strings

2021-04-07 Thread Andy Shevchenko
On Wed, Apr 07, 2021 at 04:29:29PM +0800, Yicong Yang wrote: > On 2021/4/7 3:54, Wolfram Sang wrote: > > > >> diff --git a/include/linux/i2c.h b/include/linux/i2c.h > >> index 10bd0b0..7268180 100644 > >> --- a/include/linux/i2c.h > >> +++ b/include/linux/i2c.h > >> @@ -47,6 +47,26 @@ typedef int

Re: [PATCH v6 2/5] i2c: core: add api to provide frequency mode strings

2021-04-07 Thread Yicong Yang
On 2021/4/7 3:54, Wolfram Sang wrote: > >> diff --git a/include/linux/i2c.h b/include/linux/i2c.h >> index 10bd0b0..7268180 100644 >> --- a/include/linux/i2c.h >> +++ b/include/linux/i2c.h >> @@ -47,6 +47,26 @@ typedef int (*i2c_slave_cb_t)(struct i2c_client *client, >> #define

Re: [PATCH v6 2/5] i2c: core: add api to provide frequency mode strings

2021-04-06 Thread Wolfram Sang
> diff --git a/include/linux/i2c.h b/include/linux/i2c.h > index 10bd0b0..7268180 100644 > --- a/include/linux/i2c.h > +++ b/include/linux/i2c.h > @@ -47,6 +47,26 @@ typedef int (*i2c_slave_cb_t)(struct i2c_client *client, > #define I2C_MAX_HIGH_SPEED_MODE_FREQ 340 > #define

[PATCH v6 2/5] i2c: core: add api to provide frequency mode strings

2021-03-31 Thread Yicong Yang
Some I2C drivers like Designware and HiSilicon will print the bus frequency mode information, so add a public one that everyone can make use of. Tested-by: Jarkko Nikula Reviewed-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Yicong Yang --- include/linux/i2c.h | 20