media: i2c: ov2740: get OTP data ready before nvmem registration
authorBingbu Cao <bingbu.cao@intel.com>
Fri, 24 Jul 2020 03:45:38 +0000 (05:45 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 1 Sep 2020 12:13:26 +0000 (14:13 +0200)
commit3cb14256d8876490a028c766f1be3a3f7bdd8c95
tree2c910b24a1755ee272b8148e62c4222271103dd9
parent1d8f95c497053839be326bd97eb3128e3b3312cb
media: i2c: ov2740: get OTP data ready before nvmem registration

The OTP data was not ready after registered as nvmem device, it is
risky as the nvmem read may happen once the device exists, this patch
get the OTP data ready before registering the nvmem device. OTP data
missing should not break the normal camera sensor probe, so use a
warning instead of an error message.

Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
Signed-off-by: Qingwu Zhang <qingwu.zhang@intel.com>
Suggested-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/ov2740.c