* [PATCH] media: davinci: vpif: set device capabilities
@ 2012-09-25 11:16 Prabhakar
2012-09-25 11:43 ` Hans Verkuil
0 siblings, 1 reply; 9+ messages in thread
From: Prabhakar @ 2012-09-25 11:16 UTC (permalink / raw)
To: LMML
Cc: DLOS, Manjunath Hadli, Mauro Carvalho Chehab, VGER,
Lad, Prabhakar, Hans Verkuil
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));
strlcpy(cap->bus_info, "VPIF Platform", sizeof(cap->bus_info));
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));
strlcpy(cap->bus_info, "Platform", sizeof(cap->bus_info));
strlcpy(cap->card, config->card_name, sizeof(cap->card));
--
1.7.4.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] media: davinci: vpif: set device capabilities
2012-09-25 11:16 [PATCH] media: davinci: vpif: set device capabilities Prabhakar
@ 2012-09-25 11:43 ` Hans Verkuil
2012-09-25 11:47 ` Prabhakar Lad
2012-09-25 11:49 ` Laurent Pinchart
0 siblings, 2 replies; 9+ messages in thread
From: Hans Verkuil @ 2012-09-25 11:43 UTC (permalink / raw)
To: Prabhakar
Cc: LMML, DLOS, Manjunath Hadli, Mauro Carvalho Chehab, VGER,
Lad, Prabhakar, Hans Verkuil
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.
> 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,
Hans
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] media: davinci: vpif: set device capabilities
2012-09-25 11:43 ` Hans Verkuil
@ 2012-09-25 11:47 ` Prabhakar Lad
2012-09-25 11:49 ` Laurent Pinchart
1 sibling, 0 replies; 9+ messages in thread
From: Prabhakar Lad @ 2012-09-25 11:47 UTC (permalink / raw)
To: Hans Verkuil
Cc: LMML, DLOS, Manjunath Hadli, Mauro Carvalho Chehab, VGER,
Lad, Prabhakar, Hans Verkuil
Hi Hans,
Thanks for the review.
On Tue, Sep 25, 2012 at 5:13 PM, Hans Verkuil <hansverk@cisco.com> 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'.
>
Ok.
>> 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.
>
Ok.
>> 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));
>>
>
Ok, I'll respin v2 with all the changes.
Regards,
--Prabhakar Lad
> Regards,
>
> Hans
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] media: davinci: vpif: set device capabilities
2012-09-25 11:43 ` Hans Verkuil
2012-09-25 11:47 ` Prabhakar Lad
@ 2012-09-25 11:49 ` Laurent Pinchart
2012-09-25 11:54 ` Hans Verkuil
1 sibling, 1 reply; 9+ messages in thread
From: Laurent Pinchart @ 2012-09-25 11:49 UTC (permalink / raw)
To: Hans Verkuil
Cc: Prabhakar, LMML, DLOS, Manjunath Hadli, Mauro Carvalho Chehab,
VGER, Lad, Prabhakar, Hans Verkuil
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] media: davinci: vpif: set device capabilities
2012-09-25 11:49 ` Laurent Pinchart
@ 2012-09-25 11:54 ` Hans Verkuil
2012-09-25 13:26 ` Prabhakar Lad
0 siblings, 1 reply; 9+ messages in thread
From: Hans Verkuil @ 2012-09-25 11:54 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Prabhakar, LMML, DLOS, Manjunath Hadli, Mauro Carvalho Chehab,
VGER, Lad, Prabhakar, Hans Verkuil
On Tue 25 September 2012 13:49:16 Laurent Pinchart wrote:
> 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.
Sure, that's even better. You do have to check that this gives you what you'd
expect (i.e., that you don't end up with "platform:platform:vpif_capture").
Regards,
Hans
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] media: davinci: vpif: set device capabilities
2012-09-25 11:54 ` Hans Verkuil
@ 2012-09-25 13:26 ` Prabhakar Lad
2012-09-25 13:48 ` Hans Verkuil
0 siblings, 1 reply; 9+ messages in thread
From: Prabhakar Lad @ 2012-09-25 13:26 UTC (permalink / raw)
To: Hans Verkuil, Laurent Pinchart
Cc: LMML, DLOS, Manjunath Hadli, Mauro Carvalho Chehab, VGER,
Lad, Prabhakar, Hans Verkuil
Hi Hans/Laurent
On Tue, Sep 25, 2012 at 5:24 PM, Hans Verkuil <hansverk@cisco.com> wrote:
> On Tue 25 September 2012 13:49:16 Laurent Pinchart wrote:
>> 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.
>
> Sure, that's even better. You do have to check that this gives you what you'd
> expect (i.e., that you don't end up with "platform:platform:vpif_capture").
>
But the driver field is max 16, should i extend it to 32 ?
Regards,
--Prabhakar Lad
> Regards,
>
> Hans
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] media: davinci: vpif: set device capabilities
2012-09-25 13:26 ` Prabhakar Lad
@ 2012-09-25 13:48 ` Hans Verkuil
2012-09-25 13:50 ` Laurent Pinchart
0 siblings, 1 reply; 9+ messages in thread
From: Hans Verkuil @ 2012-09-25 13:48 UTC (permalink / raw)
To: Prabhakar Lad
Cc: Laurent Pinchart, LMML, DLOS, Manjunath Hadli,
Mauro Carvalho Chehab, VGER, Lad, Prabhakar, Hans Verkuil
On Tue 25 September 2012 15:26:11 Prabhakar Lad wrote:
> Hi Hans/Laurent
>
> On Tue, Sep 25, 2012 at 5:24 PM, Hans Verkuil <hansverk@cisco.com> wrote:
> > On Tue 25 September 2012 13:49:16 Laurent Pinchart wrote:
> >> 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.
> >
> > Sure, that's even better. You do have to check that this gives you what you'd
> > expect (i.e., that you don't end up with "platform:platform:vpif_capture").
> >
> But the driver field is max 16, should i extend it to 32 ?
I'm certain Laurent meant to say:
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s", dev_name(vpif_dev));
It makes no sense to use cap->driver.
Regards,
Hans
>
> Regards,
> --Prabhakar Lad
>
> > Regards,
> >
> > Hans
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] media: davinci: vpif: set device capabilities
2012-09-25 13:48 ` Hans Verkuil
@ 2012-09-25 13:50 ` Laurent Pinchart
2012-09-25 13:56 ` Prabhakar Lad
0 siblings, 1 reply; 9+ messages in thread
From: Laurent Pinchart @ 2012-09-25 13:50 UTC (permalink / raw)
To: Hans Verkuil
Cc: Prabhakar Lad, LMML, DLOS, Manjunath Hadli, Mauro Carvalho Chehab,
VGER, Lad, Prabhakar, Hans Verkuil
On Tuesday 25 September 2012 15:48:10 Hans Verkuil wrote:
> On Tue 25 September 2012 15:26:11 Prabhakar Lad wrote:
> > On Tue, Sep 25, 2012 at 5:24 PM, Hans Verkuil <hansverk@cisco.com> wrote:
> > > On Tue 25 September 2012 13:49:16 Laurent Pinchart wrote:
> > >> 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.
> > >
> > > Sure, that's even better. You do have to check that this gives you what
> > > you'd expect (i.e., that you don't end up with
> > > "platform:platform:vpif_capture").>
> > But the driver field is max 16, should i extend it to 32 ?
>
> I'm certain Laurent meant to say:
>
> snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
> dev_name(vpif_dev));
Yes that's what I meant, sorry.
> It makes no sense to use cap->driver.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] media: davinci: vpif: set device capabilities
2012-09-25 13:50 ` Laurent Pinchart
@ 2012-09-25 13:56 ` Prabhakar Lad
0 siblings, 0 replies; 9+ messages in thread
From: Prabhakar Lad @ 2012-09-25 13:56 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Hans Verkuil, LMML, DLOS, Manjunath Hadli, Mauro Carvalho Chehab,
VGER, Lad, Prabhakar, Hans Verkuil
On Tue, Sep 25, 2012 at 7:20 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Tuesday 25 September 2012 15:48:10 Hans Verkuil wrote:
>> On Tue 25 September 2012 15:26:11 Prabhakar Lad wrote:
>> > On Tue, Sep 25, 2012 at 5:24 PM, Hans Verkuil <hansverk@cisco.com> wrote:
>> > > On Tue 25 September 2012 13:49:16 Laurent Pinchart wrote:
>> > >> 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.
>> > >
>> > > Sure, that's even better. You do have to check that this gives you what
>> > > you'd expect (i.e., that you don't end up with
>> > > "platform:platform:vpif_capture").>
>> > But the driver field is max 16, should i extend it to 32 ?
>>
>> I'm certain Laurent meant to say:
>>
>> snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s",
>> dev_name(vpif_dev));
>
> Yes that's what I meant, sorry.
>
Ok thanks for clarifying.
Regards,
--Prabhakar Lad
>> It makes no sense to use cap->driver.
>
> --
> Regards,
>
> Laurent Pinchart
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-09-25 13:56 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-25 11:16 [PATCH] media: davinci: vpif: set device capabilities Prabhakar
2012-09-25 11:43 ` Hans Verkuil
2012-09-25 11:47 ` Prabhakar Lad
2012-09-25 11:49 ` Laurent Pinchart
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
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.