[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210210025142.3609708-1-swboyd@chromium.org>
Date: Tue, 9 Feb 2021 18:51:39 -0800
From: Stephen Boyd <swboyd@...omium.org>
To: Jonathan Cameron <jic23@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Benson Leung <bleung@...omium.org>,
Guenter Roeck <groeck@...omium.org>,
Douglas Anderson <dianders@...omium.org>,
Gwendal Grignou <gwendal@...omium.org>,
devicetree@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
Enric Balletbo i Serra <enric.balletbo@...labora.com>
Subject: [PATCHv5 0/3] iio: Add a ChromeOS EC MKBP proximity driver
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.
I propose this is all merged through IIO subsystem. Please ack
the first patch so it can be merged that way.
Changes from v4:
* Reduced binding and moved proximity node to mfd spi example
* Dropped of_match_ptr()
Changes from v3:
* Added SPI and cros-ec wrapper nodes to yaml example
* Ignore notifier registration return code that is always zero
Changes from v2:
* Check iio clock and use IIO time if not boottime
Changes from v1:
* Driver moved location
* Put mkbp everywhere
* Fixed up DT binding to not fail and make sure is a child of cros-ec
* Simplified logic for sending a message
* Dropped CONFIG_OF usage
* Sorted includes
[1] https://lore.kernel.org/r/20201205004709.3126266-1-swboyd@chromium.org
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Benson Leung <bleung@...omium.org>
Cc: Guenter Roeck <groeck@...omium.org>
Cc: Douglas Anderson <dianders@...omium.org>
Cc: Gwendal Grignou <gwendal@...omium.org>
Cc: <devicetree@...r.kernel.org>
Cc: Rob Herring <robh+dt@...nel.org>
Cc: Enric Balletbo i Serra <enric.balletbo@...labora.com>
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
.../google,cros-ec-mkbp-proximity.yaml | 37 +++
.../bindings/mfd/google,cros-ec.yaml | 7 +
drivers/iio/proximity/Kconfig | 11 +
drivers/iio/proximity/Makefile | 1 +
.../iio/proximity/cros_ec_mkbp_proximity.c | 242 ++++++++++++++++++
.../linux/platform_data/cros_ec_commands.h | 1 +
6 files changed, 299 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/proximity/google,cros-ec-mkbp-proximity.yaml
create mode 100644 drivers/iio/proximity/cros_ec_mkbp_proximity.c
base-commit: 19c329f6808995b142b3966301f217c831e7cf31
--
https://chromeos.dev
Powered by blists - more mailing lists