Re: [PATCH v10 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-10 Thread Peter Rosin
On 2018-09-10 23:38, Ajay Gupta wrote: >> My guess is that with the above, you can actually program the I2C_MST_ADDR >> register inside the "if (Read)" branch and then remove the I2C_AQ_COMB | >> I2C_AQ_COMB_WRITE_FIRST | I2C_AQ_COMB_SAME_ADDR quirks. > > We need I2C_MST_ADDR to be programmed even

RE: [PATCH v10 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-10 Thread Ajay Gupta
Hi Peter > > + if (msgs[i].flags & I2C_M_RD) { > > + /* gpu_i2c_read has implicit start and stop */ > > + status = gpu_i2c_read(i2cd, msgs[i].buf, > >> msgs[i].len); > > + if (status < 0) > > +

Re: [PATCH v10 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-10 Thread Peter Rosin
On 2018-09-10 22:04, Ajay Gupta wrote: > Hi Peter, > > + if (msgs[i].flags & I2C_M_RD) { > + /* gpu_i2c_read has implicit start and stop */ > + status = gpu_i2c_read(i2cd, msgs[i].buf, >> msgs[i].len); > +

RE: [PATCH v10 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-10 Thread Ajay Gupta
Hi Peter, > >>> + if (msgs[i].flags & I2C_M_RD) { > >>> + /* gpu_i2c_read has implicit start and stop */ > >>> + status = gpu_i2c_read(i2cd, msgs[i].buf, > msgs[i].len); > >>> + if (status < 0) > >>> +

Re: [PATCH v10 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-10 Thread Peter Rosin
On 2018-09-10 19:43, Ajay Gupta wrote: > Hi Peter, > >>> + >>> + if (msgs[i].flags & I2C_M_RD) { >>> + /* gpu_i2c_read has implicit start and stop */ >>> + status = gpu_i2c_read(i2cd, msgs[i].buf, >>> msgs[i].len);

RE: [PATCH v10 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-10 Thread Ajay Gupta
Hi Peter, > > + > > + if (msgs[i].flags & I2C_M_RD) { > > + /* gpu_i2c_read has implicit start and stop */ > > + status = gpu_i2c_read(i2cd, msgs[i].buf, > > msgs[i].len); > > + if (status < 0)

Re: [PATCH v10 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-10 Thread Peter Rosin
On 2018-09-10 19:28, Peter Rosin wrote: > On 2018-09-10 18:08, Ajay Gupta wrote: >> Hi Peter, >> > + > + if (msgs[i].flags & I2C_M_RD) { > + /* gpu_i2c_read has implicit start and stop */ > + status = gpu_i2c_read(i2cd, msgs[i].buf, msgs[i].le

Re: [PATCH v10 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-10 Thread Peter Rosin
On 2018-09-10 18:08, Ajay Gupta wrote: > Hi Peter, > + + if (msgs[i].flags & I2C_M_RD) { + /* gpu_i2c_read has implicit start and stop */ + status = gpu_i2c_read(i2cd, msgs[i].buf, msgs[i].len); + if (status < 0)

RE: [PATCH v10 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-10 Thread Ajay Gupta
Hi Peter, > >> + > >> + if (msgs[i].flags & I2C_M_RD) { > >> + /* gpu_i2c_read has implicit start and stop */ > >> + status = gpu_i2c_read(i2cd, msgs[i].buf, msgs[i].len); > >> + if (status < 0) > >> + return stat

Re: [PATCH v10 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-10 Thread Peter Rosin
On 2018-09-08 21:17, Peter Rosin wrote: >> + >> +if (msgs[i].flags & I2C_M_RD) { >> +/* gpu_i2c_read has implicit start and stop */ >> +status = gpu_i2c_read(i2cd, msgs[i].buf, msgs[i].len); >> +if (status < 0) >> +

Re: [PATCH v10 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-08 Thread Peter Rosin
Andy, there's a question for you below. On 2018-09-08 02:09, Ajay Gupta wrote: > Latest NVIDIA GPU card has USB Type-C interface. There is a > Type-C controller which can be accessed over I2C. > > This driver adds I2C bus driver to communicate with Type-C controller. > I2C client driver will be p

[PATCH v10 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-09-07 Thread Ajay Gupta
Latest NVIDIA GPU card has USB Type-C interface. There is a Type-C controller which can be accessed over I2C. This driver adds I2C bus driver to communicate with Type-C controller. I2C client driver will be part of USB Type-C UCSI driver. Signed-off-by: Ajay Gupta Reviewed-by: Andy Shevchenko R