Input: elan_i2c - Do no operation for elan_smbus_set_mode function
Subsystems (2)
PATCH 1/3 Input: elan_i2c - Do no operation for elan_smbus_set_mode function
Some touchpads might get error while triggerring the set_mode command in SMBus interface. Do no operation for elan_smbus_set_mode function.
--- drivers/input/mouse/elan_i2c_smbus.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/input/mouse/elan_i2c_smbus.c +1 -4
@@ -84,10 +84,7 @@ static int elan_smbus_initialize(struct i2c_client *client)static int elan_smbus_set_mode (struct i2c_client *client,u8 mode) { -u8 cmd[4 ] = {0x00 ,0x07 ,0x00 , mode }; - -return i2c_smbus_write_block_data (client,ETP_SMBUS_IAP_CMD , -sizeof (cmd), cmd); +return 0 ;/* A no-op */ }static int elan_smbus_sleep_control (struct i2c_client *client,bool sleep)
Signature · 1 line
2.17.1
Dmitry Torokhov
maintainerHi Dave,
Quoted 2 lines · Dave Wang
Some touchpads might get error while triggerring the
set_modecommand in SMBus interface. Do no operation forelan_smbus_set_modefunction.
Are there devices that do not trigger errors? How do we put SMbus devices into low power mode?
Quoted 25 lines
Signed-off-by Dave Wang <[email protected]>--- drivers/input/mouse/elan_i2c_smbus.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/input/mouse/elan_i2c_smbus.c +1
-4@@ -84,10 +84,7 @@ static int elan_smbus_initialize(struct i2c_client *client)static int elan_smbus_set_mode (struct i2c_client *client,u8 mode) { -u8 cmd[4 ] = {0x00 ,0x07 ,0x00 , mode }; - -return i2c_smbus_write_block_data (client,ETP_SMBUS_IAP_CMD , -sizeof (cmd), cmd); +return 0 ;/* A no-op */ }static int elan_smbus_sleep_control (struct i2c_client *client,bool sleep)Signature · 1 line
2.17.1
Thanks.
Signature · 1 line
Dmitry
Dear Dmitry,
Are there devices that do not trigger errors?
=> Yes, there exist devices that would act normally. However, our team cannot organize the rule to recognize which devices could trigger this command without error.
What I sure about is that some devices would get TP no function while triggering this command.
Besides, ABS mode had been set in P/S2 protocol, so there is no need to set ABS mode again in SMBUS driver.
How do we put SMbus devices into low power mode?
=> As far as I am concerned, core.c only set the mode into ABS mode or ENABLE_CALIBRATE mode after updating firmware.
I don't know what or when to set SMbus devices into low power mode.
Best regards,
Dave
-----Original Message-----
From: Dmitry Torokhov [mailto:[email protected]]
Sent: Wednesday, July 22, 2020 12:13 AM
To: Dave Wang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/3] Input: elan_i2c - Do no operation for elan_smbus_set_mode function
Hi Dave,
Quoted 2 lines · Dave Wang
Some touchpads might get error while triggerring the
set_modecommand in SMBus interface. Do no operation forelan_smbus_set_modefunction.
Are there devices that do not trigger errors? How do we put SMbus devices into low power mode?
Quoted 23 lines
Signed-off-by Dave Wang <[email protected]>--- drivers/input/mouse/elan_i2c_smbus.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/input/mouse/elan_i2c_smbus.c +1
-4@@ -84,10 +84,7 @@ static int elan_smbus_initialize(struct i2c_client *client)static int elan_smbus_set_mode (struct i2c_client *client,u8 mode) { -u8 cmd[4 ] = {0x00 ,0x07 ,0x00 , mode }; - -return i2c_smbus_write_block_data (client,ETP_SMBUS_IAP_CMD , -sizeof (cmd), cmd); +return 0 ;/* A no-op */ } static int elan_smbus_sleep_control(struct i2c_client *client, bool
Quoted 4 lines
sleep)
--
2.17.1
Thanks.
--
Dmitry
Dear Dmitry,
Should this be moved into core? Or we only plan on using this on SMbus? => using on smbus.
What will happen after firmware update? How can userspace verify that the firmware update completed successfully if we always return static data? => FW modified the architecture that reading register cmd in P/S2 and then updating flow in SMbus.
As a result, it would not get success result while updating firmware in SMbus driver.
Elan will use the tool to update firmware.
Can the device still be accessed via PS/2 while also using SMbus? => Yes, the device could still be accessed via PS/2 while also using SMbus. However, we cannot use P/S2 driver and SMbus driver to read register simultaneously because of the limitation of driver (elantench (ps2) driver would be unmounted before loading into SMbus driver). So we use tool to update firmware in SMbus interface.
Best regards,
Dave
-----Original Message-----
From: Dmitry Torokhov [mailto:[email protected]]
Sent: Wednesday, July 22, 2020 12:13 AM
To: Dave Wang <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/3] Input: elan_i2c - Do no operation for elan_smbus_set_mode function
Hi Dave,
Quoted 2 lines · Dave Wang
Some touchpads might get error while triggerring the
set_modecommand in SMBus interface. Do no operation forelan_smbus_set_modefunction.
Are there devices that do not trigger errors? How do we put SMbus devices into low power mode?
Quoted 23 lines
Signed-off-by Dave Wang <[email protected]>--- drivers/input/mouse/elan_i2c_smbus.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/input/mouse/elan_i2c_smbus.c +1
-4@@ -84,10 +84,7 @@ static int elan_smbus_initialize(struct i2c_client *client)static int elan_smbus_set_mode (struct i2c_client *client,u8 mode) { -u8 cmd[4 ] = {0x00 ,0x07 ,0x00 , mode }; - -return i2c_smbus_write_block_data (client,ETP_SMBUS_IAP_CMD , -sizeof (cmd), cmd); +return 0 ;/* A no-op */ } static int elan_smbus_sleep_control(struct i2c_client *client, bool
Quoted 4 lines
sleep)
--
2.17.1
Thanks.
--
Dmitry