Skip to content

Commit

Permalink
Revert "linux-driver-addons: use rc built in kernel"
Browse files Browse the repository at this point in the history
This reverts commit 32dd87c.
  • Loading branch information
afl1 committed Jul 18, 2019
1 parent 7af31a7 commit 1044019
Show file tree
Hide file tree
Showing 7 changed files with 215 additions and 92 deletions.
@@ -1,55 +1,13 @@
--- a/v4l/scripts/make_kconfig.pl
+++ b/v4l/scripts/make_kconfig.pl
@@ -626,6 +626,52 @@ ($$)
@@ -626,6 +626,10 @@ ($$)
close OUT;

# These options should default to off
+disable_config('MEDIA_ANALOG_TV_SUPPORT');
+disable_config('MEDIA_CAMERA_SUPPORT');
+disable_config('MEDIA_CEC_SUPPORT');
+disable_config('SOC_CAMERA');
+disable_config('VIDEO_SAA7146_VV');
+disable_config('RC_CORE');
+disable_config('IR_NEC_DECODER');
+disable_config('IR_RC5_DECODER');
+disable_config('IR_RC6_DECODER');
+disable_config('IR_JVC_DECODER');
+disable_config('IR_SONY_DECODER');
+disable_config('IR_SANYO_DECODER');
+disable_config('IR_SHARP_DECODER');
+disable_config('IR_MCE_KBD_DECODER');
+disable_config('IR_XMP_DECODER');
+disable_config('IR_IMON_DECODER');
+disable_config('RC_ATI_REMOTE');
+disable_config('IR_HIX5HD2');
+disable_config('IR_IMON');
+disable_config('IR_IMON_RAW');
+disable_config('IR_ITE_CIR');
+disable_config('IR_MCEUSB');
+disable_config('IR_FINTEK');
+disable_config('IR_MESON');
+disable_config('IR_NUVOTON');
+disable_config('IR_ENE');
+disable_config('IR_REDRAT3');
+disable_config('IR_RX51');
+disable_config('IR_SPI');
+disable_config('IR_STREAMZAP');
+disable_config('IR_WINBOND_CIR');
+disable_config('RC_LOOPBACK');
+disable_config('IR_GPIO_CIR');
+disable_config('IR_GPIO_TX');
+disable_config('IR_PWM_TX');
+disable_config('IR_IGORPLUGUSB');
+disable_config('IR_IGUANA');
+disable_config('IR_TTUSBIR');
+disable_config('RC_ST');
+disable_config('IR_SUNXI');
+disable_config('IR_IMG');
+disable_config('IR_SERIAL');
+disable_config('IR_SIR');
+disable_config('IR_MTK');
+disable_config('IR_ZX');
+disable_config('IR_TANGO');
disable_config('DVB_AV7110_FIRMWARE');
disable_config('DVB_CINERGYT2_TUNING');
disable_config('VIDEO_HELPER_CHIPS_AUTO');
@@ -0,0 +1,54 @@
--- a/v4l/scripts/make_kconfig.pl
+++ b/v4l/scripts/make_kconfig.pl
@@ -626,6 +626,51 @@ ($$)
close OUT;

# These options should default to off
+disable_config('MEDIA_ANALOG_TV_SUPPORT');
+disable_config('MEDIA_CAMERA_SUPPORT');
+disable_config('MEDIA_CEC_SUPPORT');
+disable_config('SOC_CAMERA');
+disable_config('RC_CORE');
+disable_config('IR_NEC_DECODER');
+disable_config('IR_RC5_DECODER');
+disable_config('IR_RC6_DECODER');
+disable_config('IR_JVC_DECODER');
+disable_config('IR_SONY_DECODER');
+disable_config('IR_SANYO_DECODER');
+disable_config('IR_SHARP_DECODER');
+disable_config('IR_MCE_KBD_DECODER');
+disable_config('IR_XMP_DECODER');
+disable_config('IR_IMON_DECODER');
+disable_config('RC_ATI_REMOTE');
+disable_config('IR_HIX5HD2');
+disable_config('IR_IMON');
+disable_config('IR_IMON_RAW');
+disable_config('IR_ITE_CIR');
+disable_config('IR_MCEUSB');
+disable_config('IR_FINTEK');
+disable_config('IR_MESON');
+disable_config('IR_NUVOTON');
+disable_config('IR_ENE');
+disable_config('IR_REDRAT3');
+disable_config('IR_RX51');
+disable_config('IR_SPI');
+disable_config('IR_STREAMZAP');
+disable_config('IR_WINBOND_CIR');
+disable_config('RC_LOOPBACK');
+disable_config('IR_GPIO_CIR');
+disable_config('IR_GPIO_TX');
+disable_config('IR_PWM_TX');
+disable_config('IR_IGORPLUGUSB');
+disable_config('IR_IGUANA');
+disable_config('IR_TTUSBIR');
+disable_config('RC_ST');
+disable_config('IR_SUNXI');
+disable_config('IR_IMG');
+disable_config('IR_SERIAL');
+disable_config('IR_SIR');
+disable_config('IR_MTK');
+disable_config('IR_ZX');
+disable_config('IR_TANGO');
disable_config('DVB_AV7110_FIRMWARE');
disable_config('DVB_CINERGYT2_TUNING');
disable_config('VIDEO_HELPER_CHIPS_AUTO');
@@ -0,0 +1,12 @@
--- /dev/null
+++ b/v4l/config-mycompat.h
@@ -0,0 +1,8 @@
+#undef smp_mb__after_atomic
+#define smp_mb__after_atomic() smp_mb() /*mb*/
+#undef NEED_SMP_MB_AFTER_ATOMIC
+#undef writel_relaxed
+#define writel_relaxed(v,c) ((void)__raw_writel((__force u32)cpu_to_le32(v),(c)))
+#undef NEED_WRITEL_RELAXED
+#undef NEED_PM_RUNTIME_GET
+#undef NEED_OF_NODE_NAME_EQ
--
@@ -0,0 +1,53 @@
From 3f1f8303b6e0be751d7a7c55031c8ab840ed5c1a Mon Sep 17 00:00:00 2001
From: Matthias Reichl <hias@horus.com>
Date: Fri, 24 Aug 2018 23:31:51 +0200
Subject: [PATCH] media: rc: ir-rc6-decoder: enable toggle bit for Kathrein
RCU-676 remote

The Kathrein RCU-676 remote uses the 32-bit rc6 protocol and toggles
bit 15 (0x8000) on repeated button presses, like MCE remotes.

Add it's customer code 0x80460000 to the 32-bit rc6 toggle
handling code to get proper scancodes and toggle reports.

Signed-off-by: Matthias Reichl <hias@horus.com>
---
drivers/media/rc/ir-rc6-decoder.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/media/rc/ir-rc6-decoder.c b/drivers/media/rc/ir-rc6-decoder.c
index 68487ce9f79b..d96aed1343e4 100644
--- a/drivers/media/rc/ir-rc6-decoder.c
+++ b/drivers/media/rc/ir-rc6-decoder.c
@@ -40,6 +40,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_KATHREIN_CC 0x80460000 /* Kathrein RCU-676 customer code */
#ifndef CHAR_BIT
#define CHAR_BIT 8 /* Normally in <limits.h> */
#endif
@@ -242,13 +243,17 @@ static int ir_rc6_decode(struct rc_dev *dev, struct ir_raw_event ev)
toggle = 0;
break;
case 32:
- if ((scancode & RC6_6A_LCC_MASK) == RC6_6A_MCE_CC) {
+ switch (scancode & RC6_6A_LCC_MASK) {
+ case RC6_6A_MCE_CC:
+ case RC6_6A_KATHREIN_CC:
protocol = RC_PROTO_RC6_MCE;
toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
- } else {
+ break;
+ default:
protocol = RC_PROTO_RC6_6A_32;
toggle = 0;
+ break;
}
break;
default:
--
2.11.0


@@ -0,0 +1,41 @@
From ae1ccaa3587c0bd3d6d01841fa2e668cdf738f1e Mon Sep 17 00:00:00 2001
From: Matthias Reichl <hias@horus.com>
Date: Sun, 3 Feb 2019 14:24:00 +0100
Subject: [PATCH] media: rc: ir-rc6-decoder: enable toggle bit for Zotac
remotes

The Zotac RC2604323/01G and RC2604329/02BG remotes use the 32-bit
rc6 protocol and toggle bit 15 (0x8000) on repeated button presses,
like MCE remotes.

Add the customer code 0x80340000 to the 32-bit rc6 toggle
handling code to get proper scancodes and toggle reports.

Signed-off-by: Matthias Reichl <hias@horus.com>
---
drivers/media/rc/ir-rc6-decoder.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/media/rc/ir-rc6-decoder.c b/drivers/media/rc/ir-rc6-decoder.c
index d96aed1343e4..5cc302fa4daa 100644
--- a/drivers/media/rc/ir-rc6-decoder.c
+++ b/drivers/media/rc/ir-rc6-decoder.c
@@ -40,6 +40,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> */
@@ -246,6 +247,7 @@ static int ir_rc6_decode(struct rc_dev *dev, struct ir_raw_event ev)
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;
--
2.20.1

Expand Up @@ -224,6 +224,19 @@ index 0c512b5..98914b1 100644
static int si2183_read_status(struct dvb_frontend *fe, enum fe_status *status)
{
struct i2c_client *client = fe->demodulator_priv;
@@ -282,6 +292,12 @@ static int si2183_read_status(struct dvb_frontend *fe, enum fe_status *status)
cmd.rlen = 14;
snr_mul = 2;
break;
+ case SYS_DVBC2:
+ memcpy(cmd.args, "\x91\x01", 2);
+ cmd.wlen = 2;
+ cmd.rlen = 16;
+ snr_mul = 2;
+ break;
default:
ret = -EINVAL;
goto err;
@@ -427,7 +443,7 @@ static int si2183_set_dvbc(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
Expand Down Expand Up @@ -257,7 +270,7 @@ index 0c512b5..98914b1 100644
int ret;
u16 prop;

@@ -528,6 +552,14 @@ static int si2183_set_mcns(struct dvb_frontend *fe)
@@ -528,6 +552,41 @@ static int si2183_set_mcns(struct dvb_frontend *fe)
return ret;
}

Expand All @@ -268,27 +281,63 @@ index 0c512b5..98914b1 100644
+ dev_err(&client->dev, "err set mcns AFC range\n");
+ return ret;
+ }
+
+ return 0;
+}
+
+static int si2183_set_dvbc2(struct dvb_frontend *fe)
+{
+ struct dtv_frontend_properties *c = &fe->dtv_property_cache;
+ struct i2c_client *client = fe->demodulator_priv;
+ struct si2183_cmd cmd;
+ int ret;
+ u16 prop;
+
+ /* dvb-c2 mode */
+ prop = 0xb8;
+ ret = si2183_set_prop(client, SI2183_PROP_MODE, &prop);
+ if (ret) {
+ dev_err(&client->dev, "err set dvb-c2 mode\n");
+ return ret;
+ }
+
+ /* AFC range */
+ prop = 550;
+ ret = si2183_set_prop(client, SI2183_PROP_DVBC2_AFC, &prop);
+ if (ret) {
+ dev_err(&client->dev, "err set dvb-c2 AFC range\n");
+ return ret;
+ }
+
return 0;
}

@@ -765,7 +824,8 @@ static int si2183_set_frontend(struct dvb_frontend *fe)
@@ -765,7 +824,9 @@ static int si2183_set_frontend(struct dvb_frontend *fe)
case SYS_DVBT2:
case SYS_DVBC_ANNEX_A:
case SYS_DVBC_ANNEX_B:
+ case SYS_DVBC_ANNEX_C:
case SYS_ISDBT:
+ case SYS_DVBC2:
dev->RF_switch(dev->base->i2c,dev->rf_in,1);
break;

@@ -801,6 +862,7 @@ static int si2183_set_frontend(struct dvb_frontend *fe)
@@ -801,11 +862,15 @@ static int si2183_set_frontend(struct dvb_frontend *fe)
ret = si2183_set_dvbt(fe);
break;
case SYS_DVBC_ANNEX_A:
+ case SYS_DVBC_ANNEX_C:
ret = si2183_set_dvbc(fe);
break;
case SYS_DVBC_ANNEX_B:
ret = si2183_set_mcns(fe);
break;
+ case SYS_DVBC2:
+ ret = si2183_set_dvbc2(fe);
+ break;
case SYS_ISDBT:
ret = si2183_set_isdbt(fe);
break;
@@ -856,6 +921,10 @@ static int si2183_init(struct dvb_frontend *fe)

/* initialize */
Expand Down Expand Up @@ -317,7 +366,7 @@ index 0c512b5..98914b1 100644
- SYS_DVBC_ANNEX_A, SYS_DVBC_ANNEX_B,
- SYS_DVBS, SYS_DVBS2, SYS_DSS},
+ SYS_DVBC_ANNEX_A, SYS_DVBC_ANNEX_B, SYS_DVBC_ANNEX_C,
+ SYS_DVBS, SYS_DVBS2},
+ SYS_DVBS, SYS_DVBS2, SYS_DVBC2},
.info = {
.name = "Silicon Labs Si2183",
.symbol_rate_min = 1000000,
Expand Down
@@ -1,6 +1,6 @@
--- a/v4l/scripts/make_kconfig.pl
+++ b/v4l/scripts/make_kconfig.pl
@@ -626,6 +626,53 @@ ($$)
@@ -626,6 +626,11 @@ ($$)
close OUT;

# These options should default to off
Expand All @@ -9,50 +9,6 @@
+disable_config('MEDIA_CEC_SUPPORT');
+disable_config('SOC_CAMERA');
+disable_config('VIDEO_MT9M111');
+disable_config('VIDEO_SAA7146_VV');
+disable_config('RC_CORE');
+disable_config('IR_NEC_DECODER');
+disable_config('IR_RC5_DECODER');
+disable_config('IR_RC6_DECODER');
+disable_config('IR_JVC_DECODER');
+disable_config('IR_SONY_DECODER');
+disable_config('IR_SANYO_DECODER');
+disable_config('IR_SHARP_DECODER');
+disable_config('IR_MCE_KBD_DECODER');
+disable_config('IR_XMP_DECODER');
+disable_config('IR_IMON_DECODER');
+disable_config('RC_ATI_REMOTE');
+disable_config('IR_HIX5HD2');
+disable_config('IR_IMON');
+disable_config('IR_IMON_RAW');
+disable_config('IR_ITE_CIR');
+disable_config('IR_MCEUSB');
+disable_config('IR_FINTEK');
+disable_config('IR_MESON');
+disable_config('IR_NUVOTON');
+disable_config('IR_ENE');
+disable_config('IR_REDRAT3');
+disable_config('IR_RX51');
+disable_config('IR_SPI');
+disable_config('IR_STREAMZAP');
+disable_config('IR_WINBOND_CIR');
+disable_config('RC_LOOPBACK');
+disable_config('IR_GPIO_CIR');
+disable_config('IR_GPIO_TX');
+disable_config('IR_PWM_TX');
+disable_config('IR_IGORPLUGUSB');
+disable_config('IR_IGUANA');
+disable_config('IR_TTUSBIR');
+disable_config('RC_ST');
+disable_config('IR_SUNXI');
+disable_config('IR_IMG');
+disable_config('IR_SERIAL');
+disable_config('IR_SIR');
+disable_config('IR_MTK');
+disable_config('IR_ZX');
+disable_config('IR_TANGO');
disable_config('DVB_AV7110_FIRMWARE');
disable_config('DVB_CINERGYT2_TUNING');
disable_config('VIDEO_HELPER_CHIPS_AUTO');


0 comments on commit 1044019

Please sign in to comment.