public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Sami Kyöstilä" <skyostil@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	dtor@chromium.org, arnd@arndb.de, evanbenn@chromium.org
Subject: Re: [PATCH v2 1/1] drivers/misc: add a driver for HPS
Date: Fri, 4 Feb 2022 16:27:05 +0100	[thread overview]
Message-ID: <Yf1FySKp9bdbVNah@kroah.com> (raw)
In-Reply-To: <20220202044937.3187603-2-skyostil@chromium.org>

On Wed, Feb 02, 2022 at 03:49:37PM +1100, Sami Kyöstilä wrote:
> This patch introduces a driver for the ChromeOS screen privacy
> 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.
> 
> Signed-off-by: Sami Kyöstilä <skyostil@chromium.org>
> ---
> 
> Changes in v2:
> - Removed custom ioctl interface.
> - Reworked to use miscdev.
> 
>  MAINTAINERS            |   6 ++
>  drivers/misc/Kconfig   |  10 +++
>  drivers/misc/Makefile  |   1 +
>  drivers/misc/hps-i2c.c | 184 +++++++++++++++++++++++++++++++++++++++++

Why isn't this in drivers/platform/chrome/ instead?

And what can you do with this hardware when it is enabled?  What
userspace tool uses it?

thanks,

greg k-h

  reply	other threads:[~2022-02-04 15:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-02  4:49 [PATCH v2 0/1] Add a driver for the ChromeOS screen privacy sensor (HPS) Sami Kyöstilä
2022-02-02  4:49 ` [PATCH v2 1/1] drivers/misc: add a driver for HPS Sami Kyöstilä
2022-02-04 15:27   ` Greg KH [this message]
2022-02-07  1:08     ` Sami Kyostila

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yf1FySKp9bdbVNah@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=dtor@chromium.org \
    --cc=evanbenn@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skyostil@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox