Linux Media Controller development
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Kieran Bingham <kbingham@kernel.org>,
	hverkuil@xs4all.nl
Subject: Re: [PATCH] v4l2-async: add v4l2_async_match()
Date: Tue, 2 May 2017 23:23:47 +0300	[thread overview]
Message-ID: <e5639542-9eff-e6a0-5dbc-8ee439b64d5c@linux.intel.com> (raw)
In-Reply-To: <20170502165413.7559-1-niklas.soderlund+renesas@ragnatech.se>

Hi Niklas,

Niklas Söderlund wrote:
> For drivers registering notifiers with more then one subdevices it's
> difficult to know exactly which one is being bound in each call to the
> notifiers bound callback. Comparing OF nodes became harder after the
> introduction of fwnode where the two following comparisons are not equal
> but where so previous to fwnode.
>
> asd.match.fwnode.fwnode == of_fwnode_handle(subdev->dev->of_node)
>
> asd.match.fwnode.fwnode == of_fwnode_handle(subdev->of_node)
>
> It's also not ideal to directly access the asd.match union without first
> checking the match_type. So to make it easier for drivers to perform
> this type of matching export the v4l2 async match helpers with a new
> symbol v4l2_async_match(). This wold replace the comparisons above with:
>
> v4l2_async_match(subdev, &asd)

Where do you need such a thing, i.e. what do you want to do? Do you have 
an example of where this is helpful?

The async framework has been designed to make it easy to store driver 
specific information to an async sub-device but I'm not sure if all 
drivers do this. Some do at least.

-- 
Kind regards,

Sakari Ailus
sakari.ailus@linux.intel.com

  reply	other threads:[~2017-05-02 20:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-02 16:54 [PATCH] v4l2-async: add v4l2_async_match() Niklas Söderlund
2017-05-02 20:23 ` Sakari Ailus [this message]
2017-05-02 22:08   ` Niklas Söderlund

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=e5639542-9eff-e6a0-5dbc-8ee439b64d5c@linux.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kbingham@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    /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