media: rcar-vin: add group allocator functions
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Sat, 14 Apr 2018 11:57:18 +0000 (07:57 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 20 Apr 2018 14:08:04 +0000 (10:08 -0400)
commit3bb4c3bc85bf77a76c921671800bde2e1bf82a88
tree14ca2e566f5a0c78b90626a84fdc5a9aaea167a9
parent68ee48d66648f8c800a640733ce774d0bdc06329
media: rcar-vin: add group allocator functions

In media controller mode all VIN instances needs to be part of the same
media graph. There is also a need for each VIN instance to know about
and in some cases be able to communicate with other VIN instances.

Add an allocator framework where the first VIN instance to be probed
creates a shared data structure and registers a media device.
Consecutive VINs insert themself into the global group.

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-core.c
drivers/media/platform/rcar-vin/rcar-vin.h