Re: [PATCH] iio: industrialio-core: look for aliases to request device index

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

 



Wed, Feb 28, 2024 at 02:12:54PM +0900, Dominique Martinet kirjoitti:
> From: Syunya Ohshio <syunya.ohshio@xxxxxxxxxxxxxxxxx>
> 
> When using dtb overlays it can be difficult to predict which iio device

DTB
IIO

> will get assigned what index, and there is no easy way to create
> symlinks for /sys nodes through udev so to simplify userspace code make
> it possible to request fixed indices for iio devices in device tree.

IIO

> 
> For platforms without device trees of_alias_get_id will just fail and

We refer to functions as func():
of_alias_get_id()

> ida_alloc_range will behave as ida_alloc currently does.

Ditto.

> For platforms with device trees, they can not set an alias, for example
> this would try to get 10 from the ida for the device corresponding to
> adc2:
> aliases {
>   iio10 = &adc2
> };

> To: Jonathan Cameron <jic23@xxxxxxxxxx>
> Cc: Guido Günther <agx@xxxxxxxxxxx>
> Cc: Lars-Peter Clausen <lars@xxxxxxxxxx>
> Cc: Rob Herring <robh+dt@xxxxxxxxxx>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@xxxxxxxxxx>
> Cc: Conor Dooley <conor+dt@xxxxxxxxxx>
> Cc: linux-iio@xxxxxxxxxxxxxxx
> Cc: devicetree@xxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx

Please, make sure you don't pollute commit message with these.
Either use specific --to and --cc when formating patch or move
them into comment block (after '---' line below).

> Signed-off-by: Syunya Ohshio <syunya.ohshio@xxxxxxxxxxxxxxxxx>
> Signed-off-by: Dominique Martinet <dominique.martinet@xxxxxxxxxxxxxxxxx>

...

> +#include <linux/of.h>

What about ACPI?
Please try avoid hard to use OF-specific code for the new features.

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