linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] iio: Add a ChromeOS EC MKBP proximity driver
@ 2021-01-22 22:54 Stephen Boyd
  2021-01-22 22:54 ` [PATCH 1/3] platform/chrome: cros_ec: Add SW_FRONT_PROXIMITY MKBP define Stephen Boyd
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Stephen Boyd @ 2021-01-22 22:54 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-kernel, linux-iio, Dmitry Torokhov, Benson Leung,
	Guenter Roeck, Douglas Anderson, Gwendal Grignou, devicetree,
	Rob Herring

This is a different approach to [1] where I tried to add this proximity
sensor logic to the input subsystem. Instead, we'll take the approach of
making a small IIO proximity driver that parses the EC switch bitmap to
find out if the front proximity sensor is detecting something or not.
This allows us to treat proximity sensors as IIO devices all the time in
userspace instead of handling this switch on the EC via the input
subsystem and then other proximity sensors via IIO.

[1] https://lore.kernel.org/r/20201205004709.3126266-1-swboyd@chromium.org

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Benson Leung <bleung@chromium.org>
Cc: Guenter Roeck <groeck@chromium.org>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Gwendal Grignou <gwendal@chromium.org>
Cc: <devicetree@vger.kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>

Stephen Boyd (3):
  platform/chrome: cros_ec: Add SW_FRONT_PROXIMITY MKBP define
  dt-bindings: iio: Add cros ec proximity yaml doc
  iio: proximity: Add a ChromeOS EC MKBP proximity driver

 .../proximity/google,cros-ec-proximity.yaml   |  37 +++
 drivers/iio/proximity/Kconfig                 |  11 +
 drivers/iio/proximity/Makefile                |   1 +
 drivers/iio/proximity/cros_ec_proximity.c     | 252 ++++++++++++++++++
 .../linux/platform_data/cros_ec_commands.h    |   1 +
 5 files changed, 302 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/proximity/google,cros-ec-proximity.yaml
 create mode 100644 drivers/iio/proximity/cros_ec_proximity.c


base-commit: 19c329f6808995b142b3966301f217c831e7cf31
-- 
https://chromeos.dev


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-01-28  8:33 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 22:54 [PATCH 0/3] iio: Add a ChromeOS EC MKBP proximity driver Stephen Boyd
2021-01-22 22:54 ` [PATCH 1/3] platform/chrome: cros_ec: Add SW_FRONT_PROXIMITY MKBP define Stephen Boyd
2021-01-22 22:54 ` [PATCH 2/3] dt-bindings: iio: Add cros ec proximity yaml doc Stephen Boyd
2021-01-24 17:27   ` Jonathan Cameron
2021-01-24 20:42     ` Gwendal Grignou
2021-01-25 18:33       ` Stephen Boyd
2021-01-25 15:02     ` Rob Herring
2021-01-25 18:53       ` Stephen Boyd
2021-01-24 22:33   ` Rob Herring
2021-01-22 22:54 ` [PATCH 3/3] iio: proximity: Add a ChromeOS EC MKBP proximity driver Stephen Boyd
2021-01-24 17:38   ` Jonathan Cameron
2021-01-24 21:41     ` Gwendal Grignou
2021-01-25 18:52       ` Stephen Boyd
2021-01-25 22:28         ` Gwendal Grignou
2021-01-25 23:44           ` Stephen Boyd
2021-01-26 20:59             ` Gwendal Grignou
2021-01-28  8:32               ` Stephen Boyd
2021-01-25 18:39     ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).