mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
linux: update cubox kernel to 3.10.30
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
2abad30bbc
commit
30b16a37fd
@ -19,7 +19,7 @@
|
||||
PKG_NAME="linux"
|
||||
case "$LINUX" in
|
||||
imx6)
|
||||
PKG_VERSION="imx_3.0.35_4.1.0-5c73417"
|
||||
PKG_VERSION="cuboxi-592b2d9"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
;;
|
||||
3.13)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -175,7 +175,7 @@
|
||||
# Space separated list is supported,
|
||||
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
|
||||
# ADDITIONAL_DRIVERS="RTL8192CU RTL8192DU RTL8188EU RTL8723AU dvbhdhomerun"
|
||||
ADDITIONAL_DRIVERS="RTL8188EU"
|
||||
ADDITIONAL_DRIVERS="RTL8192CU RTL8192DU dvbhdhomerun"
|
||||
|
||||
# build and install bluetooth support (yes / no)
|
||||
BLUETOOTH_SUPPORT="no"
|
||||
|
@ -1,12 +1,13 @@
|
||||
diff -Naur linux-2.6.34-rc7/init/main.c linux-2.6.34-rc7.patch/init/main.c
|
||||
--- linux-2.6.34-rc7/init/main.c 2010-05-10 03:36:28.000000000 +0200
|
||||
+++ linux-2.6.34-rc7.patch/init/main.c 2010-05-15 12:28:34.767241760 +0200
|
||||
@@ -886,8 +886,14 @@
|
||||
diff --git a/init/main.c b/init/main.c
|
||||
index 9484f4b..db55edd 100644
|
||||
--- a/init/main.c
|
||||
+++ b/init/main.c
|
||||
@@ -880,8 +880,14 @@ static noinline void __init kernel_init_freeable(void)
|
||||
do_basic_setup();
|
||||
|
||||
/* Open the /dev/console on the rootfs, this should never fail */
|
||||
- if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
|
||||
- printk(KERN_WARNING "Warning: unable to open an initial console.\n");
|
||||
- pr_err("Warning: unable to open an initial console.\n");
|
||||
+ char *console = "/dev_console";
|
||||
+
|
||||
+ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) {
|
||||
|
@ -0,0 +1,18 @@
|
||||
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
|
||||
index b0f164b..ecb1af6 100644
|
||||
--- a/tools/perf/Makefile
|
||||
+++ b/tools/perf/Makefile
|
||||
@@ -687,12 +687,10 @@ ifndef NO_LIBAUDIT
|
||||
endif
|
||||
|
||||
ifndef NO_SLANG
|
||||
- FLAGS_SLANG=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -I/usr/include/slang -lslang
|
||||
+ FLAGS_SLANG=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -lslang
|
||||
ifneq ($(call try-cc,$(SOURCE_SLANG),$(FLAGS_SLANG),libslang),y)
|
||||
msg := $(warning slang not found, disables TUI support. Please install slang-devel or libslang-dev);
|
||||
else
|
||||
- # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h
|
||||
- BASIC_CFLAGS += -I/usr/include/slang
|
||||
BASIC_CFLAGS += -DSLANG_SUPPORT
|
||||
EXTLIBS += -lslang
|
||||
LIB_OBJS += $(OUTPUT)ui/browser.o
|
1029
projects/Cuboxi/patches/linux/linux-052-XBOX_remote_support.patch
Normal file
1029
projects/Cuboxi/patches/linux/linux-052-XBOX_remote_support.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,113 +0,0 @@
|
||||
diff -Naur linux-2.6.37/drivers/hid/hid-aureal.c linux-2.6.37.patch/drivers/hid/hid-aureal.c
|
||||
--- linux-2.6.37/drivers/hid/hid-aureal.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.37.patch/drivers/hid/hid-aureal.c 2011-01-07 22:35:31.413389936 +0100
|
||||
@@ -0,0 +1,60 @@
|
||||
+/*
|
||||
+ * HID driver for some sunplus "special" devices
|
||||
+ *
|
||||
+ * Copyright (c) 1999 Andreas Gal
|
||||
+ * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz>
|
||||
+ * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc
|
||||
+ * Copyright (c) 2006-2007 Jiri Kosina
|
||||
+ * Copyright (c) 2007 Paul Walmsley
|
||||
+ * Copyright (c) 2008 Jiri Slaby
|
||||
+ * Copyright (c) 2010 Franco Catrin <fcatrin@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * 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; either version 2 of the License, or (at your option)
|
||||
+ * any later version.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/device.h>
|
||||
+#include <linux/hid.h>
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+#include "hid-ids.h"
|
||||
+
|
||||
+static __u8 *aureal_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
+ unsigned int *rsize)
|
||||
+{
|
||||
+ if (*rsize >= 54 && rdesc[52] == 0x25 && rdesc[53] == 0x01) {
|
||||
+ dev_info(&hdev->dev, "fixing Aureal Cy se W-01RN USB_V3.1 "
|
||||
+ "report descriptor. Keyboard Logical Maximum = 101\n");
|
||||
+ rdesc[53] = 0x65;
|
||||
+ } return rdesc;
|
||||
+}
|
||||
+
|
||||
+static const struct hid_device_id aureal_devices[] = {
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_AUREAL, USB_DEVICE_ID_AUREAL_W01RN) },
|
||||
+ { }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(hid, aureal_devices);
|
||||
+
|
||||
+static struct hid_driver aureal_driver = {
|
||||
+ .name = "aureal",
|
||||
+ .id_table = aureal_devices,
|
||||
+ .report_fixup = aureal_report_fixup,
|
||||
+};
|
||||
+
|
||||
+static int __init aureal_init(void)
|
||||
+{
|
||||
+ return hid_register_driver(&aureal_driver);
|
||||
+}
|
||||
+
|
||||
+static void __exit aureal_exit(void)
|
||||
+{
|
||||
+ hid_unregister_driver(&aureal_driver);
|
||||
+}
|
||||
+
|
||||
+module_init(aureal_init);
|
||||
+module_exit(aureal_exit);
|
||||
+MODULE_LICENSE("GPL");
|
||||
diff -Naur linux-2.6.37/drivers/hid/hid-ids.h linux-2.6.37.patch/drivers/hid/hid-ids.h
|
||||
--- linux-2.6.37/drivers/hid/hid-ids.h 2011-01-05 01:50:19.000000000 +0100
|
||||
+++ linux-2.6.37.patch/drivers/hid/hid-ids.h 2011-01-07 22:35:31.414389949 +0100
|
||||
@@ -6,6 +6,7 @@
|
||||
* Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc
|
||||
* Copyright (c) 2006-2007 Jiri Kosina
|
||||
* Copyright (c) 2007 Paul Walmsley
|
||||
+ * Copyright (c) 2010 Franco Catrin <fcatrin@gmail.com>
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -327,6 +328,9 @@
|
||||
#define USB_DEVICE_ID_KYE_ERGO_525V 0x0087
|
||||
#define USB_DEVICE_ID_KYE_GPEN_560 0x5003
|
||||
|
||||
+#define USB_VENDOR_ID_AUREAL 0x0755
|
||||
+#define USB_DEVICE_ID_AUREAL_W01RN 0x2626
|
||||
+
|
||||
#define USB_VENDOR_ID_LABTEC 0x1020
|
||||
#define USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD 0x0006
|
||||
|
||||
diff -Naur linux-2.6.37/drivers/hid/Kconfig linux-2.6.37.patch/drivers/hid/Kconfig
|
||||
--- linux-2.6.37/drivers/hid/Kconfig 2011-01-05 01:50:19.000000000 +0100
|
||||
+++ linux-2.6.37.patch/drivers/hid/Kconfig 2011-01-07 22:35:31.467390603 +0100
|
||||
@@ -87,6 +87,13 @@
|
||||
Say Y here if you want support for keyboards of Apple iBooks, PowerBooks,
|
||||
MacBooks, MacBook Pros and Apple Aluminum.
|
||||
|
||||
+config HID_AUREAL
|
||||
+ tristate "Aureal" if EMBEDDED
|
||||
+ depends on USB_HID
|
||||
+ default !EMBEDDED
|
||||
+ ---help---
|
||||
+ Support for Aureal Cy se W-01RN Remote Controller
|
||||
+
|
||||
config HID_BELKIN
|
||||
tristate "Belkin Flip KVM and Wireless keyboard" if EMBEDDED
|
||||
depends on USB_HID
|
||||
diff -Naur linux-2.6.37/drivers/hid/Makefile linux-2.6.37.patch/drivers/hid/Makefile
|
||||
--- linux-2.6.37/drivers/hid/Makefile 2011-01-05 01:50:19.000000000 +0100
|
||||
+++ linux-2.6.37.patch/drivers/hid/Makefile 2011-01-07 22:35:31.547391590 +0100
|
||||
@@ -29,6 +29,7 @@
|
||||
obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o
|
||||
obj-$(CONFIG_HID_ACRUX_FF) += hid-axff.o
|
||||
obj-$(CONFIG_HID_APPLE) += hid-apple.o
|
||||
+obj-$(CONFIG_HID_AUREAL) += hid-aureal.o
|
||||
obj-$(CONFIG_HID_BELKIN) += hid-belkin.o
|
||||
obj-$(CONFIG_HID_CANDO) += hid-cando.o
|
||||
obj-$(CONFIG_HID_CHERRY) += hid-cherry.o
|
@ -1,7 +1,20 @@
|
||||
diff -Naur linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/hid-ids.h linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/hid-ids.h
|
||||
--- linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/hid-ids.h 2014-01-12 18:38:32.000000000 +0100
|
||||
+++ linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/hid-ids.h 2014-01-22 14:43:36.570838160 +0100
|
||||
@@ -561,6 +561,9 @@
|
||||
diff -Naur linux-3.9/drivers/hid/hid-core.c linux-3.9.patch/drivers/hid/hid-core.c
|
||||
--- linux-3.9/drivers/hid/hid-core.c 2013-04-29 02:36:01.000000000 +0200
|
||||
+++ linux-3.9.patch/drivers/hid/hid-core.c 2013-04-29 17:08:40.528324010 +0200
|
||||
@@ -1681,6 +1681,9 @@
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_1) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_2) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_3) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_KEYBOARD) },
|
||||
#if IS_ENABLED(CONFIG_HID_ROCCAT)
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) },
|
||||
diff -Naur linux-3.9/drivers/hid/hid-ids.h linux-3.9.patch/drivers/hid/hid-ids.h
|
||||
--- linux-3.9/drivers/hid/hid-ids.h 2013-04-29 02:36:01.000000000 +0200
|
||||
+++ linux-3.9.patch/drivers/hid/hid-ids.h 2013-04-29 17:08:40.537323981 +0200
|
||||
@@ -663,6 +663,9 @@
|
||||
|
||||
#define USB_VENDOR_ID_PHILIPS 0x0471
|
||||
#define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617
|
||||
@ -11,9 +24,9 @@ diff -Naur linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/hid-ids.h linux-imx_3.0.35
|
||||
|
||||
#define USB_VENDOR_ID_PI_ENGINEERING 0x05f3
|
||||
#define USB_DEVICE_ID_PI_ENGINEERING_VEC_USB_FOOTPEDAL 0xff
|
||||
diff -Naur linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/hid-spinelplus.c linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/hid-spinelplus.c
|
||||
--- linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/hid-spinelplus.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/hid-spinelplus.c 2014-01-22 14:43:36.570838160 +0100
|
||||
diff -Naur linux-3.9/drivers/hid/hid-spinelplus.c linux-3.9.patch/drivers/hid/hid-spinelplus.c
|
||||
--- linux-3.9/drivers/hid/hid-spinelplus.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-3.9.patch/drivers/hid/hid-spinelplus.c 2013-04-29 17:08:40.537323981 +0200
|
||||
@@ -0,0 +1,104 @@
|
||||
+/*
|
||||
+ * HID driver for "PHILIPS MCE USB IR Receiver- Spinel plus" remotes
|
||||
@ -119,12 +132,12 @@ diff -Naur linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/hid-spinelplus.c linux-imx
|
||||
+module_init(spinelplus_init);
|
||||
+module_exit(spinelplus_exit);
|
||||
+MODULE_LICENSE("GPL");
|
||||
diff -Naur linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/Kconfig linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/Kconfig
|
||||
--- linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/Kconfig 2014-01-12 18:38:32.000000000 +0100
|
||||
+++ linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/Kconfig 2014-01-22 14:43:36.571838106 +0100
|
||||
@@ -496,6 +496,12 @@
|
||||
diff -Naur linux-3.9/drivers/hid/Kconfig linux-3.9.patch/drivers/hid/Kconfig
|
||||
--- linux-3.9/drivers/hid/Kconfig 2013-04-29 02:36:01.000000000 +0200
|
||||
+++ linux-3.9.patch/drivers/hid/Kconfig 2013-04-29 17:08:40.538323977 +0200
|
||||
@@ -602,6 +602,12 @@
|
||||
---help---
|
||||
Support for Sony PS3 controller.
|
||||
Support for Steelseries SRW-S1 steering wheel
|
||||
|
||||
+config HID_SPINELPLUS
|
||||
+ tristate "Spinel Plus remote control"
|
||||
@ -135,14 +148,14 @@ diff -Naur linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/Kconfig linux-imx_3.0.35_4
|
||||
config HID_SUNPLUS
|
||||
tristate "Sunplus wireless desktop"
|
||||
depends on USB_HID
|
||||
diff -Naur linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/Makefile linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/Makefile
|
||||
--- linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/Makefile 2014-01-12 18:38:32.000000000 +0100
|
||||
+++ linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/Makefile 2014-01-22 14:44:22.868855680 +0100
|
||||
@@ -63,6 +63,7 @@
|
||||
obj-$(CONFIG_HID_SAMSUNG) += hid-samsung.o
|
||||
diff -Naur linux-3.9/drivers/hid/Makefile linux-3.9.patch/drivers/hid/Makefile
|
||||
--- linux-3.9/drivers/hid/Makefile 2013-04-29 02:36:01.000000000 +0200
|
||||
+++ linux-3.9.patch/drivers/hid/Makefile 2013-04-29 17:09:26.744173841 +0200
|
||||
@@ -101,6 +101,7 @@
|
||||
obj-$(CONFIG_HID_SMARTJOYPLUS) += hid-sjoy.o
|
||||
obj-$(CONFIG_HID_SONY) += hid-sony.o
|
||||
obj-$(CONFIG_HID_SPEEDLINK) += hid-speedlink.o
|
||||
+obj-$(CONFIG_HID_SPINELPLUS) += hid-spinelplus.o
|
||||
obj-$(CONFIG_HID_STEELSERIES) += hid-steelseries.o
|
||||
obj-$(CONFIG_HID_SUNPLUS) += hid-sunplus.o
|
||||
obj-$(CONFIG_HID_GREENASIA) += hid-gaff.o
|
||||
obj-$(CONFIG_HID_THRUSTMASTER) += hid-tmff.o
|
@ -1,12 +0,0 @@
|
||||
diff -Naur linux-3.2.7/drivers/media/rc/mceusb.c linux-3.2.7.patch/drivers/media/rc/mceusb.c
|
||||
--- linux-3.2.7/drivers/media/rc/mceusb.c 2012-02-20 22:42:16.000000000 +0100
|
||||
+++ linux-3.2.7.patch/drivers/media/rc/mceusb.c 2012-02-27 04:47:29.210888244 +0100
|
||||
@@ -361,6 +361,8 @@
|
||||
{ USB_DEVICE(VENDOR_FORMOSA, 0xe03c) },
|
||||
/* Formosa Industrial Computing */
|
||||
{ USB_DEVICE(VENDOR_FORMOSA, 0xe03e) },
|
||||
+ /* Formosa Industrial Computing AIM IR606 */
|
||||
+ { USB_DEVICE(VENDOR_FORMOSA, 0xe042) },
|
||||
/* Fintek eHome Infrared Transceiver (HP branded) */
|
||||
{ USB_DEVICE(VENDOR_FINTEK, 0x5168) },
|
||||
/* Fintek eHome Infrared Transceiver */
|
@ -0,0 +1,20 @@
|
||||
diff -Naur linux-3.6.7/drivers/media/rc/mceusb.c linux-3.6.7.patch/drivers/media/rc/mceusb.c
|
||||
--- linux-3.6.7/drivers/media/rc/mceusb.c 2012-11-29 04:45:51.142129739 +0100
|
||||
+++ linux-3.6.7.patch/drivers/media/rc/mceusb.c 2012-11-29 04:51:30.982828558 +0100
|
||||
@@ -200,6 +200,7 @@
|
||||
#define VENDOR_TIVO 0x105a
|
||||
#define VENDOR_CONEXANT 0x0572
|
||||
#define VENDOR_TWISTEDMELON 0x2596
|
||||
+#define VENDOR_ADAPTEC 0x03f3
|
||||
|
||||
enum mceusb_model_type {
|
||||
MCE_GEN2 = 0, /* Most boards */
|
||||
@@ -400,6 +401,8 @@
|
||||
{ USB_DEVICE(VENDOR_TWISTEDMELON, 0x8016) },
|
||||
/* Twisted Melon Inc. - Manta Transceiver */
|
||||
{ USB_DEVICE(VENDOR_TWISTEDMELON, 0x8042) },
|
||||
+ /* Adaptec / HP eHome Receiver */
|
||||
+ { USB_DEVICE(VENDOR_ADAPTEC, 0x0094) },
|
||||
/* Terminating entry */
|
||||
{ }
|
||||
};
|
@ -0,0 +1,22 @@
|
||||
--- linux/drivers/media/rc/ir-rc6-decoder.c 2012-11-25 22:08:13.148418669 -0800
|
||||
+++ linux.patch/drivers/media/rc/ir-rc6-decoder.c 2012-11-25 22:07:48.864417975 -0800
|
||||
@@ -39,7 +39,6 @@
|
||||
#define RC6_STARTBIT_MASK 0x08 /* for the header bits */
|
||||
#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 */
|
||||
#ifndef CHAR_BIT
|
||||
#define CHAR_BIT 8 /* Normally in <limits.h> */
|
||||
#endif
|
||||
@@ -242,9 +241,8 @@ again:
|
||||
}
|
||||
|
||||
scancode = data->body;
|
||||
- if (data->count == RC6_6A_32_NBITS &&
|
||||
- (scancode & RC6_6A_LCC_MASK) == RC6_6A_MCE_CC) {
|
||||
- /* MCE RC */
|
||||
+ if (data->count == RC6_6A_32_NBITS) {
|
||||
+ /* MCE compatible RC */
|
||||
toggle = (scancode & RC6_6A_MCE_TOGGLE_MASK) ? 1 : 0;
|
||||
scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
|
||||
} else {
|
@ -0,0 +1,13 @@
|
||||
diff -Naur linux-3.9.4/drivers/media/rc/mceusb.c linux-3.9.4.patch/drivers/media/rc/mceusb.c
|
||||
--- linux-3.9.4/drivers/media/rc/mceusb.c 2013-05-24 20:45:59.000000000 +0200
|
||||
+++ linux-3.9.4.patch/drivers/media/rc/mceusb.c 2013-05-27 12:28:12.811230633 +0200
|
||||
@@ -309,6 +309,9 @@
|
||||
/* SMK/I-O Data GV-MC7/RCKIT Receiver */
|
||||
{ USB_DEVICE(VENDOR_SMK, 0x0353),
|
||||
.driver_info = MCE_GEN2_NO_TX },
|
||||
+ /* SMK Manufacturing, Inc. Receiver */
|
||||
+ { USB_DEVICE(VENDOR_SMK, 0x0357),
|
||||
+ .driver_info = MCE_GEN2_NO_TX },
|
||||
/* Tatung eHome Infrared Transceiver */
|
||||
{ USB_DEVICE(VENDOR_TATUNG, 0x9150) },
|
||||
/* Shuttle eHome Infrared Transceiver */
|
@ -0,0 +1,867 @@
|
||||
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
|
||||
index 427b759..22d320e 100644
|
||||
--- a/drivers/hid/Kconfig
|
||||
+++ b/drivers/hid/Kconfig
|
||||
@@ -561,15 +561,6 @@ config HID_PRIMAX
|
||||
Support for Primax devices that are not fully compliant with the
|
||||
HID standard.
|
||||
|
||||
-config HID_PS3REMOTE
|
||||
- tristate "Sony PS3 BD Remote Control"
|
||||
- depends on HID
|
||||
- ---help---
|
||||
- Support for the Sony PS3 Blue-ray Disk Remote Control and Logitech
|
||||
- Harmony Adapter for PS3, which connect over Bluetooth.
|
||||
-
|
||||
- Support for the 6-axis controllers is provided by HID_SONY.
|
||||
-
|
||||
config HID_ROCCAT
|
||||
tristate "Roccat device support"
|
||||
depends on USB_HID
|
||||
@@ -594,12 +585,17 @@ config HID_SAMSUNG
|
||||
Support for Samsung InfraRed remote control or keyboards.
|
||||
|
||||
config HID_SONY
|
||||
- tristate "Sony PS3 controller"
|
||||
+ tristate "Sony PS2/3 accessories"
|
||||
depends on USB_HID
|
||||
+ depends on NEW_LEDS
|
||||
+ depends on LEDS_CLASS
|
||||
---help---
|
||||
- Support for Sony PS3 6-axis controllers.
|
||||
-
|
||||
- Support for the Sony PS3 BD Remote is provided by HID_PS3REMOTE.
|
||||
+ Support for
|
||||
+
|
||||
+ * Sony PS3 6-axis controllers
|
||||
+ * Buzz controllers
|
||||
+ * Sony PS3 Blue-ray Disk Remote Control (Bluetooth)
|
||||
+ * Logitech Harmony adapter for Sony Playstation 3 (Bluetooth)
|
||||
|
||||
config HID_SPEEDLINK
|
||||
tristate "Speedlink VAD Cezanne mouse support"
|
||||
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
|
||||
index b545124..419b7ca 100644
|
||||
--- a/drivers/hid/Makefile
|
||||
+++ b/drivers/hid/Makefile
|
||||
@@ -92,7 +92,6 @@ hid-picolcd-y += hid-picolcd_debugfs.o
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_HID_PRIMAX) += hid-primax.o
|
||||
-obj-$(CONFIG_HID_PS3REMOTE) += hid-ps3remote.o
|
||||
obj-$(CONFIG_HID_ROCCAT) += hid-roccat.o hid-roccat-common.o \
|
||||
hid-roccat-arvo.o hid-roccat-isku.o hid-roccat-kone.o \
|
||||
hid-roccat-koneplus.o hid-roccat-konepure.o hid-roccat-kovaplus.o \
|
||||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
||||
index b885a28..37e35c0 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -1683,6 +1683,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_BUZZ_CONTROLLER) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_BDREMOTE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER) },
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index 56b224e..c11cca1 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -737,6 +737,8 @@
|
||||
#define USB_DEVICE_ID_SONY_PS3_BDREMOTE 0x0306
|
||||
#define USB_DEVICE_ID_SONY_PS3_CONTROLLER 0x0268
|
||||
#define USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER 0x042f
|
||||
+#define USB_DEVICE_ID_SONY_BUZZ_CONTROLLER 0x0002
|
||||
+#define USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER 0x1000
|
||||
|
||||
#define USB_VENDOR_ID_SOUNDGRAPH 0x15c2
|
||||
#define USB_DEVICE_ID_SOUNDGRAPH_IMON_FIRST 0x0034
|
||||
diff --git a/drivers/hid/hid-ps3remote.c b/drivers/hid/hid-ps3remote.c
|
||||
deleted file mode 100644
|
||||
index f1239d3..0000000
|
||||
--- a/drivers/hid/hid-ps3remote.c
|
||||
+++ /dev/null
|
||||
@@ -1,204 +0,0 @@
|
||||
-/*
|
||||
- * HID driver for Sony PS3 BD Remote Control
|
||||
- *
|
||||
- * Copyright (c) 2012 David Dillow <dave@thedillows.org>
|
||||
- * Based on a blend of the bluez fakehid user-space code by Marcel Holtmann
|
||||
- * and other kernel HID drivers.
|
||||
- */
|
||||
-
|
||||
-/*
|
||||
- * 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; either version 2 of the License, or (at your option)
|
||||
- * any later version.
|
||||
- */
|
||||
-
|
||||
-/* NOTE: in order for the Sony PS3 BD Remote Control to be found by
|
||||
- * a Bluetooth host, the key combination Start+Enter has to be kept pressed
|
||||
- * for about 7 seconds with the Bluetooth Host Controller in discovering mode.
|
||||
- *
|
||||
- * There will be no PIN request from the device.
|
||||
- */
|
||||
-
|
||||
-#include <linux/device.h>
|
||||
-#include <linux/hid.h>
|
||||
-#include <linux/module.h>
|
||||
-
|
||||
-#include "hid-ids.h"
|
||||
-
|
||||
-static __u8 ps3remote_rdesc[] = {
|
||||
- 0x05, 0x01, /* GUsagePage Generic Desktop */
|
||||
- 0x09, 0x05, /* LUsage 0x05 [Game Pad] */
|
||||
- 0xA1, 0x01, /* MCollection Application (mouse, keyboard) */
|
||||
-
|
||||
- /* Use collection 1 for joypad buttons */
|
||||
- 0xA1, 0x02, /* MCollection Logical (interrelated data) */
|
||||
-
|
||||
- /* Ignore the 1st byte, maybe it is used for a controller
|
||||
- * number but it's not needed for correct operation */
|
||||
- 0x75, 0x08, /* GReportSize 0x08 [8] */
|
||||
- 0x95, 0x01, /* GReportCount 0x01 [1] */
|
||||
- 0x81, 0x01, /* MInput 0x01 (Const[0] Arr[1] Abs[2]) */
|
||||
-
|
||||
- /* Bytes from 2nd to 4th are a bitmap for joypad buttons, for these
|
||||
- * buttons multiple keypresses are allowed */
|
||||
- 0x05, 0x09, /* GUsagePage Button */
|
||||
- 0x19, 0x01, /* LUsageMinimum 0x01 [Button 1 (primary/trigger)] */
|
||||
- 0x29, 0x18, /* LUsageMaximum 0x18 [Button 24] */
|
||||
- 0x14, /* GLogicalMinimum [0] */
|
||||
- 0x25, 0x01, /* GLogicalMaximum 0x01 [1] */
|
||||
- 0x75, 0x01, /* GReportSize 0x01 [1] */
|
||||
- 0x95, 0x18, /* GReportCount 0x18 [24] */
|
||||
- 0x81, 0x02, /* MInput 0x02 (Data[0] Var[1] Abs[2]) */
|
||||
-
|
||||
- 0xC0, /* MEndCollection */
|
||||
-
|
||||
- /* Use collection 2 for remote control buttons */
|
||||
- 0xA1, 0x02, /* MCollection Logical (interrelated data) */
|
||||
-
|
||||
- /* 5th byte is used for remote control buttons */
|
||||
- 0x05, 0x09, /* GUsagePage Button */
|
||||
- 0x18, /* LUsageMinimum [No button pressed] */
|
||||
- 0x29, 0xFE, /* LUsageMaximum 0xFE [Button 254] */
|
||||
- 0x14, /* GLogicalMinimum [0] */
|
||||
- 0x26, 0xFE, 0x00, /* GLogicalMaximum 0x00FE [254] */
|
||||
- 0x75, 0x08, /* GReportSize 0x08 [8] */
|
||||
- 0x95, 0x01, /* GReportCount 0x01 [1] */
|
||||
- 0x80, /* MInput */
|
||||
-
|
||||
- /* Ignore bytes from 6th to 11th, 6th to 10th are always constant at
|
||||
- * 0xff and 11th is for press indication */
|
||||
- 0x75, 0x08, /* GReportSize 0x08 [8] */
|
||||
- 0x95, 0x06, /* GReportCount 0x06 [6] */
|
||||
- 0x81, 0x01, /* MInput 0x01 (Const[0] Arr[1] Abs[2]) */
|
||||
-
|
||||
- /* 12th byte is for battery strength */
|
||||
- 0x05, 0x06, /* GUsagePage Generic Device Controls */
|
||||
- 0x09, 0x20, /* LUsage 0x20 [Battery Strength] */
|
||||
- 0x14, /* GLogicalMinimum [0] */
|
||||
- 0x25, 0x05, /* GLogicalMaximum 0x05 [5] */
|
||||
- 0x75, 0x08, /* GReportSize 0x08 [8] */
|
||||
- 0x95, 0x01, /* GReportCount 0x01 [1] */
|
||||
- 0x81, 0x02, /* MInput 0x02 (Data[0] Var[1] Abs[2]) */
|
||||
-
|
||||
- 0xC0, /* MEndCollection */
|
||||
-
|
||||
- 0xC0 /* MEndCollection [Game Pad] */
|
||||
-};
|
||||
-
|
||||
-static const unsigned int ps3remote_keymap_joypad_buttons[] = {
|
||||
- [0x01] = KEY_SELECT,
|
||||
- [0x02] = BTN_THUMBL, /* L3 */
|
||||
- [0x03] = BTN_THUMBR, /* R3 */
|
||||
- [0x04] = BTN_START,
|
||||
- [0x05] = KEY_UP,
|
||||
- [0x06] = KEY_RIGHT,
|
||||
- [0x07] = KEY_DOWN,
|
||||
- [0x08] = KEY_LEFT,
|
||||
- [0x09] = BTN_TL2, /* L2 */
|
||||
- [0x0a] = BTN_TR2, /* R2 */
|
||||
- [0x0b] = BTN_TL, /* L1 */
|
||||
- [0x0c] = BTN_TR, /* R1 */
|
||||
- [0x0d] = KEY_OPTION, /* options/triangle */
|
||||
- [0x0e] = KEY_BACK, /* back/circle */
|
||||
- [0x0f] = BTN_0, /* cross */
|
||||
- [0x10] = KEY_SCREEN, /* view/square */
|
||||
- [0x11] = KEY_HOMEPAGE, /* PS button */
|
||||
- [0x14] = KEY_ENTER,
|
||||
-};
|
||||
-static const unsigned int ps3remote_keymap_remote_buttons[] = {
|
||||
- [0x00] = KEY_1,
|
||||
- [0x01] = KEY_2,
|
||||
- [0x02] = KEY_3,
|
||||
- [0x03] = KEY_4,
|
||||
- [0x04] = KEY_5,
|
||||
- [0x05] = KEY_6,
|
||||
- [0x06] = KEY_7,
|
||||
- [0x07] = KEY_8,
|
||||
- [0x08] = KEY_9,
|
||||
- [0x09] = KEY_0,
|
||||
- [0x0e] = KEY_ESC, /* return */
|
||||
- [0x0f] = KEY_CLEAR,
|
||||
- [0x16] = KEY_EJECTCD,
|
||||
- [0x1a] = KEY_MENU, /* top menu */
|
||||
- [0x28] = KEY_TIME,
|
||||
- [0x30] = KEY_PREVIOUS,
|
||||
- [0x31] = KEY_NEXT,
|
||||
- [0x32] = KEY_PLAY,
|
||||
- [0x33] = KEY_REWIND, /* scan back */
|
||||
- [0x34] = KEY_FORWARD, /* scan forward */
|
||||
- [0x38] = KEY_STOP,
|
||||
- [0x39] = KEY_PAUSE,
|
||||
- [0x40] = KEY_CONTEXT_MENU, /* pop up/menu */
|
||||
- [0x60] = KEY_FRAMEBACK, /* slow/step back */
|
||||
- [0x61] = KEY_FRAMEFORWARD, /* slow/step forward */
|
||||
- [0x63] = KEY_SUBTITLE,
|
||||
- [0x64] = KEY_AUDIO,
|
||||
- [0x65] = KEY_ANGLE,
|
||||
- [0x70] = KEY_INFO, /* display */
|
||||
- [0x80] = KEY_BLUE,
|
||||
- [0x81] = KEY_RED,
|
||||
- [0x82] = KEY_GREEN,
|
||||
- [0x83] = KEY_YELLOW,
|
||||
-};
|
||||
-
|
||||
-static __u8 *ps3remote_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
- unsigned int *rsize)
|
||||
-{
|
||||
- *rsize = sizeof(ps3remote_rdesc);
|
||||
- return ps3remote_rdesc;
|
||||
-}
|
||||
-
|
||||
-static int ps3remote_mapping(struct hid_device *hdev, struct hid_input *hi,
|
||||
- struct hid_field *field, struct hid_usage *usage,
|
||||
- unsigned long **bit, int *max)
|
||||
-{
|
||||
- unsigned int key = usage->hid & HID_USAGE;
|
||||
-
|
||||
- if ((usage->hid & HID_USAGE_PAGE) != HID_UP_BUTTON)
|
||||
- return -1;
|
||||
-
|
||||
- switch (usage->collection_index) {
|
||||
- case 1:
|
||||
- if (key >= ARRAY_SIZE(ps3remote_keymap_joypad_buttons))
|
||||
- return -1;
|
||||
-
|
||||
- key = ps3remote_keymap_joypad_buttons[key];
|
||||
- if (!key)
|
||||
- return -1;
|
||||
- break;
|
||||
- case 2:
|
||||
- if (key >= ARRAY_SIZE(ps3remote_keymap_remote_buttons))
|
||||
- return -1;
|
||||
-
|
||||
- key = ps3remote_keymap_remote_buttons[key];
|
||||
- if (!key)
|
||||
- return -1;
|
||||
- break;
|
||||
- default:
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
- hid_map_usage_clear(hi, usage, bit, max, EV_KEY, key);
|
||||
- return 1;
|
||||
-}
|
||||
-
|
||||
-static const struct hid_device_id ps3remote_devices[] = {
|
||||
- /* PS3 BD Remote Control */
|
||||
- { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_BDREMOTE) },
|
||||
- /* Logitech Harmony Adapter for PS3 */
|
||||
- { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_PS3) },
|
||||
- { }
|
||||
-};
|
||||
-MODULE_DEVICE_TABLE(hid, ps3remote_devices);
|
||||
-
|
||||
-static struct hid_driver ps3remote_driver = {
|
||||
- .name = "ps3_remote",
|
||||
- .id_table = ps3remote_devices,
|
||||
- .report_fixup = ps3remote_fixup,
|
||||
- .input_mapping = ps3remote_mapping,
|
||||
-};
|
||||
-module_hid_driver(ps3remote_driver);
|
||||
-
|
||||
-MODULE_LICENSE("GPL");
|
||||
-MODULE_AUTHOR("David Dillow <dave@thedillows.org>, Antonio Ospite <ospite@studenti.unina.it>");
|
||||
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
|
||||
index 312098e..83f9629 100644
|
||||
--- a/drivers/hid/hid-sony.c
|
||||
+++ b/drivers/hid/hid-sony.c
|
||||
@@ -1,11 +1,13 @@
|
||||
/*
|
||||
- * HID driver for some sony "special" devices
|
||||
+ * HID driver for Sony / PS2 / PS3 BD devices.
|
||||
*
|
||||
* Copyright (c) 1999 Andreas Gal
|
||||
* Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz>
|
||||
* Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc
|
||||
* Copyright (c) 2008 Jiri Slaby
|
||||
- * Copyright (c) 2006-2008 Jiri Kosina
|
||||
+ * Copyright (c) 2012 David Dillow <dave@thedillows.org>
|
||||
+ * Copyright (c) 2006-2013 Jiri Kosina
|
||||
+ * Copyright (c) 2013 Colin Leitner <colin.leitner@gmail.com>
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -15,17 +17,28 @@
|
||||
* any later version.
|
||||
*/
|
||||
|
||||
+/* NOTE: in order for the Sony PS3 BD Remote Control to be found by
|
||||
+ * a Bluetooth host, the key combination Start+Enter has to be kept pressed
|
||||
+ * for about 7 seconds with the Bluetooth Host Controller in discovering mode.
|
||||
+ *
|
||||
+ * There will be no PIN request from the device.
|
||||
+ */
|
||||
+
|
||||
#include <linux/device.h>
|
||||
#include <linux/hid.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/usb.h>
|
||||
+#include "usbhid/usbhid.h"
|
||||
+#include <linux/leds.h>
|
||||
|
||||
#include "hid-ids.h"
|
||||
|
||||
#define VAIO_RDESC_CONSTANT (1 << 0)
|
||||
#define SIXAXIS_CONTROLLER_USB (1 << 1)
|
||||
#define SIXAXIS_CONTROLLER_BT (1 << 2)
|
||||
+#define BUZZ_CONTROLLER (1 << 3)
|
||||
+#define PS3REMOTE (1 << 4)
|
||||
|
||||
static const u8 sixaxis_rdesc_fixup[] = {
|
||||
0x95, 0x13, 0x09, 0x01, 0x81, 0x02, 0x95, 0x0C,
|
||||
@@ -55,10 +68,214 @@ static const u8 sixaxis_rdesc_fixup2[] = {
|
||||
0xb1, 0x02, 0xc0, 0xc0,
|
||||
};
|
||||
|
||||
+static __u8 ps3remote_rdesc[] = {
|
||||
+ 0x05, 0x01, /* GUsagePage Generic Desktop */
|
||||
+ 0x09, 0x05, /* LUsage 0x05 [Game Pad] */
|
||||
+ 0xA1, 0x01, /* MCollection Application (mouse, keyboard) */
|
||||
+
|
||||
+ /* Use collection 1 for joypad buttons */
|
||||
+ 0xA1, 0x02, /* MCollection Logical (interrelated data) */
|
||||
+
|
||||
+ /* Ignore the 1st byte, maybe it is used for a controller
|
||||
+ * number but it's not needed for correct operation */
|
||||
+ 0x75, 0x08, /* GReportSize 0x08 [8] */
|
||||
+ 0x95, 0x01, /* GReportCount 0x01 [1] */
|
||||
+ 0x81, 0x01, /* MInput 0x01 (Const[0] Arr[1] Abs[2]) */
|
||||
+
|
||||
+ /* Bytes from 2nd to 4th are a bitmap for joypad buttons, for these
|
||||
+ * buttons multiple keypresses are allowed */
|
||||
+ 0x05, 0x09, /* GUsagePage Button */
|
||||
+ 0x19, 0x01, /* LUsageMinimum 0x01 [Button 1 (primary/trigger)] */
|
||||
+ 0x29, 0x18, /* LUsageMaximum 0x18 [Button 24] */
|
||||
+ 0x14, /* GLogicalMinimum [0] */
|
||||
+ 0x25, 0x01, /* GLogicalMaximum 0x01 [1] */
|
||||
+ 0x75, 0x01, /* GReportSize 0x01 [1] */
|
||||
+ 0x95, 0x18, /* GReportCount 0x18 [24] */
|
||||
+ 0x81, 0x02, /* MInput 0x02 (Data[0] Var[1] Abs[2]) */
|
||||
+
|
||||
+ 0xC0, /* MEndCollection */
|
||||
+
|
||||
+ /* Use collection 2 for remote control buttons */
|
||||
+ 0xA1, 0x02, /* MCollection Logical (interrelated data) */
|
||||
+
|
||||
+ /* 5th byte is used for remote control buttons */
|
||||
+ 0x05, 0x09, /* GUsagePage Button */
|
||||
+ 0x18, /* LUsageMinimum [No button pressed] */
|
||||
+ 0x29, 0xFE, /* LUsageMaximum 0xFE [Button 254] */
|
||||
+ 0x14, /* GLogicalMinimum [0] */
|
||||
+ 0x26, 0xFE, 0x00, /* GLogicalMaximum 0x00FE [254] */
|
||||
+ 0x75, 0x08, /* GReportSize 0x08 [8] */
|
||||
+ 0x95, 0x01, /* GReportCount 0x01 [1] */
|
||||
+ 0x80, /* MInput */
|
||||
+
|
||||
+ /* Ignore bytes from 6th to 11th, 6th to 10th are always constant at
|
||||
+ * 0xff and 11th is for press indication */
|
||||
+ 0x75, 0x08, /* GReportSize 0x08 [8] */
|
||||
+ 0x95, 0x06, /* GReportCount 0x06 [6] */
|
||||
+ 0x81, 0x01, /* MInput 0x01 (Const[0] Arr[1] Abs[2]) */
|
||||
+
|
||||
+ /* 12th byte is for battery strength */
|
||||
+ 0x05, 0x06, /* GUsagePage Generic Device Controls */
|
||||
+ 0x09, 0x20, /* LUsage 0x20 [Battery Strength] */
|
||||
+ 0x14, /* GLogicalMinimum [0] */
|
||||
+ 0x25, 0x05, /* GLogicalMaximum 0x05 [5] */
|
||||
+ 0x75, 0x08, /* GReportSize 0x08 [8] */
|
||||
+ 0x95, 0x01, /* GReportCount 0x01 [1] */
|
||||
+ 0x81, 0x02, /* MInput 0x02 (Data[0] Var[1] Abs[2]) */
|
||||
+
|
||||
+ 0xC0, /* MEndCollection */
|
||||
+
|
||||
+ 0xC0 /* MEndCollection [Game Pad] */
|
||||
+};
|
||||
+
|
||||
+static const unsigned int ps3remote_keymap_joypad_buttons[] = {
|
||||
+ [0x01] = KEY_SELECT,
|
||||
+ [0x02] = BTN_THUMBL, /* L3 */
|
||||
+ [0x03] = BTN_THUMBR, /* R3 */
|
||||
+ [0x04] = BTN_START,
|
||||
+ [0x05] = KEY_UP,
|
||||
+ [0x06] = KEY_RIGHT,
|
||||
+ [0x07] = KEY_DOWN,
|
||||
+ [0x08] = KEY_LEFT,
|
||||
+ [0x09] = BTN_TL2, /* L2 */
|
||||
+ [0x0a] = BTN_TR2, /* R2 */
|
||||
+ [0x0b] = BTN_TL, /* L1 */
|
||||
+ [0x0c] = BTN_TR, /* R1 */
|
||||
+ [0x0d] = KEY_OPTION, /* options/triangle */
|
||||
+ [0x0e] = KEY_BACK, /* back/circle */
|
||||
+ [0x0f] = BTN_0, /* cross */
|
||||
+ [0x10] = KEY_SCREEN, /* view/square */
|
||||
+ [0x11] = KEY_HOMEPAGE, /* PS button */
|
||||
+ [0x14] = KEY_ENTER,
|
||||
+};
|
||||
+static const unsigned int ps3remote_keymap_remote_buttons[] = {
|
||||
+ [0x00] = KEY_1,
|
||||
+ [0x01] = KEY_2,
|
||||
+ [0x02] = KEY_3,
|
||||
+ [0x03] = KEY_4,
|
||||
+ [0x04] = KEY_5,
|
||||
+ [0x05] = KEY_6,
|
||||
+ [0x06] = KEY_7,
|
||||
+ [0x07] = KEY_8,
|
||||
+ [0x08] = KEY_9,
|
||||
+ [0x09] = KEY_0,
|
||||
+ [0x0e] = KEY_ESC, /* return */
|
||||
+ [0x0f] = KEY_CLEAR,
|
||||
+ [0x16] = KEY_EJECTCD,
|
||||
+ [0x1a] = KEY_MENU, /* top menu */
|
||||
+ [0x28] = KEY_TIME,
|
||||
+ [0x30] = KEY_PREVIOUS,
|
||||
+ [0x31] = KEY_NEXT,
|
||||
+ [0x32] = KEY_PLAY,
|
||||
+ [0x33] = KEY_REWIND, /* scan back */
|
||||
+ [0x34] = KEY_FORWARD, /* scan forward */
|
||||
+ [0x38] = KEY_STOP,
|
||||
+ [0x39] = KEY_PAUSE,
|
||||
+ [0x40] = KEY_CONTEXT_MENU, /* pop up/menu */
|
||||
+ [0x60] = KEY_FRAMEBACK, /* slow/step back */
|
||||
+ [0x61] = KEY_FRAMEFORWARD, /* slow/step forward */
|
||||
+ [0x63] = KEY_SUBTITLE,
|
||||
+ [0x64] = KEY_AUDIO,
|
||||
+ [0x65] = KEY_ANGLE,
|
||||
+ [0x70] = KEY_INFO, /* display */
|
||||
+ [0x80] = KEY_BLUE,
|
||||
+ [0x81] = KEY_RED,
|
||||
+ [0x82] = KEY_GREEN,
|
||||
+ [0x83] = KEY_YELLOW,
|
||||
+};
|
||||
+
|
||||
+static const unsigned int buzz_keymap[] = {
|
||||
+ /* The controller has 4 remote buzzers, each with one LED and 5
|
||||
+ * buttons.
|
||||
+ *
|
||||
+ * We use the mapping chosen by the controller, which is:
|
||||
+ *
|
||||
+ * Key Offset
|
||||
+ * -------------------
|
||||
+ * Buzz 1
|
||||
+ * Blue 5
|
||||
+ * Orange 4
|
||||
+ * Green 3
|
||||
+ * Yellow 2
|
||||
+ *
|
||||
+ * So, for example, the orange button on the third buzzer is mapped to
|
||||
+ * BTN_TRIGGER_HAPPY14
|
||||
+ */
|
||||
+ [ 1] = BTN_TRIGGER_HAPPY1,
|
||||
+ [ 2] = BTN_TRIGGER_HAPPY2,
|
||||
+ [ 3] = BTN_TRIGGER_HAPPY3,
|
||||
+ [ 4] = BTN_TRIGGER_HAPPY4,
|
||||
+ [ 5] = BTN_TRIGGER_HAPPY5,
|
||||
+ [ 6] = BTN_TRIGGER_HAPPY6,
|
||||
+ [ 7] = BTN_TRIGGER_HAPPY7,
|
||||
+ [ 8] = BTN_TRIGGER_HAPPY8,
|
||||
+ [ 9] = BTN_TRIGGER_HAPPY9,
|
||||
+ [10] = BTN_TRIGGER_HAPPY10,
|
||||
+ [11] = BTN_TRIGGER_HAPPY11,
|
||||
+ [12] = BTN_TRIGGER_HAPPY12,
|
||||
+ [13] = BTN_TRIGGER_HAPPY13,
|
||||
+ [14] = BTN_TRIGGER_HAPPY14,
|
||||
+ [15] = BTN_TRIGGER_HAPPY15,
|
||||
+ [16] = BTN_TRIGGER_HAPPY16,
|
||||
+ [17] = BTN_TRIGGER_HAPPY17,
|
||||
+ [18] = BTN_TRIGGER_HAPPY18,
|
||||
+ [19] = BTN_TRIGGER_HAPPY19,
|
||||
+ [20] = BTN_TRIGGER_HAPPY20,
|
||||
+};
|
||||
+
|
||||
struct sony_sc {
|
||||
unsigned long quirks;
|
||||
+
|
||||
+ void *extra;
|
||||
};
|
||||
|
||||
+struct buzz_extra {
|
||||
+ int led_state;
|
||||
+ struct led_classdev *leds[4];
|
||||
+};
|
||||
+
|
||||
+static __u8 *ps3remote_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
+ unsigned int *rsize)
|
||||
+{
|
||||
+ *rsize = sizeof(ps3remote_rdesc);
|
||||
+ return ps3remote_rdesc;
|
||||
+}
|
||||
+
|
||||
+static int ps3remote_mapping(struct hid_device *hdev, struct hid_input *hi,
|
||||
+ struct hid_field *field, struct hid_usage *usage,
|
||||
+ unsigned long **bit, int *max)
|
||||
+{
|
||||
+ unsigned int key = usage->hid & HID_USAGE;
|
||||
+
|
||||
+ if ((usage->hid & HID_USAGE_PAGE) != HID_UP_BUTTON)
|
||||
+ return -1;
|
||||
+
|
||||
+ switch (usage->collection_index) {
|
||||
+ case 1:
|
||||
+ if (key >= ARRAY_SIZE(ps3remote_keymap_joypad_buttons))
|
||||
+ return -1;
|
||||
+
|
||||
+ key = ps3remote_keymap_joypad_buttons[key];
|
||||
+ if (!key)
|
||||
+ return -1;
|
||||
+ break;
|
||||
+ case 2:
|
||||
+ if (key >= ARRAY_SIZE(ps3remote_keymap_remote_buttons))
|
||||
+ return -1;
|
||||
+
|
||||
+ key = ps3remote_keymap_remote_buttons[key];
|
||||
+ if (!key)
|
||||
+ return -1;
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ hid_map_usage_clear(hi, usage, bit, max, EV_KEY, key);
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/* Sony Vaio VGX has wrongly mouse pointer declared as constant */
|
||||
static __u8 *sony_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
unsigned int *rsize)
|
||||
@@ -95,6 +312,10 @@ static __u8 *sony_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
*rsize = sizeof(sixaxis_rdesc_fixup2);
|
||||
memcpy(rdesc, &sixaxis_rdesc_fixup2, *rsize);
|
||||
}
|
||||
+
|
||||
+ if (sc->quirks & PS3REMOTE)
|
||||
+ return ps3remote_fixup(hdev, rdesc, rsize);
|
||||
+
|
||||
return rdesc;
|
||||
}
|
||||
|
||||
@@ -117,6 +338,41 @@ static int sony_raw_event(struct hid_device *hdev, struct hid_report *report,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int sony_mapping(struct hid_device *hdev, struct hid_input *hi,
|
||||
+ struct hid_field *field, struct hid_usage *usage,
|
||||
+ unsigned long **bit, int *max)
|
||||
+{
|
||||
+ struct sony_sc *sc = hid_get_drvdata(hdev);
|
||||
+
|
||||
+ if (sc->quirks & BUZZ_CONTROLLER) {
|
||||
+ unsigned int key = usage->hid & HID_USAGE;
|
||||
+
|
||||
+ if ((usage->hid & HID_USAGE_PAGE) != HID_UP_BUTTON)
|
||||
+ return -1;
|
||||
+
|
||||
+ switch (usage->collection_index) {
|
||||
+ case 1:
|
||||
+ if (key >= ARRAY_SIZE(buzz_keymap))
|
||||
+ return -1;
|
||||
+
|
||||
+ key = buzz_keymap[key];
|
||||
+ if (!key)
|
||||
+ return -1;
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ hid_map_usage_clear(hi, usage, bit, max, EV_KEY, key);
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ if (sc->quirks & PS3REMOTE)
|
||||
+ return ps3remote_mapping(hdev, hi, field, usage, bit, max);
|
||||
+
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* The Sony Sixaxis does not handle HID Output Reports on the Interrupt EP
|
||||
* like it should according to usbhid/hid-core.c::usbhid_output_raw_report()
|
||||
@@ -192,11 +448,181 @@ static int sixaxis_set_operational_bt(struct hid_device *hdev)
|
||||
return hdev->hid_output_raw_report(hdev, buf, sizeof(buf), HID_FEATURE_REPORT);
|
||||
}
|
||||
|
||||
+static void buzz_set_leds(struct hid_device *hdev, int leds)
|
||||
+{
|
||||
+ struct list_head *report_list =
|
||||
+ &hdev->report_enum[HID_OUTPUT_REPORT].report_list;
|
||||
+ struct hid_report *report = list_entry(report_list->next,
|
||||
+ struct hid_report, list);
|
||||
+ __s32 *value = report->field[0]->value;
|
||||
+
|
||||
+ value[0] = 0x00;
|
||||
+ value[1] = (leds & 1) ? 0xff : 0x00;
|
||||
+ value[2] = (leds & 2) ? 0xff : 0x00;
|
||||
+ value[3] = (leds & 4) ? 0xff : 0x00;
|
||||
+ value[4] = (leds & 8) ? 0xff : 0x00;
|
||||
+ value[5] = 0x00;
|
||||
+ value[6] = 0x00;
|
||||
+ hid_hw_request(hdev, report, HID_REQ_SET_REPORT);
|
||||
+}
|
||||
+
|
||||
+static void buzz_led_set_brightness(struct led_classdev *led,
|
||||
+ enum led_brightness value)
|
||||
+{
|
||||
+ struct device *dev = led->dev->parent;
|
||||
+ struct hid_device *hdev = container_of(dev, struct hid_device, dev);
|
||||
+ struct sony_sc *drv_data;
|
||||
+ struct buzz_extra *buzz;
|
||||
+
|
||||
+ int n;
|
||||
+
|
||||
+ drv_data = hid_get_drvdata(hdev);
|
||||
+ if (!drv_data || !drv_data->extra) {
|
||||
+ hid_err(hdev, "No device data\n");
|
||||
+ return;
|
||||
+ }
|
||||
+ buzz = drv_data->extra;
|
||||
+
|
||||
+ for (n = 0; n < 4; n++) {
|
||||
+ if (led == buzz->leds[n]) {
|
||||
+ int on = !! (buzz->led_state & (1 << n));
|
||||
+ if (value == LED_OFF && on) {
|
||||
+ buzz->led_state &= ~(1 << n);
|
||||
+ buzz_set_leds(hdev, buzz->led_state);
|
||||
+ } else if (value != LED_OFF && !on) {
|
||||
+ buzz->led_state |= (1 << n);
|
||||
+ buzz_set_leds(hdev, buzz->led_state);
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static enum led_brightness buzz_led_get_brightness(struct led_classdev *led)
|
||||
+{
|
||||
+ struct device *dev = led->dev->parent;
|
||||
+ struct hid_device *hdev = container_of(dev, struct hid_device, dev);
|
||||
+ struct sony_sc *drv_data;
|
||||
+ struct buzz_extra *buzz;
|
||||
+
|
||||
+ int n;
|
||||
+ int on = 0;
|
||||
+
|
||||
+ drv_data = hid_get_drvdata(hdev);
|
||||
+ if (!drv_data || !drv_data->extra) {
|
||||
+ hid_err(hdev, "No device data\n");
|
||||
+ return LED_OFF;
|
||||
+ }
|
||||
+ buzz = drv_data->extra;
|
||||
+
|
||||
+ for (n = 0; n < 4; n++) {
|
||||
+ if (led == buzz->leds[n]) {
|
||||
+ on = !! (buzz->led_state & (1 << n));
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return on ? LED_FULL : LED_OFF;
|
||||
+}
|
||||
+
|
||||
+static int buzz_init(struct hid_device *hdev)
|
||||
+{
|
||||
+ struct sony_sc *drv_data;
|
||||
+ struct buzz_extra *buzz;
|
||||
+ int n, ret = 0;
|
||||
+ struct led_classdev *led;
|
||||
+ size_t name_sz;
|
||||
+ char *name;
|
||||
+
|
||||
+ drv_data = hid_get_drvdata(hdev);
|
||||
+ BUG_ON(!(drv_data->quirks & BUZZ_CONTROLLER));
|
||||
+
|
||||
+ buzz = kzalloc(sizeof(*buzz), GFP_KERNEL);
|
||||
+ if (!buzz) {
|
||||
+ hid_err(hdev, "Insufficient memory, cannot allocate driver data\n");
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+ drv_data->extra = buzz;
|
||||
+
|
||||
+ /* Clear LEDs as we have no way of reading their initial state. This is
|
||||
+ * only relevant if the driver is loaded after somebody actively set the
|
||||
+ * LEDs to on */
|
||||
+ buzz_set_leds(hdev, 0x00);
|
||||
+
|
||||
+ name_sz = strlen(dev_name(&hdev->dev)) + strlen("::buzz#") + 1;
|
||||
+
|
||||
+ for (n = 0; n < 4; n++) {
|
||||
+ led = kzalloc(sizeof(struct led_classdev) + name_sz, GFP_KERNEL);
|
||||
+ if (!led) {
|
||||
+ hid_err(hdev, "Couldn't allocate memory for LED %d\n", n);
|
||||
+ goto error_leds;
|
||||
+ }
|
||||
+
|
||||
+ name = (void *)(&led[1]);
|
||||
+ snprintf(name, name_sz, "%s::buzz%d", dev_name(&hdev->dev), n + 1);
|
||||
+ led->name = name;
|
||||
+ led->brightness = 0;
|
||||
+ led->max_brightness = 1;
|
||||
+ led->brightness_get = buzz_led_get_brightness;
|
||||
+ led->brightness_set = buzz_led_set_brightness;
|
||||
+
|
||||
+ if (led_classdev_register(&hdev->dev, led)) {
|
||||
+ hid_err(hdev, "Failed to register LED %d\n", n);
|
||||
+ kfree(led);
|
||||
+ goto error_leds;
|
||||
+ }
|
||||
+
|
||||
+ buzz->leds[n] = led;
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+
|
||||
+error_leds:
|
||||
+ for (n = 0; n < 4; n++) {
|
||||
+ led = buzz->leds[n];
|
||||
+ buzz->leds[n] = NULL;
|
||||
+ if (!led)
|
||||
+ continue;
|
||||
+ led_classdev_unregister(led);
|
||||
+ kfree(led);
|
||||
+ }
|
||||
+
|
||||
+ kfree(drv_data->extra);
|
||||
+ drv_data->extra = NULL;
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void buzz_remove(struct hid_device *hdev)
|
||||
+{
|
||||
+ struct sony_sc *drv_data;
|
||||
+ struct buzz_extra *buzz;
|
||||
+ struct led_classdev *led;
|
||||
+ int n;
|
||||
+
|
||||
+ drv_data = hid_get_drvdata(hdev);
|
||||
+ BUG_ON(!(drv_data->quirks & BUZZ_CONTROLLER));
|
||||
+
|
||||
+ buzz = drv_data->extra;
|
||||
+
|
||||
+ for (n = 0; n < 4; n++) {
|
||||
+ led = buzz->leds[n];
|
||||
+ buzz->leds[n] = NULL;
|
||||
+ if (!led)
|
||||
+ continue;
|
||||
+ led_classdev_unregister(led);
|
||||
+ kfree(led);
|
||||
+ }
|
||||
+
|
||||
+ kfree(drv_data->extra);
|
||||
+ drv_data->extra = NULL;
|
||||
+}
|
||||
+
|
||||
static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
{
|
||||
int ret;
|
||||
unsigned long quirks = id->driver_data;
|
||||
struct sony_sc *sc;
|
||||
+ unsigned int connect_mask = HID_CONNECT_DEFAULT;
|
||||
|
||||
sc = kzalloc(sizeof(*sc), GFP_KERNEL);
|
||||
if (sc == NULL) {
|
||||
@@ -213,8 +639,14 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
goto err_free;
|
||||
}
|
||||
|
||||
- ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT |
|
||||
- HID_CONNECT_HIDDEV_FORCE);
|
||||
+ if (sc->quirks & VAIO_RDESC_CONSTANT)
|
||||
+ connect_mask |= HID_CONNECT_HIDDEV_FORCE;
|
||||
+ else if (sc->quirks & SIXAXIS_CONTROLLER_USB)
|
||||
+ connect_mask |= HID_CONNECT_HIDDEV_FORCE;
|
||||
+ else if (sc->quirks & SIXAXIS_CONTROLLER_BT)
|
||||
+ connect_mask |= HID_CONNECT_HIDDEV_FORCE;
|
||||
+
|
||||
+ ret = hid_hw_start(hdev, connect_mask);
|
||||
if (ret) {
|
||||
hid_err(hdev, "hw start failed\n");
|
||||
goto err_free;
|
||||
@@ -226,6 +658,8 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
}
|
||||
else if (sc->quirks & SIXAXIS_CONTROLLER_BT)
|
||||
ret = sixaxis_set_operational_bt(hdev);
|
||||
+ else if (sc->quirks & BUZZ_CONTROLLER)
|
||||
+ ret = buzz_init(hdev);
|
||||
else
|
||||
ret = 0;
|
||||
|
||||
@@ -242,8 +676,13 @@ err_free:
|
||||
|
||||
static void sony_remove(struct hid_device *hdev)
|
||||
{
|
||||
+ struct sony_sc *sc = hid_get_drvdata(hdev);
|
||||
+
|
||||
+ if (sc->quirks & BUZZ_CONTROLLER)
|
||||
+ buzz_remove(hdev);
|
||||
+
|
||||
hid_hw_stop(hdev);
|
||||
- kfree(hid_get_drvdata(hdev));
|
||||
+ kfree(sc);
|
||||
}
|
||||
|
||||
static const struct hid_device_id sony_devices[] = {
|
||||
@@ -257,17 +696,30 @@ static const struct hid_device_id sony_devices[] = {
|
||||
.driver_data = VAIO_RDESC_CONSTANT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE),
|
||||
.driver_data = VAIO_RDESC_CONSTANT },
|
||||
+ /* Wired Buzz Controller. Reported as Sony Hub from its USB ID and as
|
||||
+ * Logitech joystick from the device descriptor. */
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_BUZZ_CONTROLLER),
|
||||
+ .driver_data = BUZZ_CONTROLLER },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER),
|
||||
+ .driver_data = BUZZ_CONTROLLER },
|
||||
+ /* PS3 BD Remote Control */
|
||||
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_BDREMOTE),
|
||||
+ .driver_data = PS3REMOTE },
|
||||
+ /* Logitech Harmony Adapter for PS3 */
|
||||
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_PS3),
|
||||
+ .driver_data = PS3REMOTE },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(hid, sony_devices);
|
||||
|
||||
static struct hid_driver sony_driver = {
|
||||
- .name = "sony",
|
||||
- .id_table = sony_devices,
|
||||
- .probe = sony_probe,
|
||||
- .remove = sony_remove,
|
||||
- .report_fixup = sony_report_fixup,
|
||||
- .raw_event = sony_raw_event
|
||||
+ .name = "sony",
|
||||
+ .id_table = sony_devices,
|
||||
+ .input_mapping = sony_mapping,
|
||||
+ .probe = sony_probe,
|
||||
+ .remove = sony_remove,
|
||||
+ .report_fixup = sony_report_fixup,
|
||||
+ .raw_event = sony_raw_event
|
||||
};
|
||||
module_hid_driver(sony_driver);
|
||||
|
@ -0,0 +1,61 @@
|
||||
Betreff: [RFC] hid/sony: add autorepeat for PS3 remotes
|
||||
Von: David Dillow <dave@thedillows.org>
|
||||
Datum: 28.06.2013 04:28
|
||||
An: linux-input@vger.kernel.org
|
||||
Kopie (CC): Stephan Raue <stephan@openelec.tv>
|
||||
|
||||
Some applications using the PS3 remote would like to have autorepeat
|
||||
from the device. Use the input subsystem's software emulation to provide
|
||||
this capability, and enable those that don't need it to turn it off.
|
||||
---
|
||||
I'm not sure this is the correct approach, or if it is even appropriate
|
||||
for a remote to do autorepeat. However, the media/rc subsystem does do
|
||||
it by default, and it's been requested by users, so there is at least
|
||||
some demand.
|
||||
|
||||
This compiled against the hid-sony driver with the PS3 remote changes
|
||||
merged, but I have done no testing of it. If the approach seems
|
||||
reasonable, I'll try to test it when the MythTV is idle.
|
||||
|
||||
drivers/hid/hid-sony.c | 20 ++++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
|
||||
index ecbc749..0bbcd07 100644
|
||||
--- a/drivers/hid/hid-sony.c
|
||||
+++ b/drivers/hid/hid-sony.c
|
||||
@@ -274,6 +274,24 @@ static int ps3remote_mapping(struct hid_device *hdev, struct hid_input *hi,
|
||||
return 1;
|
||||
}
|
||||
|
||||
+static int ps3remote_setup_repeat(struct hid_device *hdev)
|
||||
+{
|
||||
+ struct hid_input *hidinput = list_first_entry(&hdev->inputs,
|
||||
+ struct hid_input, list);
|
||||
+ struct input_dev *input = hidinput->input;
|
||||
+
|
||||
+ /*
|
||||
+ * Set up autorepeat defaults per the remote control subsystem;
|
||||
+ * this must be done after hid_hw_start(), as having these non-zero
|
||||
+ * at the time of input_register_device() tells the input system that
|
||||
+ * the hardware does the autorepeat, and the PS3 remote does not.
|
||||
+ */
|
||||
+ set_bit(EV_REP, input->evbit);
|
||||
+ input->rep[REP_DELAY] = 500;
|
||||
+ input->rep[REP_PERIOD] = 125;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
/* Sony Vaio VGX has wrongly mouse pointer declared as constant */
|
||||
static __u8 *sony_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
@@ -659,6 +677,8 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
ret = sixaxis_set_operational_bt(hdev);
|
||||
else if (sc->quirks & BUZZ_CONTROLLER)
|
||||
ret = buzz_init(hdev);
|
||||
+ else if (sc->quirks & PS3REMOTE)
|
||||
+ ret = ps3remote_setup_repeat(hdev);
|
||||
else
|
||||
ret = 0;
|
||||
|
||||
|
||||
|
@ -0,0 +1,47 @@
|
||||
commit 5a601d61d36236a667cc7d170b300d18dd6240c6
|
||||
Author: Juan J. Sierralta <sierralta@gmail.com>
|
||||
Date: Sun Jul 28 09:26:04 2013 +0300
|
||||
|
||||
Add support for SMK-Link PS3 remote
|
||||
|
||||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
||||
index 396d24d..9eb7129 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -1686,6 +1686,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
|
||||
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SONY_PS3_BDREMOTE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_BUZZ_CONTROLLER) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_BDREMOTE) },
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index dd0511e..2801df1 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -734,6 +734,7 @@
|
||||
#define USB_VENDOR_ID_SKYCABLE 0x1223
|
||||
#define USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER 0x3F07
|
||||
|
||||
+#define USB_VENDOR_ID_SMK 0x0609
|
||||
#define USB_VENDOR_ID_SONY 0x054c
|
||||
#define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE 0x024b
|
||||
#define USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE 0x0374
|
||||
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
|
||||
index 8f425e2..614f057 100644
|
||||
--- a/drivers/hid/hid-sony.c
|
||||
+++ b/drivers/hid/hid-sony.c
|
||||
@@ -728,8 +728,12 @@ static const struct hid_device_id sony_devices[] = {
|
||||
/* Logitech Harmony Adapter for PS3 */
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_PS3),
|
||||
.driver_data = PS3REMOTE },
|
||||
+ /* SMK-Link Universal Remote Control VP3700 */
|
||||
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SONY_PS3_BDREMOTE),
|
||||
+ .driver_data = PS3REMOTE },
|
||||
{ }
|
||||
};
|
||||
+
|
||||
MODULE_DEVICE_TABLE(hid, sony_devices);
|
||||
|
||||
static struct hid_driver sony_driver = {
|
@ -0,0 +1,11 @@
|
||||
diff -Naur linux-3.8.4/drivers/input/joystick/xpad.c linux-3.8.4.patch/drivers/input/joystick/xpad.c
|
||||
--- linux-3.8.4/drivers/input/joystick/xpad.c 2013-03-20 21:11:19.000000000 +0100
|
||||
+++ linux-3.8.4.patch/drivers/input/joystick/xpad.c 2013-03-26 20:24:29.273978355 +0100
|
||||
@@ -174,7 +174,6 @@
|
||||
{ 0x1bad, 0xf901, "Gamestop Xbox 360 Controller", 0, XTYPE_XBOX360 },
|
||||
{ 0x1bad, 0xf903, "Tron Xbox 360 controller", 0, XTYPE_XBOX360 },
|
||||
{ 0x24c6, 0x5300, "PowerA MINI PROEX Controller", 0, XTYPE_XBOX360 },
|
||||
- { 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX },
|
||||
{ 0x0000, 0x0000, "Generic X-Box pad", 0, XTYPE_UNKNOWN }
|
||||
};
|
||||
|
@ -0,0 +1,14 @@
|
||||
diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
|
||||
index 2cc8ec7..985fa11 100644
|
||||
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
|
||||
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
|
||||
@@ -1408,6 +1408,9 @@ static const struct usb_device_id rtl28xxu_id_table[] = {
|
||||
&rtl2832u_props, "Compro VideoMate U620F", NULL) },
|
||||
{ DVB_USB_DEVICE(USB_VID_KWORLD_2, 0xd394,
|
||||
&rtl2832u_props, "MaxMedia HU394-T", NULL) },
|
||||
+ { DVB_USB_DEVICE(USB_VID_GTEK, 0xa803,
|
||||
+ &rtl2832u_props, "Realtek RTL2832U reference design", NULL) },
|
||||
+
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, rtl28xxu_id_table);
|
@ -1,7 +1,7 @@
|
||||
diff -Naur linux-3.2.1/drivers/media/dvb/frontends/stb0899_drv.c linux-3.2.1.patch/drivers/media/dvb/frontends/stb0899_drv.c
|
||||
--- linux-3.2.1/drivers/media/dvb/frontends/stb0899_drv.c 2012-01-12 20:42:45.000000000 +0100
|
||||
+++ linux-3.2.1.patch/drivers/media/dvb/frontends/stb0899_drv.c 2012-01-23 10:47:29.311211860 +0100
|
||||
@@ -1614,7 +1614,7 @@
|
||||
diff -Naur linux-3.7.2/drivers/media/dvb-frontends/stb0899_drv.c linux-3.7.2.patch/drivers/media/dvb-frontends/stb0899_drv.c
|
||||
--- linux-3.7.2/drivers/media/dvb-frontends/stb0899_drv.c 2013-01-11 18:19:28.000000000 +0100
|
||||
+++ linux-3.7.2.patch/drivers/media/dvb-frontends/stb0899_drv.c 2013-01-16 10:25:43.479645317 +0100
|
||||
@@ -1581,7 +1581,7 @@
|
||||
.frequency_max = 2150000,
|
||||
.frequency_stepsize = 0,
|
||||
.frequency_tolerance = 0,
|
||||
|
6161
projects/Cuboxi/patches/linux/linux-210-dvbsky.patch
Normal file
6161
projects/Cuboxi/patches/linux/linux-210-dvbsky.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,7 @@
|
||||
diff --git a/drivers/media/dvb/frontends/stb0899_algo.c b/drivers/media/dvb/frontends/stb0899_algo.c
|
||||
index 2da55ec..3efde1e 100644
|
||||
--- a/drivers/media/dvb/frontends/stb0899_algo.c
|
||||
+++ b/drivers/media/dvb/frontends/stb0899_algo.c
|
||||
@@ -206,7 +206,6 @@ static enum stb0899_status stb0899_check_tmg(struct stb0899_state *state)
|
||||
diff -Naur linux-3.7.2/drivers/media/dvb-frontends/stb0899_algo.c linux-3.7.2.patch/drivers/media/dvb-frontends/stb0899_algo.c
|
||||
--- linux-3.7.2/drivers/media/dvb-frontends/stb0899_algo.c 2013-01-11 18:19:28.000000000 +0100
|
||||
+++ linux-3.7.2.patch/drivers/media/dvb-frontends/stb0899_algo.c 2013-01-16 10:28:33.633409961 +0100
|
||||
@@ -206,7 +206,6 @@
|
||||
static enum stb0899_status stb0899_search_tmg(struct stb0899_state *state)
|
||||
{
|
||||
struct stb0899_internal *internal = &state->internal;
|
||||
@ -10,7 +9,7 @@ index 2da55ec..3efde1e 100644
|
||||
|
||||
short int derot_step, derot_freq = 0, derot_limit, next_loop = 3;
|
||||
int index = 0;
|
||||
@@ -216,10 +215,9 @@ static enum stb0899_status stb0899_search_tmg(struct stb0899_state *state)
|
||||
@@ -216,10 +215,9 @@
|
||||
|
||||
/* timing loop computation & symbol rate optimisation */
|
||||
derot_limit = (internal->sub_range / 2L) / internal->mclk;
|
||||
@ -22,7 +21,7 @@ index 2da55ec..3efde1e 100644
|
||||
derot_freq += index * internal->direction * derot_step; /* next derot zig zag position */
|
||||
|
||||
if (abs(derot_freq) > derot_limit)
|
||||
@@ -230,6 +228,7 @@ static enum stb0899_status stb0899_search_tmg(struct stb0899_state *state)
|
||||
@@ -230,6 +228,7 @@
|
||||
STB0899_SETFIELD_VAL(CFRL, cfr[1], LSB(state->config->inversion * derot_freq));
|
||||
stb0899_write_regs(state, STB0899_CFRM, cfr, 2); /* derotator frequency */
|
||||
}
|
||||
@ -30,7 +29,7 @@ index 2da55ec..3efde1e 100644
|
||||
internal->direction = -internal->direction; /* Change zigzag direction */
|
||||
}
|
||||
|
||||
@@ -278,14 +277,18 @@ static enum stb0899_status stb0899_search_carrier(struct stb0899_state *state)
|
||||
@@ -278,14 +277,18 @@
|
||||
{
|
||||
struct stb0899_internal *internal = &state->internal;
|
||||
|
||||
@ -50,7 +49,7 @@ index 2da55ec..3efde1e 100644
|
||||
|
||||
reg = stb0899_read_reg(state, STB0899_CFD);
|
||||
STB0899_SETFIELD_VAL(CFD_ON, reg, 1);
|
||||
@@ -294,11 +297,10 @@ static enum stb0899_status stb0899_search_carrier(struct stb0899_state *state)
|
||||
@@ -294,11 +297,10 @@
|
||||
do {
|
||||
dprintk(state->verbose, FE_DEBUG, 1, "Derot Freq=%d, mclk=%d", derot_freq, internal->mclk);
|
||||
if (stb0899_check_carrier(state) == NOCARRIER) {
|
||||
@ -64,7 +63,7 @@ index 2da55ec..3efde1e 100644
|
||||
next_loop--;
|
||||
|
||||
if (next_loop) {
|
||||
@@ -310,9 +312,10 @@ static enum stb0899_status stb0899_search_carrier(struct stb0899_state *state)
|
||||
@@ -310,9 +312,10 @@
|
||||
STB0899_SETFIELD_VAL(CFRL, cfr[1], LSB(state->config->inversion * derot_freq));
|
||||
stb0899_write_regs(state, STB0899_CFRM, cfr, 2); /* derotator frequency */
|
||||
}
|
||||
@ -76,7 +75,7 @@ index 2da55ec..3efde1e 100644
|
||||
} while ((internal->status != CARRIEROK) && next_loop);
|
||||
|
||||
if (internal->status == CARRIEROK) {
|
||||
@@ -338,6 +341,7 @@ static enum stb0899_status stb0899_check_data(struct stb0899_state *state)
|
||||
@@ -338,6 +341,7 @@
|
||||
int lock = 0, index = 0, dataTime = 500, loop;
|
||||
u8 reg;
|
||||
|
||||
@ -84,7 +83,7 @@ index 2da55ec..3efde1e 100644
|
||||
internal->status = NODATA;
|
||||
|
||||
/* RESET FEC */
|
||||
@@ -348,6 +352,7 @@ static enum stb0899_status stb0899_check_data(struct stb0899_state *state)
|
||||
@@ -348,6 +352,7 @@
|
||||
reg = stb0899_read_reg(state, STB0899_TSTRES);
|
||||
STB0899_SETFIELD_VAL(FRESACS, reg, 0);
|
||||
stb0899_write_reg(state, STB0899_TSTRES, reg);
|
||||
@ -92,7 +91,7 @@ index 2da55ec..3efde1e 100644
|
||||
|
||||
if (params->srate <= 2000000)
|
||||
dataTime = 2000;
|
||||
@@ -360,6 +365,7 @@ static enum stb0899_status stb0899_check_data(struct stb0899_state *state)
|
||||
@@ -363,6 +368,7 @@
|
||||
|
||||
stb0899_write_reg(state, STB0899_DSTATUS2, 0x00); /* force search loop */
|
||||
while (1) {
|
||||
@ -100,7 +99,7 @@ index 2da55ec..3efde1e 100644
|
||||
/* WARNING! VIT LOCKED has to be tested before VIT_END_LOOOP */
|
||||
reg = stb0899_read_reg(state, STB0899_VSTATUS);
|
||||
lock = STB0899_GETFIELD(VSTATUS_LOCKEDVIT, reg);
|
||||
@@ -387,20 +393,21 @@ static enum stb0899_status stb0899_search_data(struct stb0899_state *state)
|
||||
@@ -390,20 +396,21 @@
|
||||
short int derot_freq, derot_step, derot_limit, next_loop = 3;
|
||||
u8 cfr[2];
|
||||
u8 reg;
|
||||
@ -126,7 +125,7 @@ index 2da55ec..3efde1e 100644
|
||||
next_loop--;
|
||||
|
||||
if (next_loop) {
|
||||
@@ -414,9 +421,9 @@ static enum stb0899_status stb0899_search_data(struct stb0899_state *state)
|
||||
@@ -417,9 +424,9 @@
|
||||
stb0899_write_regs(state, STB0899_CFRM, cfr, 2); /* derotator frequency */
|
||||
|
||||
stb0899_check_carrier(state);
|
||||
@ -137,5 +136,3 @@ index 2da55ec..3efde1e 100644
|
||||
internal->direction = -internal->direction; /* change zig zag direction */
|
||||
} while ((internal->status != DATAOK) && next_loop);
|
||||
|
||||
--
|
||||
1.7.1
|
||||
|
@ -1,46 +0,0 @@
|
||||
diff -Naur linux-3.2.21/drivers/media/dvb/dvb-usb/dw2102.c linux-3.2.21.patch/drivers/media/dvb/dvb-usb/dw2102.c
|
||||
--- linux-3.2.21/drivers/media/dvb/dvb-usb/dw2102.c 2012-06-20 00:18:30.000000000 +0200
|
||||
+++ linux-3.2.21.patch/drivers/media/dvb/dvb-usb/dw2102.c 2012-06-28 14:08:50.721691934 +0200
|
||||
@@ -1181,6 +1181,14 @@
|
||||
{
|
||||
u8 obuf[3] = { 0xe, 0x80, 0 };
|
||||
u8 ibuf[] = { 0 };
|
||||
+
|
||||
+ if (dvb_usb_generic_rw(d->dev, obuf, 3, ibuf, 1, 0) < 0)
|
||||
+ err("command 0x0e transfer failed.");
|
||||
+
|
||||
+ //power on su3000
|
||||
+ obuf[0] = 0xe;
|
||||
+ obuf[1] = 0x02;
|
||||
+ obuf[2] = 1;
|
||||
|
||||
if (dvb_usb_generic_rw(d->dev, obuf, 3, ibuf, 1, 0) < 0)
|
||||
err("command 0x0e transfer failed.");
|
||||
@@ -1448,6 +1456,7 @@
|
||||
{USB_DEVICE(0x3034, 0x7500)},
|
||||
{USB_DEVICE(0x1f4d, 0x3000)},
|
||||
{USB_DEVICE(USB_VID_TERRATEC, 0x00a8)},
|
||||
+ {USB_DEVICE(USB_VID_TERRATEC, 0x00b0)},
|
||||
{USB_DEVICE(0x9022, USB_PID_TEVII_S480_1)},
|
||||
{USB_DEVICE(0x9022, USB_PID_TEVII_S480_2)},
|
||||
{USB_DEVICE(0x1f4d, 0x3100)},
|
||||
@@ -1839,7 +1848,7 @@
|
||||
}},
|
||||
}
|
||||
},
|
||||
- .num_device_descs = 3,
|
||||
+ .num_device_descs = 4,
|
||||
.devices = {
|
||||
{ "SU3000HD DVB-S USB2.0",
|
||||
{ &dw2102_table[10], NULL },
|
||||
@@ -1853,6 +1862,10 @@
|
||||
{ &dw2102_table[14], NULL },
|
||||
{ NULL },
|
||||
},
|
||||
+ { "Terratec Cinergy S2 USB HD Rev.2",
|
||||
+ { &dw2102_table[17], NULL },
|
||||
+ { NULL },
|
||||
+ },
|
||||
}
|
||||
};
|
||||
|
@ -1,25 +0,0 @@
|
||||
This patch adds a module-device-table-entry to the
|
||||
technisat-usb2-driver which will help udev to on-demand load the
|
||||
driver. This was obviously forgotten during initial commit.
|
||||
|
||||
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
|
||||
---
|
||||
drivers/media/dvb/dvb-usb/technisat-usb2.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/media/dvb/dvb-usb/technisat-usb2.c b/drivers/media/dvb/dvb-usb/technisat-usb2.c
|
||||
index acefaa8..7a8c8c1 100644
|
||||
--- a/drivers/media/dvb/dvb-usb/technisat-usb2.c
|
||||
+++ b/drivers/media/dvb/dvb-usb/technisat-usb2.c
|
||||
@@ -677,6 +677,7 @@ static struct usb_device_id technisat_usb2_id_table[] = {
|
||||
{ USB_DEVICE(USB_VID_TECHNISAT, USB_PID_TECHNISAT_USB2_DVB_S2) },
|
||||
{ 0 } /* Terminating entry */
|
||||
};
|
||||
+MODULE_DEVICE_TABLE(usb, technisat_usb2_id_table);
|
||||
|
||||
/* device description */
|
||||
static struct dvb_usb_device_properties technisat_usb2_devices = {
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
--
|
12735
projects/Cuboxi/patches/linux/linux-221-ngene-octopus.patch
Normal file
12735
projects/Cuboxi/patches/linux/linux-221-ngene-octopus.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,62 @@
|
||||
diff -Naur linux-3.7.2/drivers/media/dvb-frontends/stb0899_drv.c linux-3.7.2.patch/drivers/media/dvb-frontends/stb0899_drv.c
|
||||
--- linux-3.7.2/drivers/media/dvb-frontends/stb0899_drv.c 2013-01-11 18:19:28.000000000 +0100
|
||||
+++ linux-3.7.2.patch/drivers/media/dvb-frontends/stb0899_drv.c 2013-01-16 10:33:10.323380937 +0100
|
||||
@@ -971,6 +971,16 @@
|
||||
|
||||
*strength = stb0899_table_lookup(stb0899_dvbsrf_tab, ARRAY_SIZE(stb0899_dvbsrf_tab) - 1, val);
|
||||
*strength += 750;
|
||||
+
|
||||
+ const int MIN_STRENGTH_DVBS = 0;
|
||||
+ const int MAX_STRENGTH_DVBS = 680;
|
||||
+ if (*strength < MIN_STRENGTH_DVBS)
|
||||
+ *strength = 0;
|
||||
+ else if(*strength > MAX_STRENGTH_DVBS)
|
||||
+ *strength = 0xFFFF;
|
||||
+ else
|
||||
+ *strength = (*strength - MIN_STRENGTH_DVBS) * 0xFFFF / (MAX_STRENGTH_DVBS - MIN_STRENGTH_DVBS);
|
||||
+
|
||||
dprintk(state->verbose, FE_DEBUG, 1, "AGCIQVALUE = 0x%02x, C = %d * 0.1 dBm",
|
||||
val & 0xff, *strength);
|
||||
}
|
||||
@@ -983,6 +993,7 @@
|
||||
|
||||
*strength = stb0899_table_lookup(stb0899_dvbs2rf_tab, ARRAY_SIZE(stb0899_dvbs2rf_tab) - 1, val);
|
||||
*strength += 950;
|
||||
+ *strength = *strength << 4;
|
||||
dprintk(state->verbose, FE_DEBUG, 1, "IF_AGC_GAIN = 0x%04x, C = %d * 0.1 dBm",
|
||||
val & 0x3fff, *strength);
|
||||
}
|
||||
@@ -1016,6 +1027,16 @@
|
||||
val = MAKEWORD16(buf[0], buf[1]);
|
||||
|
||||
*snr = stb0899_table_lookup(stb0899_cn_tab, ARRAY_SIZE(stb0899_cn_tab) - 1, val);
|
||||
+
|
||||
+ const int MIN_SNR_DVBS = 0;
|
||||
+ const int MAX_SNR_DVBS = 200;
|
||||
+ if (*snr < MIN_SNR_DVBS)
|
||||
+ *snr = 0;
|
||||
+ else if(*snr > MAX_SNR_DVBS)
|
||||
+ *snr = 0xFFFF;
|
||||
+ else
|
||||
+ *snr = (*snr - MIN_SNR_DVBS) * 0xFFFF / (MAX_SNR_DVBS - MIN_SNR_DVBS);
|
||||
+
|
||||
dprintk(state->verbose, FE_DEBUG, 1, "NIR = 0x%02x%02x = %u, C/N = %d * 0.1 dBm\n",
|
||||
buf[0], buf[1], val, *snr);
|
||||
}
|
||||
@@ -1040,6 +1061,16 @@
|
||||
val = (quantn - estn) / 10;
|
||||
}
|
||||
*snr = val;
|
||||
+
|
||||
+ const int MIN_SNR_DVBS2 = 10;
|
||||
+ const int MAX_SNR_DVBS2 = 70;
|
||||
+ if (*snr < MIN_SNR_DVBS2)
|
||||
+ *snr = 0;
|
||||
+ else if(*snr > MAX_SNR_DVBS2)
|
||||
+ *snr = 0xFFFF;
|
||||
+ else
|
||||
+ *snr = (*snr - MIN_SNR_DVBS2) * 0xFFFF / (MAX_SNR_DVBS2 - MIN_SNR_DVBS2);
|
||||
+
|
||||
dprintk(state->verbose, FE_DEBUG, 1, "Es/N0 quant = %d (%d) estimate = %u (%d), C/N = %d * 0.1 dBm",
|
||||
quant, quantn, est, estn, val);
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
diff -Naur linux-3.7.9/drivers/media/usb/dvb-usb/pctv452e.c linux-3.7.9.patch/drivers/media/usb/dvb-usb/pctv452e.c
|
||||
--- linux-3.7.9/drivers/media/usb/dvb-usb/pctv452e.c 2013-01-11 18:19:28.000000000 +0100
|
||||
+++ linux-3.7.9.patch/drivers/media/usb/dvb-usb/pctv452e.c 2013-01-16 10:35:01.131342123 +0100
|
||||
@@ -995,11 +995,11 @@
|
||||
/* parameter for the MPEG2-data transfer */
|
||||
.stream = {
|
||||
.type = USB_ISOC,
|
||||
- .count = 7,
|
||||
+ .count = 4,
|
||||
.endpoint = 0x02,
|
||||
.u = {
|
||||
.isoc = {
|
||||
- .framesperurb = 4,
|
||||
+ .framesperurb = 64,
|
||||
.framesize = 940,
|
||||
.interval = 1
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
--- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c 2013-07-21 16:06:37.443909481 +0200
|
||||
+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c 2013-07-21 16:11:10.696335476 +0200
|
||||
@@ -1470,15 +1470,18 @@
|
||||
}
|
||||
|
||||
#define BRCMF_USB_VENDOR_ID_BROADCOM 0x0a5c
|
||||
+#define BRCMF_USB_VENDOR_ID_LINKSYS 0x13b1
|
||||
#define BRCMF_USB_DEVICE_ID_43143 0xbd1e
|
||||
#define BRCMF_USB_DEVICE_ID_43236 0xbd17
|
||||
#define BRCMF_USB_DEVICE_ID_43242 0xbd1f
|
||||
+#define BRCMF_USB_DEVICE_ID_AE2500 0x003a
|
||||
#define BRCMF_USB_DEVICE_ID_BCMFW 0x0bdc
|
||||
|
||||
static struct usb_device_id brcmf_usb_devid_table[] = {
|
||||
{ USB_DEVICE(BRCMF_USB_VENDOR_ID_BROADCOM, BRCMF_USB_DEVICE_ID_43143) },
|
||||
{ USB_DEVICE(BRCMF_USB_VENDOR_ID_BROADCOM, BRCMF_USB_DEVICE_ID_43236) },
|
||||
{ USB_DEVICE(BRCMF_USB_VENDOR_ID_BROADCOM, BRCMF_USB_DEVICE_ID_43242) },
|
||||
+ { USB_DEVICE(BRCMF_USB_VENDOR_ID_LINKSYS, BRCMF_USB_DEVICE_ID_AE2500) },
|
||||
/* special entry for device with firmware loaded and running */
|
||||
{ USB_DEVICE(BRCMF_USB_VENDOR_ID_BROADCOM, BRCMF_USB_DEVICE_ID_BCMFW) },
|
||||
{ }
|
@ -0,0 +1,72 @@
|
||||
commit 073af93346306a0e079c161e3ed8dd263fef0b20
|
||||
Author: Stefan Saraev <stefan@saraev.ca>
|
||||
Date: Sat Jul 13 19:31:03 2013 +0300
|
||||
|
||||
Support for cheap Ralink 3070 WiFi plug
|
||||
|
||||
source: http://www.geekamole.com/2013/rt2800usb-fix-for-ralinkmediatek-3070-gentoo-linux/
|
||||
|
||||
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
|
||||
index a7630d5..9504d45 100644
|
||||
--- a/drivers/net/wireless/rt2x00/rt2800.h
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2800.h
|
||||
@@ -69,6 +69,7 @@
|
||||
#define RF3320 0x000b
|
||||
#define RF3322 0x000c
|
||||
#define RF3053 0x000d
|
||||
+#define RF3070 0x3070
|
||||
#define RF5592 0x000f
|
||||
#define RF3290 0x3290
|
||||
#define RF5360 0x5360
|
||||
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||
index 72f32e5..3e18df4 100644
|
||||
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
|
||||
@@ -2599,6 +2599,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
|
||||
break;
|
||||
case RF5360:
|
||||
case RF5370:
|
||||
+ case RF3070:
|
||||
case RF5372:
|
||||
case RF5390:
|
||||
case RF5392:
|
||||
@@ -2615,6 +2616,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
|
||||
rt2x00_rf(rt2x00dev, RF3322) ||
|
||||
rt2x00_rf(rt2x00dev, RF5360) ||
|
||||
rt2x00_rf(rt2x00dev, RF5370) ||
|
||||
+ rt2x00_rf(rt2x00dev, RF3070) ||
|
||||
rt2x00_rf(rt2x00dev, RF5372) ||
|
||||
rt2x00_rf(rt2x00dev, RF5390) ||
|
||||
rt2x00_rf(rt2x00dev, RF5392)) {
|
||||
@@ -3199,6 +3201,7 @@ void rt2800_vco_calibration(struct rt2x00_dev *rt2x00dev)
|
||||
case RF3290:
|
||||
case RF5360:
|
||||
case RF5370:
|
||||
+ case RF3070:
|
||||
case RF5372:
|
||||
case RF5390:
|
||||
case RF5392:
|
||||
@@ -5515,6 +5518,7 @@ static int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
|
||||
case RF3322:
|
||||
case RF5360:
|
||||
case RF5370:
|
||||
+ case RF3070:
|
||||
case RF5372:
|
||||
case RF5390:
|
||||
case RF5392:
|
||||
@@ -5969,6 +5973,7 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
|
||||
rt2x00_rf(rt2x00dev, RF3322) ||
|
||||
rt2x00_rf(rt2x00dev, RF5360) ||
|
||||
rt2x00_rf(rt2x00dev, RF5370) ||
|
||||
+ rt2x00_rf(rt2x00dev, RF3070) ||
|
||||
rt2x00_rf(rt2x00dev, RF5372) ||
|
||||
rt2x00_rf(rt2x00dev, RF5390) ||
|
||||
rt2x00_rf(rt2x00dev, RF5392)) {
|
||||
@@ -6071,6 +6076,7 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
|
||||
case RF3290:
|
||||
case RF5360:
|
||||
case RF5370:
|
||||
+ case RF3070:
|
||||
case RF5372:
|
||||
case RF5390:
|
||||
case RF5392:
|
@ -0,0 +1,28 @@
|
||||
From 62330f8f9b6105bfe201f52b7ed86ea6ce3d5901 Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Sun, 8 Sep 2013 10:33:51 +0100
|
||||
Subject: [PATCH] Add Ubiquiti WifiStation USB id to ath9k wifi driver
|
||||
|
||||
---
|
||||
drivers/net/wireless/ath/ath9k/hif_usb.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
index 75a6376..8cb8d8d 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
|
||||
@@ -37,9 +37,11 @@
|
||||
{ USB_DEVICE(0x13D3, 0x3350) }, /* Azurewave */
|
||||
{ USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */
|
||||
{ USB_DEVICE(0x040D, 0x3801) }, /* VIA */
|
||||
+ { USB_DEVICE(0x0cf3, 0xb002) }, /* Ubiquiti WifiStation */
|
||||
{ USB_DEVICE(0x0cf3, 0xb003) }, /* Ubiquiti WifiStation Ext */
|
||||
{ USB_DEVICE(0x0cf3, 0xb002) }, /* Ubiquiti WifiStation */
|
||||
{ USB_DEVICE(0x057c, 0x8403) }, /* AVM FRITZ!WLAN 11N v2 USB */
|
||||
+ { USB_DEVICE(0x057c, 0x8403) }, /* AVM FRITZ!WLAN 11N v2 USB */
|
||||
|
||||
{ USB_DEVICE(0x0cf3, 0x7015),
|
||||
.driver_info = AR9287_USB }, /* Atheros */
|
||||
--
|
||||
1.8.4
|
||||
|
@ -0,0 +1,10 @@
|
||||
--- a/drivers/net/wireless/rt2x00/rt2800usb.c 2013-10-08 15:14:44.844047190 +0200
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c 2013-10-08 15:15:00.279904575 +0200
|
||||
@@ -976,6 +976,7 @@
|
||||
{ USB_DEVICE(0x0411, 0x015d) },
|
||||
{ USB_DEVICE(0x0411, 0x016f) },
|
||||
{ USB_DEVICE(0x0411, 0x01a2) },
|
||||
+ { USB_DEVICE(0x0411, 0x01a8) },
|
||||
{ USB_DEVICE(0x0411, 0x01ee) },
|
||||
/* Corega */
|
||||
{ USB_DEVICE(0x07aa, 0x002f) },
|
11
projects/Cuboxi/patches/linux/linux-706-Sitecom-N300.patch
Normal file
11
projects/Cuboxi/patches/linux/linux-706-Sitecom-N300.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -Naur linux-3.10.16/drivers/staging/rtl8712/usb_intf.c linux-3.10.16.patch/drivers/staging/rtl8712/usb_intf.c
|
||||
--- linux-3.10.16/drivers/staging/rtl8712/usb_intf.c 2013-10-14 01:08:56.000000000 +0200
|
||||
+++ linux-3.10.16.patch/drivers/staging/rtl8712/usb_intf.c 2013-10-16 13:27:44.032951265 +0200
|
||||
@@ -92,6 +92,7 @@
|
||||
{USB_DEVICE(0x0DF6, 0x005B)},
|
||||
{USB_DEVICE(0x0DF6, 0x005D)},
|
||||
{USB_DEVICE(0x0DF6, 0x0063)},
|
||||
+ {USB_DEVICE(0x0DF6, 0x006C)},
|
||||
/* Sweex */
|
||||
{USB_DEVICE(0x177F, 0x0154)},
|
||||
/* Thinkware */
|
1577
projects/Cuboxi/patches/linux/linux-995-CX24120-13Z_frontend.patch
Executable file
1577
projects/Cuboxi/patches/linux/linux-995-CX24120-13Z_frontend.patch
Executable file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,49 @@
|
||||
From 9098cb577d0f4b2dd71f37988515686008b7c733 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Saraev <stefan@saraev.ca>
|
||||
Date: Tue, 24 Sep 2013 13:42:50 +0300
|
||||
Subject: [PATCH] mac80211: ignore (E)CSA in probe response frames
|
||||
|
||||
BP: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/net/mac80211/mlme.c?id=d70b7616d9080ec9f868fbd31db5fd4341435d61
|
||||
|
||||
thanks @bedouin67
|
||||
---
|
||||
net/mac80211/mlme.c | 11 +++--------
|
||||
1 file changed, 3 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
|
||||
index 5b4328d..1c5a8e6 100644
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -2885,19 +2885,11 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
|
||||
if (bss)
|
||||
ieee80211_rx_bss_put(local, bss);
|
||||
|
||||
- if (!sdata->u.mgd.associated ||
|
||||
- !ether_addr_equal(mgmt->bssid, sdata->u.mgd.associated->bssid))
|
||||
- return;
|
||||
-
|
||||
if (need_ps) {
|
||||
mutex_lock(&local->iflist_mtx);
|
||||
ieee80211_recalc_ps(local, -1);
|
||||
mutex_unlock(&local->iflist_mtx);
|
||||
}
|
||||
-
|
||||
- ieee80211_sta_process_chanswitch(sdata, rx_status->mactime,
|
||||
- elems, true);
|
||||
-
|
||||
}
|
||||
|
||||
|
||||
@@ -3182,6 +3174,9 @@ ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
|
||||
|
||||
ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems);
|
||||
|
||||
+ ieee80211_sta_process_chanswitch(sdata, rx_status->mactime,
|
||||
+ &elems, true);
|
||||
+
|
||||
if (ieee80211_sta_wmm_params(local, sdata, elems.wmm_param,
|
||||
elems.wmm_param_len))
|
||||
changed |= BSS_CHANGED_QOS;
|
||||
--
|
||||
1.8.3.2
|
||||
|
@ -1,251 +0,0 @@
|
||||
From 7a723d6e138c55f9c520125078982b1c1177d592 Mon Sep 17 00:00:00 2001
|
||||
From: Ivan Djelic <ivan.djelic@parrot.com>
|
||||
Date: Wed, 06 Mar 2013 19:09:27 +0000
|
||||
Subject: ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations
|
||||
|
||||
Recent GCC versions (e.g. GCC-4.7.2) perform optimizations based on
|
||||
assumptions about the implementation of memset and similar functions.
|
||||
The current ARM optimized memset code does not return the value of
|
||||
its first argument, as is usually expected from standard implementations.
|
||||
|
||||
For instance in the following function:
|
||||
|
||||
void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter)
|
||||
{
|
||||
memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter));
|
||||
waiter->magic = waiter;
|
||||
INIT_LIST_HEAD(&waiter->list);
|
||||
}
|
||||
|
||||
compiled as:
|
||||
|
||||
800554d0 <debug_mutex_lock_common>:
|
||||
800554d0: e92d4008 push {r3, lr}
|
||||
800554d4: e1a00001 mov r0, r1
|
||||
800554d8: e3a02010 mov r2, #16 ; 0x10
|
||||
800554dc: e3a01011 mov r1, #17 ; 0x11
|
||||
800554e0: eb04426e bl 80165ea0 <memset>
|
||||
800554e4: e1a03000 mov r3, r0
|
||||
800554e8: e583000c str r0, [r3, #12]
|
||||
800554ec: e5830000 str r0, [r3]
|
||||
800554f0: e5830004 str r0, [r3, #4]
|
||||
800554f4: e8bd8008 pop {r3, pc}
|
||||
|
||||
GCC assumes memset returns the value of pointer 'waiter' in register r0; causing
|
||||
register/memory corruptions.
|
||||
|
||||
This patch fixes the return value of the assembly version of memset.
|
||||
It adds a 'mov' instruction and merges an additional load+store into
|
||||
existing load/store instructions.
|
||||
For ease of review, here is a breakdown of the patch into 4 simple steps:
|
||||
|
||||
Step 1
|
||||
======
|
||||
Perform the following substitutions:
|
||||
ip -> r8, then
|
||||
r0 -> ip,
|
||||
and insert 'mov ip, r0' as the first statement of the function.
|
||||
At this point, we have a memset() implementation returning the proper result,
|
||||
but corrupting r8 on some paths (the ones that were using ip).
|
||||
|
||||
Step 2
|
||||
======
|
||||
Make sure r8 is saved and restored when (! CALGN(1)+0) == 1:
|
||||
|
||||
save r8:
|
||||
- str lr, [sp, #-4]!
|
||||
+ stmfd sp!, {r8, lr}
|
||||
|
||||
and restore r8 on both exit paths:
|
||||
- ldmeqfd sp!, {pc} @ Now <64 bytes to go.
|
||||
+ ldmeqfd sp!, {r8, pc} @ Now <64 bytes to go.
|
||||
(...)
|
||||
tst r2, #16
|
||||
stmneia ip!, {r1, r3, r8, lr}
|
||||
- ldr lr, [sp], #4
|
||||
+ ldmfd sp!, {r8, lr}
|
||||
|
||||
Step 3
|
||||
======
|
||||
Make sure r8 is saved and restored when (! CALGN(1)+0) == 0:
|
||||
|
||||
save r8:
|
||||
- stmfd sp!, {r4-r7, lr}
|
||||
+ stmfd sp!, {r4-r8, lr}
|
||||
|
||||
and restore r8 on both exit paths:
|
||||
bgt 3b
|
||||
- ldmeqfd sp!, {r4-r7, pc}
|
||||
+ ldmeqfd sp!, {r4-r8, pc}
|
||||
(...)
|
||||
tst r2, #16
|
||||
stmneia ip!, {r4-r7}
|
||||
- ldmfd sp!, {r4-r7, lr}
|
||||
+ ldmfd sp!, {r4-r8, lr}
|
||||
|
||||
Step 4
|
||||
======
|
||||
Rewrite register list "r4-r7, r8" as "r4-r8".
|
||||
|
||||
Signed-off-by: Ivan Djelic <ivan.djelic@parrot.com>
|
||||
Reviewed-by: Nicolas Pitre <nico@linaro.org>
|
||||
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
|
||||
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
(cherry picked from commit 455bd4c430b0c0a361f38e8658a0d6cb469942b5)
|
||||
---
|
||||
diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S
|
||||
index 650d592..d912e73 100644
|
||||
--- a/arch/arm/lib/memset.S
|
||||
+++ b/arch/arm/lib/memset.S
|
||||
@@ -19,9 +19,9 @@
|
||||
1: subs r2, r2, #4 @ 1 do we have enough
|
||||
blt 5f @ 1 bytes to align with?
|
||||
cmp r3, #2 @ 1
|
||||
- strltb r1, [r0], #1 @ 1
|
||||
- strleb r1, [r0], #1 @ 1
|
||||
- strb r1, [r0], #1 @ 1
|
||||
+ strltb r1, [ip], #1 @ 1
|
||||
+ strleb r1, [ip], #1 @ 1
|
||||
+ strb r1, [ip], #1 @ 1
|
||||
add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3))
|
||||
/*
|
||||
* The pointer is now aligned and the length is adjusted. Try doing the
|
||||
@@ -29,10 +29,14 @@
|
||||
*/
|
||||
|
||||
ENTRY(memset)
|
||||
- ands r3, r0, #3 @ 1 unaligned?
|
||||
+/*
|
||||
+ * Preserve the contents of r0 for the return value.
|
||||
+ */
|
||||
+ mov ip, r0
|
||||
+ ands r3, ip, #3 @ 1 unaligned?
|
||||
bne 1b @ 1
|
||||
/*
|
||||
- * we know that the pointer in r0 is aligned to a word boundary.
|
||||
+ * we know that the pointer in ip is aligned to a word boundary.
|
||||
*/
|
||||
orr r1, r1, r1, lsl #8
|
||||
orr r1, r1, r1, lsl #16
|
||||
@@ -43,29 +47,28 @@ ENTRY(memset)
|
||||
#if ! CALGN(1)+0
|
||||
|
||||
/*
|
||||
- * We need an extra register for this loop - save the return address and
|
||||
- * use the LR
|
||||
+ * We need 2 extra registers for this loop - use r8 and the LR
|
||||
*/
|
||||
- str lr, [sp, #-4]!
|
||||
- mov ip, r1
|
||||
+ stmfd sp!, {r8, lr}
|
||||
+ mov r8, r1
|
||||
mov lr, r1
|
||||
|
||||
2: subs r2, r2, #64
|
||||
- stmgeia r0!, {r1, r3, ip, lr} @ 64 bytes at a time.
|
||||
- stmgeia r0!, {r1, r3, ip, lr}
|
||||
- stmgeia r0!, {r1, r3, ip, lr}
|
||||
- stmgeia r0!, {r1, r3, ip, lr}
|
||||
+ stmgeia ip!, {r1, r3, r8, lr} @ 64 bytes at a time.
|
||||
+ stmgeia ip!, {r1, r3, r8, lr}
|
||||
+ stmgeia ip!, {r1, r3, r8, lr}
|
||||
+ stmgeia ip!, {r1, r3, r8, lr}
|
||||
bgt 2b
|
||||
- ldmeqfd sp!, {pc} @ Now <64 bytes to go.
|
||||
+ ldmeqfd sp!, {r8, pc} @ Now <64 bytes to go.
|
||||
/*
|
||||
* No need to correct the count; we're only testing bits from now on
|
||||
*/
|
||||
tst r2, #32
|
||||
- stmneia r0!, {r1, r3, ip, lr}
|
||||
- stmneia r0!, {r1, r3, ip, lr}
|
||||
+ stmneia ip!, {r1, r3, r8, lr}
|
||||
+ stmneia ip!, {r1, r3, r8, lr}
|
||||
tst r2, #16
|
||||
- stmneia r0!, {r1, r3, ip, lr}
|
||||
- ldr lr, [sp], #4
|
||||
+ stmneia ip!, {r1, r3, r8, lr}
|
||||
+ ldmfd sp!, {r8, lr}
|
||||
|
||||
#else
|
||||
|
||||
@@ -74,54 +77,54 @@ ENTRY(memset)
|
||||
* whole cache lines at once.
|
||||
*/
|
||||
|
||||
- stmfd sp!, {r4-r7, lr}
|
||||
+ stmfd sp!, {r4-r8, lr}
|
||||
mov r4, r1
|
||||
mov r5, r1
|
||||
mov r6, r1
|
||||
mov r7, r1
|
||||
- mov ip, r1
|
||||
+ mov r8, r1
|
||||
mov lr, r1
|
||||
|
||||
cmp r2, #96
|
||||
- tstgt r0, #31
|
||||
+ tstgt ip, #31
|
||||
ble 3f
|
||||
|
||||
- and ip, r0, #31
|
||||
- rsb ip, ip, #32
|
||||
- sub r2, r2, ip
|
||||
- movs ip, ip, lsl #(32 - 4)
|
||||
- stmcsia r0!, {r4, r5, r6, r7}
|
||||
- stmmiia r0!, {r4, r5}
|
||||
- tst ip, #(1 << 30)
|
||||
- mov ip, r1
|
||||
- strne r1, [r0], #4
|
||||
+ and r8, ip, #31
|
||||
+ rsb r8, r8, #32
|
||||
+ sub r2, r2, r8
|
||||
+ movs r8, r8, lsl #(32 - 4)
|
||||
+ stmcsia ip!, {r4, r5, r6, r7}
|
||||
+ stmmiia ip!, {r4, r5}
|
||||
+ tst r8, #(1 << 30)
|
||||
+ mov r8, r1
|
||||
+ strne r1, [ip], #4
|
||||
|
||||
3: subs r2, r2, #64
|
||||
- stmgeia r0!, {r1, r3-r7, ip, lr}
|
||||
- stmgeia r0!, {r1, r3-r7, ip, lr}
|
||||
+ stmgeia ip!, {r1, r3-r8, lr}
|
||||
+ stmgeia ip!, {r1, r3-r8, lr}
|
||||
bgt 3b
|
||||
- ldmeqfd sp!, {r4-r7, pc}
|
||||
+ ldmeqfd sp!, {r4-r8, pc}
|
||||
|
||||
tst r2, #32
|
||||
- stmneia r0!, {r1, r3-r7, ip, lr}
|
||||
+ stmneia ip!, {r1, r3-r8, lr}
|
||||
tst r2, #16
|
||||
- stmneia r0!, {r4-r7}
|
||||
- ldmfd sp!, {r4-r7, lr}
|
||||
+ stmneia ip!, {r4-r7}
|
||||
+ ldmfd sp!, {r4-r8, lr}
|
||||
|
||||
#endif
|
||||
|
||||
4: tst r2, #8
|
||||
- stmneia r0!, {r1, r3}
|
||||
+ stmneia ip!, {r1, r3}
|
||||
tst r2, #4
|
||||
- strne r1, [r0], #4
|
||||
+ strne r1, [ip], #4
|
||||
/*
|
||||
* When we get here, we've got less than 4 bytes to zero. We
|
||||
* may have an unaligned pointer as well.
|
||||
*/
|
||||
5: tst r2, #2
|
||||
- strneb r1, [r0], #1
|
||||
- strneb r1, [r0], #1
|
||||
+ strneb r1, [ip], #1
|
||||
+ strneb r1, [ip], #1
|
||||
tst r2, #1
|
||||
- strneb r1, [r0], #1
|
||||
+ strneb r1, [ip], #1
|
||||
mov pc, lr
|
||||
ENDPROC(memset)
|
||||
--
|
||||
cgit v0.9.0.2-39-g756e
|
@ -1,80 +0,0 @@
|
||||
From c1cc6598158d2444ab7b24851025da49de7efbe4 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Pitre <nicolas.pitre@linaro.org>
|
||||
Date: Tue, 12 Mar 2013 12:00:42 +0000
|
||||
Subject: ARM: 7670/1: fix the memset fix
|
||||
|
||||
Commit 455bd4c430b0 ("ARM: 7668/1: fix memset-related crashes caused by
|
||||
recent GCC (4.7.2) optimizations") attempted to fix a compliance issue
|
||||
with the memset return value. However the memset itself became broken
|
||||
by that patch for misaligned pointers.
|
||||
|
||||
This fixes the above by branching over the entry code from the
|
||||
misaligned fixup code to avoid reloading the original pointer.
|
||||
|
||||
Also, because the function entry alignment is wrong in the Thumb mode
|
||||
compilation, that fixup code is moved to the end.
|
||||
|
||||
While at it, the entry instructions are slightly reworked to help dual
|
||||
issue pipelines.
|
||||
|
||||
Signed-off-by: Nicolas Pitre <nico@linaro.org>
|
||||
Tested-by: Alexander Holler <holler@ahsoftware.de>
|
||||
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
(cherry picked from commit 418df63adac56841ef6b0f1fcf435bc64d4ed177)
|
||||
---
|
||||
diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S
|
||||
index d912e73..94b0650 100644
|
||||
--- a/arch/arm/lib/memset.S
|
||||
+++ b/arch/arm/lib/memset.S
|
||||
@@ -14,31 +14,15 @@
|
||||
|
||||
.text
|
||||
.align 5
|
||||
- .word 0
|
||||
-
|
||||
-1: subs r2, r2, #4 @ 1 do we have enough
|
||||
- blt 5f @ 1 bytes to align with?
|
||||
- cmp r3, #2 @ 1
|
||||
- strltb r1, [ip], #1 @ 1
|
||||
- strleb r1, [ip], #1 @ 1
|
||||
- strb r1, [ip], #1 @ 1
|
||||
- add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3))
|
||||
-/*
|
||||
- * The pointer is now aligned and the length is adjusted. Try doing the
|
||||
- * memset again.
|
||||
- */
|
||||
|
||||
ENTRY(memset)
|
||||
-/*
|
||||
- * Preserve the contents of r0 for the return value.
|
||||
- */
|
||||
- mov ip, r0
|
||||
- ands r3, ip, #3 @ 1 unaligned?
|
||||
- bne 1b @ 1
|
||||
+ ands r3, r0, #3 @ 1 unaligned?
|
||||
+ mov ip, r0 @ preserve r0 as return value
|
||||
+ bne 6f @ 1
|
||||
/*
|
||||
* we know that the pointer in ip is aligned to a word boundary.
|
||||
*/
|
||||
- orr r1, r1, r1, lsl #8
|
||||
+1: orr r1, r1, r1, lsl #8
|
||||
orr r1, r1, r1, lsl #16
|
||||
mov r3, r1
|
||||
cmp r2, #16
|
||||
@@ -127,4 +111,13 @@ ENTRY(memset)
|
||||
tst r2, #1
|
||||
strneb r1, [ip], #1
|
||||
mov pc, lr
|
||||
+
|
||||
+6: subs r2, r2, #4 @ 1 do we have enough
|
||||
+ blt 5b @ 1 bytes to align with?
|
||||
+ cmp r3, #2 @ 1
|
||||
+ strltb r1, [ip], #1 @ 1
|
||||
+ strleb r1, [ip], #1 @ 1
|
||||
+ strb r1, [ip], #1 @ 1
|
||||
+ add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3))
|
||||
+ b 1b
|
||||
ENDPROC(memset)
|
||||
--
|
||||
cgit v0.9.0.2-39-g756e
|
@ -1,30 +0,0 @@
|
||||
From b565d5fc613b00f4853fd7048db82f272f112de2 Mon Sep 17 00:00:00 2001
|
||||
From: wolfgar <stephan.rafin@laposte.net>
|
||||
Date: Sun, 10 Nov 2013 04:13:41 +0100
|
||||
Subject: [PATCH] Remove 24bits imx analog sound output for now to avoid to
|
||||
trigger XBMC bug
|
||||
|
||||
---
|
||||
sound/soc/imx/imx-ssi.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c
|
||||
index a4ff902..79ae8ca 100644
|
||||
--- a/sound/soc/imx/imx-ssi.c
|
||||
+++ b/sound/soc/imx/imx-ssi.c
|
||||
@@ -61,8 +61,11 @@
|
||||
|
||||
#define SSI_SACNT_DEFAULT (SSI_SACNT_AC97EN | SSI_SACNT_FV)
|
||||
#define IMX_SSI_FORMATS \
|
||||
+ (SNDRV_PCM_FMTBIT_S16_LE)
|
||||
+
|
||||
+/*#define IMX_SSI_FORMATS \
|
||||
(SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
|
||||
- SNDRV_PCM_FMTBIT_S24_LE)
|
||||
+ SNDRV_PCM_FMTBIT_S24_LE)*/
|
||||
#ifdef CONFIG_SND_MXC_SOC_IRAM
|
||||
static int UseIRAM;
|
||||
#endif
|
||||
--
|
||||
1.8.5.1
|
||||
|
@ -1,17 +0,0 @@
|
||||
diff -Naur a/sound/soc/codecs/mxc_spdif.h b/sound/soc/codecs/mxc_spdif.h
|
||||
--- a/sound/soc/codecs/mxc_spdif.h 2013-12-06 16:18:39.000000000 +0100
|
||||
+++ b/sound/soc/codecs/mxc_spdif.h 2014-01-21 18:44:54.301081422 +0100
|
||||
@@ -150,9 +150,13 @@
|
||||
SNDRV_PCM_RATE_64000 | \
|
||||
SNDRV_PCM_RATE_96000)
|
||||
|
||||
+// !!! temporary workaround for broken 24bit mode !!!
|
||||
+#define MXC_SPDIF_FORMATS_PLAYBACK (SNDRV_PCM_FMTBIT_S16_LE)
|
||||
+/*
|
||||
#define MXC_SPDIF_FORMATS_PLAYBACK (SNDRV_PCM_FMTBIT_S16_LE | \
|
||||
SNDRV_PCM_FMTBIT_S20_3LE | \
|
||||
SNDRV_PCM_FMTBIT_S24_LE)
|
||||
+*/
|
||||
|
||||
#define MXC_SPDIF_FORMATS_CAPTURE (SNDRV_PCM_FMTBIT_S24_LE)
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- linux-linux-imx+bdde708ebf/drivers/mxc/ipu3/ipu_param_mem.h 2013-08-16 04:01:35.000000000 +0200
|
||||
+++ linux-linux-imx+bdde708ebf/drivers/mxc/ipu3/ipu_param_mem.h-new 2013-10-16 07:49:35.916193147 +0200
|
||||
@@ -382,7 +382,7 @@
|
||||
ipu_ch_param_set_field(¶ms, 1, 78, 7, 15); /* burst size */
|
||||
uv_stride = uv_stride*2;
|
||||
} else {
|
||||
- ipu_ch_param_set_field(¶ms, 1, 78, 7, 31); /* burst size */
|
||||
+ ipu_ch_param_set_field(¶ms, 1, 78, 7, 63); /* burst size */
|
||||
}
|
||||
break;
|
||||
case IPU_PIX_FMT_YVU420P:
|
@ -1,85 +0,0 @@
|
||||
diff --git a/drivers/mxc/thermal/thermal.c b/drivers/mxc/thermal/thermal.c
|
||||
index cbe771d..8c08838 100644
|
||||
--- a/drivers/mxc/thermal/thermal.c
|
||||
+++ b/drivers/mxc/thermal/thermal.c
|
||||
@@ -22,7 +22,7 @@
|
||||
*
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
-
|
||||
+#define DEBUG
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/dmi.h>
|
||||
@@ -123,17 +123,17 @@
|
||||
ANATOP_TRIPS_HOT | ANATOP_TRIPS_ACTIVE)
|
||||
|
||||
#define _COMPONENT ANATOP_THERMAL_COMPONENT
|
||||
-#define KELVIN_OFFSET 273
|
||||
+#define MKELVIN_OFFSET 273000
|
||||
#define POLLING_FREQ 2000 /* 2s */
|
||||
-#define TEMP_CRITICAL 373 /* 100 C*/
|
||||
-#define TEMP_HOT 363 /* 90 C*/
|
||||
-#define TEMP_ACTIVE 353 /* 80 C*/
|
||||
+#define TEMP_CRITICAL 373000 /* 100000 mC*/
|
||||
+#define TEMP_HOT 363000 /* 90000 mC*/
|
||||
+#define TEMP_ACTIVE 353000 /* 80000 mC*/
|
||||
#define MEASURE_FREQ 3276 /* 3276 RTC clocks delay, 100ms */
|
||||
#define KELVIN_TO_CEL(t, off) (((t) - (off)))
|
||||
#define CEL_TO_KELVIN(t, off) (((t) + (off)))
|
||||
#define DEFAULT_RATIO 145
|
||||
#define DEFAULT_N40C 1563
|
||||
-#define REG_VALUE_TO_CEL(ratio, raw) ((raw_n40c - raw) * 100 / ratio - 40)
|
||||
+#define REG_VALUE_TO_MCEL(ratio, raw) (((raw_n40c - raw) * 100 / ratio - 40) * 1000)
|
||||
#define ANATOP_DEBUG false
|
||||
#define THERMAL_FUSE_NAME "/sys/fsl_otp/HW_OCOTP_ANA1"
|
||||
|
||||
@@ -282,7 +282,7 @@ static int anatop_thermal_get_temp(struct thermal_zone_device *thermal,
|
||||
return -EINVAL;
|
||||
|
||||
if (!ratio || suspend_flag) {
|
||||
- *temp = KELVIN_TO_CEL(TEMP_ACTIVE, KELVIN_OFFSET);
|
||||
+ *temp = KELVIN_TO_CEL(TEMP_ACTIVE, MKELVIN_OFFSET);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -332,17 +332,17 @@ static int anatop_thermal_get_temp(struct thermal_zone_device *thermal,
|
||||
/* only the temp between -40C and 125C is valid, this
|
||||
is for save */
|
||||
if (tmp <= raw_n40c && tmp >= raw_125c)
|
||||
- tz->temperature = REG_VALUE_TO_CEL(ratio, tmp);
|
||||
+ tz->temperature = REG_VALUE_TO_MCEL(ratio, tmp);
|
||||
else {
|
||||
printk(KERN_WARNING "Invalid temperature, force it to 25C\n");
|
||||
- tz->temperature = 25;
|
||||
+ tz->temperature = 25000;
|
||||
}
|
||||
|
||||
if (debug_mask & DEBUG_VERBOSE)
|
||||
pr_info("Cooling device Temperature is %lu C\n", tz->temperature);
|
||||
|
||||
- *temp = (cooling_device_disable && tz->temperature >= KELVIN_TO_CEL(TEMP_CRITICAL, KELVIN_OFFSET)) ?
|
||||
- KELVIN_TO_CEL(TEMP_CRITICAL - 1, KELVIN_OFFSET) : tz->temperature;
|
||||
+ *temp = (cooling_device_disable && tz->temperature >= KELVIN_TO_CEL(TEMP_CRITICAL, MKELVIN_OFFSET)) ?
|
||||
+ KELVIN_TO_CEL(TEMP_CRITICAL - 1, MKELVIN_OFFSET) : tz->temperature;
|
||||
|
||||
/* Set alarm threshold if necessary */
|
||||
if ((__raw_readl(anatop_base + HW_ANADIG_TEMPSENSE0) &
|
||||
@@ -822,7 +822,7 @@ static int anatop_thermal_add(struct anatop_device *device)
|
||||
if (result)
|
||||
goto free_memory;
|
||||
|
||||
- tz->kelvin_offset = KELVIN_OFFSET;
|
||||
+ tz->kelvin_offset = MKELVIN_OFFSET;
|
||||
|
||||
result = anatop_thermal_register_thermal_zone(tz);
|
||||
if (result)
|
||||
@@ -909,7 +909,7 @@ static int anatop_thermal_counting_ratio(unsigned int fuse_data)
|
||||
raw_n40c = raw_25c + (13 * ratio) / 20;
|
||||
raw_125c = raw_25c - ratio;
|
||||
/* Init default critical temp to set alarm */
|
||||
- raw_critical = raw_25c - ratio * (KELVIN_TO_CEL(TEMP_CRITICAL, KELVIN_OFFSET) - 25) / 100;
|
||||
+ raw_critical = raw_25c - ratio * (KELVIN_TO_CEL(TEMP_CRITICAL, MKELVIN_OFFSET) - 25) / 100000;
|
||||
clk_enable(pll3_clk);
|
||||
|
||||
return ret;
|
@ -1,14 +0,0 @@
|
||||
diff -Naur linux-imx_3.0.35_4.1.0-0f2006c/include/linux/fsl_devices.h linux-imx_3.0.35_4.1.0-0f2006c.patch/include/linux/fsl_devices.h
|
||||
--- linux-imx_3.0.35_4.1.0-0f2006c/include/linux/fsl_devices.h 2014-01-12 18:38:34.000000000 +0100
|
||||
+++ linux-imx_3.0.35_4.1.0-0f2006c.patch/include/linux/fsl_devices.h 2014-01-13 03:49:09.472692153 +0100
|
||||
@@ -18,7 +18,10 @@
|
||||
#define _FSL_DEVICE_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
+
|
||||
+#ifdef __KERNEL__
|
||||
#include <linux/cdev.h>
|
||||
+#endif /* __KERNEL__ */
|
||||
|
||||
/*
|
||||
* Some conventions on how we handle peripherals on Freescale chips
|
Loading…
x
Reference in New Issue
Block a user