Re: [PATCH v3 2/2] iio: acpi_als: Add trigger support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux