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

From: Sowjanya Komatineni
Date: Thu Mar 26 2020 - 13:04:06 EST



On 3/26/20 7:48 AM, Sakari Ailus wrote:
External email: Use caution opening links or attachments


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

OK, Will wait and send v6 once I see that patch merged. Thanks Sakari.