From 23fa18eaa71266feff7ba8d83022d9e1cc83c65a Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Fri, 10 May 2024 07:42:03 +0000 Subject: [PATCH] disable pwm7 --- kernel/drivers/media/rc/ir-xmp-decoder.c | 29 +++++++++++------------------ 1 files changed, 11 insertions(+), 18 deletions(-) diff --git a/kernel/drivers/media/rc/ir-xmp-decoder.c b/kernel/drivers/media/rc/ir-xmp-decoder.c index c965f51..ff94f48 100644 --- a/kernel/drivers/media/rc/ir-xmp-decoder.c +++ b/kernel/drivers/media/rc/ir-xmp-decoder.c @@ -1,15 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-only /* ir-xmp-decoder.c - handle XMP IR Pulse/Space protocol * * Copyright (C) 2014 by Marcel Mol - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. * * - Based on info from http://www.hifi-remote.com * - Ignore Toggle=9 frames @@ -20,11 +12,12 @@ #include <linux/module.h> #include "rc-core-priv.h" -#define XMP_UNIT 136000 /* ns */ -#define XMP_LEADER 210000 /* ns */ -#define XMP_NIBBLE_PREFIX 760000 /* ns */ -#define XMP_HALFFRAME_SPACE 13800000 /* ns */ -#define XMP_TRAILER_SPACE 20000000 /* should be 80ms but not all dureation supliers can go that high */ +#define XMP_UNIT 136 /* us */ +#define XMP_LEADER 210 /* us */ +#define XMP_NIBBLE_PREFIX 760 /* us */ +#define XMP_HALFFRAME_SPACE 13800 /* us */ +/* should be 80ms but not all duration supliers can go that high */ +#define XMP_TRAILER_SPACE 20000 enum xmp_state { STATE_INACTIVE, @@ -50,7 +43,7 @@ } dev_dbg(&dev->dev, "XMP decode started at state %d %d (%uus %s)\n", - data->state, data->count, TO_US(ev.duration), TO_STR(ev.pulse)); + data->state, data->count, ev.duration, TO_STR(ev.pulse)); switch (data->state) { @@ -94,7 +87,7 @@ n = data->durations; /* * the 4th nibble should be 15 so base the divider on this - * to transform durations into nibbles. Substract 2000 from + * to transform durations into nibbles. Subtract 2000 from * the divider to compensate for fluctuations in the signal */ divider = (n[3] - XMP_NIBBLE_PREFIX) / 15 - 2000; @@ -174,7 +167,7 @@ } else if (geq_margin(ev.duration, XMP_NIBBLE_PREFIX, XMP_UNIT)) { /* store nibble raw data, decode after trailer */ if (data->count == 16) { - dev_dbg(&dev->dev, "to many pulses (%d) ignoring: %u\n", + dev_dbg(&dev->dev, "too many pulses (%d) ignoring: %u\n", data->count, ev.duration); data->state = STATE_INACTIVE; return -EINVAL; @@ -191,7 +184,7 @@ } dev_dbg(&dev->dev, "XMP decode failed at count %d state %d (%uus %s)\n", - data->count, data->state, TO_US(ev.duration), TO_STR(ev.pulse)); + data->count, data->state, ev.duration, TO_STR(ev.pulse)); data->state = STATE_INACTIVE; return -EINVAL; } -- Gitblit v1.6.2