All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Sami Kyostila <skyostil@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	dtor@chromium.org, evanbenn@chromium.org, arnd@arndb.de
Subject: Re: [PATCH 1/2] drivers/misc: add a driver for HPS
Date: Fri, 28 Jan 2022 10:36:32 +0100	[thread overview]
Message-ID: <YfO5IJMPC8TnZM2A@kroah.com> (raw)
In-Reply-To: <CAPuLczsKqFOsqf-d39HOMHZaFQb2vmv054HUOj2+amQGE=oPkw@mail.gmail.com>

On Fri, Jan 28, 2022 at 06:41:25PM +1100, Sami Kyostila wrote:
> to 27. tammik. 2022 klo 20.40 Greg KH (gregkh@linuxfoundation.org) kirjoitti:
> >
> > On Thu, Jan 27, 2022 at 07:35:44PM +1100, Sami Kyöstilä wrote:
> > > This patch introduces a driver for the ChromeOS snooping protection
> > > 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 initial version of the device only supports power
> > > management, i.e., communicating with the sensor must be done through I2C
> > > 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.
> >
> > How about a userspace tool that interacts with this new ioctl interface
> > as well so that we can understand how the driver is supposed to work?
> 
> Sure, here's a small example that shows how to read a magic register
> value from the device:
> https://gist.github.com/skyostil/13d60a288919d18d00b20e81dfe018cd
> 
> (Let me know if you'd prefer this to be checked into the tree somewhere.)

It should be somewhere so we know where to look and how this works and
who to complain to when it needs to be changed :)

thanks,

greg k-h

  reply	other threads:[~2022-01-28  9:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27  8:35 [PATCH 0/2] Add a driver for the ChromeOS snooping protection sensor (HPS) Sami Kyöstilä
2022-01-27  8:35 ` [PATCH 1/2] drivers/misc: add a driver for HPS Sami Kyöstilä
2022-01-27  9:40   ` Greg KH
2022-01-28  7:41     ` Sami Kyostila
2022-01-28  9:36       ` Greg KH [this message]
2022-02-18 17:20   ` Pavel Machek
2022-01-27  8:35 ` [PATCH 2/2] drivers/misc: add transfer ioctl " Sami Kyöstilä
2022-01-27  9:41   ` Greg KH
2022-01-28  7:42     ` Sami Kyostila
2022-01-28  9:36       ` Greg KH
2022-01-31  8:23         ` Sami Kyostila
2022-01-31 12:51           ` Arnd Bergmann
2022-01-28  9:47       ` Arnd Bergmann
2022-01-27 22:39   ` Randy Dunlap
2022-01-28  7:42     ` 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=YfO5IJMPC8TnZM2A@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.