Re: [PATCH] media: ov2740: add NVMEM interface to read customized OTP data

2020-07-17 Thread Sergey Senozhatsky
On (20/06/12 17:42), Bingbu Cao wrote: > > +static int ov2740_nvmem_read(void *priv, unsigned int off, void *val, > + size_t count) > +{ > + struct nvm_data *nvm = priv; > + > + memcpy(val, nvm->nvm_buffer + off, count); > + > + return 0; > +} > + > +static in

Re: [PATCH] media: ov2740: add NVMEM interface to read customized OTP data

2020-06-15 Thread Sakari Ailus
Hi Srinivas, On Mon, Jun 15, 2020 at 10:46:20AM +0100, Srinivas Kandagatla wrote: > > > On 15/06/2020 10:29, Sakari Ailus wrote: > > > + ret = ov2740_register_nvmem(client); > > > + if (ret) > > > + dev_err(&client->dev, "register nvmem failed, ret %d\n", ret); > > > + > > > /*

Re: [PATCH] media: ov2740: add NVMEM interface to read customized OTP data

2020-06-15 Thread Srinivas Kandagatla
On 15/06/2020 10:29, Sakari Ailus wrote: + ret = ov2740_register_nvmem(client); + if (ret) + dev_err(&client->dev, "register nvmem failed, ret %d\n", ret); + /* * Device is already turned on by i2c-core with ACPI domain PM. * Enable runtime P

Re: [PATCH] media: ov2740: add NVMEM interface to read customized OTP data

2020-06-15 Thread Sakari Ailus
Hi Bingbu, Thank you for the patch. On Fri, Jun 12, 2020 at 05:42:02PM +0800, Bingbu Cao wrote: > From: Qingwu Zhang > > ov2740 includes 512bytes of one-time programmable memory and > 256 bytes are reserved for customers which can be used to store > customized information. This patch provide an

[PATCH] media: ov2740: add NVMEM interface to read customized OTP data

2020-06-12 Thread Bingbu Cao
From: Qingwu Zhang ov2740 includes 512bytes of one-time programmable memory and 256 bytes are reserved for customers which can be used to store customized information. This patch provide an NVMEM interface to support read out the customized data in OTP. Signed-off-by: Bingbu Cao Signed-off-by: