]> git.baikalelectronics.ru Git - kernel.git/commit
media: rcar-vin: add function to manipulate Gen3 chsel value
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Sat, 14 Apr 2018 11:57:13 +0000 (07:57 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 20 Apr 2018 14:01:12 +0000 (10:01 -0400)
commitf01cb989635029c62fe31b56d0f9b6f838c3be0f
tree39c443813a365251e3d347c05ccac02faa8f4ef5
parent10c6661acddf3a1329cc495c30a9f3ff1f2976f0
media: rcar-vin: add function to manipulate Gen3 chsel value

On Gen3 the CSI-2 routing is controlled by the VnCSI_IFMD register. One
feature of this register is that it's only present in the VIN0 and VIN4
instances. The register in VIN0 controls the routing for VIN0-3 and the
register in VIN4 controls routing for VIN4-7.

To be able to control routing from a media device this function is need
to control runtime PM for the subgroup master (VIN0 and VIN4). The
subgroup master must be switched on before the register is manipulated,
once the operation is complete it's safe to switch the master off and
the new routing will still be in effect.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/rcar-vin/rcar-dma.c
drivers/media/platform/rcar-vin/rcar-vin.h