* [PATCH 0/1] iio: accel: kionix-kx022a: Timestamp minor fix
@ 2023-02-17 19:19 Mehdi Djait
2023-02-17 19:19 ` [PATCH 1/1] iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler Mehdi Djait
2023-02-17 20:04 ` [PATCH 0/1] iio: accel: kionix-kx022a: Timestamp minor fix Matti Vaittinen
0 siblings, 2 replies; 8+ messages in thread
From: Mehdi Djait @ 2023-02-17 19:19 UTC (permalink / raw)
To: mazziesaccount, jic23; +Cc: linux-iio, lars, Mehdi Djait
As discussed in [1] here is a patch to get the timestamp in the
trigger handler from the driver's private data
[1] https://lore.kernel.org/linux-iio/Y+%2FLpcc0Wa2VGsGO@carbian/T/#mec923c14d1324ffabfa88dde225eeb227005b48f
Mehdi Djait (1):
iio: accel: kionix-kx022a: Get the timestamp from the driver's private
data in the trigger_handler
drivers/iio/accel/kionix-kx022a.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.30.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/1] iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler
2023-02-17 19:19 [PATCH 0/1] iio: accel: kionix-kx022a: Timestamp minor fix Mehdi Djait
@ 2023-02-17 19:19 ` Mehdi Djait
2023-02-17 19:52 ` Matti Vaittinen
2023-02-17 20:04 ` [PATCH 0/1] iio: accel: kionix-kx022a: Timestamp minor fix Matti Vaittinen
1 sibling, 1 reply; 8+ messages in thread
From: Mehdi Djait @ 2023-02-17 19:19 UTC (permalink / raw)
To: mazziesaccount, jic23; +Cc: linux-iio, lars, Mehdi Djait
The trigger_handler gets called from the IRQ thread handler using
iio_trigger_poll_chained() which will only call the bottom half of the
pollfunc and therefore pf->timestamp will not get set.
Use instead the timestamp from the driver's private data which is always
set in the IRQ handler.
Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com>
---
drivers/iio/accel/kionix-kx022a.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-kx022a.c
index f866859855cd..1c3a72380fb8 100644
--- a/drivers/iio/accel/kionix-kx022a.c
+++ b/drivers/iio/accel/kionix-kx022a.c
@@ -864,7 +864,7 @@ static irqreturn_t kx022a_trigger_handler(int irq, void *p)
if (ret < 0)
goto err_read;
- iio_push_to_buffers_with_timestamp(idev, data->buffer, pf->timestamp);
+ iio_push_to_buffers_with_timestamp(idev, data->buffer, data->timestamp);
err_read:
iio_trigger_notify_done(idev->trig);
--
2.30.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler
2023-02-17 19:19 ` [PATCH 1/1] iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler Mehdi Djait
@ 2023-02-17 19:52 ` Matti Vaittinen
2023-02-17 19:55 ` Matti Vaittinen
0 siblings, 1 reply; 8+ messages in thread
From: Matti Vaittinen @ 2023-02-17 19:52 UTC (permalink / raw)
To: Mehdi Djait, jic23; +Cc: linux-iio, lars
On 2/17/23 21:19, Mehdi Djait wrote:
> The trigger_handler gets called from the IRQ thread handler using
> iio_trigger_poll_chained() which will only call the bottom half of the
> pollfunc and therefore pf->timestamp will not get set.
>
> Use instead the timestamp from the driver's private data which is always
> set in the IRQ handler.
>
> Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
> ---
> drivers/iio/accel/kionix-kx022a.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-kx022a.c
> index f866859855cd..1c3a72380fb8 100644
> --- a/drivers/iio/accel/kionix-kx022a.c
> +++ b/drivers/iio/accel/kionix-kx022a.c
> @@ -864,7 +864,7 @@ static irqreturn_t kx022a_trigger_handler(int irq, void *p)
> if (ret < 0)
> goto err_read;
>
> - iio_push_to_buffers_with_timestamp(idev, data->buffer, pf->timestamp);
> + iio_push_to_buffers_with_timestamp(idev, data->buffer, data->timestamp);
> err_read:
> iio_trigger_notify_done(idev->trig);
>
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler
2023-02-17 19:52 ` Matti Vaittinen
@ 2023-02-17 19:55 ` Matti Vaittinen
2023-02-18 13:17 ` Mehdi Djait
0 siblings, 1 reply; 8+ messages in thread
From: Matti Vaittinen @ 2023-02-17 19:55 UTC (permalink / raw)
To: Mehdi Djait, jic23; +Cc: linux-iio, lars
On 2/17/23 21:52, Matti Vaittinen wrote:
> On 2/17/23 21:19, Mehdi Djait wrote:
>> The trigger_handler gets called from the IRQ thread handler using
>> iio_trigger_poll_chained() which will only call the bottom half of the
>> pollfunc and therefore pf->timestamp will not get set.
>>
>> Use instead the timestamp from the driver's private data which is always
>> set in the IRQ handler.
>>
>> Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com>
>
> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
>
Oh. I just noticed there is no Fixes tag. It'd be good to have one as it
usually helps fixes like this being back-ported to stable.
>> ---
>> drivers/iio/accel/kionix-kx022a.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/iio/accel/kionix-kx022a.c
>> b/drivers/iio/accel/kionix-kx022a.c
>> index f866859855cd..1c3a72380fb8 100644
>> --- a/drivers/iio/accel/kionix-kx022a.c
>> +++ b/drivers/iio/accel/kionix-kx022a.c
>> @@ -864,7 +864,7 @@ static irqreturn_t kx022a_trigger_handler(int irq,
>> void *p)
>> if (ret < 0)
>> goto err_read;
>> - iio_push_to_buffers_with_timestamp(idev, data->buffer,
>> pf->timestamp);
>> + iio_push_to_buffers_with_timestamp(idev, data->buffer,
>> data->timestamp);
>> err_read:
>> iio_trigger_notify_done(idev->trig);
>
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/1] iio: accel: kionix-kx022a: Timestamp minor fix
2023-02-17 19:19 [PATCH 0/1] iio: accel: kionix-kx022a: Timestamp minor fix Mehdi Djait
2023-02-17 19:19 ` [PATCH 1/1] iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler Mehdi Djait
@ 2023-02-17 20:04 ` Matti Vaittinen
2023-02-18 13:32 ` Mehdi Djait
1 sibling, 1 reply; 8+ messages in thread
From: Matti Vaittinen @ 2023-02-17 20:04 UTC (permalink / raw)
To: Mehdi Djait, jic23; +Cc: linux-iio, lars
Thanks again Mehdi. It's great to have this fixed :)
On 2/17/23 21:19, Mehdi Djait wrote:
> As discussed in [1] here is a patch to get the timestamp in the
> trigger handler from the driver's private data
>
> [1] https://lore.kernel.org/linux-iio/Y+%2FLpcc0Wa2VGsGO@carbian/T/#mec923c14d1324ffabfa88dde225eeb227005b48f
>
By the way, I don't think a cover-letter is required for single patches.
You can usually put the relevant information in the commit message.
Additionally, if there is some questions, suggestions or other relevant
bits you wish to say - but don't want to include in commit logs - you
can usually place them in the patch mail directly after the first
"---"
Eg:
<commit message>
<Signed-off-by and other tags>
---
Here we can add a note / request if required.
drivers/iio/accel/kionix-kx022a.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/kionix-kx022a.c
b/drivers/iio/accel/kionix-kx022a.c
index f866859855cd..1c3a72380fb8 100644
--- a/drivers/iio/accel/kionix-kx022a.c
+++ b/drivers/iio/accel/kionix-kx022a.c
> Mehdi Djait (1):
> iio: accel: kionix-kx022a: Get the timestamp from the driver's private
> data in the trigger_handler
>
> drivers/iio/accel/kionix-kx022a.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler
2023-02-17 19:55 ` Matti Vaittinen
@ 2023-02-18 13:17 ` Mehdi Djait
0 siblings, 0 replies; 8+ messages in thread
From: Mehdi Djait @ 2023-02-18 13:17 UTC (permalink / raw)
To: Matti Vaittinen; +Cc: jic23, linux-iio
Hi Matti,
On Fri, Feb 17, 2023 at 09:55:33PM +0200, Matti Vaittinen wrote:
> On 2/17/23 21:52, Matti Vaittinen wrote:
> > On 2/17/23 21:19, Mehdi Djait wrote:
> > > The trigger_handler gets called from the IRQ thread handler using
> > > iio_trigger_poll_chained() which will only call the bottom half of the
> > > pollfunc and therefore pf->timestamp will not get set.
> > >
> > > Use instead the timestamp from the driver's private data which is always
> > > set in the IRQ handler.
> > >
> > > Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com>
> >
> > Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
> >
>
> Oh. I just noticed there is no Fixes tag. It'd be good to have one as it
> usually helps fixes like this being back-ported to stable.
>
I will add the Fixes tag and send the patch again.
--
Kind Regards
Mehdi Djait
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/1] iio: accel: kionix-kx022a: Timestamp minor fix
2023-02-17 20:04 ` [PATCH 0/1] iio: accel: kionix-kx022a: Timestamp minor fix Matti Vaittinen
@ 2023-02-18 13:32 ` Mehdi Djait
2023-02-18 17:26 ` Jonathan Cameron
0 siblings, 1 reply; 8+ messages in thread
From: Mehdi Djait @ 2023-02-18 13:32 UTC (permalink / raw)
To: Matti Vaittinen; +Cc: jic23, linux-iio
Hi Matti,
On Fri, Feb 17, 2023 at 10:04:30PM +0200, Matti Vaittinen wrote:
> Thanks again Mehdi. It's great to have this fixed :)
>
> On 2/17/23 21:19, Mehdi Djait wrote:
> > As discussed in [1] here is a patch to get the timestamp in the
> > trigger handler from the driver's private data
> >
> > [1] https://lore.kernel.org/linux-iio/Y+%2FLpcc0Wa2VGsGO@carbian/T/#mec923c14d1324ffabfa88dde225eeb227005b48f
> >
>
> By the way, I don't think a cover-letter is required for single patches. You
> can usually put the relevant information in the commit message.
> Additionally, if there is some questions, suggestions or other relevant bits
> you wish to say - but don't want to include in commit logs - you can usually
> place them in the patch mail directly after the first
> "---"
>
> Eg:
>
> <commit message>
> <Signed-off-by and other tags>
>
> ---
>
> Here we can add a note / request if required.
>
Yes, that's why I sent a cover-letter, I wanted to include relevant bits
but not in the commit message (a reference to the discussion).
I should have sent the patch --in-reply-to the thread with the discussion
anyway.
Thank you for the help :)
--
Kind Regards
Mehdi Djait
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/1] iio: accel: kionix-kx022a: Timestamp minor fix
2023-02-18 13:32 ` Mehdi Djait
@ 2023-02-18 17:26 ` Jonathan Cameron
0 siblings, 0 replies; 8+ messages in thread
From: Jonathan Cameron @ 2023-02-18 17:26 UTC (permalink / raw)
To: Mehdi Djait; +Cc: Matti Vaittinen, linux-iio
On Sat, 18 Feb 2023 14:32:46 +0100
Mehdi Djait <mehdi.djait.k@gmail.com> wrote:
> Hi Matti,
>
> On Fri, Feb 17, 2023 at 10:04:30PM +0200, Matti Vaittinen wrote:
> > Thanks again Mehdi. It's great to have this fixed :)
> >
> > On 2/17/23 21:19, Mehdi Djait wrote:
> > > As discussed in [1] here is a patch to get the timestamp in the
> > > trigger handler from the driver's private data
> > >
> > > [1] https://lore.kernel.org/linux-iio/Y+%2FLpcc0Wa2VGsGO@carbian/T/#mec923c14d1324ffabfa88dde225eeb227005b48f
> > >
> >
> > By the way, I don't think a cover-letter is required for single patches. You
> > can usually put the relevant information in the commit message.
> > Additionally, if there is some questions, suggestions or other relevant bits
> > you wish to say - but don't want to include in commit logs - you can usually
> > place them in the patch mail directly after the first
> > "---"
> >
> > Eg:
> >
> > <commit message>
> > <Signed-off-by and other tags>
> >
> > ---
> >
> > Here we can add a note / request if required.
> >
>
> Yes, that's why I sent a cover-letter, I wanted to include relevant bits
> but not in the commit message (a reference to the discussion).
>
> I should have sent the patch --in-reply-to the thread with the discussion
> anyway.
Don't do that. Use a Link tag to the discussion instead.
Otherwise the patch series can get buried and lost.
>
> Thank you for the help :)
>
> --
> Kind Regards
> Mehdi Djait
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-02-18 17:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17 19:19 [PATCH 0/1] iio: accel: kionix-kx022a: Timestamp minor fix Mehdi Djait
2023-02-17 19:19 ` [PATCH 1/1] iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler Mehdi Djait
2023-02-17 19:52 ` Matti Vaittinen
2023-02-17 19:55 ` Matti Vaittinen
2023-02-18 13:17 ` Mehdi Djait
2023-02-17 20:04 ` [PATCH 0/1] iio: accel: kionix-kx022a: Timestamp minor fix Matti Vaittinen
2023-02-18 13:32 ` Mehdi Djait
2023-02-18 17:26 ` 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).