media: ti-vpe: cal: Add per platform data support
authorBenoit Parrot <bparrot@ti.com>
Tue, 12 Nov 2019 14:53:31 +0000 (15:53 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 9 Dec 2019 10:24:22 +0000 (11:24 +0100)
commit65ee4280f19cb17ae21a11afcea0bf08f3eadfd2
tree3c427ac07ff2f3482ab21f820adbbef0104f1c5a
parent5e51dd35255774419af84fc3dcc068ce8ae908c3
media: ti-vpe: cal: Add per platform data support

First this patch adds a method to access the CTRL_CORE_CAMERRX_CONTROL
register to use the syscon mechanism. For backward compatibility we also
handle using the existing camerrx_control "reg" entry if a syscon node
is not found.

In addition the register bit layout for the CTRL_CORE_CAMERRX_CONTROL
changes depending on the device. In order to support this we need to use
a register access scheme based on data configuration instead of using
static macro.

In this case we make use of the regmap facility and create data set
based on the various device and phy available.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/ti-vpe/cal.c