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-rc6-decoder.c | 20 +++++++------------- 1 files changed, 7 insertions(+), 13 deletions(-) diff --git a/kernel/drivers/media/rc/ir-rc6-decoder.c b/kernel/drivers/media/rc/ir-rc6-decoder.c index d96aed1..0657ad5 100644 --- a/kernel/drivers/media/rc/ir-rc6-decoder.c +++ b/kernel/drivers/media/rc/ir-rc6-decoder.c @@ -1,15 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-only /* ir-rc6-decoder.c - A decoder for the RC6 IR protocol * * Copyright (C) 2010 by David Härdeman <david@hardeman.nu> - * - * 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. */ #include "rc-core-priv.h" @@ -23,7 +15,7 @@ * RC6-6A-32 (MCE version with toggle bit in body) */ -#define RC6_UNIT 444444 /* nanosecs */ +#define RC6_UNIT 444 /* microseconds */ #define RC6_HEADER_NBITS 4 /* not including toggle bit */ #define RC6_0_NBITS 16 #define RC6_6A_32_NBITS 32 @@ -40,6 +32,7 @@ #define RC6_6A_MCE_TOGGLE_MASK 0x8000 /* for the body bits */ #define RC6_6A_LCC_MASK 0xffff0000 /* RC6-6A-32 long customer code mask */ #define RC6_6A_MCE_CC 0x800f0000 /* MCE customer code */ +#define RC6_6A_ZOTAC_CC 0x80340000 /* Zotac customer code */ #define RC6_6A_KATHREIN_CC 0x80460000 /* Kathrein RCU-676 customer code */ #ifndef CHAR_BIT #define CHAR_BIT 8 /* Normally in <limits.h> */ @@ -71,7 +64,7 @@ case 6: if (!data->toggle) return RC6_MODE_6A; - /* fall through */ + fallthrough; default: return RC6_MODE_UNKNOWN; } @@ -102,7 +95,7 @@ again: dev_dbg(&dev->dev, "RC6 decode started at state %i (%uus %s)\n", - data->state, TO_US(ev.duration), TO_STR(ev.pulse)); + data->state, ev.duration, TO_STR(ev.pulse)); if (!geq_margin(ev.duration, RC6_UNIT, RC6_UNIT / 2)) return 0; @@ -246,6 +239,7 @@ switch (scancode & RC6_6A_LCC_MASK) { case RC6_6A_MCE_CC: case RC6_6A_KATHREIN_CC: + case RC6_6A_ZOTAC_CC: protocol = RC_PROTO_RC6_MCE; toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK); scancode &= ~RC6_6A_MCE_TOGGLE_MASK; @@ -276,7 +270,7 @@ out: dev_dbg(&dev->dev, "RC6 decode failed at state %i (%uus %s)\n", - data->state, TO_US(ev.duration), TO_STR(ev.pulse)); + data->state, ev.duration, TO_STR(ev.pulse)); data->state = STATE_INACTIVE; return -EINVAL; } -- Gitblit v1.6.2