linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-leds@vger.kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org, kyungmin.park@samsung.com,
	b.zolnierkie@samsung.com, pavel@ucw.cz, cooloney@gmail.com,
	rpurdie@rpsys.net, sakari.ailus@iki.fi, s.nawrocki@samsung.com,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH/RFC v8 04/14] v4l2-async: change custom.match callback argument type
Date: Mon, 01 Dec 2014 10:35:32 +0100	[thread overview]
Message-ID: <547C3664.9090806@samsung.com> (raw)
In-Reply-To: <5063831.7WQadZaPHh@avalon>

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

  reply	other threads:[~2014-12-01  9:35 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-28  9:17 [PATCH/RFC v8 00/14] LED / flash API integration Jacek Anaszewski
2014-11-28  9:17 ` [PATCH/RFC v8 01/14] leds: Add LED Flash class extension to the LED subsystem Jacek Anaszewski
     [not found]   ` <CAK5ve-KMdJOLQ0ThKw9OM9u_CcwT87Bx4vcUjnX4fG2+t3pJsw@mail.gmail.com>
2014-12-08 17:07     ` Jacek Anaszewski
2014-11-28  9:17 ` [PATCH/RFC v8 02/14] Documentation: leds: Add description of LED Flash class extension Jacek Anaszewski
2014-11-29 12:58   ` Pavel Machek
2014-12-01 11:40     ` Jacek Anaszewski
2014-12-01 13:04       ` Pavel Machek
2014-12-01 13:58         ` Jacek Anaszewski
2014-12-01 15:21           ` Sakari Ailus
2014-12-05 19:45           ` Bryan Wu
2014-12-06 12:43             ` Pavel Machek
2014-12-08 16:55               ` Jacek Anaszewski
2014-12-08 20:18                 ` Pavel Machek
2014-12-09  8:54                   ` Jacek Anaszewski
2014-12-09 15:50                     ` Pavel Machek
2014-12-10 13:17                       ` Jacek Anaszewski
2014-12-10 13:32                         ` Pavel Machek
2014-12-10 23:14                       ` Sakari Ailus
2015-01-29 21:24                         ` Pavel Machek
2014-11-28  9:17 ` [PATCH/RFC v8 03/14] Documentation: leds: Add description of v4l2-flash sub-device Jacek Anaszewski
2014-11-29 23:44   ` Sakari Ailus
2014-12-05 19:50   ` Bryan Wu
2014-11-28  9:17 ` [PATCH/RFC v8 04/14] v4l2-async: change custom.match callback argument type Jacek Anaszewski
2014-11-29 13:00   ` Pavel Machek
2014-11-29 16:38   ` Laurent Pinchart
2014-12-01  9:35     ` Jacek Anaszewski [this message]
2014-11-28  9:17 ` [PATCH/RFC v8 05/14] v4l2-ctrls: Add V4L2_CID_FLASH_SYNC_STROBE control Jacek Anaszewski
2014-11-28  9:17 ` [PATCH/RFC v8 06/14] media: Add registration helpers for V4L2 flash sub-devices Jacek Anaszewski
2014-12-01 14:53   ` Jacek Anaszewski
2014-11-28  9:17 ` [PATCH/RFC v8 07/14] exynos4-is: Add support for v4l2-flash subdevs Jacek Anaszewski
2014-11-29 13:02   ` Pavel Machek
2014-11-28  9:18 ` [PATCH/RFC v8 08/14] DT: Add documentation for exynos4-is 'flashes' property Jacek Anaszewski
2014-11-28 11:14   ` Mark Rutland
2014-11-28 12:09     ` Jacek Anaszewski
2014-11-28 12:30       ` Mark Rutland
2014-11-28 14:11         ` Jacek Anaszewski
2014-11-28 14:38           ` Mark Rutland
2014-11-28  9:18 ` [PATCH/RFC v8 09/14] mfd: max77693: adjust max77693_led_platform_data Jacek Anaszewski
2014-12-01 11:34   ` Lee Jones
2014-12-01 12:49     ` Jacek Anaszewski
2014-12-01 12:53       ` Lee Jones
2014-11-28  9:18 ` [PATCH/RFC v8 10/14] leds: Add support for max77693 mfd flash cell Jacek Anaszewski
2014-11-28  9:18 ` [PATCH/RFC v8 11/14] DT: Add documentation for the mfd Maxim max77693 Jacek Anaszewski
2014-11-29 19:26   ` Pavel Machek
2014-12-01 12:58     ` Jacek Anaszewski
2014-12-01 13:02       ` Pavel Machek
2014-12-01 13:43         ` Jacek Anaszewski
2014-12-01 11:15   ` Lee Jones
2014-11-28  9:18 ` [PATCH/RFC v8 12/14] leds: Add driver for AAT1290 current regulator Jacek Anaszewski
2014-11-29 19:05   ` Pavel Machek
2014-12-01 11:47     ` Jacek Anaszewski
2014-11-28  9:18 ` [PATCH/RFC v8 13/14] of: Add Skyworks Solutions, Inc. vendor prefix Jacek Anaszewski
2014-11-28  9:18 ` [PATCH/RFC v8 14/14] DT: Add documentation for the Skyworks AAT1290 Jacek Anaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=547C3664.9090806@samsung.com \
    --to=j.anaszewski@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=cooloney@gmail.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=hans.verkuil@cisco.com \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pavel@ucw.cz \
    --cc=rpurdie@rpsys.net \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).