[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <547C3664.9090806@samsung.com>
Date: Mon, 01 Dec 2014 10:35:32 +0100
From: Jacek Anaszewski <j.anaszewski@...sung.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: linux-leds@...r.kernel.org, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, kyungmin.park@...sung.com,
b.zolnierkie@...sung.com, pavel@....cz, cooloney@...il.com,
rpurdie@...ys.net, sakari.ailus@....fi, s.nawrocki@...sung.com,
Guennadi Liakhovetski <g.liakhovetski@....de>,
Hans Verkuil <hans.verkuil@...co.com>,
Mark Rutland <mark.rutland@....com>
Subject: Re: [PATCH/RFC v8 04/14] v4l2-async: change custom.match callback
argument type
Hi Laurent,
On 11/29/2014 05:38 PM, Laurent Pinchart wrote:
> Hi Jacek,
>
> Thank you for the patch.
>
> On Friday 28 November 2014 10:17:56 Jacek Anaszewski wrote:
>> It is useful to have an access to the async sub-device
>> being matched, not only to the related struct device.
>> Change match callback argument from struct device
>> to struct v4l2_subdev. It will allow e.g. for matching
>> a sub-device by its "name" property.
>
> In principle I agree. However, we will need to reimplement v4l2-async based on
> the component (drivers/base/component.c) framework at some point. As the
> component framework is based on struct device, will it still be possible to
> match on subdev name in that case ? If not, we might need to try to find
> another approach to the issue.
There were reservations raised [1] concerning the way of matching
by name, as the labels are not guaranteed to be globally unique across
Device Tree. I admit, this issue has to be solved in a different way.
Especially in view of prospective transition to using
drivers/base/component.c
I propose to add a new structure:
struct v4l2_asd_match{
bool (*match)(struct v4l2_async_subdev *, void *);
void *priv;
}
and a function:
v4l2_async_register_subdev_with_match(struct v4l2_subdev *sd, struct
v4l2_asd_match*).
This way we could pass DT sub-node related to a sub-led in a priv
field of v4l2_asd_match upon registration.
This is similar approach as in case of drivers/base/component.c.
Best Regards,
Jacek Anaszewski
[1] http://www.spinics.net/lists/linux-leds/msg02532.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists