mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hansverk@cisco.com>
Cc: Prabhakar <prabhakar.csengg@gmail.com>,
	LMML <linux-media@vger.kernel.org>,
	DLOS <davinci-linux-open-source@linux.davincidsp.com>,
	Manjunath Hadli <manjunath.hadli@ti.com>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	VGER <linux-kernel@vger.kernel.org>,
	"Lad, Prabhakar" <prabhakar.lad@ti.com>,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [PATCH] media: davinci: vpif: set device capabilities
Date: Tue, 25 Sep 2012 13:49:16 +0200	[thread overview]
Message-ID: <2015356.T8yoHfqqkq@avalon> (raw)
In-Reply-To: <201209251343.36240.hansverk@cisco.com>

Hi Hans,

On Tuesday 25 September 2012 13:43:36 Hans Verkuil wrote:
> On Tue 25 September 2012 13:16:24 Prabhakar wrote:
> > From: Lad, Prabhakar <prabhakar.lad@ti.com>
> > 
> > Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
> > Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
> > Cc: Hans Verkuil <hans.verkuil@cisco.com>
> > ---
> > 
> >  drivers/media/platform/davinci/vpif_capture.c |    4 +++-
> >  drivers/media/platform/davinci/vpif_display.c |    4 +++-
> >  2 files changed, 6 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/media/platform/davinci/vpif_capture.c
> > b/drivers/media/platform/davinci/vpif_capture.c index 4828888..faeca98
> > 100644
> > --- a/drivers/media/platform/davinci/vpif_capture.c
> > +++ b/drivers/media/platform/davinci/vpif_capture.c
> > @@ -1630,7 +1630,9 @@ static int vpif_querycap(struct file *file, void 
> > *priv,> 
> >  {
> >  
> >  	struct vpif_capture_config *config = vpif_dev->platform_data;
> > 
> > -	cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
> > +	cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
> > +			V4L2_CAP_READWRITE;
> > +	cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
> > 
> >  	strlcpy(cap->driver, "vpif capture", sizeof(cap->driver));
> 
> This should be the real driver name which is 'vpif_capture'.
> 
> >  	strlcpy(cap->bus_info, "VPIF Platform", sizeof(cap->bus_info));
> 
> For bus_info I would use: "platform:vpif_capture".
> 
> The 'platform:' prefix is going to be the standard for platform drivers.

What about

snprintf(cap->driver, sizeof(cap->driver), "platform:%s", dev_name(vpif_dev));

That would handle cases where multiple platform devices of the same type are 
present.

> >  	strlcpy(cap->card, config->card_name, sizeof(cap->card));
> > 
> > diff --git a/drivers/media/platform/davinci/vpif_display.c
> > b/drivers/media/platform/davinci/vpif_display.c index d94b8a2..171e449
> > 100644
> > --- a/drivers/media/platform/davinci/vpif_display.c
> > +++ b/drivers/media/platform/davinci/vpif_display.c
> > @@ -827,7 +827,9 @@ static int vpif_querycap(struct file *file, void 
> > *priv,> 
> >  {
> >  
> >  	struct vpif_display_config *config = vpif_dev->platform_data;
> > 
> > -	cap->capabilities = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING;
> > +	cap->device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING |
> > +			    V4L2_CAP_READWRITE;
> > +	cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
> > 
> >  	strlcpy(cap->driver, "vpif display", sizeof(cap->driver));
> 
> vpif_driver
> 
> >  	strlcpy(cap->bus_info, "Platform", sizeof(cap->bus_info));
> 
> Ditto: "platform:vpif_driver".
> 
> >  	strlcpy(cap->card, config->card_name, sizeof(cap->card));

-- 
Regards,

Laurent Pinchart


  parent reply	other threads:[~2012-09-25 11:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-25 11:16 Prabhakar
2012-09-25 11:43 ` Hans Verkuil
2012-09-25 11:47   ` Prabhakar Lad
2012-09-25 11:49   ` Laurent Pinchart [this message]
2012-09-25 11:54     ` Hans Verkuil
2012-09-25 13:26       ` Prabhakar Lad
2012-09-25 13:48         ` Hans Verkuil
2012-09-25 13:50           ` Laurent Pinchart
2012-09-25 13:56             ` Prabhakar Lad

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=2015356.T8yoHfqqkq@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hansverk@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=manjunath.hadli@ti.com \
    --cc=mchehab@infradead.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.lad@ti.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®