summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/cyapa.c
AgeCommit message (Collapse)AuthorFilesLines
2015-04-20Input: cyapa - fix setting suspend scan rateDudley Du1-2/+2
The suspend scan rate value should not exceed 1000, unfortunately when implementing the limit we used max_t instead of min_t, causing the value to be at least 1000. Signed-off-by: Dudley Du <dudl@cypress.com> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-22Input: cyapa - off by one in cyapa_update_fw_store()Dan Carpenter1-1/+1
If "(count == NAME_MAX)" then we could end up putting the NUL terminator one space beyond the end of the fw_name[] array. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-18Input: cyapa - add acpi device id supportDudley Du1-0/+11
Add acpi device tree support. acpi device id "CYAP0000" is for old gen3 trackpad devices. acpi device id "CYAP0001" is for new gen5 trackpad devices. Signed-off-by: Dudley Du <dudl@cypress.com> Tested-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-18Input: cyapa - add sysfs interfaces support in the cyapa driverDudley Du1-0/+310
Introduce control interfaces that are commonly used in pre- and after production, for trackpad device state checking, managing and firmware image updating. These interfaces include mode, firmware_version and product_id interfaces for reading firmware version and trackpad device product id values, and update_fw interface to command firmware image update process. There are also baseline and calibrate interfaces for reading and checking trackpad device's sensors states. Signed-off-by: Dudley Du <dudl@cypress.com> Tested-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-18Input: cyapa - add runtime power management supportDudley Du1-1/+187
This change implements runtime PM support in the driver and adds runtime_suspend_scanrate_ms power management interface in device's power group, so users or applications can control the runtime power management strategy of trackpad device according to their requirements. Signed-off-by: Dudley Du <dudl@cypress.com> Tested-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-18Input: cyapa - add power management interfaces support for the deviceDudley Du1-0/+136
Add suspend_scanrate_ms power management interfaces in device's power group, so users or applications can control the power management strategy of trackpad device according to their requirements. Signed-off-by: Dudley Du <dudl@cypress.com> Tested-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-18Input: cyapa - add gen5 trackpad device basic functions supportDudley Du1-0/+13
This change adds support for Gen5 Cypress trackpads. The driver detects generation of the device at probe time and automatically selects appropriate protocol. Signed-off-by: Dudley Du <dudl@cypress.com> Tested-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-18Input: cyapa - re-design driver to support multi-trackpad in one driverDudley Du1-665/+411
In order to support multiple different chipsets and communication protocols trackpad devices in one cyapa driver, the new cyapa driver is re-designed with one cyapa driver core and multiple device specific functions component. The cyapa driver core is contained in this patch, it supplies basic functions that working with kernel and input subsystem, and also supplies the interfaces that the specific devices' component can connect and work together with as one driver. Signed-off-by: Dudley Du <dudl@cypress.com> Tested-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-04Input: cyapa - use 'error' for error codesDudley Du1-47/+47
Let's use 'error' variable instead of 'ret' when we need to store erro codes. Signed-off-by: Dudley Du <dudley.dulixin@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-03Input: cyapa - fix resuming the deviceDudley Du1-4/+3
Chage b1cfa7b4388285c0f0b486f152ab0cb18612c779 tried to get away form using irq in cyapa structure and use client->irq instead, but missed a couple of spots making the touchpad inoperative after resume. Reported-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Dudley Du <dudley.dulixin@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-09Input: cyapa - switch to using managed resourcesDudley Du1-79/+105
Use of managed resources simplifies error handling and device removal code. Signed-off-by: Dudley Du <dudl@cypress.com> [Dmitry: added open/close methods so cyapa_remove is no longer needed.] Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-02Input: mouse - use __maybe_unused instead of ifdef around suspend/resumeJingoo Han1-4/+2
Use __maybe_unused instead of ifdef guards around suspend/resume functions, in order to increase build coverage and fix build warnings. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-02-13Input: cyapa - add support for smbus protocolBenson Leung1-5/+174
This patch adds support for the Cypress APA Smbus Trackpad type, which uses a modified register map that fits within the limitations of the smbus protocol. Devices that use this protocol include: CYTRA-116001-00 - Samsung Series 5 550 Chromebook trackpad CYTRA-103002-00 - Acer C7 Chromebook trackpad CYTRA-101003-00 - HP Pavilion 14 Chromebook trackpad Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Benson Leung <bleung@chromium.org> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-17Input: add driver for Cypress APA I2C TrackpadBenson Leung1-0/+804
This patch introduces a driver for Cypress All Points Addressable I2C Trackpad, including the ones in 2012 Samsung Chromebooks. This device is compatible with MT protocol type B, providing identifiable contacts. Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Benson Leung <bleung@chromium.org> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>