From: Jonathan Cameron <jic23@kernel.org>
To: Stephen Boyd <swboyd@chromium.org>
Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Benson Leung <bleung@chromium.org>,
Guenter Roeck <groeck@chromium.org>,
Douglas Anderson <dianders@chromium.org>,
Gwendal Grignou <gwendal@chromium.org>,
Enric Balletbo i Serra <enric.balletbo@collabora.com>
Subject: Re: [PATCH v4 3/3] iio: proximity: Add a ChromeOS EC MKBP proximity driver
Date: Sat, 6 Feb 2021 16:17:11 +0000 [thread overview]
Message-ID: <20210206161711.6f555434@archlinux> (raw)
In-Reply-To: <20210202184434.42644-4-swboyd@chromium.org>
On Tue, 2 Feb 2021 10:44:34 -0800
Stephen Boyd <swboyd@chromium.org> wrote:
> Add support for a ChromeOS EC proximity driver that exposes a "front"
> proximity sensor via the IIO subsystem. The EC decides when front
> proximity is near and sets an MKBP switch 'EC_MKBP_FRONT_PROXIMITY' to
> notify the kernel of proximity. Similarly, when proximity detects
> something far away it sets the switch bit to 0. For now this driver
> exposes a single sensor, but it could be expanded in the future via more
> MKBP bits if desired.
>
> 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>
> Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Just one thing noticed on a final read through. I'm happy to fix up
whilst applying. Otherwise all I'm waiting for now is to give
Rob time to look at the device tree binding if he wants to do so.
Jonathan
> diff --git a/drivers/iio/proximity/cros_ec_mkbp_proximity.c b/drivers/iio/proximity/cros_ec_mkbp_proximity.c
> new file mode 100644
> index 000000000000..23bed4562b34
> --- /dev/null
> +++ b/drivers/iio/proximity/cros_ec_mkbp_proximity.c
> @@ -0,0 +1,242 @@
...
> +static struct platform_driver cros_ec_mkbp_proximity_driver = {
> + .driver = {
> + .name = "cros-ec-mkbp-proximity",
> + .of_match_table = of_match_ptr(cros_ec_mkbp_proximity_of_match),
I'm going to assume we know no one is going to use this with
ACPI via PRP0001 given presumably the firmware on these devices
is tightly controlled.
However, we should should still drop the of_match_ptr
as it will lead to an unused warning for cros_ec_mkbp_proximity_of_match
if anyone builds this without CONFIG_OF + it sets a general bad
precedence that I'd rather wasn't around for people to copy.
Note that in general we are slowly ripping these out of IIO but
probably lots still there.
If this is all that is needed in this version I'll just do it
whilst applying unless anyone shouts.
Jonathan
> + },
> + .probe = cros_ec_mkbp_proximity_probe,
> + .remove = cros_ec_mkbp_proximity_remove,
> +};
> +module_platform_driver(cros_ec_mkbp_proximity_driver);
> +
> +MODULE_LICENSE("GPL v2");
> +MODULE_DESCRIPTION("ChromeOS EC MKBP proximity sensor driver");
next prev parent reply other threads:[~2021-02-06 16:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 18:44 [PATCHv4 0/3] iio: Add a ChromeOS EC MKBP proximity driver Stephen Boyd
2021-02-02 18:44 ` [PATCH v4 1/3] platform/chrome: cros_ec: Add SW_FRONT_PROXIMITY MKBP define Stephen Boyd
2021-02-02 18:44 ` [PATCH v4 2/3] dt-bindings: iio: Add cros ec proximity yaml doc Stephen Boyd
2021-02-03 8:29 ` Enric Balletbo Serra
2021-02-09 21:13 ` Rob Herring
2021-02-10 2:40 ` Stephen Boyd
2021-02-02 18:44 ` [PATCH v4 3/3] iio: proximity: Add a ChromeOS EC MKBP proximity driver Stephen Boyd
2021-02-06 16:17 ` Jonathan Cameron [this message]
2021-02-07 3:21 ` Stephen Boyd
2021-02-10 2:40 ` Stephen Boyd
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=20210206161711.6f555434@archlinux \
--to=jic23@kernel.org \
--cc=bleung@chromium.org \
--cc=dianders@chromium.org \
--cc=dmitry.torokhov@gmail.com \
--cc=enric.balletbo@collabora.com \
--cc=groeck@chromium.org \
--cc=gwendal@chromium.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swboyd@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