summaryrefslogtreecommitdiffstats
path: root/drivers/input/rmi4
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2019-05-10 20:40:35 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2019-05-10 20:40:35 +0200
commit14e0c7317ed58bcd15af5c3d09818ee0f2e3984c (patch)
treef9b63dc681574484c23c6b01be81f17cf9c64d6a /drivers/input/rmi4
parentInput: synaptics-rmi4 - write config register values to the right offset (diff)
parentInput: libps2 - mark expected switch fall-through (diff)
downloadlinux-14e0c7317ed58bcd15af5c3d09818ee0f2e3984c.tar.xz
linux-14e0c7317ed58bcd15af5c3d09818ee0f2e3984c.zip
Merge branch 'next' into for-linus
Prepare input updates for 5.2 merge window.
Diffstat (limited to 'drivers/input/rmi4')
-rw-r--r--drivers/input/rmi4/rmi_f54.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/input/rmi4/rmi_f54.c b/drivers/input/rmi4/rmi_f54.c
index a6f515bcab22..516fea06ed59 100644
--- a/drivers/input/rmi4/rmi_f54.c
+++ b/drivers/input/rmi4/rmi_f54.c
@@ -456,25 +456,15 @@ static int rmi_f54_vidioc_fmt(struct file *file, void *priv,
static int rmi_f54_vidioc_enum_fmt(struct file *file, void *priv,
struct v4l2_fmtdesc *fmt)
{
+ struct f54_data *f54 = video_drvdata(file);
+
if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
- switch (fmt->index) {
- case 0:
- fmt->pixelformat = V4L2_TCH_FMT_DELTA_TD16;
- break;
-
- case 1:
- fmt->pixelformat = V4L2_TCH_FMT_DELTA_TD08;
- break;
-
- case 2:
- fmt->pixelformat = V4L2_TCH_FMT_TU16;
- break;
-
- default:
+ if (fmt->index)
return -EINVAL;
- }
+
+ fmt->pixelformat = f54->format.pixelformat;
return 0;
}
@@ -692,6 +682,7 @@ static int rmi_f54_probe(struct rmi_function *fn)
return -ENOMEM;
rmi_f54_create_input_map(f54);
+ rmi_f54_set_input(f54, 0);
/* register video device */
strlcpy(f54->v4l2.name, F54_NAME, sizeof(f54->v4l2.name));