Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1435172

Re: [PATCH v6 10/11] Input: synaptics-rmi4 - add support for F54 diagnostics

From Nick Dyer <nick@shmanahar.org>
Newsgroups linux.kernel
Subject Re: [PATCH v6 10/11] Input: synaptics-rmi4 - add support for F54 diagnostics
Date 2016-07-01 11:00 +0200
Message-ID <rQ2sO-4sz-21@gated-at.bofh.it> (permalink)
References <rPOg9-44d-5@gated-at.bofh.it> <rPOg9-44d-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jun 30, 2016 at 06:38:53PM +0100, Nick Dyer wrote:
> Function 54 implements access to various RMI4 diagnostic features.
> 
> This patch adds support for retrieving this data. It registers a V4L2
> device to output the data to user space.
> 
> Signed-off-by: Nick Dyer <nick@shmanahar.org>
> ---
>  drivers/input/rmi4/Kconfig      |  11 +
>  drivers/input/rmi4/Makefile     |   1 +
>  drivers/input/rmi4/rmi_bus.c    |   3 +
>  drivers/input/rmi4/rmi_driver.h |   1 +
>  drivers/input/rmi4/rmi_f54.c    | 754 ++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 770 insertions(+)
>  create mode 100644 drivers/input/rmi4/rmi_f54.c
[...]
> index 0000000..2361157
> --- /dev/null
> +++ b/drivers/input/rmi4/rmi_f54.c
[...]
> +static int rmi_f54_vidioc_querycap(struct file *file, void *priv,
> +				   struct v4l2_capability *cap)
> +{
> +	struct f54_data *f54 = video_drvdata(file);
> +
> +	strlcpy(cap->driver, F54_NAME, sizeof(cap->driver));
> +	strlcpy(cap->card, SYNAPTICS_INPUT_DEVICE_NAME, sizeof(cap->card));
> +	strlcpy(cap->bus_info, dev_name(&f54->fn->dev), sizeof(cap->bus_info));

I need to correct this to prefix the bus. RMI4 registers its own bus, so
devices appear under eg /sys/bus/rmi4/devices/rmi4-00.fn54

So I will change to:
snprintf(cap->bus_info, sizeof(cap->bus_info), "rmi4:%s", dev_name(&f54->fn->dev));

And I will need to add rmi4 to the valid prefixes in v4l2-complaince as well.

> +
> +	return 0;
> +}

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v6 10/11] Input: synaptics-rmi4 - add support for F54 diagnostics Nick Dyer <nick@shmanahar.org> - 2016-06-30 19:50 +0200
  Re: [PATCH v6 10/11] Input: synaptics-rmi4 - add support for F54  diagnostics Nick Dyer <nick@shmanahar.org> - 2016-07-01 11:00 +0200
  Re: [PATCH v6 10/11] Input: synaptics-rmi4 - add support for F54  diagnostics Andrew Duggan <aduggan@synaptics.com> - 2016-07-01 21:20 +0200

csiph-web