Re: [RFC PATCH v5 6/9] media: tegra: Add Tegra210 Video input driver

Sakari Ailus
2020-03-26T14:48:45Z

Hi Sowjanya,

On Wed, Mar 25, 2020 at 11:30:18PM -0700, Sowjanya Komatineni wrote:
>
> On 3/25/20 4:03 AM, Sakari Ailus wrote:
> > > +static int tegra_channel_enum_input(struct file *file, void *fh,
> > > + struct v4l2_input *inp)
> > > +{
> > > + /* currently driver supports internal TPG only */
> > > + if (inp->index)
> > > + return -EINVAL;
> > > +
> > > + inp->type = V4L2_INPUT_TYPE_CAMERA;
> > > + strscpy(inp->name, "Tegra TPG", sizeof(inp->name));
> > > +
> > > + return 0;
> > > +}
> > > +
> > > +static int tegra_channel_g_input(struct file *file, void *priv,
> > > + unsigned int *i)
> > > +{
> > > + *i = 0;
> > > + return 0;
> > > +}
> > > +
> > > +static int tegra_channel_s_input(struct file *file, void *priv,
> > > + unsigned int input)
> > > +{
> > > + if (input > 0)
> > > + return -EINVAL;
> > > +
> > > + return 0;
> > > +}
> > Please see patchset on topic "v4l2-dev/ioctl: Add V4L2_CAP_IO_MC" on
> > linux-media; it's relevant here, too.
>
> Can update in v6 to add device caps V4L2_CAP_IO_MC and remove enum/g/s_input
> ioctls.
>
> But, I don't see this patch "v4l2-dev/ioctl: Add V4L2_CAP_IO_MC" on latest
> linux-next

It's not merged yet but likely will be very soon.

--
Sakari Ailus