* [RESEND PATCH 4/4] iio: st_common: use standard trigger suffix
@ 2015-09-15 7:49 Linus Walleij
2015-09-20 10:58 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2015-09-15 7:49 UTC (permalink / raw)
To: Jonathan Cameron, linux-iio; +Cc: Linus Walleij, Denis Ciocca
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.
Cc: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
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");
--
2.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RESEND PATCH 4/4] iio: st_common: use standard trigger suffix
2015-09-15 7:49 [RESEND PATCH 4/4] iio: st_common: use standard trigger suffix Linus Walleij
@ 2015-09-20 10:58 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2015-09-20 10:58 UTC (permalink / raw)
To: Linus Walleij, linux-iio; +Cc: Denis Ciocca
On 15/09/15 08:49, Linus Walleij 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.
>
> Cc: Denis Ciocca <denis.ciocca@st.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Sorry, I never replied to your last email about this one. Have
done so now as better to keep discussion in that thread than
start a new one.
Jonathan
> ---
> 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");
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-20 10:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-15 7:49 [RESEND PATCH 4/4] iio: st_common: use standard trigger suffix Linus Walleij
2015-09-20 10:58 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).