Re: [PATCH -next v3 2/2] media: ov772x: use SCCB helpers

2018-07-10 Thread Wolfram Sang
> > I think it would be even better to introduce a SSCB regmap layer > > and use that. > > I'm fine with introducing a SCCB regmap layer. I am fine with this approach, too. > But do we need to provide both a SCCB regmap and these SCCB helpers? I don't know much about the OV sensor drivers. I'd

Re: [PATCH -next v3 2/2] media: ov772x: use SCCB helpers

2018-07-10 Thread Akinobu Mita
2018年7月10日(火) 6:23 Sebastian Reichel : > > Hi, > > On Mon, Jul 09, 2018 at 06:14:43PM +0200, Wolfram Sang wrote: > > > static int ov772x_read(struct i2c_client *client, u8 addr) > > > { > > > - int ret; > > > - u8 val; > > > - > > > - ret = i2c_master_send(client, &addr, 1); > > > - if (r

Re: [PATCH -next v3 2/2] media: ov772x: use SCCB helpers

2018-07-09 Thread Sebastian Reichel
Hi, On Mon, Jul 09, 2018 at 06:14:43PM +0200, Wolfram Sang wrote: > > static int ov772x_read(struct i2c_client *client, u8 addr) > > { > > - int ret; > > - u8 val; > > - > > - ret = i2c_master_send(client, &addr, 1); > > - if (ret < 0) > > - return ret; > > - ret = i2c_master

Re: [PATCH -next v3 2/2] media: ov772x: use SCCB helpers

2018-07-09 Thread Wolfram Sang
> static int ov772x_read(struct i2c_client *client, u8 addr) > { > - int ret; > - u8 val; > - > - ret = i2c_master_send(client, &addr, 1); > - if (ret < 0) > - return ret; > - ret = i2c_master_recv(client, &val, 1); > - if (ret < 0) > - return ret;