[media] vimc: Subdevices as modules
authorHelen Fornazier <helen.koike@collabora.com>
Mon, 19 Jun 2017 17:00:18 +0000 (14:00 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 23 Jun 2017 12:12:07 +0000 (09:12 -0300)
commit4a29b70907496aa9da79112ec31cf9cf2b972c3f
tree9be42df7b467e369899f96e2e4d2e25869bf42f8
parent535d296f4841ffbd7f773ff2a559daa6e117f315
[media] vimc: Subdevices as modules

Change the core structure for adding subdevices in the topology.
Instead of calling the specific create function for each subdevice,
inject a child platform_device with the driver's name.
Each type of node in the topology (sensor, capture, debayer, scaler)
will register a platform_driver with the corresponding name through the
component subsystem.
Implementing a new subdevice type doesn't require vimc-core to be altered.

This facilitates future implementation of dynamic entities, where
hotpluging an entity in the topology is just a matter of
registering/unregistering a platform_device in the system.
It also facilitates other implementations of different nodes without
touching the core code and remove the need of a header file for each
type of node.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/vimc/Makefile
drivers/media/platform/vimc/vimc-capture.c
drivers/media/platform/vimc/vimc-capture.h [deleted file]
drivers/media/platform/vimc/vimc-common.c
drivers/media/platform/vimc/vimc-common.h
drivers/media/platform/vimc/vimc-core.c
drivers/media/platform/vimc/vimc-sensor.c
drivers/media/platform/vimc/vimc-sensor.h [deleted file]