Re: [PATCH 3/3] iio: proximity: Add a ChromeOS EC MKBP proximity driver

2021-01-31 Thread Jonathan Cameron
... > > > > > > +static const struct of_device_id cros_ec_proximity_of_match[] = { > > > > > > + { .compatible = "google,cros-ec-proximity" }, > > > > > > + {} > > > > > > +}; > > > > > > +MODULE_DEVICE_TABLE(of, cros_ec_proximity_of_match); > > > > > > +#endif > > > > > > + > > > > > >

Re: [PATCH 3/3] iio: proximity: Add a ChromeOS EC MKBP proximity driver

2021-01-31 Thread Jonathan Cameron
... > > > + > > > +#ifdef CONFIG_OF > > > > As a general rule, we are trying to clear out protections on CONFIG_OF etc > > and use of of_match_ptr() on the basis they don't really gain us anything > > and prevent use of some other firmware types. Here I guess you know what > > your firmware

Re: [PATCH 3/3] iio: proximity: Add a ChromeOS EC MKBP proximity driver

2021-01-28 Thread Stephen Boyd
Quoting Gwendal Grignou (2021-01-26 12:59:50) > On Mon, Jan 25, 2021 at 3:44 PM Stephen Boyd wrote: > > > > instead of having to do > > an offset after the fact. For now I'll use ec_dev->last_event_time > > because this is only used on chromeos and that should work until > > userspace is changed,

Re: [PATCH 3/3] iio: proximity: Add a ChromeOS EC MKBP proximity driver

2021-01-26 Thread Gwendal Grignou
On Mon, Jan 25, 2021 at 3:44 PM Stephen Boyd wrote: > > Quoting Gwendal Grignou (2021-01-25 14:28:46) > > On Mon, Jan 25, 2021 at 10:52 AM Stephen Boyd wrote: > > > > > > Quoting Gwendal Grignou (2021-01-24 13:41:44) > > > > On Sun, Jan 24, 2021 at 9:38 AM Jonathan Cameron > > > > wrote: > > >

Re: [PATCH 3/3] iio: proximity: Add a ChromeOS EC MKBP proximity driver

2021-01-26 Thread Stephen Boyd
Quoting Gwendal Grignou (2021-01-24 13:41:44) > On Sun, Jan 24, 2021 at 9:38 AM Jonathan Cameron wrote: > > > > On Fri, 22 Jan 2021 14:54:43 -0800 > > Stephen Boyd wrote: > > > > > --- > > > drivers/iio/proximity/Kconfig | 11 + > > > drivers/iio/proximity/Makefile| 1

Re: [PATCH 3/3] iio: proximity: Add a ChromeOS EC MKBP proximity driver

2021-01-26 Thread Stephen Boyd
Quoting Jonathan Cameron (2021-01-24 09:38:20) > On Fri, 22 Jan 2021 14:54:43 -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

Re: [PATCH 3/3] iio: proximity: Add a ChromeOS EC MKBP proximity driver

2021-01-25 Thread Stephen Boyd
Quoting Gwendal Grignou (2021-01-25 14:28:46) > On Mon, Jan 25, 2021 at 10:52 AM Stephen Boyd wrote: > > > > Quoting Gwendal Grignou (2021-01-24 13:41:44) > > > On Sun, Jan 24, 2021 at 9:38 AM Jonathan Cameron wrote: > > > > > > > > On Fri, 22 Jan 2021 14:54:43 -0800 > > > > Stephen Boyd wrote:

Re: [PATCH 3/3] iio: proximity: Add a ChromeOS EC MKBP proximity driver

2021-01-25 Thread Gwendal Grignou
On Mon, Jan 25, 2021 at 10:52 AM Stephen Boyd wrote: > > Quoting Gwendal Grignou (2021-01-24 13:41:44) > > On Sun, Jan 24, 2021 at 9:38 AM Jonathan Cameron wrote: > > > > > > On Fri, 22 Jan 2021 14:54:43 -0800 > > > Stephen Boyd wrote: > > > > > > > --- > > > > drivers/iio/proximity/Kconfig

Re: [PATCH 3/3] iio: proximity: Add a ChromeOS EC MKBP proximity driver

2021-01-24 Thread Gwendal Grignou
On Sun, Jan 24, 2021 at 9:38 AM Jonathan Cameron wrote: > > On Fri, 22 Jan 2021 14:54:43 -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

Re: [PATCH 3/3] iio: proximity: Add a ChromeOS EC MKBP proximity driver

2021-01-24 Thread Jonathan Cameron
On Fri, 22 Jan 2021 14:54:43 -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

[PATCH 3/3] iio: proximity: Add a ChromeOS EC MKBP proximity driver

2021-01-22 Thread Stephen Boyd
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