All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: KT Liao <kt.liao@emc.com.tw>,
	Andrew Duggan <aduggan@synaptics.com>,
	Adrian Alves <aalves@gmail.com>,
	linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH 02/10] Input: synaptics-rmi4 - Add rmi_find_function()
Date: Mon, 6 Feb 2017 11:28:12 -0800	[thread overview]
Message-ID: <20170206192812.GC17441@dtor-ws> (raw)
In-Reply-To: <20170110161128.7441-3-benjamin.tissoires@redhat.com>

On Tue, Jan 10, 2017 at 05:11:20PM +0100, Benjamin Tissoires wrote:
> If a function needs to communicate with an other, it's better to have
> a way to retrieve this other.
> 
> Reviewed-by: Andrew Duggan <aduggan@synaptics.com>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Applied, thank you.

> ---
>  drivers/input/rmi4/rmi_driver.c | 13 +++++++++++++
>  drivers/input/rmi4/rmi_driver.h |  1 +
>  2 files changed, 14 insertions(+)
> 
> diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
> index 11447ab..87dbb0c 100644
> --- a/drivers/input/rmi4/rmi_driver.c
> +++ b/drivers/input/rmi4/rmi_driver.c
> @@ -265,6 +265,19 @@ static int rmi_irq_init(struct rmi_device *rmi_dev)
>  	return 0;
>  }
>  
> +struct rmi_function *rmi_find_function(struct rmi_device *rmi_dev, u8 number)
> +{
> +	struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev);
> +	struct rmi_function *entry;
> +
> +	list_for_each_entry(entry, &data->function_list, node) {
> +		if (entry->fd.function_number == number)
> +			return entry;
> +	}
> +
> +	return NULL;
> +}
> +
>  static int suspend_one_function(struct rmi_function *fn)
>  {
>  	struct rmi_function_handler *fh;
> diff --git a/drivers/input/rmi4/rmi_driver.h b/drivers/input/rmi4/rmi_driver.h
> index 24f8f76..0506371 100644
> --- a/drivers/input/rmi4/rmi_driver.h
> +++ b/drivers/input/rmi4/rmi_driver.h
> @@ -93,6 +93,7 @@ bool rmi_is_physical_driver(struct device_driver *);
>  int rmi_register_physical_driver(void);
>  void rmi_unregister_physical_driver(void);
>  void rmi_free_function_list(struct rmi_device *rmi_dev);
> +struct rmi_function *rmi_find_function(struct rmi_device *rmi_dev, u8 number);
>  int rmi_enable_sensor(struct rmi_device *rmi_dev);
>  int rmi_scan_pdt(struct rmi_device *rmi_dev, void *ctx,
>  		 int (*callback)(struct rmi_device *rmi_dev, void *ctx,
> -- 
> 2.9.3
> 

-- 
Dmitry

  reply	other threads:[~2017-02-06 19:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 16:11 [PATCH 00/10] Add binding from PS/2 to SMBus for Synaptics and Elan Benjamin Tissoires
2017-01-10 16:11 ` [PATCH 01/10] Input: serio - store the pt_buttons in the struct serio directly Benjamin Tissoires
2017-01-10 16:11 ` [PATCH 02/10] Input: synaptics-rmi4 - Add rmi_find_function() Benjamin Tissoires
2017-02-06 19:28   ` Dmitry Torokhov [this message]
2017-01-10 16:11 ` [PATCH 03/10] Input: synaptics-rmi4 - f30/f03: Forward mechanical buttons on buttonpads to PS/2 guest Benjamin Tissoires
2017-02-06 19:23   ` Dmitry Torokhov
2017-02-07 16:25     ` Benjamin Tissoires
2017-02-07 16:25       ` [PATCH v2 1/2] Input: psmouse - add a custom serio protocol to send extra information Benjamin Tissoires
2017-02-08  8:26         ` Dmitry Torokhov
2017-02-08 17:51           ` Benjamin Tissoires
2017-02-07 16:25       ` [PATCH v2 2/2] Input: synaptics-rmi4 - f30/f03: Forward mechanical buttons on buttonpads to PS/2 guest Benjamin Tissoires
2017-01-10 16:11 ` [PATCH 04/10] Input: psmouse - allow to deactivate a driver from the serio handle Benjamin Tissoires
2017-01-10 16:11 ` [PATCH 05/10] Input: synaptics - allocate a Synaptics Intertouch device Benjamin Tissoires
2017-01-10 16:11 ` [PATCH 06/10] Input: synaptics-rmi4 - smbus: call psmouse_deactivate before binding/resume Benjamin Tissoires
2017-01-10 16:11 ` [PATCH 07/10] Input: synaptics-rmi4 - smbus: on resume, try 3 times if init fails Benjamin Tissoires
2017-01-10 16:11 ` [PATCH 08/10] Input: add a PS/2 to SMBus platform module Benjamin Tissoires
2017-01-18  8:05   ` Benjamin Tissoires
2017-01-10 16:11 ` [PATCH 09/10] Input: elan_i2c - add trackstick report Benjamin Tissoires
2017-01-10 16:11 ` [PATCH 10/10] Input: elantech - automatically bind an SMBus device when acceptable Benjamin Tissoires
2017-01-30 13:05 ` [PATCH 00/10] Add binding from PS/2 to SMBus for Synaptics and Elan Benjamin Tissoires
2017-02-06 19:27   ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170206192812.GC17441@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=aalves@gmail.com \
    --cc=aduggan@synaptics.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=kt.liao@emc.com.tw \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.