forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/media/rc/ir-jvc-decoder.c
....@@ -1,15 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /* ir-jvc-decoder.c - handle JVC IR Pulse/Space protocol
23 *
34 * Copyright (C) 2010 by David Härdeman <david@hardeman.nu>
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation version 2 of the License.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
135 */
146
157 #include <linux/bitrev.h>
....@@ -17,7 +9,7 @@
179 #include "rc-core-priv.h"
1810
1911 #define JVC_NBITS 16 /* dev(8) + func(8) */
20
-#define JVC_UNIT 525000 /* ns */
12
+#define JVC_UNIT 525 /* us */
2113 #define JVC_HEADER_PULSE (16 * JVC_UNIT) /* lack of header -> repeat */
2214 #define JVC_HEADER_SPACE (8 * JVC_UNIT)
2315 #define JVC_BIT_PULSE (1 * JVC_UNIT)
....@@ -57,7 +49,7 @@
5749 goto out;
5850
5951 dev_dbg(&dev->dev, "JVC decode started at state %d (%uus %s)\n",
60
- data->state, TO_US(ev.duration), TO_STR(ev.pulse));
52
+ data->state, ev.duration, TO_STR(ev.pulse));
6153
6254 again:
6355 switch (data->state) {
....@@ -165,7 +157,7 @@
165157
166158 out:
167159 dev_dbg(&dev->dev, "JVC decode failed at state %d (%uus %s)\n",
168
- data->state, TO_US(ev.duration), TO_STR(ev.pulse));
160
+ data->state, ev.duration, TO_STR(ev.pulse));
169161 data->state = STATE_INACTIVE;
170162 return -EINVAL;
171163 }