mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	alsa-devel@alsa-project.org, broonie@opensource.wolfsonmicro.com,
	clemens@ladisch.de, gregkh@suse.de,
	sakari.ailus@maxwell.research.nokia.com
Subject: Re: [RFC/PATCH v7 03/12] media: Entities, pads and links
Date: Thu, 23 Dec 2010 10:05:34 +0100	[thread overview]
Message-ID: <201012231005.34882.laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <201012211722.39810.hverkuil@xs4all.nl>

Hi Hans,

On Tuesday 21 December 2010 17:22:39 Hans Verkuil wrote:
> Hi Laurent,
> 
> I promised to look at the new type names, so here is my opinion:

Thanks.

> On Monday, December 20, 2010 12:36:26 Laurent Pinchart wrote:
> 
> <snip>
> 
> > +
> > +#define MEDIA_ENTITY_TYPE_SHIFT			16
> > +#define MEDIA_ENTITY_TYPE_MASK			0x00ff0000
> > +#define MEDIA_ENTITY_SUBTYPE_MASK		0x0000ffff
> > +
> > +#define MEDIA_ENTITY_TYPE_DEVNODE		(1 << MEDIA_ENTITY_TYPE_SHIFT)
> > +#define MEDIA_ENTITY_TYPE_DEVNODE_V4L		(MEDIA_ENTITY_TYPE_DEVNODE + 
1)
> > +#define MEDIA_ENTITY_TYPE_DEVNODE_FB		(MEDIA_ENTITY_TYPE_DEVNODE + 2)
> > +#define MEDIA_ENTITY_TYPE_DEVNODE_ALSA		(MEDIA_ENTITY_TYPE_DEVNODE + 
3)
> > +#define MEDIA_ENTITY_TYPE_DEVNODE_DVB		(MEDIA_ENTITY_TYPE_DEVNODE + 
4)
> > +
> > +#define MEDIA_ENTITY_TYPE_V4L2_SUBDEV		(2 << MEDIA_ENTITY_TYPE_SHIFT)
> > +#define
> > MEDIA_ENTITY_TYPE_V4L2_SUBDEV_SENSOR	(MEDIA_ENTITY_TYPE_V4L2_SUBDEV + 1)
> > +#define
> > MEDIA_ENTITY_TYPE_V4L2_SUBDEV_FLASH	(MEDIA_ENTITY_TYPE_V4L2_SUBDEV + 2)
> > +#define
> > MEDIA_ENTITY_TYPE_V4L2_SUBDEV_LENS	(MEDIA_ENTITY_TYPE_V4L2_SUBDEV + 3) +
> > +#define MEDIA_ENTITY_FLAG_DEFAULT		(1 << 0)
> > +
> > +#define MEDIA_LINK_FLAG_ENABLED			(1 << 0)
> > +#define MEDIA_LINK_FLAG_IMMUTABLE		(1 << 1)
> > +
> > +#define MEDIA_PAD_FLAG_INPUT			(1 << 0)
> > +#define MEDIA_PAD_FLAG_OUTPUT			(1 << 1)
> 
> Using V4L2_SUBDEV instead of just SUBDEV is definitely an improvement.
> 
> However, I think the defines are getting way too long and I would propose
> to use the ME_ prefix instead of MEDIA_ENTITY_. Also ML_ instead of
> MEDIA_LINK_ and MP_ instead of MEDIA_PAD_.
> 
> That way it is less of an alphabet soup when reading code.

I agree that the names are too long, but I'm concerned that the ME_, ML_ and 
MP_ prefixes might cause namespace clashes.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2010-12-23  9:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-20 11:36 [RFC/PATCH v7 00/12] Media controller (core and V4L2) Laurent Pinchart
2010-12-20 11:36 ` [RFC/PATCH v7 01/12] media: Media device node support Laurent Pinchart
2010-12-23  3:32   ` Greg KH
2010-12-24 11:59     ` Laurent Pinchart
2011-01-06 22:19       ` Greg KH
2011-01-06 23:27         ` Hans Verkuil
2011-01-06 23:46           ` Greg KH
2011-01-10 14:09         ` Laurent Pinchart
2010-12-23  3:34   ` Greg KH
2010-12-20 11:36 ` [RFC/PATCH v7 02/12] media: Media device Laurent Pinchart
2010-12-23  3:33   ` Greg KH
2010-12-24 12:01     ` Laurent Pinchart
2010-12-20 11:36 ` [RFC/PATCH v7 03/12] media: Entities, pads and links Laurent Pinchart
2010-12-21 16:22   ` Hans Verkuil
2010-12-23  9:05     ` Laurent Pinchart [this message]
2010-12-20 11:36 ` [RFC/PATCH v7 04/12] media: Entity graph traversal Laurent Pinchart
2010-12-20 11:36 ` [RFC/PATCH v7 05/12] media: Reference count and power handling Laurent Pinchart
2010-12-20 11:36 ` [RFC/PATCH v7 06/12] media: Media device information query Laurent Pinchart
2010-12-20 11:36 ` [RFC/PATCH v7 07/12] media: Entities, pads and links enumeration Laurent Pinchart
2010-12-20 11:36 ` [RFC/PATCH v7 08/12] media: Links setup Laurent Pinchart
2010-12-20 11:36 ` [RFC/PATCH v7 09/12] media: Pipelines and media streams Laurent Pinchart
2010-12-20 11:36 ` [RFC/PATCH v7 10/12] v4l: Add a media_device pointer to the v4l2_device structure Laurent Pinchart
2010-12-20 11:36 ` [RFC/PATCH v7 11/12] v4l: Make video_device inherit from media_entity Laurent Pinchart
2010-12-20 11:36 ` [RFC/PATCH v7 12/12] v4l: Make v4l2_subdev " Laurent Pinchart

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=201012231005.34882.laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=clemens@ladisch.de \
    --cc=gregkh@suse.de \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@maxwell.research.nokia.com \
    /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

all inboxes | Powered by JetHome®