All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org, detlev.casanova@gmail.com
Subject: Re: [RFC PATCH 0/2] Allow inheritance of private controls
Date: Mon, 03 Feb 2014 09:55:48 +0100	[thread overview]
Message-ID: <52EF5994.4090101@xs4all.nl> (raw)
In-Reply-To: <14055698.TyElnNSLTS@avalon>

Hi Laurent,

On 02/02/2014 10:45 AM, Laurent Pinchart wrote:
> Hi Hans,
> 
> Thank you for the patches.
> 
> On Friday 31 January 2014 12:12:04 Hans Verkuil wrote:
>> Devices with a simple video pipeline may want to inherit private controls
>> of sub-devices and expose them to the video node instead of v4l-subdev
>> nodes (which may be inhibit anyway by the driver).
>>
>> Add support for this.
>>
>> A typical real-life example of this is a PCI capture card with just a single
>> video receiver sub-device. Creating v4l-subdev nodes for this is overkill
>> since it is clear which control belongs to which subdev.
> 
> The is_private flag has been introduced to allow subdevs to disable control 
> inheritance. We're now adding a way for bridges to override that, which makes 
> me wonder whether private controls are really the best way to express this.
> 
> Shouldn't we think about what we're trying to achieve with controls and places 
> where they're exposed and then possibly rework the code accordingly ?

I think is_private should be renamed to is_protected (as used in C++) and
inheriting protected controls is similar to marking a class as 'friend' in C++.

That's the mechanism I have in mind.

So is_private -> is_protected and the proposed inherit_private_ctrls field
becomes inherit_protected_ctrls.

There are only a handful of drivers that set is_private today, so it is easy
enough to rename.

What do you think?

Regards,

	Hans

      reply	other threads:[~2014-02-03  8:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31 11:12 [RFC PATCH 0/2] Allow inheritance of private controls Hans Verkuil
2014-01-31 11:12 ` [RFC PATCH 1/2] v4l2-ctrls: add add_priv arg to v4l2_ctrl_add_handler Hans Verkuil
2014-01-31 11:12 ` [RFC PATCH 2/2] v4l2-device: add inherit_private_ctrls field Hans Verkuil
2014-02-02  9:45 ` [RFC PATCH 0/2] Allow inheritance of private controls Laurent Pinchart
2014-02-03  8:55   ` Hans Verkuil [this message]

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=52EF5994.4090101@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=detlev.casanova@gmail.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.