linux/drivers/staging/nvec
Alexandru Hossu fb2ae75b1a staging: nvec: fix unconditional pm_power_off teardown
tegra_nvec_remove() unconditionally sets pm_power_off = NULL, even if
nvec was not the one that registered it. This breaks any other driver
that may have set pm_power_off to its own handler.

Replace the unconditional assignment with a guarded check so that
pm_power_off is only cleared if nvec was the one that set it.

Also remove the stale FIXME comment, as the guard addresses exactly
what it was asking for.

Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Alexandru Hossu <hossu.alexandru@gmail.com>
Link: https://patch.msgid.link/20260427081713.3401874-3-hossu.alexandru@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-05-04 16:17:10 +02:00
..
Kconfig staging: nvec: Fix Kconfig indentation 2019-11-20 15:20:29 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nvec-keytable.h staging: nvec: remove redundant license text 2018-01-15 16:03:45 +01:00
nvec.c staging: nvec: fix unconditional pm_power_off teardown 2026-05-04 16:17:10 +02:00
nvec.h staging: nvec: convert to use GPIO descriptors 2018-04-23 14:38:00 +02:00
nvec_kbd.c staging: Switch back to struct platform_driver::remove() 2024-10-09 11:54:53 +02:00
nvec_paz00.c Staging: nvec: Remove macro definition to_nvec_led 2023-03-22 10:19:25 +01:00
nvec_power.c staging: nvec: Fix incorrect null termination of battery manufacturer 2025-07-24 11:29:57 +02:00
nvec_ps2.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
README Staging: nvec: Replace HTTP links with HTTPS ones 2020-07-10 13:52:46 +02:00
TODO staging: nvec: update TODO 2024-04-11 13:59:31 +02:00

NVEC: An NVidia compliant Embedded Controller Protocol Implementation

This is an implementation of the NVEC protocol used to communicate with an
embedded controller (EC) via I2C bus. The EC is an I2C master while the host
processor is the I2C slave. Requests from the host processor to the EC are
started by triggering a gpio line.

There is no written documentation of the protocol available to the public,
but the source code[1] of the published nvec reference drivers can be a guide.
This driver is currently only used by the AC100 project[2], but it is likely,
that other Tegra boards (not yet mainlined, if ever) also use it.

[1] e.g. https://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=tree;f=arch/arm/mach-tegra/nvec;hb=android-tegra-2.6.32
[2] http://gitorious.org/ac100, http://launchpad.net/ac100