Re: [RFC PATCH 1/2] i2c: Add i2c_verify_device_id() to verify device id

2018-04-09 Thread Guenter Roeck
On Sun, Apr 08, 2018 at 09:34:36AM +0200, Wolfram Sang wrote: > Hi, > > On Mon, Mar 19, 2018 at 09:10:58AM -0700, Guenter Roeck wrote: > > Commit dde67eb1beeb ("i2c: add i2c_get_device_id() to get the standard > > I2C device id") added a function to return the standard I2C device ID. > > Use that

Re: [RFC PATCH 1/2] i2c: Add i2c_verify_device_id() to verify device id

2018-04-08 Thread Peter Rosin
Sorry for replying to self... On 2018-04-08 11:08, Peter Rosin wrote: > On 2018-04-08 09:34, Wolfram Sang wrote: >> Hi, >> >> On Mon, Mar 19, 2018 at 09:10:58AM -0700, Guenter Roeck wrote: >>> Commit dde67eb1beeb ("i2c: add i2c_get_device_id() to get the standard >>> I2C device id") added a functi

Re: [RFC PATCH 1/2] i2c: Add i2c_verify_device_id() to verify device id

2018-04-08 Thread Peter Rosin
On 2018-04-08 09:34, Wolfram Sang wrote: > Hi, > > On Mon, Mar 19, 2018 at 09:10:58AM -0700, Guenter Roeck wrote: >> Commit dde67eb1beeb ("i2c: add i2c_get_device_id() to get the standard >> I2C device id") added a function to return the standard I2C device ID. >> Use that function to verify the d

Re: [RFC PATCH 1/2] i2c: Add i2c_verify_device_id() to verify device id

2018-04-08 Thread Wolfram Sang
Hi, On Mon, Mar 19, 2018 at 09:10:58AM -0700, Guenter Roeck wrote: > Commit dde67eb1beeb ("i2c: add i2c_get_device_id() to get the standard > I2C device id") added a function to return the standard I2C device ID. > Use that function to verify the device ID of a given device. I am very open to the

Re: [RFC PATCH 1/2] i2c: Add i2c_verify_device_id() to verify device id

2018-03-19 Thread Peter Rosin
On 2018-03-19 21:50, Guenter Roeck wrote: > On Mon, Mar 19, 2018 at 08:55:55PM +0100, Peter Rosin wrote: >> On 2018-03-19 19:48, Guenter Roeck wrote: >>> On Mon, Mar 19, 2018 at 05:47:05PM +0100, Peter Rosin wrote: I also wonder if NXP will ever release a chip with part-id 0 and die-revis

Re: [RFC PATCH 1/2] i2c: Add i2c_verify_device_id() to verify device id

2018-03-19 Thread Guenter Roeck
On Mon, Mar 19, 2018 at 08:55:55PM +0100, Peter Rosin wrote: > On 2018-03-19 19:48, Guenter Roeck wrote: > > On Mon, Mar 19, 2018 at 05:47:05PM +0100, Peter Rosin wrote: > >> I also wonder if NXP will ever release a chip with part-id 0 and > >> die-revision 0? If not, an all zero struct i2c_device_

Re: [RFC PATCH 1/2] i2c: Add i2c_verify_device_id() to verify device id

2018-03-19 Thread Peter Rosin
On 2018-03-19 19:48, Guenter Roeck wrote: > On Mon, Mar 19, 2018 at 05:47:05PM +0100, Peter Rosin wrote: >> I also wonder if NXP will ever release a chip with part-id 0 and >> die-revision 0? If not, an all zero struct i2c_device_identity >> could be used instead of manufacturer_id 0x and that

Re: [RFC PATCH 1/2] i2c: Add i2c_verify_device_id() to verify device id

2018-03-19 Thread Guenter Roeck
On Mon, Mar 19, 2018 at 05:47:05PM +0100, Peter Rosin wrote: > On 2018-03-19 17:10, Guenter Roeck wrote: > > Commit dde67eb1beeb ("i2c: add i2c_get_device_id() to get the standard > > I2C device id") added a function to return the standard I2C device ID. > > Use that function to verify the device I

Re: [RFC PATCH 1/2] i2c: Add i2c_verify_device_id() to verify device id

2018-03-19 Thread Peter Rosin
On 2018-03-19 17:10, Guenter Roeck wrote: > Commit dde67eb1beeb ("i2c: add i2c_get_device_id() to get the standard > I2C device id") added a function to return the standard I2C device ID. > Use that function to verify the device ID of a given device. Yeah, you're moving complexity from the driver