| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* ir-jvc-decoder.c - handle JVC IR Pulse/Space protocol |
|---|
| 2 | 3 | * |
|---|
| 3 | 4 | * 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. |
|---|
| 13 | 5 | */ |
|---|
| 14 | 6 | |
|---|
| 15 | 7 | #include <linux/bitrev.h> |
|---|
| .. | .. |
|---|
| 17 | 9 | #include "rc-core-priv.h" |
|---|
| 18 | 10 | |
|---|
| 19 | 11 | #define JVC_NBITS 16 /* dev(8) + func(8) */ |
|---|
| 20 | | -#define JVC_UNIT 525000 /* ns */ |
|---|
| 12 | +#define JVC_UNIT 525 /* us */ |
|---|
| 21 | 13 | #define JVC_HEADER_PULSE (16 * JVC_UNIT) /* lack of header -> repeat */ |
|---|
| 22 | 14 | #define JVC_HEADER_SPACE (8 * JVC_UNIT) |
|---|
| 23 | 15 | #define JVC_BIT_PULSE (1 * JVC_UNIT) |
|---|
| .. | .. |
|---|
| 57 | 49 | goto out; |
|---|
| 58 | 50 | |
|---|
| 59 | 51 | 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)); |
|---|
| 61 | 53 | |
|---|
| 62 | 54 | again: |
|---|
| 63 | 55 | switch (data->state) { |
|---|
| .. | .. |
|---|
| 165 | 157 | |
|---|
| 166 | 158 | out: |
|---|
| 167 | 159 | 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)); |
|---|
| 169 | 161 | data->state = STATE_INACTIVE; |
|---|
| 170 | 162 | return -EINVAL; |
|---|
| 171 | 163 | } |
|---|