Re: [PATCH v4 3/3] iio: acpi_als: Add trigger support

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

 



On Wed, Dec 16, 2020 at 8:02 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).
>
> Check iio_info reports the sensor as buffer capable:
>   iio:device0: acpi-als (buffer capable)
>
> To test, check we can get data on demand on an Intel based chromebook:

+ blank line

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

space before &

>   echo 1 > trigger2/trigger_now

You may improve readability by using a temporary variable:

  IIO_DEV="iio:device0"
  ...
  cat trigger2/name > $IIO_DEV/trigger/current_trigger
  for i in $IIO_DEV/scan_elements/*_en $IIO_DEV/buffer/enable ; do
  ...
  od -x /dev/$IIO_DEV &

Commit message keeps silent about the side effect of these changes on
the old setups.
Is there any?

...

>  drivers/iio/light/acpi-als.c | 88 +++++++++++++++++++++++++++---------

Question here, does it need a documentation update?

...

>  #include <linux/iio/kfifo_buf.h>

Is it still in use?

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