mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] iio: proximity: hx9023s: Use 'CLOCK_BOOTTIME' as the default clock source
@ 2024-09-02 10:32 Yasin Lee
  2024-09-02 10:43 ` Lars-Peter Clausen
  0 siblings, 1 reply; 3+ messages in thread
From: Yasin Lee @ 2024-09-02 10:32 UTC (permalink / raw)
  To: yasin.lee.x; +Cc: jic23, lars, dan.carpenter, nuno.sa, linux-iio, linux-kernel

Override the default (CLOCK_REALTIME) clock source to 'CLOCK_BOOTTIME'.

Signed-off-by: Yasin Lee <yasin.lee.x@gmail.com>
---
 drivers/iio/proximity/hx9023s.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/iio/proximity/hx9023s.c b/drivers/iio/proximity/hx9023s.c
index 8b9f84400e00..5363357a9a46 100644
--- a/drivers/iio/proximity/hx9023s.c
+++ b/drivers/iio/proximity/hx9023s.c
@@ -1074,6 +1074,10 @@ static int hx9023s_probe(struct i2c_client *client)
 					     "iio trigger register failed\n");
 	}
 
+	ret = iio_device_set_clock(indio_dev, CLOCK_BOOTTIME);
+	if (ret)
+		return dev_err_probe(dev, ret, "clock boottime set failed\n");
+
 	ret = devm_iio_triggered_buffer_setup(dev, indio_dev,
 					      iio_pollfunc_store_time,
 					      hx9023s_trigger_handler,
-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iio: proximity: hx9023s: Use 'CLOCK_BOOTTIME' as the default clock source
  2024-09-02 10:32 [PATCH] iio: proximity: hx9023s: Use 'CLOCK_BOOTTIME' as the default clock source Yasin Lee
@ 2024-09-02 10:43 ` Lars-Peter Clausen
  2024-09-04  9:19   ` Yasin Lee
  0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2024-09-02 10:43 UTC (permalink / raw)
  To: Yasin Lee; +Cc: jic23, dan.carpenter, nuno.sa, linux-iio, linux-kernel

On 9/2/24 12:32, Yasin Lee wrote:
> Override the default (CLOCK_REALTIME) clock source to 'CLOCK_BOOTTIME'.
Why? Won't this break existing applications that rely on the current 
default?
>
> Signed-off-by: Yasin Lee <yasin.lee.x@gmail.com>
> ---
>   drivers/iio/proximity/hx9023s.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/iio/proximity/hx9023s.c b/drivers/iio/proximity/hx9023s.c
> index 8b9f84400e00..5363357a9a46 100644
> --- a/drivers/iio/proximity/hx9023s.c
> +++ b/drivers/iio/proximity/hx9023s.c
> @@ -1074,6 +1074,10 @@ static int hx9023s_probe(struct i2c_client *client)
>   					     "iio trigger register failed\n");
>   	}
>   
> +	ret = iio_device_set_clock(indio_dev, CLOCK_BOOTTIME);
> +	if (ret)
> +		return dev_err_probe(dev, ret, "clock boottime set failed\n");
> +
>   	ret = devm_iio_triggered_buffer_setup(dev, indio_dev,
>   					      iio_pollfunc_store_time,
>   					      hx9023s_trigger_handler,



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iio: proximity: hx9023s: Use 'CLOCK_BOOTTIME' as the default clock source
  2024-09-02 10:43 ` Lars-Peter Clausen
@ 2024-09-04  9:19   ` Yasin Lee
  0 siblings, 0 replies; 3+ messages in thread
From: Yasin Lee @ 2024-09-04  9:19 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: jic23, dan.carpenter, nuno.sa, linux-iio, linux-kernel

On 9/2/24 18:43, Lars-Peter Clausen wrote:
> On 9/2/24 12:32, Yasin Lee wrote:
>> Override the default (CLOCK_REALTIME) clock source to 'CLOCK_BOOTTIME'.
> Why? Won't this break existing applications that rely on the current 
> default?
>
Dear Lars-Peter,

Thank you very much for your careful review. After careful 
consideration, I agree that changing the clock source from 
CLOCK_REALTIME to CLOCK_BOOTTIME was not the right approach.

This submission is incorrect and will be discarded.

Best regards,
Yasin Lee


>> Signed-off-by: Yasin Lee <yasin.lee.x@gmail.com>
>> ---
>>   drivers/iio/proximity/hx9023s.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/iio/proximity/hx9023s.c 
>> b/drivers/iio/proximity/hx9023s.c
>> index 8b9f84400e00..5363357a9a46 100644
>> --- a/drivers/iio/proximity/hx9023s.c
>> +++ b/drivers/iio/proximity/hx9023s.c
>> @@ -1074,6 +1074,10 @@ static int hx9023s_probe(struct i2c_client 
>> *client)
>>                            "iio trigger register failed\n");
>>       }
>>   +    ret = iio_device_set_clock(indio_dev, CLOCK_BOOTTIME);
>> +    if (ret)
>> +        return dev_err_probe(dev, ret, "clock boottime set failed\n");
>> +
>>       ret = devm_iio_triggered_buffer_setup(dev, indio_dev,
>>                             iio_pollfunc_store_time,
>>                             hx9023s_trigger_handler,
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-04  9:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-02 10:32 [PATCH] iio: proximity: hx9023s: Use 'CLOCK_BOOTTIME' as the default clock source Yasin Lee
2024-09-02 10:43 ` Lars-Peter Clausen
2024-09-04  9:19   ` Yasin Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®