Install async notifier for digital input on Gen3 when no other CSI-2 input has been found connected. Signed-off-by: Jacopo Mondi <jacopo+renesas@xxxxxxxxxx> --- drivers/media/platform/rcar-vin/rcar-core.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c index 78ca232..6e5d84a 100644 --- a/drivers/media/platform/rcar-vin/rcar-core.c +++ b/drivers/media/platform/rcar-vin/rcar-core.c @@ -866,17 +866,28 @@ static int rvin_group_graph_init(struct rvin_dev *vin) } i = 0; - for_each_set_bit(bit, &bitmap, RVIN_CSI_MAX) { - subdevs[i++] = &vin->group->csi[bit].asd; + for_each_set_bit(bit, &bitmap, RVIN_INPUT_MAX) { + if (bit < RVIN_CSI_MAX) + subdevs[i++] = &vin->group->csi[bit].asd; + else if (bit == RVIN_PARALLEL_IN) { + subdevs[0] = &vin->digital.asd; + vin->notifier.num_subdevs = 1; + } } vin_dbg(vin, "Claimed %d subdevices for group\n", count); - vin->notifier.num_subdevs = count; vin->notifier.subdevs = subdevs; - vin->notifier.bound = rvin_group_notify_bound; - vin->notifier.unbind = rvin_group_notify_unbind; - vin->notifier.complete = rvin_group_notify_complete; + if (!vin->notifier.num_subdevs) { + vin->notifier.num_subdevs = count; + vin->notifier.bound = rvin_group_notify_bound; + vin->notifier.unbind = rvin_group_notify_unbind; + vin->notifier.complete = rvin_group_notify_complete; + } else { + vin->notifier.bound = rvin_digital_notify_bound; + vin->notifier.unbind = rvin_digital_notify_unbind; + vin->notifier.complete = rvin_digital_notify_complete; + } mutex_unlock(&vin->group->lock); -- 2.7.4