Re: [PATCH] iio: st_common: use standard trigger suffix

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

 




On 5 August 2015 10:28:15 BST, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
>The triggers from ST sensors are named <iio_device_name>-trigger
>instead of the standard <iio_device_name>-dev<iio_dev_id> as
>used by most and also in the iio-tools. Change this to match
>the norm.
>
>After this I can do tests with generic_buffer -n <dev_name>
>without having to manually specify the trigger with the -t
>option.
Hmm ABI change... Not a requirement that this naming be followed...

Could register the trigger twice I suppose so as to keep old name available.... 


>
>Cc: Denis Ciocca <denis.ciocca@xxxxxx>
>Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
>---
> drivers/iio/common/st_sensors/st_sensors_trigger.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/iio/common/st_sensors/st_sensors_trigger.c
>b/drivers/iio/common/st_sensors/st_sensors_trigger.c
>index 3e907040c2c7..3c0aa17d753f 100644
>--- a/drivers/iio/common/st_sensors/st_sensors_trigger.c
>+++ b/drivers/iio/common/st_sensors/st_sensors_trigger.c
>@@ -24,7 +24,8 @@ int st_sensors_allocate_trigger(struct iio_dev
>*indio_dev,
> 	int err;
> 	struct st_sensor_data *sdata = iio_priv(indio_dev);
> 
>-	sdata->trig = iio_trigger_alloc("%s-trigger", indio_dev->name);
>+	sdata->trig = iio_trigger_alloc("%s-dev%d",
>+					indio_dev->name, indio_dev->id);
> 	if (sdata->trig == NULL) {
> 		err = -ENOMEM;
> 		dev_err(&indio_dev->dev, "failed to allocate iio trigger.\n");

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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