History log of /linux-master/drivers/platform/chrome/cros_hps_i2c.c
Revision Date Author Comments
# f5bb4e38 26-May-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

platform/chrome: Switch i2c drivers back to use .probe()

After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter")
convert back to (the new) .probe() to be able to eventually drop
.probe_new() from struct i2c_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20230526214703.2135137-1-u.kleine-koenig@pengutronix.de


# d8cb88f1 18-Oct-2022 Dan Callaghan <dcallagh@chromium.org>

platform/chrome: cros_hps_i2c: make remove callback return void

Commit ed5c2f5fd10d ("i2c: Make remove callback return void") changed
the return type of the 'remove' callback to void, but this driver was
originally written before that change landed. Update the remove callback
to match.

Fixes: 5f9952548d91 ("platform/chrome: add a driver for HPS")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Dan Callaghan <dcallagh@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20221018235237.2274969-1-dcallagh@chromium.org


# 5f995254 17-Oct-2022 Dan Callaghan <dcallagh@chromium.org>

platform/chrome: add a driver for HPS

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