Input: psmouse - add support for SMBus companions
This provides glue between PS/2 devices that enumerate the RMI4 devices and Elan touchpads to the RMI4 (or Elan) SMBus driver. The SMBus devices keep their PS/2 connection alive. If the initialization process goes too far (psmouse_activate called), the device disconnects from the I2C bus and stays on the PS/2 bus, that is why we explicitly disable PS/2 device reporting (by calling psmouse_deactivate) before trying to register SMBus companion device. The HID over I2C devices are enumerated through the ACPI DSDT, and their PS/2 device also exports the InterTouch bit in the extended capability 0x0C. However, the firmware keeps its I2C connection open even after going further in the PS/2 initialization. We don't need to take extra precautions with those device, especially because they block their PS/2 communication when HID over I2C is used. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:

committed by
Dmitry Torokhov

parent
c774326a21
commit
8eb92e5c91
@@ -209,5 +209,34 @@ static struct psmouse_attribute psmouse_attr_##_name = { \
|
||||
&(psmouse)->ps2dev.serio->dev, \
|
||||
psmouse_fmt(format), ##__VA_ARGS__)
|
||||
|
||||
#ifdef CONFIG_MOUSE_PS2_SMBUS
|
||||
|
||||
int psmouse_smbus_module_init(void);
|
||||
void psmouse_smbus_module_exit(void);
|
||||
|
||||
struct i2c_board_info;
|
||||
|
||||
int psmouse_smbus_init(struct psmouse *psmouse,
|
||||
const struct i2c_board_info *board,
|
||||
const void *pdata, size_t pdata_size,
|
||||
bool leave_breadcrumbs);
|
||||
void psmouse_smbus_cleanup(struct psmouse *psmouse);
|
||||
|
||||
#else /* !CONFIG_MOUSE_PS2_SMBUS */
|
||||
|
||||
static inline int psmouse_smbus_module_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void psmouse_smbus_module_exit(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void psmouse_smbus_cleanup(struct psmouse *psmouse)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_MOUSE_PS2_SMBUS */
|
||||
|
||||
#endif /* _PSMOUSE_H */
|
||||
|
Reference in New Issue
Block a user