forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/iio/trigger/iio-trig-hrtimer.c
....@@ -1,16 +1,12 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /**
23 * The industrial I/O periodic hrtimer trigger driver
34 *
45 * Copyright (C) Intuitive Aerial AB
56 * Written by Marten Svanfeldt, marten@intuitiveaerial.com
6
- * Copyright (C) 2012, Analog Device Inc.
7
+ * Copyright (C) 2012, Analog Devices Inc.
78 * Author: Lars-Peter Clausen <lars@metafoo.de>
89 * Copyright (C) 2015, Intel Corporation
9
- *
10
- * This program is free software; you can redistribute it and/or modify it
11
- * under the terms of the GNU General Public License version 2 as published by
12
- * the Free Software Foundation.
13
- *
1410 */
1511 #include <linux/kernel.h>
1612 #include <linux/slab.h>
....@@ -106,7 +102,7 @@
106102
107103 if (state)
108104 hrtimer_start(&trig_info->timer, trig_info->period,
109
- HRTIMER_MODE_REL);
105
+ HRTIMER_MODE_REL_HARD);
110106 else
111107 hrtimer_cancel(&trig_info->timer);
112108
....@@ -136,7 +132,7 @@
136132 trig_info->swt.trigger->ops = &iio_hrtimer_trigger_ops;
137133 trig_info->swt.trigger->dev.groups = iio_hrtimer_attr_groups;
138134
139
- hrtimer_init(&trig_info->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
135
+ hrtimer_init(&trig_info->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
140136 trig_info->timer.function = iio_hrtimer_trig_handler;
141137
142138 trig_info->sampling_frequency = HRTIMER_DEFAULT_SAMPLING_FREQUENCY;