media: rcar-csi2: Add helper to lookup mbps settings
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Fri, 30 Aug 2024 20:31:01 +0000 (22:31 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 16 Oct 2024 07:32:37 +0000 (09:32 +0200)
commite5be5622b3a28682e95f3f23a7e6834868e4a14f
tree040db51f52ed4d0ed9d9b4cf9d76081fc1b9fa12
parent28a034da232d39b1a26c2198a0ac2625102d9594
media: rcar-csi2: Add helper to lookup mbps settings

The structure mapping a configuration information to a particular mpbs
setting needs to be extended with more information to support future
SoCs. Before it is extended reduce code duplication by creating a helper
to lookup information from an array of mbps setting, the lookup code
has already been copied to two speared locations.

While at it rename the structure to make it clear it contains
information related to a mbps setting, not just a single register value.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/renesas/rcar-csi2.c