summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visorinput
Commit message (Collapse)AuthorAgeFilesLines
* staging: unisys: visorinput: Add default conditions to case statementsDavid Binder2016-11-071-0/+6
| | | | | | | | | | | This commit adds a default condition to those case statements that do not already have one. This is done to provide both a logical covering of all conditions, as well as to maintain uniformity with the rest of the Unisys driver set. Signed-off-by: David Binder <david.binder@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorbus: Convert visorchannel_signalremove() return valDavid Binder2016-09-271-1/+1
| | | | | | | | | | | Per Documentation/CodingStyle, function names that convey an action or an imperative command should return an integer. This commit converts the visorbus API function, visorchannel_signalremove(), to returning integer values. All uses of this function are updated accordingly. Signed-off-by: David Binder <david.binder@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: make MODULE_DESCRIPTIONs consistentJon Frisch2016-09-271-1/+1
| | | | | | | | | | This patch ensures that consistent verbiage is used in the MODULE_DESCRIPTION text (reported by 'modinfo') for all of the Unisys s-Par drivers. Signed-off-by: Jon Frisch <jon.frisch@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: remove driver version from visorinput.cJon Frisch2016-09-271-2/+0
| | | | | | | | | | This patch removes the driver version and the version.h include from visorinput.c Signed-off-by: Jon Frisch <jon.frisch@unisys.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: remove driver version from struct visor_driverJon Frisch2016-09-271-1/+0
| | | | | | | | | | | | | | | This patch removes the all instances of the driver version from struct visor_driver. This includes removing version, vertag (a human readable version string of the driver version) and version_attr from struct visor_driver. This resulted in removing the bus attributes and driver attributes which only contained the driver version. The utsname function is used to replace the driver version with the kernel version in bus_device_info_init(). Signed-off-by: Jon Frisch <jon.frisch@unisys.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: Remove ultrainputreport.h includeBryan Thompson2016-09-121-2/+0
| | | | | | | | | Stop ultrainputreport.h from including itself. Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: Update visorinput.c includesBryan Thompson2016-09-121-1/+0
| | | | | | | | | Remove unnecessary channel.h include from visorinput.c. Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: make lock_visor_dev a mutexTim Sell2016-08-151-17/+17
| | | | | | | | | | | Since lock_visor_dev is a binary semaphore it makes more sense to use a mutex lock. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Acked-By: Neil Horman <nhorman@tuxdriver.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: ensure proper locking wrt creation & intsTim Sell2016-08-151-25/+49
| | | | | | | | | | | | | | | | | | | | | Ensure we properly lock between visorinput_channel_interrupt(), visorinput_open(), and devdata_create(). We now guarantee that: * interrupts will be disabled and remain disabled during device creation, by setting 'paused = true' across device creation * we canNOT get into visorinput_open() until the device structure is totally initialized, by delaying the input_register_device() until the end of device initialization We also now ensure that lock_visor_dev is held across updates of devdata state, to ensure state consistency. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Acked-By: Neil Horman <nhorman@tuxdriver.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: remove unnecessary lockingTim Sell2016-08-151-10/+47
| | | | | | | | | | | | | | | | | | | Locking in the _interrupt() function is NOT necessary so long as we ensure that interrupts have been stopped whenever we need to pause or resume the device, which we now do. While a device is paused, we ensure that interrupts stay disabled, i.e. that the _interrupt() function will NOT be called, yet remember the desired state in devdata->interrupts_enabled if open() or close() are called are called while the device is paused. Then when the device is resumed, we restore the actual state of interrupts (i.e., whether _interrupt() is going to be called or not) to the desired state in devdata->interrupts_enabled. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Acked-By: Neil Horman <nhorman@tuxdriver.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput change -1 return valueErik Arfvidson2016-06-071-1/+1
| | | | | | | | This patch changes the vague -1 return value to -EINVAL Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: handle_locking_key() simplificationsTim Sell2016-05-091-11/+7
| | | | | | | | | | By directly returning for the error-case, a test was eliminated. Also, the old_state variable was removed as it was not necessary, and some redundant parens were removed. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: remove erroneous 'FIXME' commentsTim Sell2016-04-111-3/+3
| | | | | | | | These comments were mistakenly carried forward by a previous copy/paste. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: remove visorinput.c double negative comparisonErik Arfvidson2016-03-281-1/+1
| | | | | | | | | This patch simply removes the double negative comparison for test_bit since test_bit already preforms this check. Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: convert pr_err() to dev_err()Eva Rachel Retuya2016-03-101-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace pr_err() calls with respective dev_err() counterpart. Semantic patch used to detect and apply the transformation: @r exists@ identifier f,s,i; position p; @@ f(...,struct s *i,...) { <+... pr_err@p(...) ...+> } @s@ identifier r.s, dev; @@ struct s { ... struct device dev; ... }; @t@ identifier r.i, s.dev; expression fmt; position r.p; @@ - pr_err@p( + dev_err(&i->dev, fmt, ...); Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput depends on INPUTRandy Dunlap2016-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build errors by limiting UNISYS_VISORINPUT to the INPUT kconfig setting. drivers/built-in.o: In function `visorinput_remove': visorinput.c:(.text+0x20802e): undefined reference to `input_unregister_device' drivers/built-in.o: In function `visorinput_probe': visorinput.c:(.text+0x208177): undefined reference to `input_allocate_device' visorinput.c:(.text+0x208241): undefined reference to `input_register_device' visorinput.c:(.text+0x20824d): undefined reference to `input_free_device' visorinput.c:(.text+0x208286): undefined reference to `input_allocate_device' visorinput.c:(.text+0x208302): undefined reference to `input_set_abs_params' visorinput.c:(.text+0x20831a): undefined reference to `input_set_abs_params' visorinput.c:(.text+0x20833f): undefined reference to `input_register_device' visorinput.c:(.text+0x20834b): undefined reference to `input_free_device' visorinput.c:(.text+0x20835f): undefined reference to `input_set_capability' drivers/built-in.o: In function `visorinput_channel_interrupt': visorinput.c:(.text+0x20851e): undefined reference to `input_event' visorinput.c:(.text+0x20862c): undefined reference to `input_event' drivers/built-in.o: In function `input_report_key': visorinput.c:(.text+0x207fd1): undefined reference to `input_event' drivers/built-in.o: In function `input_sync': visorinput.c:(.text+0x207fdc): undefined reference to `input_event' Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: fix block comments in ultrainputreport.hErik Arfvidson2016-02-111-19/+26
| | | | | | | | | | This patch fixes the following types of check patch warnings: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: better config switch commentsBenjamin Romer2015-11-251-1/+6
| | | | | | | | We should provide more information in the Kconfig help for visorbus and visorinput. Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: remove unused variableSudip Mukherjee2015-11-171-3/+1
| | | | | | | The variables op, sd and zmotion were never being used. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: Remove useless intialisationAmitoj Kaur Chawla2015-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: no need to track open countTim Sell2015-10-161-14/+4
| | | | | | | | | | | | evdev_open_device() and evdev_close_device() (in evdev.c) already track the open count under lock, and will only call visorinput_open() on the first open and visorinput_close() on the last close. So this patch removes the unnessary logic from visorinput, and the now-unused counter from the struct. Signed-off-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: fix comment formatTim Sell2015-10-161-1/+2
| | | | | | | | Fix the multi-line comment formatting in visorinput.c. Signed-off-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: address checkpatch alignment issuesTim Sell2015-10-161-2/+2
| | | | | | | | Fix the alignment of function parameters to the parenthesis above. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: unisys: visorinput: Remove unused codeShivani Bhardwaj2015-10-131-4/+0
| | | | | | | | | | | | | | | | | | | | Remove the code which is not used anywhere in the program. Semantic patch used: @@ type T; identifier i; constant C; position p != e.p; @@ - T i@p; <+... when != i - i = C; ...+> Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: remove extraneous do_key functionTim Sell2015-10-041-12/+6
| | | | | | | | do_key() is no longer needed. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: remove extraneous mouse logicTim Sell2015-10-041-12/+0
| | | | | | | | Removes a cursor positioning hack that no longer seems to be required. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: register & use input_dev open() and close()Tim Sell2015-10-041-5/+50
| | | | | | | | | | Registration of visorinput_open() and visorinput_close() for each device allow us to eliminate unnecessary activity when nobody in user-land cares. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: change input bus type to BUS_VIRTUAL (6)Tim Sell2015-10-041-2/+2
| | | | | | | | | BUS_HOST wasn't really appropriate, so I changed to BUS_VIRTUAL, which is what virtio uses. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: comment tweaks - s/gizmo/input node/gTim Sell2015-10-041-3/+3
| | | | | | | | Just a simple search and replace in the comments. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: correct code comments per kernel conventionsTim Sell2015-10-041-18/+29
| | | | | | | | | | | | | | | Multi-line comments were modified to conform to kernel conventions: /* * multi-line * comments */ doc-test /** */ for some comments was removed. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: make structs & arrays const where possibleTim Sell2015-10-041-13/+29
| | | | | | | | | | | | | | | | | | This also gave me a warning with the assignment: visorinput_dev->keycode = visorkbd_keycode; because input_dev->keycode is NOT static but visorkbd_keycode now is, so I went ahead and also added logic to stash away non-static copies of visorkbd_keycode[] and visorkbd_ext_keycode[] within visorinput_devdata, and use the copy to assign to visorinput_dev->keycode. This change is also technically required, because user-space can remap keys, and we don't want this to be shared with the other keyboard devices running on the same system. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: re-order declarations for consistencyTim Sell2015-10-041-127/+115
| | | | | | | | | | | | | | | | | | In order to be more consistent with kernel conventions used elsewhere, I have re-ordered declarations in visorinput.c to follow this general order (where possible): * #defines * struct/enum/union declarations * static declarations (const if possible for all of them) * forward function declarations where absolutely necessary Exceptions were made for the static declarations like the driver declaration, given that it depends on previously-defined callbacks. So such declarations are at the end of visorinput.c. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorinput: subsume .h files directly into visorinput.cTim Sell2015-10-043-67/+17
| | | | | | | | | keyboardchannel.h and mousechannel.h are now included within visorinput.c directly. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: unisys: visorhid: rename to visorinputTim Sell2015-10-046-0/+827
This visorhid driver provides a Human Interface Device, but is not at all using HID, the protocol. It's a plain input driver, so for clarity, it is being renamed to visorinput. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud