summaryrefslogtreecommitdiffstats
path: root/drivers/staging/nvec/nvec_ps2.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: nvec: remove managed resource from PS2 driverMarc Dietrich2016-11-071-1/+1
| | | | | | | | | | | | This basicly reverts commit e534f3e9 (staging:nvec: Introduce the use of the managed version of kzalloc). Serio struct should never by managed because it is refcounted. Doing so will lead to a double free oops on module remove. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Fixes: e534f3e9429f ("staging:nvec: Introduce the use of the managed version of kzalloc") Cc: stable <stable@vger.kernel.org> # 3.15+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Revert "staging: nvec: ps2: change serio type to passthrough"Paul Fertser2016-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 36b30d6138f4677514aca35ab76c20c1604baaad. This is necessary to detect paz00 (ac100) touchpad properly as one speaking ETPS/2 protocol. Without it X.org's synaptics driver doesn't work as the touchpad is detected as an ImPS/2 mouse instead. Commit ec6184b1c717b8768122e25fe6d312f609cc1bb4 changed the way auto-detection is performed on ports marked as pass through and made the issue apparent. A pass through port is an additional PS/2 port used to connect a slave device to a master device that is using PS/2 to communicate with the host (so slave's PS/2 communication is tunneled over master's PS/2 link). "Synaptics PS/2 TouchPad Interfacing Guide" describes such a setup (PS/2 PASS-THROUGH OPTION section). Since paz00's embedded controller is not connected to a PS/2 port itself, the PS/2 interface it exposes is not a pass-through one. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Acked-by: Marc Dietrich <marvin24@gmx.de> Fixes: 36b30d6138f4 ("staging: nvec: ps2: change serio type to passthrough") Cc: stable <stable@vger.kernel.org> # 3.4+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: staging: nvec: remove bogus reset command for PS/2 interfacePaul Fertser2016-11-071-4/+0
| | | | | | | | | | | | | | This command was sent behind serio's back and the answer to it was confusing atkbd probe function which lead to the elantech touchpad getting detected as a keyboard. To prevent this from happening just let every party do its part of the job. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Acked-by: Marc Dietrich <marvin24@gmx.de> Cc: stable <stable@vger.kernel.org> # 3.4+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: nvec: removes an unnecessary cast on a void pointerBen Marsh2016-03-111-1/+1
| | | | | | | Patch to nvec_ps2.c to remove an unnecessary cast on a void pointer. Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: nvec: remove duplicated constPeng Fan2015-06-171-2/+2
| | | | | | | | | | Sparse checking warning: "drivers/staging/nvec/nvec_ps2.c:172:14: warning: duplicate const". Remove the duplicated const to fix the warning. Signed-off-by: Peng Fan <van.freenix@gmail.com> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: nvec: use !x instead of x == NULLSomya Anand2015-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Functions like devm_kzalloc, kmalloc_array, devm_ioremap, usb_alloc_urb, alloc_netdev return NULL as a return value on failure. Generally, When NULL represents failure, !x is commonly used. This patch cleans up the tests on the results of these functions, thereby using !x instead of x == NULL or NULL == x. This is done via following coccinelle script: @prob_7@ identifier x; statement S; @@ ( x = devm_kzalloc(...); | x = usb_alloc_urb(...); | x = kmalloc_array(...); | x = devm_ioremap(...); | x = alloc_netdev(...); ) ... - if(NULL == x) + if(!x) S Further we have used isomorphism characteristics of coccinelle to indicate x == NULL and NULL == x are equivalent. This is done via following iso script. Expression @ is_null @ expression X; @@ X == NULL <=> NULL == X Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: nvec: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* staging: nvec: insert blank lines after declarationsPawel Lebioda2014-07-091-0/+2
| | | | | | | | | This patch fixes coding style warnings reported by checkpatch.pl: "Missing a blank line after declarations". Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:nvec: Introduce the use of the managed version of kzallocHimangi Saraogi2014-03-071-1/+1
| | | | | | | | | | This patch moves shared private data kzalloc to managed devm_kzalloc. There are no kfree statements associated with this data, so using devm adds the possibility of the data being freed, if the proble function fails (if that is possible) or if the remove function succeeds. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: nvec: cleanup childs on removeMarc Dietrich2013-05-141-1/+6
| | | | | | | | | Disable device functions and unregister notifier if available. The serio device must not be "kzallocated". Otherwise serio_unregister_port will fail because the device is already freed. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: nvec: add missing module aliasesMarc Dietrich2013-05-141-0/+1
| | | | | | | | | Keyboard and mouse drivers were missing MODULE_ALIAS definitions. This fixes auto module loading of these drivers. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: nvec: cleanup the string messMarc Dietrich2013-01-291-10/+15
| | | | | | | Replace the various command strings by named constants. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: nvec: fix mouse suspend/resume callsMarc Dietrich2013-01-291-9/+7
| | | | | | | | The EC command for enable/disable is not an EC command. Instead it needs to be send to the mouse. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: nvec: remove use of __devexitBill Pemberton2012-11-211-1/+1
| | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Julian Andres Klode <jak@jak-linux.org> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: nvec: remove use of __devinitBill Pemberton2012-11-211-1/+1
| | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Julian Andres Klode <jak@jak-linux.org> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: nvec: remove use of __devexit_pBill Pemberton2012-11-211-1/+1
| | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Julian Andres Klode <jak@jak-linux.org> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: nvec: add remove function to nvec childsMarc Dietrich2012-06-251-0/+8
| | | | | | | This patch cleanups registered devices on remove. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: nvec: cleanup powermanagement callbacksMarc Dietrich2012-06-251-4/+10
| | | | | | | Simplify powermanagement initialization by using pm_ops macro. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: nvec: cleanup driver registrationMarc Dietrich2012-06-251-6/+1
| | | | | | | | This patch simplifies code by using the module_platform_driver macro. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: nvec: convert to devm_ functionsMarc Dietrich2012-06-251-1/+5
| | | | | | | | This patch cleanups the nvec and its childs by replacing calls to resource allocations by their devm_* equivalents. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: nvec: ps2: change serio type to passthroughMarc Dietrich2012-01-311-1/+1
| | | | | | | | | This changes the serio type of the nvec_ps2 mouse port to passthrough. The old 8042 type seems appropiete for keyboards only. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Julian Andres Klode <jak@jak-linux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: nvec: ps2: disable/enable mouse on suspend/resumeMarc Dietrich2012-01-311-0/+8
| | | | | | | | This change makes the touchpad buttons work after suspend/resume. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Julian Andres Klode <jak@jak-linux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: nvec: ps2: add some more debug functionsMarc Dietrich2012-01-311-5/+13
| | | | | | | | | This can print the mouse traffic which goes over the i2c bus. Make mouse debugging messages configurable and disable them by default. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Julian Andres Klode <jak@jak-linux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: nvec: ps2: tell nvec to send 6 byte long messagesMarc Dietrich2012-01-311-1/+1
| | | | | | | | | This packet size used on most modern touchpads. Ideally, this should be configurable or autodetected. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Julian Andres Klode <jak@jak-linux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: nvec: ps2: let the start/stop streaming commands be called by the ↵Marc Dietrich2012-01-311-2/+2
| | | | | | | | | | | start/stop functions of serio Instead of executing these commands during open/close, the start/stop event of the serio device seem to be more appropiete. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Julian Andres Klode <jak@jak-linux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: nvec: ps2: add suspend/resume functionsMarc Dietrich2012-01-311-0/+19
| | | | | | | | | | | | This adds suspend and resume functions to the nvec_ps2 mouse driver. During suspend the nvec sends a "Cancel all mouse events" command. If this is missed, there will be still some bytes in the received buffer after resume which make the mouse go out of sync. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Julian Andres Klode <jak@jak-linux.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: nvec: ps2: Always sample 4 bytes instead of just 1Julian Andres Klode2011-09-291-2/+3
| | | | | | | | | | Get 4 bytes of data from nvec at once instead of just a single byte. This makes the driver more similar to nvidias and might improve reliability. Signed-off-by: Julian Andres Klode <jak@jak-linux.org> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: nvec: Return error in PS2 driver if write failsJulian Andres Klode2011-09-291-5/+2
| | | | | | | | | Return the return value of nvec_write_async() in the methods returning an int. Signed-off-by: Julian Andres Klode <jak@jak-linux.org> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: nvec: coding style fixes / add copyright noticeMarc Dietrich2011-09-291-41/+53
| | | | | | | | | | This patch fixes coding style and adds copyright notices. Signed-off-by: Marc Dietrich <marvin24@gmx.de> [jak@jak-linux.org: Merge later cleanup into that patch] Signed-off-by: Julian Andres Klode <jak@jak-linux.org> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: nvec: Include missing headersJulian Andres Klode2011-09-291-0/+1
| | | | | | | | | Those headers were apparently included by other headers previously, but are not anymore. Signed-off-by: Julian Andres Klode <jak@jak-linux.org> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: nvec: convert to use platform register and mfdcellsMarc Dietrich2011-08-241-1/+18
| | | | | | | | | This patch converts the nvec to use mfd cells and improves the registration of the platform driver. The child drivers are also converted to use mfd cells and platform registration. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: initial version of the nvec driverMarc Dietrich2011-05-191-0/+103
This is an implementation of a NVidia compliant embedded controller protocol driver. It is used on some ARM-Tegra boards for device communication. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud