linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Dave Wang <dave.wang@emc.com.tw>
Cc: Linux-input@vger.kernel.org, Linux-kernel@vger.kernel.org,
	phoenix@emc.com.tw, josh.chen@emc.com.tw, jingle.wu@emc.com.tw,
	kai.heng.feng@canonical.com
Subject: Re: [PATCH 3/3] Input: elan_i2c - Get the device information from PS/2 interface
Date: Tue, 21 Jul 2020 09:11:26 -0700	[thread overview]
Message-ID: <20200721161126.GH1665100@dtor-ws> (raw)
In-Reply-To: <20191209111842.32390-1-dave.wang@emc.com.tw>

Hi Dave,

On Mon, Dec 09, 2019 at 06:18:42AM -0500, Dave Wang wrote:
> Get the device information from PS/2 interface for PS/2+SMBus
> protocol such as product_id, fw_version, ic_type...etc.
> 
> Signed-off-by: Dave Wang <dave.wang@emc.com.tw>
> ---
>  drivers/input/mouse/elan_i2c_smbus.c | 87 +++++++++++++++++-----------
>  1 file changed, 54 insertions(+), 33 deletions(-)
> 
> diff --git a/drivers/input/mouse/elan_i2c_smbus.c b/drivers/input/mouse/elan_i2c_smbus.c
> index 9ffb1f834507..35919035ec89 100644
> --- a/drivers/input/mouse/elan_i2c_smbus.c
> +++ b/drivers/input/mouse/elan_i2c_smbus.c
> @@ -146,17 +146,22 @@ static int elan_smbus_get_version(struct i2c_client *client,
>  	int error;
>  	u8 val[I2C_SMBUS_BLOCK_MAX] = {0};
>  
> -	error = i2c_smbus_read_block_data(client,
> -					  iap ? ETP_SMBUS_IAP_VERSION_CMD :
> -						ETP_SMBUS_FW_VERSION_CMD,
> -					  val);
> -	if (error < 0) {
> -		dev_err(&client->dev, "failed to get %s version: %d\n",
> -			iap ? "IAP" : "FW", error);
> -		return error;
> +	if (device_property_read_u8(&client->dev,
> +				iap ? "elan,iap_version" : "elan,fw_version",
> +				version)) {

Should this be moved into core? Or we only plan on using this on SMbus?
What will happen after firmware update? How can userspace verify that
the firmware update completed successfully if we always return static
data? Can the device still be accessed via PS/2 while also using SMbus?

Thanks.

-- 
Dmitry

      reply	other threads:[~2020-07-21 16:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-09 11:18 [PATCH 3/3] Input: elan_i2c - Get the device information from PS/2 interface Dave Wang
2020-07-21 16:11 ` Dmitry Torokhov [this message]

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=20200721161126.GH1665100@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=Linux-input@vger.kernel.org \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=dave.wang@emc.com.tw \
    --cc=jingle.wu@emc.com.tw \
    --cc=josh.chen@emc.com.tw \
    --cc=kai.heng.feng@canonical.com \
    --cc=phoenix@emc.com.tw \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).