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

From: Stephen Boyd
Date: Thu Jan 28 2021 - 03:33:10 EST


Quoting Gwendal Grignou (2021-01-26 12:59:50)
> On Mon, Jan 25, 2021 at 3:44 PM Stephen Boyd <swboyd@xxxxxxxxxxxx> 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, but in the future I think we'll need to have a way
> > for this IIO device to be notified when the clock base changes in
> > iio_device_set_clock() and then have this driver call into cros_ec to
> > request that such a timestamp be made when this event is seen. Or even
> > better have a way to request that cros_ec timestamp the event itself on
> > the EC side, but I don't know if that's possible.
> One way would be use the EC sensor stack that collect such timestamp,
> but that would be more firmware changes.
>
> On second thought, to keep it simple and consistent with other IIO
> drivers, I suggest to keep using iio_get_time_ns() when the sensor
> clock is not CLOCK_BOOTTIME, ec_dev->last_event_time when it is.

Ok I will make that change and send v3.