On Fri, Dec 11, 2020 at 12:15 AM Gwendal Grignou <gwendal@xxxxxxxxxxxx> wrote: > > As some firmware does not notify on illuminance changes, add a > trigger to be able to query light via software (sysfs-trigger or > hrtrigger). > > BUG=b:172408337 > TEST=Check iio_info reports the sensor as buffer capable: > iio:device0: acpi-als (buffer capable) > Check we can get data on demand on volteer: > echo 1 > iio_sysfs_trigger/add_trigger > cat trigger2/name > iio\:device0/trigger/current_trigger > for i in iio\:device0/scan_elements/*_en iio\:device0/buffer/enable ; do > echo 1 > $i > done > od -x /dev/iio\:device0& Hard to read. Also I recommend to indent a bit (couple of lead spaces, for example) > echo 1 > trigger2/trigger_now ... > + /* > + * when coming from own trigger via polls, set timestamp here. Capitalize sentences. from its own? a timestamp > + * Given ACPI notifier is already in a thread and call function directly, > + * there is no need to set the timestamp in the notify function. > + */ ... > + struct device *dev = &device->dev; This is not related. Please, split the preparatory patch. -- With Best Regards, Andy Shevchenko