lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 6 Feb 2021 16:17:11 +0000
From:   Jonathan Cameron <>
To:     Stephen Boyd <>
        Dmitry Torokhov <>,
        Benson Leung <>,
        Guenter Roeck <>,
        Douglas Anderson <>,
        Gwendal Grignou <>,
        Enric Balletbo i Serra <>
Subject: Re: [PATCH v4 3/3] iio: proximity: Add a ChromeOS EC MKBP proximity

On Tue,  2 Feb 2021 10:44:34 -0800
Stephen Boyd <> 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 <>
> Cc: Benson Leung <>
> Cc: Guenter Roeck <>
> Cc: Douglas Anderson <>
> Cc: Gwendal Grignou <>
> Reviewed-by: Enric Balletbo i Serra <>
> Signed-off-by: Stephen Boyd <>

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.


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


> +	},
> +	.probe = cros_ec_mkbp_proximity_probe,
> +	.remove = cros_ec_mkbp_proximity_remove,
> +};
> +module_platform_driver(cros_ec_mkbp_proximity_driver);
> +
> +MODULE_DESCRIPTION("ChromeOS EC MKBP proximity sensor driver");

Powered by blists - more mailing lists