History log of /linux-master/drivers/staging/nvec/nvec_kbd.c
Revision Date Author Comments
# 46ea3230 03-Apr-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

staging: nvec: nvec_kbd: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230403154014.2564054-20-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a5a98554 17-Dec-2019 Xidong Wang <wangxidong_97@163.com>

staging: nvec: check return value

In nvec_kbd_probe(), the return value of devm_input_allocate_device()
should be checked before it is used.

Signed-off-by: Xidong Wang <wangxidong_97@163.com>
Link: https://lore.kernel.org/r/1576648598-12257-1-git-send-email-wangxidong_97@163.com
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d6d69c82 11-Jan-2018 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: nvec: remove redundant license text

Now that the SPDX tag is in all drivers/staging/nvec/ files, that
identifies the license in a specific and legally-defined manner. So the
extra GPL text wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text. And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 971bcfca 11-Jan-2018 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

staging: nvec: add SPDX identifier.

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Fix up the staging nvec driver to have a proper SPDX identifiers, based
on the license text in the file itself. The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ac15649c 04-Mar-2017 simran singhal <singhalsimran0@gmail.com>

staging: nvec: Remove unnecessary cast on void pointer

The following Coccinelle script was used to detect this:

@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d5dbc024 20-Oct-2014 Wolfram Sang <wsa@kernel.org>

staging: nvec: drop owner assignment from platform_drivers

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>


# 167bf09e 13-May-2013 Leon Romanovsky <leon@kernel.org>

staging: nvec: Convert to use devm_input_allocate

nvec_kbd is converted to use devm_input_allocate.
This simplifies error handling and remove path.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c2b62f60 29-Apr-2013 Marc Dietrich <marvin24@gmx.de>

staging: nvec: cleanup childs on remove

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>


# 99758dec 29-Apr-2013 Marc Dietrich <marvin24@gmx.de>

staging: nvec: add missing module aliases

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>


# d398f56e 29-Apr-2013 Marc Dietrich <marvin24@gmx.de>

staging: nvec: cleanup childs on remove

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>


# 38dc92ed 29-Apr-2013 Marc Dietrich <marvin24@gmx.de>

staging: nvec: add missing module aliases

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>


# 93eff83f 27-Jan-2013 Marc Dietrich <marvin24@gmx.de>

staging: nvec: cleanup the string mess

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>


# 1a6a8a84 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu>

staging: nvec: remove use of __devexit

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>


# 46620803 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu>

staging: nvec: remove use of __devinit

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>


# 44b90a3f 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu>

staging: nvec: remove use of __devexit_p

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>


# 3cdde3a3 24-Jun-2012 Marc Dietrich <marvin24@gmx.de>

staging: nvec: add remove function to nvec childs

This patch cleanups registered devices on remove.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 9891b1ce 24-Jun-2012 Marc Dietrich <marvin24@gmx.de>

staging: nvec: cleanup driver registration

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>


# ff169c14 27-Sep-2011 Julian Andres Klode <jak@jak-linux.org>

staging: nvec: Enable the capslock LED in the keyboard driver

When the caps lock key is pressed, toggle the associated
LED. According to Nvidia code, we should send 0x01 where
we sent 0x07, but this does not appear to work correctly
on the AC100.

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>


# 0cab4cb8 27-Sep-2011 Julian Andres Klode <jak@jak-linux.org>

staging: nvec: Rewrite the interrupt handler

Rewrite the interrupt handler to use a state machine similar to
that found in the various kernels for the Advent Vega. This also
changes the code to use the new functions introduced in the
previous commits.

This also merges the rewrite sent in August 2011 by Marc
Dietrich, and thus also includes code by him. His original
patch can be found on the mailing list.

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>


# 97cc2657 27-Sep-2011 Ilya Petrov <ilya.muromec@gmail.com>

staging: nvec: add LED support

This patch adds support for LEDs connect to a nvec. A single brightness
property is exported to sysfs. LEDs are selected via bitfields in the
brightness value. Also the blinking behavior is selected through this
method. Vendors may use different values for different HW designs.

Signed-off-by: Ilya Petrov <ilya.muromec@gmail.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
[jak@jak-linux.org: Fixed checkpatch warnings]
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>


# 162c7d8c 27-Sep-2011 Marc Dietrich <marvin24@gmx.de>

staging: nvec: coding style fixes / add copyright notice

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>


# 7974035c 27-Sep-2011 Julian Andres Klode <jak@jak-linux.org>

staging: nvec: Include missing headers

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>


# f686e9af 24-Aug-2011 Marc Dietrich <marvin24@gmx.de>

staging: nvec: convert to use platform register and mfdcells

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>


# 88d94e30 15-Jul-2011 Colin Brophy <colin@brophys.com>

Staging: nvec: fixes coding style issues in nvec_kbd.c

This patches nvec_kbd.c to the file that fixes up errors found by
the checkpath.pl tool.

Signed-off-by: Colin Brophy <colin@brophys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 32890b98 19-May-2011 Marc Dietrich <marvin24@gmx.de>

Staging: initial version of the nvec driver

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>