Re: [PATCH 3/3] Input: elan_i2c - Get the device information from PS/2 interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux