JIRA: https://issues.redhat.com/browse/RHEL-33550
Omitted-fix: d8cb88f1541fdc3602dbc87ede78ec704c11546f
upstream ed5c2f5fd10d ("i2c: Make remove callback return void")
changed the return type of remove to void in between the
submission and acceptance of this driver, and this commit
changes the remove return to match. But ed5c2f5fd10d wasn't
backported to RHEL-9 and the fix is not necessary.
commit 5f9952548d91263eaf70a2ca71f8897c2a638cf1
Author: Dan Callaghan <dcallagh@chromium.org>
Date: Tue, 18 Oct 2022 12:53:15 +0000
This patch introduces a driver for the ChromeOS human presence
sensor (aka. HPS). The driver supports a sensor connected to the I2C bus
and identified as "GOOG0020" in the ACPI tables.
When loaded, the driver exports the sensor to userspace through a
character device. This device only supports power management, i.e.,
communication with the sensor must be done through regular I2C
transmissions from userspace.
Power management is implemented by enabling the respective power GPIO
while at least one userspace process holds an open fd on the character
device. By default, the device is powered down if there are no active
clients.
Note that the driver makes no effort to preserve the state of the sensor
between power down and power up events. Userspace is responsible for
reinitializing any needed state once power has been restored.
The device firmware, I2C protocol and other documentation is available
at https://chromium.googlesource.com/chromiumos/platform/hps-firmware.
Co-developed-by: Sami Kyöstilä <skyostil@chromium.org>
Signed-off-by: Sami Kyöstilä <skyostil@chromium.org>
Signed-off-by: Dan Callaghan <dcallagh@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20221018040623.2173441-1-dcallagh@chromium.org
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>