| .. | .. |
|---|
| 8 | 8 | #include "rc-core-priv.h" |
|---|
| 9 | 9 | |
|---|
| 10 | 10 | #define NEC_NBITS 32 |
|---|
| 11 | | -#define NEC_UNIT 562500 /* ns */ |
|---|
| 11 | +#define NEC_UNIT 563 /* us */ |
|---|
| 12 | 12 | #define NEC_HEADER_PULSE (16 * NEC_UNIT) |
|---|
| 13 | 13 | #define NECX_HEADER_PULSE (8 * NEC_UNIT) /* Less common NEC variant */ |
|---|
| 14 | 14 | #define NEC_HEADER_SPACE (8 * NEC_UNIT) |
|---|
| .. | .. |
|---|
| 50 | 50 | } |
|---|
| 51 | 51 | |
|---|
| 52 | 52 | dev_dbg(&dev->dev, "NEC decode started at state %d (%uus %s)\n", |
|---|
| 53 | | - data->state, TO_US(ev.duration), TO_STR(ev.pulse)); |
|---|
| 53 | + data->state, ev.duration, TO_STR(ev.pulse)); |
|---|
| 54 | 54 | |
|---|
| 55 | 55 | switch (data->state) { |
|---|
| 56 | 56 | |
|---|
| .. | .. |
|---|
| 163 | 163 | } |
|---|
| 164 | 164 | |
|---|
| 165 | 165 | dev_dbg(&dev->dev, "NEC decode failed at count %d state %d (%uus %s)\n", |
|---|
| 166 | | - data->count, data->state, TO_US(ev.duration), TO_STR(ev.pulse)); |
|---|
| 166 | + data->count, data->state, ev.duration, TO_STR(ev.pulse)); |
|---|
| 167 | 167 | data->state = STATE_INACTIVE; |
|---|
| 168 | 168 | return -EINVAL; |
|---|
| 169 | 169 | } |
|---|