|
|
Subscribe / Log in / New account

iio: Add a ChromeOS EC MKBP proximity driver

From:  Stephen Boyd <swboyd-AT-chromium.org>
To:  Jonathan Cameron <jic23-AT-kernel.org>
Subject:  [PATCH 0/3] iio: Add a ChromeOS EC MKBP proximity driver
Date:  Fri, 22 Jan 2021 14:54:40 -0800
Message-ID:  <20210122225443.186184-1-swboyd@chromium.org>
Cc:  linux-kernel-AT-vger.kernel.org, linux-iio-AT-vger.kernel.org, Dmitry Torokhov <dmitry.torokhov-AT-gmail.com>, Benson Leung <bleung-AT-chromium.org>, Guenter Roeck <groeck-AT-chromium.org>, Douglas Anderson <dianders-AT-chromium.org>, Gwendal Grignou <gwendal-AT-chromium.org>, devicetree-AT-vger.kernel.org, Rob Herring <robh+dt-AT-kernel.org>
Archive-link:  Article

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...

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



Copyright © 2021, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds