Merge pull request #3533 from MilhouseVH/linux5.2.0

linux (RPi/Generic): update to linux-5.2
This commit is contained in:
CvH 2019-07-17 18:02:58 +02:00 committed by GitHub
commit 4435221225
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 2034 additions and 472 deletions

View File

@ -3,8 +3,8 @@
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="bcm2835-driver"
PKG_VERSION="f6d9f139037bf421d5d25b1cebe1a67394542b4b"
PKG_SHA256="2c9ecc241935ec5872b6f2bb43e412866fe9ab212f9a9eaada100ef31ec2b274"
PKG_VERSION="cba4be275b9943b353ea2e5201ab2badd4c760e9"
PKG_SHA256="b332c4e56a746a46ffbc65ff8e7d5a18d3257dc781847a82ad6af88c263dcc89"
PKG_LICENSE="nonfree"
PKG_SITE="http://www.broadcom.com"
PKG_URL="${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.xz"

View File

@ -3,8 +3,8 @@
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="RTL8188EU"
PKG_VERSION="9a56f32c2a46be5b81f0eedf49ad44ea8f10bfae"
PKG_SHA256="c8f225ff85cdc49e4a043773234e42de38aac0d2c9322829dac21c2ba72fed87"
PKG_VERSION="a0fff49c4114241a314571b57e3b32c9b0a4c656"
PKG_SHA256="76026dc8eb17accde69f9c10a7485d637f01fd7a36f3c54aeda1e51b3abe5ada"
PKG_LICENSE="GPL"
# realtek: PKG_SITE="http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PFid=48&Level=5&Conn=4&ProdID=274&DownTypeID=3&GetDown=false&Downloads=true"
PKG_SITE="https://github.com/lwfinger/rtl8188eu"

View File

@ -3,8 +3,8 @@
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="RTL8192CU"
PKG_VERSION="f32ef3984db7c7f7644edec0fa28a63a47b1a7d6"
PKG_SHA256="7e8df7cce0918630121c7493a6333d392b3099b1126e8c355aa221cee032c80b"
PKG_VERSION="9a5fe3e94176c5154515834e99c00069d0bf1fd7"
PKG_SHA256="1488e6fdfc51d7a7ec8fb95d1c3b212d64f3e66e8d2f7e6637bf3dd642a75289"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/pvaret/rtl8192cu-fixes"
PKG_URL="$PKG_SITE/archive/$PKG_VERSION.tar.gz"

View File

@ -3,8 +3,8 @@
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="RTL8192DU"
PKG_VERSION="72b53f8a6c2a6696d60791df4455c3073fffc4e4"
PKG_SHA256="dec3cc45601c2c6dab47816523cb5a5731393d34cc75ec0f96a91191d3563fdd"
PKG_VERSION="54c95aaa23fe332afaa1ed4aacbb0db43aa3c7dd"
PKG_SHA256="63007fe5a19606303b4666ec54fe48527c9504e136c6e30f5f119a39517115cf"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/lwfinger/rtl8192du"
PKG_URL="https://github.com/lwfinger/rtl8192du/archive/$PKG_VERSION.tar.gz"

View File

@ -1,4 +1,4 @@
From d295ee29d71a7969047fbe5042cec471408632c4 Mon Sep 17 00:00:00 2001
From 1334c3b1378819cc428bc68222245c5c10296937 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Peron?=
<1859302+clementperon@users.noreply.github.com>
Date: Wed, 6 Jun 2018 17:40:54 +0200
@ -9,18 +9,17 @@ Why create a new __vfs_read_alt whereas the __vfs_read is exported and seems to
Remove __vfs_read_alt code and it's dependencies and use the __vfs_read function instead
---
os_dep/osdep_service.c | 32 +-------------------------------
1 file changed, 1 insertion(+), 31 deletions(-)
os_dep/osdep_service.c | 31 +------------------------------
1 file changed, 1 insertion(+), 30 deletions(-)
diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c
index 286096a..9dd3d2b 100644
index 1aee9b2..dc688f2 100644
--- a/os_dep/osdep_service.c
+++ b/os_dep/osdep_service.c
@@ -40,36 +40,6 @@ atomic_t _malloc_cnt = ATOMIC_INIT(0);
atomic_t _malloc_size = ATOMIC_INIT(0);
#endif /* DBG_MEMORY_LEAK */
@@ -42,35 +42,6 @@ static inline ssize_t call_read_iter(struct file *file, struct kiocb *kio,
}
#endif
-
-static ssize_t new_sync_read(struct file *filp, void __user *buf, __kernel_size_t len, loff_t *ppos)
-{
- struct iovec iov;
@ -53,7 +52,7 @@ index 286096a..9dd3d2b 100644
/*
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
* @return: one of RTW_STATUS_CODE
@@ -1086,7 +1056,7 @@ static int readFile(struct file *fp,char *buf,int len)
@@ -967,7 +938,7 @@ static int readFile(struct file *fp,char *buf,int len)
while(sum<len) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
@ -62,3 +61,6 @@ index 286096a..9dd3d2b 100644
#else
rlen = fp->f_op->read(fp, buf+sum, len-sum, &fp->f_pos);
#endif
--
2.14.1

View File

@ -1,4 +1,4 @@
From ad504e6bd4df0210904a10d57ddc48670bc41675 Mon Sep 17 00:00:00 2001
From fc51eecebcdefa8d99b1e8e9941219726bdab2a0 Mon Sep 17 00:00:00 2001
From: 5schatten <supervisedthinking@gmail.com>
Date: Thu, 21 Mar 2019 22:26:31 +0100
Subject: [PATCH] Revert "rtl8192du: Fix builds for kernels older than 4.11.0"
@ -9,7 +9,7 @@ This reverts commit 01722435acb1d62c9453b86161d2d8b99d702648.
1 file changed, 8 deletions(-)
diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c
index 9efffc4..99a424f 100644
index dc688f2..3635755 100644
--- a/os_dep/osdep_service.c
+++ b/os_dep/osdep_service.c
@@ -34,14 +34,6 @@
@ -24,6 +24,9 @@ index 9efffc4..99a424f 100644
-}
-#endif
-
#ifdef DBG_MEMORY_LEAK
#include <asm/atomic.h>
atomic_t _malloc_cnt = ATOMIC_INIT(0);
/*
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
* @return: one of RTW_STATUS_CODE
--
2.14.1

View File

@ -3,8 +3,8 @@
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="RTL8192EU"
PKG_VERSION="0a7199b457b25edc4d9534158a068e486b1c8bb0"
PKG_SHA256="defee6fda236bc9d77cd5cf0ceca8e86f820a1f9fa5d63c5ca7c369be1a3513e"
PKG_VERSION="d6aa91a72870185f71d5956cddb6f333537fbfa9"
PKG_SHA256="3ad503a704f644652353a8ab7e1b2861506b8aefa79a8b903af7af4d8be360d1"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/Mange/rtl8192eu-linux-driver"
PKG_URL="https://github.com/Mange/rtl8192eu-linux-driver/archive/$PKG_VERSION.tar.gz"

View File

@ -3,8 +3,8 @@
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="RTL8812AU"
PKG_VERSION="bdfef37665b34be7a84835fba97e44447b30f98c"
PKG_SHA256="44ccdeb90da2e750330108e71e6986e1a9000ba2e6b5709460a271d570a75769"
PKG_VERSION="bd00d87dd33440f70354e6a1905a09cd62e876bd"
PKG_SHA256="78c740de2d64920b5a053c02cd24ca62ea959969c2193498a77baf21dd77e5dd"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/MilhouseVH/RTL8812AU"
PKG_URL="https://github.com/MilhouseVH/RTL8812AU/archive/$PKG_VERSION.tar.gz"

View File

@ -3,8 +3,8 @@
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="iwlwifi-firmware"
PKG_VERSION="caaa6ccba6ebfa06b40d58e94b808202a735520c"
PKG_SHA256="a9846956d89557e2608df467a8c6911e26dbbd09cadf4d307d52e930fc323cd2"
PKG_VERSION="71fb5e27f775cd8a6b42d51bb738b1e3ed3988a1"
PKG_SHA256="8c093c580c9ea4050e8a5ab501bc89fcdb2eaed973f0e29471b1f58d215f87b1"
PKG_LICENSE="Free-to-use"
PKG_SITE="https://github.com/LibreELEC/iwlwifi-firmware"
PKG_URL="https://github.com/LibreELEC/iwlwifi-firmware/archive/$PKG_VERSION.tar.gz"

View File

@ -2,8 +2,8 @@
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="kernel-firmware"
PKG_VERSION="20190514"
PKG_SHA256="13dede60a1ba7b967f0eef72f40720a2ea0678dee54ea3fc44800f58ec38aafc"
PKG_VERSION="d52556e4592e64023157a83fb0f483661f23ac0e"
PKG_SHA256="bf33bfdeb9d329484d24f64cdd98f0bf1ac2a1f77e3f9539da0bdd1785f670de"
PKG_LICENSE="other"
PKG_SITE="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/"
PKG_URL="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/$PKG_VERSION.tar.gz"

View File

@ -23,14 +23,20 @@ case "$LINUX" in
PKG_SOURCE_NAME="linux-$LINUX-$PKG_VERSION.tar.gz"
;;
raspberrypi)
PKG_VERSION="84aa6f05015403b77c2c8997472865baa24d7882" # 5.1.17
PKG_SHA256="b2b639977ebf0dd377ecc9a8638e296d44d49d2f6f11729d9c22a31d5521dbc3"
PKG_VERSION="1a75b37ead9ee99fee6db5525608755a73a5efba" # 5.2.0
PKG_SHA256="16f2650b597c1b6ed787ab9ff3abfb8bc2798a32b68f7401b5391c485838c06b"
PKG_URL="https://github.com/raspberrypi/linux/archive/$PKG_VERSION.tar.gz"
PKG_SOURCE_NAME="linux-$LINUX-$PKG_VERSION.tar.gz"
;;
raspberrypi4)
PKG_VERSION="82fba36079e471b5fb5f386bb8195ce5be75cfb3" # 5.1.18
PKG_SHA256="4ab335edb71cf95505f891e7ab456f6f00731d5690b5fc0dac7a0b0ed141f1ab"
PKG_URL="https://github.com/raspberrypi/linux/archive/$PKG_VERSION.tar.gz"
PKG_SOURCE_NAME="linux-$LINUX-$PKG_VERSION.tar.gz"
;;
*)
PKG_VERSION="5.1.17"
PKG_SHA256="5935c37966a7883cea6a541684fd4076b8d8d11776d7e76996c62c832b96c43d"
PKG_VERSION="5.2"
PKG_SHA256="54ad66f672e1a831b574f5e704e8a05f1e6180a8245d4bdd811208a6cb0ac1e7"
PKG_URL="https://www.kernel.org/pub/linux/kernel/v5.x/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_PATCH_DIRS="default"
;;

View File

@ -1,158 +0,0 @@
From 55096db50d8cdbf777c67f672b493ef565a12c38 Mon Sep 17 00:00:00 2001
From: Matthias Reichl <hias@horus.com>
Date: Fri, 22 Mar 2019 12:26:17 +0100
Subject: [PATCH] media: rc: xbox_remote: add protocol and set timeout
The timestamps in ir-keytable -t output showed that the Xbox DVD
IR dongle decodes scancodes every 64ms. The last scancode of a
longer button press is decodes 64ms after the last-but-one which
indicates the decoder doesn't use a timeout but decodes on the last
edge of the signal.
267.042629: lirc protocol(unknown): scancode = 0xace
267.042665: event type EV_MSC(0x04): scancode = 0xace
267.042665: event type EV_KEY(0x01) key_down: KEY_1(0x0002)
267.042665: event type EV_SYN(0x00).
267.106625: lirc protocol(unknown): scancode = 0xace
267.106643: event type EV_MSC(0x04): scancode = 0xace
267.106643: event type EV_SYN(0x00).
267.170623: lirc protocol(unknown): scancode = 0xace
267.170638: event type EV_MSC(0x04): scancode = 0xace
267.170638: event type EV_SYN(0x00).
267.234621: lirc protocol(unknown): scancode = 0xace
267.234636: event type EV_MSC(0x04): scancode = 0xace
267.234636: event type EV_SYN(0x00).
267.298623: lirc protocol(unknown): scancode = 0xace
267.298638: event type EV_MSC(0x04): scancode = 0xace
267.298638: event type EV_SYN(0x00).
267.543345: event type EV_KEY(0x01) key_down: KEY_1(0x0002)
267.543345: event type EV_SYN(0x00).
267.570015: event type EV_KEY(0x01) key_up: KEY_1(0x0002)
267.570015: event type EV_SYN(0x00).
Add a protocol with the repeat value and set the timeout in the
driver to 10ms (to have a bit of headroom for delays) so the Xbox
DVD remote performs more responsive.
Signed-off-by: Matthias Reichl <hias@horus.com>
---
Documentation/media/lirc.h.rst.exceptions | 1 +
drivers/media/rc/keymaps/rc-xbox-dvd.c | 2 +-
drivers/media/rc/rc-main.c | 2 ++
drivers/media/rc/xbox_remote.c | 4 +++-
include/media/rc-map.h | 4 +++-
include/uapi/linux/lirc.h | 2 ++
6 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/Documentation/media/lirc.h.rst.exceptions b/Documentation/media/lirc.h.rst.exceptions
index e7a41d4b3d46..f8b5f1a32b7d 100644
--- a/Documentation/media/lirc.h.rst.exceptions
+++ b/Documentation/media/lirc.h.rst.exceptions
@@ -61,6 +61,7 @@ ignore symbol RC_PROTO_IMON
ignore symbol RC_PROTO_RCMM12
ignore symbol RC_PROTO_RCMM24
ignore symbol RC_PROTO_RCMM32
+ignore symbol RC_PROTO_XBOX_DVD
# Undocumented macros
diff --git a/drivers/media/rc/keymaps/rc-xbox-dvd.c b/drivers/media/rc/keymaps/rc-xbox-dvd.c
index af387244636b..42815ab57bff 100644
--- a/drivers/media/rc/keymaps/rc-xbox-dvd.c
+++ b/drivers/media/rc/keymaps/rc-xbox-dvd.c
@@ -42,7 +42,7 @@ static struct rc_map_list xbox_dvd_map = {
.map = {
.scan = xbox_dvd,
.size = ARRAY_SIZE(xbox_dvd),
- .rc_proto = RC_PROTO_UNKNOWN,
+ .rc_proto = RC_PROTO_XBOX_DVD,
.name = RC_MAP_XBOX_DVD,
}
};
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 78e79c37f208..7f1d5b226f68 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -76,6 +76,7 @@ static const struct {
.scancode_bits = 0x00ffffff, .repeat_period = 114 },
[RC_PROTO_RCMM32] = { .name = "rc-mm-32",
.scancode_bits = 0xffffffff, .repeat_period = 114 },
+ [RC_PROTO_XBOX_DVD] = { .name = "xbox-dvd", .repeat_period = 64 },
};
/* Used to keep track of known keymaps */
@@ -1027,6 +1028,7 @@ static const struct {
{ RC_PROTO_BIT_RCMM12 |
RC_PROTO_BIT_RCMM24 |
RC_PROTO_BIT_RCMM32, "rc-mm", "ir-rcmm-decoder" },
+ { RC_PROTO_BIT_XBOX_DVD, "xbox-dvd", NULL },
};
/**
diff --git a/drivers/media/rc/xbox_remote.c b/drivers/media/rc/xbox_remote.c
index f959cbb94744..79470c09989e 100644
--- a/drivers/media/rc/xbox_remote.c
+++ b/drivers/media/rc/xbox_remote.c
@@ -148,7 +148,7 @@ static void xbox_remote_rc_init(struct xbox_remote *xbox_remote)
struct rc_dev *rdev = xbox_remote->rdev;
rdev->priv = xbox_remote;
- rdev->allowed_protocols = RC_PROTO_BIT_UNKNOWN;
+ rdev->allowed_protocols = RC_PROTO_BIT_XBOX_DVD;
rdev->driver_name = "xbox_remote";
rdev->open = xbox_remote_rc_open;
@@ -157,6 +157,8 @@ static void xbox_remote_rc_init(struct xbox_remote *xbox_remote)
rdev->device_name = xbox_remote->rc_name;
rdev->input_phys = xbox_remote->rc_phys;
+ rdev->timeout = MS_TO_NS(10);
+
usb_to_input_id(xbox_remote->udev, &rdev->input_id);
rdev->dev.parent = &xbox_remote->interface->dev;
}
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
index e5e86d595645..a0000f392362 100644
--- a/include/media/rc-map.h
+++ b/include/media/rc-map.h
@@ -40,6 +40,7 @@
#define RC_PROTO_BIT_RCMM12 BIT_ULL(RC_PROTO_RCMM12)
#define RC_PROTO_BIT_RCMM24 BIT_ULL(RC_PROTO_RCMM24)
#define RC_PROTO_BIT_RCMM32 BIT_ULL(RC_PROTO_RCMM32)
+#define RC_PROTO_BIT_XBOX_DVD BIT_ULL(RC_PROTO_XBOX_DVD)
#define RC_PROTO_BIT_ALL \
(RC_PROTO_BIT_UNKNOWN | RC_PROTO_BIT_OTHER | \
@@ -55,7 +56,8 @@
RC_PROTO_BIT_RC6_MCE | RC_PROTO_BIT_SHARP | \
RC_PROTO_BIT_XMP | RC_PROTO_BIT_CEC | \
RC_PROTO_BIT_IMON | RC_PROTO_BIT_RCMM12 | \
- RC_PROTO_BIT_RCMM24 | RC_PROTO_BIT_RCMM32)
+ RC_PROTO_BIT_RCMM24 | RC_PROTO_BIT_RCMM32 | \
+ RC_PROTO_BIT_XBOX_DVD)
/* All rc protocols for which we have decoders */
#define RC_PROTO_BIT_ALL_IR_DECODER \
(RC_PROTO_BIT_RC5 | RC_PROTO_BIT_RC5X_20 | \
diff --git a/include/uapi/linux/lirc.h b/include/uapi/linux/lirc.h
index 45fcbf99d72e..f99d9dcae667 100644
--- a/include/uapi/linux/lirc.h
+++ b/include/uapi/linux/lirc.h
@@ -195,6 +195,7 @@ struct lirc_scancode {
* @RC_PROTO_RCMM12: RC-MM protocol 12 bits
* @RC_PROTO_RCMM24: RC-MM protocol 24 bits
* @RC_PROTO_RCMM32: RC-MM protocol 32 bits
+ * @RC_PROTO_XBOX_DVD: Xbox DVD Movie Playback Kit protocol
*/
enum rc_proto {
RC_PROTO_UNKNOWN = 0,
@@ -224,6 +225,7 @@ enum rc_proto {
RC_PROTO_RCMM12 = 24,
RC_PROTO_RCMM24 = 25,
RC_PROTO_RCMM32 = 26,
+ RC_PROTO_XBOX_DVD = 27,
};
#endif
--
2.20.1

View File

@ -0,0 +1,206 @@
commit 5a596921a4636e62843a59b7eab7b87b70a6d296
Author: Lukas Rusak <lorusak@gmail.com>
Date: Sun May 6 22:03:11 2018 -0700
HID: add ouya HID driver
This driver is a simple implementation to get the controller working and mapped properly.
This driver does not include functionality for the touchpad (yet). The original driver
was taken from from the ouya linux tree and has been simplified. It seems there may have
been other versions of the controller present that had a broken report descriptor. I have
removed that for now.
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 60252fd796f6..6be2c454e72e 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -659,6 +659,12 @@ config HID_ORTEK
- Ortek WKB-2000
- Skycable wireless presenter
+config HID_OUYA
+ tristate "OUYA Game Controller"
+ depends on USB_HID
+ ---help---
+ Support for OUYA Game Controller.
+
config HID_PANTHERLORD
tristate "Pantherlord/GreenAsia game controller"
depends on HID
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
index 17a8bd97da9d..4425890934e4 100644
--- a/drivers/hid/Makefile
+++ b/drivers/hid/Makefile
@@ -71,6 +71,7 @@ obj-$(CONFIG_HID_MULTITOUCH) += hid-multitouch.o
obj-$(CONFIG_HID_NTI) += hid-nti.o
obj-$(CONFIG_HID_NTRIG) += hid-ntrig.o
obj-$(CONFIG_HID_ORTEK) += hid-ortek.o
+obj-$(CONFIG_HID_OUYA) += hid-ouya.o
obj-$(CONFIG_HID_PRODIKEYS) += hid-prodikeys.o
obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o
obj-$(CONFIG_HID_PENMOUNT) += hid-penmount.o
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 0b5cc910f62e..0528efb825fa 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -859,6 +859,9 @@
#define USB_DEVICE_ID_ORTEK_WKB2000 0x2000
#define USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S 0x8003
+#define USB_VENDOR_ID_OUYA 0x2836
+#define USB_DEVICE_ID_OUYA_CONTROLLER 0x0001
+
#define USB_VENDOR_ID_PLANTRONICS 0x047f
#define USB_VENDOR_ID_PANASONIC 0x04da
diff --git a/drivers/hid/hid-ouya.c b/drivers/hid/hid-ouya.c
new file mode 100644
index 000000000000..4344a47b40af
--- /dev/null
+++ b/drivers/hid/hid-ouya.c
@@ -0,0 +1,131 @@
+/*
+ * HID driver for OUYA Game Controller(s)
+ *
+ * Copyright (c) 2013 OUYA
+ * Copyright (c) 2013 Gregorios Leach <optikflux@gmail.com>
+ * Copyright (c) 2018 Lukas Rusak <lorusak@gmail.com>
+ */
+
+#include <linux/device.h>
+#include <linux/hid.h>
+#include <linux/input.h>
+#include <linux/module.h>
+
+#include "hid-ids.h"
+
+static const unsigned int ouya_absmap[] = {
+ [0x30] = ABS_X, /* left stick X */
+ [0x31] = ABS_Y, /* left stick Y */
+ [0x32] = ABS_Z, /* L2 */
+ [0x33] = ABS_RX, /* right stick X */
+ [0x34] = ABS_RY, /* right stick Y */
+ [0x35] = ABS_RZ, /* R2 */
+};
+
+static const unsigned int ouya_keymap[] = {
+ [0x1] = BTN_SOUTH, /* O */
+ [0x2] = BTN_WEST, /* U */
+ [0x3] = BTN_NORTH, /* Y */
+ [0x4] = BTN_EAST, /* A */
+ [0x5] = BTN_TL, /* L1 */
+ [0x6] = BTN_TR, /* R1 */
+ [0x7] = BTN_THUMBL, /* L3 */
+ [0x8] = BTN_THUMBR, /* R3 */
+ [0x9] = BTN_DPAD_UP, /* Up */
+ [0xa] = BTN_DPAD_DOWN, /* Down */
+ [0xb] = BTN_DPAD_LEFT, /* Left */
+ [0xc] = BTN_DPAD_RIGHT, /* Right */
+ [0xd] = BTN_TL2, /* L2 */
+ [0xe] = BTN_TR2, /* R2 */
+ [0xf] = BTN_MODE, /* Power */
+};
+
+static int ouya_input_mapping(struct hid_device *hdev, struct hid_input *hi,
+ struct hid_field *field, struct hid_usage *usage,
+ unsigned long **bit, int *max)
+{
+ if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) {
+ unsigned int key = usage->hid & HID_USAGE;
+
+ if (key >= ARRAY_SIZE(ouya_keymap))
+ return -1;
+
+ key = ouya_keymap[key];
+ hid_map_usage_clear(hi, usage, bit, max, EV_KEY, key);
+
+ return 1;
+
+ } else if ((usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK) {
+ unsigned int abs = usage->hid & HID_USAGE;
+
+ if (abs >= ARRAY_SIZE(ouya_absmap))
+ return -1;
+
+ abs = ouya_absmap[abs];
+ hid_map_usage_clear(hi, usage, bit, max, EV_ABS, abs);
+
+ return 1;
+ }
+
+ return 0;
+}
+
+static int ouya_probe(struct hid_device *hdev, const struct hid_device_id *id)
+{
+ int ret;
+
+ ret = hid_parse(hdev);
+ if (ret) {
+ hid_err(hdev, "parse failed\n");
+ goto err_free;
+ }
+
+ ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT | HID_CONNECT_HIDDEV_FORCE);
+ if (ret) {
+ hid_err(hdev, "hw start failed\n");
+ goto err_free;
+ }
+
+ return 0;
+
+err_free:
+ return ret;
+}
+
+static void ouya_remove(struct hid_device *hdev)
+{
+ hid_hw_stop(hdev);
+ kfree(hid_get_drvdata(hdev));
+}
+
+static const struct hid_device_id ouya_devices[] = {
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },
+ { }
+};
+MODULE_DEVICE_TABLE(hid, ouya_devices);
+
+static struct hid_driver ouya_driver = {
+ .name = "ouya",
+ .id_table = ouya_devices,
+ .input_mapping = ouya_input_mapping,
+ .probe = ouya_probe,
+ .remove = ouya_remove,
+};
+
+static int __init ouya_init(void)
+{
+ return hid_register_driver(&ouya_driver);
+}
+
+static void __exit ouya_exit(void)
+{
+ hid_unregister_driver(&ouya_driver);
+}
+
+module_init(ouya_init);
+module_exit(ouya_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Lukas Rusak <lorusak@gmail.com>");
+MODULE_AUTHOR("Gregorios Leach <optikflux@gmail.com>");
+MODULE_DESCRIPTION("Ouya Controller Driver");
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
index 587e2681a53f..b5adc13e0df1 100644
--- a/drivers/hid/hid-quirks.c
+++ b/drivers/hid/hid-quirks.c
@@ -538,6 +538,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_IHOME_IMAC_A210S) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
#endif
+#if IS_ENABLED(CONFIG_HID_OUYA)
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },
+#endif
#if IS_ENABLED(CONFIG_HID_PANTHERLORD)
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },

View File

@ -0,0 +1,72 @@
From 7051422474e4c4e302ede3d07ffd8ef2682e07a2 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Tue, 22 Apr 2014 16:05:14 +0300
Subject: [PATCH] [RFC] hid/sony: add autorepeat for PS3 remotes
adapted to 4.6
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.
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
---
drivers/hid/hid-sony.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 310436a..84f7f41 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -1120,6 +1120,25 @@ 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;
+}
+
static u8 *sony_report_fixup(struct hid_device *hdev, u8 *rdesc,
unsigned int *rsize)
{
@@ -2372,6 +2391,8 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
sony_init_output_report(sc, dualshock4_send_output_report);
} else if (sc->quirks & MOTION_CONTROLLER) {
sony_init_output_report(sc, motion_send_output_report);
+ } else if (sc->quirks & PS3REMOTE) {
+ ret = ps3remote_setup_repeat(hdev);
} else {
ret = 0;
}
--
2.5.0

View File

@ -0,0 +1,21 @@
diff -Naur linux-3.16.1/drivers/media/rc/imon.c linux-3.16.1.patch/drivers/media/rc/imon.c
--- linux-3.16.1/drivers/media/rc/imon.c 2014-08-14 04:36:35.000000000 +0200
+++ linux-3.16.1.patch/drivers/media/rc/imon.c 2014-08-15 13:57:16.587620642 +0200
@@ -1344,6 +1344,17 @@
}
} else {
/*
+ * For users without stabilized, just ignore any value getting
+ * to close to the diagonal.
+ */
+ if ((abs(rel_y) < 2 && abs(rel_x) < 2) ||
+ abs(abs(rel_y) - abs(rel_x)) < 2 ) {
+ spin_lock_irqsave(&ictx->kc_lock, flags);
+ ictx->kc = KEY_UNKNOWN;
+ spin_unlock_irqrestore(&ictx->kc_lock, flags);
+ return;
+ }
+ /*
* Hack alert: instead of using keycodes, we have
* to use hard-coded scancodes here...
*/

View File

@ -0,0 +1,25 @@
From c314d9af9d774c052bea324e1a140ccdba0ca070 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Tue, 8 Apr 2014 14:02:53 +0300
Subject: [PATCH] pm: disable async suspend/resume by default
---
kernel/power/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 1d1bf63..361db93 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -46,7 +46,7 @@ int pm_notifier_call_chain(unsigned long val)
}
/* If set, devices may be suspended and resumed asynchronously. */
-int pm_async_enabled = 1;
+int pm_async_enabled = 0;
static ssize_t pm_async_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
--
1.7.2.5

View File

@ -0,0 +1,63 @@
From 6291800ff8cd59b51411f904685db3ecb2e322ff Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess () hadess ! net>
Date: Fri, 7 Jun 2019 07:51:33 +0000
Subject: [PATCH] tools: Fix build after y2038 changes in glibc
The 32-bit SIOCGSTAMP has been deprecated. Use the deprecated name
to fix the build.
---
tools/l2test.c | 6 +++++-
tools/rctest.c | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/tools/l2test.c b/tools/l2test.c
index 1819423..400ac4a 100644
--- a/tools/l2test.c
+++ b/tools/l2test.c
@@ -54,6 +54,10 @@
#define BREDR_DEFAULT_PSM 0x1011
#define LE_DEFAULT_PSM 0x0080
+#ifndef SIOCGSTAMP_OLD
+#define SIOCGSTAMP_OLD SIOCGSTAMP
+#endif
+
/* Test modes */
enum {
SEND,
@@ -906,7 +910,7 @@ static void recv_mode(int sk)
if (timestamp) {
struct timeval tv;
- if (ioctl(sk, SIOCGSTAMP, &tv) < 0) {
+ if (ioctl(sk, SIOCGSTAMP_OLD, &tv) < 0) {
timestamp = 0;
memset(ts, 0, sizeof(ts));
} else {
diff --git a/tools/rctest.c b/tools/rctest.c
index 6d84e07..6a2bd55 100644
--- a/tools/rctest.c
+++ b/tools/rctest.c
@@ -49,6 +49,10 @@
#include "src/shared/util.h"
+#ifndef SIOCGSTAMP_OLD
+#define SIOCGSTAMP_OLD SIOCGSTAMP
+#endif
+
/* Test modes */
enum {
SEND,
@@ -504,7 +508,7 @@ static void recv_mode(int sk)
if (timestamp) {
struct timeval tv;
- if (ioctl(sk, SIOCGSTAMP, &tv) < 0) {
+ if (ioctl(sk, SIOCGSTAMP_OLD, &tv) < 0) {
timestamp = 0;
memset(ts, 0, sizeof(ts));
} else {
--
2.14.1

View File

@ -3,8 +3,8 @@
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="bcm2835-bootloader"
PKG_VERSION="f6d9f139037bf421d5d25b1cebe1a67394542b4b"
PKG_SHA256="800a8fed38f99d5dfc8654b4d79378b3cc9722ba63196f3f9b5b83471a1dd955"
PKG_VERSION="cba4be275b9943b353ea2e5201ab2badd4c760e9"
PKG_SHA256="b1ddc0fcae536c5fb7f17fe8736ff5c42aabdeccf74c00eb85f437fcdd1207f7"
PKG_ARCH="arm"
PKG_LICENSE="nonfree"
PKG_SITE="http://www.broadcom.com"

2
projects/Generic/filesystem/usr/bin/intel-fullrange.sh Normal file → Executable file
View File

@ -1,7 +1,7 @@
#!/bin/sh
FB_TYPE="$(grep '^0 ' /proc/fb | sed 's/[^[:space:]] //')"
if [ "$FB_TYPE" == "inteldrmfb" ]; then
if [ "$FB_TYPE" == "inteldrmfb" ] || echo "$FB_TYPE" | grep -q "^i9[0-9]*drmfb$"; then
OUTPUT=`/usr/bin/xrandr -display :0 -q | sed '/ connected/!d;s/ .*//;q'`
for out in $OUTPUT ; do
# Hack - something is not yet fully right

File diff suppressed because it is too large Load Diff

View File

@ -77,7 +77,7 @@
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS bcm_sta intel_nuc_led"
# build and install driver addons (yes / no)
DRIVER_ADDONS_SUPPORT="yes"
DRIVER_ADDONS_SUPPORT="no"
# driver addons to install:
# for a list of additional drivers see packages/linux-driver-addons

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,10 @@
# Device defaults
################################################################################
# Kernel to use. values can be:
# default: default mainline kernel
LINUX="raspberrypi4"
# NOOBS supported hex versions (legacy) is not relevant for RPi4
unset NOOBS_HEX

View File

@ -118,7 +118,7 @@
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS rpi-cirrus-config bcm2835-driver"
# build and install driver addons (yes / no)
DRIVER_ADDONS_SUPPORT="yes"
DRIVER_ADDONS_SUPPORT="no"
# driver addons to install:
# for a list of additional drivers see packages/linux-driver-addons