mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
Merge pull request #2566 from MilhouseVH/le90_linux_rpi_vendor
linux: switch to Raspberry Pi vendor kernel
This commit is contained in:
commit
6130d1da24
@ -17,8 +17,8 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="bcm2835-driver"
|
||||
PKG_VERSION="aa75533"
|
||||
PKG_SHA256="669e9e083864aa3961d5d104c55b6be944bae2eb2cac5c708cb5f6b28ea991ca"
|
||||
PKG_VERSION="6e3c5f8"
|
||||
PKG_SHA256="201e918c5d4c3c45f9d97a01c5363861c228e547fc14b8240d975e1f46201a58"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="nonfree"
|
||||
PKG_SITE="http://www.broadcom.com"
|
||||
|
@ -29,31 +29,35 @@ PKG_SHORTDESC="linux26: The Linux kernel 2.6 precompiled kernel binary image and
|
||||
PKG_LONGDESC="This package contains a precompiled kernel image and the modules."
|
||||
PKG_IS_KERNEL_PKG="yes"
|
||||
|
||||
PKG_PATCH_DIRS="$LINUX"
|
||||
|
||||
case "$LINUX" in
|
||||
amlogic-3.10)
|
||||
PKG_VERSION="02fdb27"
|
||||
PKG_VERSION="02fdb27efcb2940b819fec90d9fb333a57ab9900"
|
||||
PKG_SHA256="a4c6a5759ad754109357c1283665498c23796c985fec0b50b18be25f96cf8465"
|
||||
PKG_URL="https://github.com/LibreELEC/linux-amlogic/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="$PKG_NAME-amlogic-$PKG_VERSION*"
|
||||
PKG_PATCH_DIRS="amlogic-3.10"
|
||||
PKG_SOURCE_DIR="linux-amlogic-$PKG_VERSION"
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET aml-dtbtools:host"
|
||||
PKG_BUILD_PERF="no"
|
||||
;;
|
||||
amlogic-3.14)
|
||||
PKG_VERSION="9c63c24"
|
||||
PKG_VERSION="9c63c24324096d5e03db59c6621521cab671db79"
|
||||
PKG_SHA256="ca5c17921e554c75a63dd91f400ceaee3657d2b485db93909754891d68ea19d2"
|
||||
PKG_URL="https://github.com/LibreELEC/linux-amlogic/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="$PKG_NAME-amlogic-$PKG_VERSION*"
|
||||
PKG_PATCH_DIRS="amlogic-3.14"
|
||||
PKG_SOURCE_DIR="linux-amlogic-$PKG_VERSION"
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET aml-dtbtools:host"
|
||||
PKG_BUILD_PERF="no"
|
||||
;;
|
||||
rockchip-4.4)
|
||||
PKG_VERSION="eae92ae2"
|
||||
PKG_VERSION="eae92ae2b930999857df47c3057327c1c490454b"
|
||||
PKG_SHA256="da453ca6ecefc3719a1165bc7b08fe00fc2b50ab64f6289ef6f3670a9fc1ceca"
|
||||
PKG_URL="https://github.com/rockchip-linux/kernel/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="kernel-$PKG_VERSION*"
|
||||
PKG_PATCH_DIRS="rockchip-4.4"
|
||||
PKG_SOURCE_DIR="kernel-$PKG_VERSION"
|
||||
;;
|
||||
raspberrypi)
|
||||
PKG_VERSION="80a14a56dacb7cc2b40d5f37d00bedb0ceace130" # 4.14.24
|
||||
PKG_SHA256="fdf9571fe8ad514e0dd7185606828a15199f3ddb140f99ba7fcaf37dadbe8491"
|
||||
PKG_URL="https://github.com/raspberrypi/linux/archive/$PKG_VERSION.tar.gz"
|
||||
;;
|
||||
*)
|
||||
PKG_VERSION="4.14.24"
|
||||
@ -251,7 +255,13 @@ makeinstall_target() {
|
||||
fi
|
||||
elif [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then
|
||||
mkdir -p $INSTALL/usr/share/bootloader/overlays
|
||||
|
||||
# install platform dtbs, but remove upstream kernel dtbs (i.e. without downstream
|
||||
# drivers and decent USB support) as these are not required by LibreELEC
|
||||
cp -p arch/$TARGET_KERNEL_ARCH/boot/dts/*.dtb $INSTALL/usr/share/bootloader
|
||||
rm -f $INSTALL/usr/share/bootloader/bcm283*.dtb
|
||||
|
||||
# install overlay dtbs
|
||||
for dtb in arch/$TARGET_KERNEL_ARCH/boot/dts/overlays/*.dtbo; do
|
||||
cp $dtb $INSTALL/usr/share/bootloader/overlays 2>/dev/null || :
|
||||
done
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 57f0b99ca9a2db948fa70988c447553683368be1 Mon Sep 17 00:00:00 2001
|
||||
From: Nell Hardcastle <nell@dev-nell.com>
|
||||
Date: Thu, 29 May 2014 22:06:50 -0700
|
||||
Subject: [PATCH] eMMC: Don't initialize partitions on RPMB flagged areas.
|
||||
|
||||
Prevents a lot of pointless hanging at boot on some devices.
|
||||
---
|
||||
drivers/mmc/card/block.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
|
||||
index 4409d79..56df902 100644
|
||||
--- a/drivers/mmc/core/block.c
|
||||
+++ b/drivers/mmc/core/block.c
|
||||
@@ -2254,7 +2254,7 @@ static int mmc_blk_alloc_parts(struct mmc_card *card, struct mmc_blk_data *md)
|
||||
return 0;
|
||||
|
||||
for (idx = 0; idx < card->nr_parts; idx++) {
|
||||
- if (card->part[idx].size) {
|
||||
+ if (card->part[idx].size && !(card->part[idx].area_type & MMC_BLK_DATA_AREA_RPMB)) {
|
||||
ret = mmc_blk_alloc_part(card, md,
|
||||
card->part[idx].part_cfg,
|
||||
card->part[idx].size >> 9,
|
||||
--
|
||||
1.7.10.4
|
||||
|
@ -0,0 +1,327 @@
|
||||
commit 58c5e239ba0402207cfecef8ea1bf52edea092e4
|
||||
Author: Lukas Rusak <lorusak@gmail.com>
|
||||
Date: Mon Jan 15 09:50:43 2018 -0800
|
||||
|
||||
drivers/hid: add ouya controller driver
|
||||
|
||||
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
|
||||
index 779c5ae47..02f79b0a4 100644
|
||||
--- a/drivers/hid/Kconfig
|
||||
+++ b/drivers/hid/Kconfig
|
||||
@@ -633,6 +633,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 235bd2a7b..d3431f77b 100644
|
||||
--- a/drivers/hid/Makefile
|
||||
+++ b/drivers/hid/Makefile
|
||||
@@ -68,6 +68,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-core.c b/drivers/hid/hid-core.c
|
||||
index 0c3f60813..cd64cafe5 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -1884,6 +1884,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_ACCUTOUCH_2216) },
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_HID_ACRUX)
|
||||
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0xf705) },
|
||||
#endif
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index 5da3d6256..b6bb209ed 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -843,6 +843,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 000000000..7792c23ba
|
||||
--- /dev/null
|
||||
+++ b/drivers/hid/hid-ouya.c
|
||||
@@ -0,0 +1,260 @@
|
||||
+/*
|
||||
+ * HID driver for OUYA Game Controller(s)
|
||||
+ *
|
||||
+ * Copyright (c) 2013 OUYA
|
||||
+ */
|
||||
+
|
||||
+#include <linux/device.h>
|
||||
+#include <linux/input.h>
|
||||
+#include <linux/hid.h>
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+#include "hid-ids.h"
|
||||
+
|
||||
+#define OUYA_TOUCHPAD_FIXUP (1 << 0)
|
||||
+
|
||||
+struct ouya_sc {
|
||||
+ unsigned long quirks;
|
||||
+};
|
||||
+
|
||||
+/* Fixed report descriptor */
|
||||
+static __u8 ouya_rdesc_fixed[] = {
|
||||
+
|
||||
+ 0x05, 0x01, /* Usage Page (Desktop), */
|
||||
+ 0x09, 0x05, /* Usage (Game Pad), */
|
||||
+
|
||||
+ 0xA1, 0x01, /* Collection (Application), */
|
||||
+ 0x85, 0x07, /* Report ID (7), */
|
||||
+
|
||||
+ 0xA1, 0x00, /* Collection (Physical), */
|
||||
+ 0x09, 0x30, /* Usage (X), */
|
||||
+ 0x09, 0x31, /* Usage (Y), */
|
||||
+ 0x15, 0x00, /* Logical Minimum (0), */
|
||||
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
|
||||
+ 0x35, 0x00, /* Physical Minimum (0), */
|
||||
+ 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
|
||||
+ 0x95, 0x02, /* Report Count (2), */
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+ 0xC0, /* End Collection, */
|
||||
+
|
||||
+ 0xA1, 0x00, /* Collection (Physical), */
|
||||
+ 0x09, 0x33, /* Usage (Rx), */
|
||||
+ 0x09, 0x34, /* Usage (Ry), */
|
||||
+ 0x15, 0x00, /* Logical Minimum (0), */
|
||||
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
|
||||
+ 0x35, 0x00, /* Physical Minimum (0), */
|
||||
+ 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
|
||||
+ 0x95, 0x02, /* Report Count (2), */
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+ 0xC0, /* End Collection, */
|
||||
+
|
||||
+ 0xA1, 0x00, /* Collection (Physical), */
|
||||
+ 0x09, 0x32, /* Usage (Z), */
|
||||
+ 0x15, 0x00, /* Logical Minimum (0), */
|
||||
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
|
||||
+ 0x35, 0x00, /* Physical Minimum (0), */
|
||||
+ 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
|
||||
+ 0x95, 0x01, /* Report Count (1), */
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+ 0xC0, /* End Collection, */
|
||||
+
|
||||
+ 0xA1, 0x00, /* Collection (Physical), */
|
||||
+ 0x09, 0x35, /* Usage (Rz), */
|
||||
+ 0x15, 0x00, /* Logical Minimum (0), */
|
||||
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
|
||||
+ 0x35, 0x00, /* Physical Minimum (0), */
|
||||
+ 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
|
||||
+ 0x95, 0x01, /* Report Count (1), */
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+ 0xC0, /* End Collection, */
|
||||
+
|
||||
+ 0x05, 0x09, /* Usage Page (Button), */
|
||||
+ 0x19, 0x01, /* Usage Minimum (01h), */
|
||||
+ 0x29, 0x10, /* Usage Maximum (10h), */
|
||||
+ 0x95, 0x10, /* Report Count (16), */
|
||||
+ 0x75, 0x01, /* Report Size (1), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+
|
||||
+ /* ORIGINAL REPORT DESCRIPTOR FOR TOUCHPAD INPUT */
|
||||
+ /* 06 00 ff a1 02 09 02 15 00 26 ff 00 35 00 46 ff 00 95 03 75 08 81 02 c0 */
|
||||
+
|
||||
+ 0x06, 0x00, 0xFF, /* Usage Page (Custom), */
|
||||
+ 0x09, 0x02, /* Usage (Mouse), */
|
||||
+ 0x09, 0x01, /* Usage (Pointer), */
|
||||
+ 0xA1, 0x00, /* Collection (Physical), */
|
||||
+ 0x05, 0x09, /* Usage Page (Button), */
|
||||
+ 0x19, 0x01, /* Usage Minimum (01h), */
|
||||
+ 0x29, 0x03, /* Usage Maximum (03h), */
|
||||
+ 0x15, 0x00, /* Logical Minimum (0), */
|
||||
+ 0x25, 0x01, /* Logical Maximum (1), */
|
||||
+ 0x95, 0x03, /* Report Count (3), */
|
||||
+ 0x75, 0x01, /* Report Size (1), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+ 0x95, 0x01, /* Report Count (1), */
|
||||
+ 0x75, 0x05, /* Report Size (5), */
|
||||
+ 0x81, 0x01, /* Input (Constant), */
|
||||
+ 0x05, 0x01, /* Usage Page (Desktop), */
|
||||
+ 0x09, 0x30, /* Usage (X), */
|
||||
+ 0x09, 0x31, /* Usage (Y), */
|
||||
+ 0x15, 0x81, /* Logical Minimum (-127), */
|
||||
+ 0x25, 0x7f, /* Logical Maximum (127), */
|
||||
+ 0x95, 0x02, /* Report Count (2), */
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x81, 0x06, /* Input (Relative), */
|
||||
+ 0xC0, /* End Collection, */
|
||||
+
|
||||
+ 0x06, 0x00, 0xFF, /* Usage Page (Custom), */
|
||||
+ 0xA1, 0x02, /* Collection (Logical), */
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x95, 0x07, /* Report Count (7), */
|
||||
+ 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
|
||||
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
|
||||
+ 0x09, 0x01, /* Usage (Pointer), */
|
||||
+ 0x91, 0x02, /* Output (Variable), */
|
||||
+ 0xC0, /* End Collection, */
|
||||
+
|
||||
+ 0xC0, /* End Collection */
|
||||
+
|
||||
+
|
||||
+ 0x06, 0x00, 0xFF, /* Usage Page (Custom), */
|
||||
+ 0x05, 0x0C, /* Usage Page (Consumer), */
|
||||
+ 0x09, 0x01, /* Usage (Consumer Control), */
|
||||
+
|
||||
+ 0xA1, 0x01, /* Collection (Application), */
|
||||
+ 0x85, 0x03, /* Report ID (3), */
|
||||
+ 0x05, 0x01, /* Usage Page (Desktop), */
|
||||
+ 0x09, 0x06, /* Usage (Keyboard), */
|
||||
+ 0xA1, 0x02, /* Collection (Logical), */
|
||||
+ 0x05, 0x06, /* Usage Page (Generic), */
|
||||
+ 0x09, 0x20, /* Usage (Battery Strgth), */
|
||||
+ 0x15, 0x00, /* Logical Minimum (0), */
|
||||
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x95, 0x01, /* Report Count (1), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+ 0x06, 0xBC, 0xFF, /* Usage Page (Custom), */
|
||||
+
|
||||
+ 0x0A, 0xAD, 0xBD, /* UNKNOWN */
|
||||
+
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x95, 0x06, /* Report Count (6), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+ 0xC0, /* End Collection, */
|
||||
+
|
||||
+ 0xC0, /* End Collection */
|
||||
+
|
||||
+ 0x00
|
||||
+};
|
||||
+
|
||||
+static __u8 *ouya_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
+ unsigned int *rsize)
|
||||
+{
|
||||
+ struct ouya_sc *sc = hid_get_drvdata(hdev);
|
||||
+
|
||||
+ if (sc->quirks & OUYA_TOUCHPAD_FIXUP) {
|
||||
+ rdesc = ouya_rdesc_fixed;
|
||||
+ *rsize = sizeof(ouya_rdesc_fixed);
|
||||
+ }
|
||||
+ return rdesc;
|
||||
+}
|
||||
+
|
||||
+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)
|
||||
+{
|
||||
+ struct ouya_sc *sc = hid_get_drvdata(hdev);
|
||||
+
|
||||
+ if (!(sc->quirks & OUYA_TOUCHPAD_FIXUP)) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if ((usage->hid & 0x90000) == 0x90000 &&
|
||||
+ (field->physical & 0xff000000) == 0xff000000 &&
|
||||
+ usage->collection_index == 5 &&
|
||||
+ field->report_count == 3) {
|
||||
+
|
||||
+ hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_MOUSE + (usage->hid - 0x90001));
|
||||
+
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int ouya_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
+{
|
||||
+ int ret;
|
||||
+ struct ouya_sc *sc;
|
||||
+
|
||||
+ sc = kzalloc(sizeof(*sc), GFP_KERNEL);
|
||||
+ if (sc == NULL) {
|
||||
+ hid_err(hdev, "can't alloc ouya descriptor\n");
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ if(((hdev->version & 0xff00) == 0x0100 && (hdev->version & 0xff) >= 0x04) ||
|
||||
+ ((hdev->version & 0xff00) == 0xe100 && (hdev->version & 0xff) >= 0x3a)) {
|
||||
+ hid_info(hdev, "ouya controller - new version\n");
|
||||
+ sc->quirks = OUYA_TOUCHPAD_FIXUP;
|
||||
+ } else {
|
||||
+ sc->quirks = 0;
|
||||
+ }
|
||||
+ hid_set_drvdata(hdev, sc);
|
||||
+
|
||||
+ 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:
|
||||
+ kfree(sc);
|
||||
+ 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,
|
||||
+ .probe = ouya_probe,
|
||||
+ .remove = ouya_remove,
|
||||
+ .input_mapping = ouya_input_mapping,
|
||||
+ .report_fixup = ouya_report_fixup
|
||||
+};
|
||||
+
|
||||
+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);
|
@ -0,0 +1,177 @@
|
||||
From 91310f578291eabef1316eed38f79b05b8eaf568 Mon Sep 17 00:00:00 2001
|
||||
From: MilhouseVH <milhouseVH.github@nmacleod.com>
|
||||
Date: Mon, 19 Jun 2017 20:01:53 +0100
|
||||
Subject: [PATCH] Spinel Plus remote 0.2
|
||||
|
||||
---
|
||||
drivers/hid/Kconfig | 6 +++
|
||||
drivers/hid/Makefile | 1 +
|
||||
drivers/hid/hid-core.c | 4 ++
|
||||
drivers/hid/hid-ids.h | 4 ++
|
||||
drivers/hid/hid-spinelplus.c | 95 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
5 files changed, 110 insertions(+)
|
||||
create mode 100644 drivers/hid/hid-spinelplus.c
|
||||
|
||||
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
|
||||
index 84500fd..6b625cf 100644
|
||||
--- a/drivers/hid/Kconfig
|
||||
+++ b/drivers/hid/Kconfig
|
||||
@@ -808,6 +808,12 @@ config HID_STEELSERIES
|
||||
---help---
|
||||
Support for Steelseries SRW-S1 steering wheel
|
||||
|
||||
+config HID_SPINELPLUS
|
||||
+ tristate "Spinel Plus remote control"
|
||||
+ depends on USB_HID
|
||||
+ ---help---
|
||||
+ Say Y here if you have a Spinel Plus (0471:206c/20cc/0613/2168) remote
|
||||
+
|
||||
config HID_SUNPLUS
|
||||
tristate "Sunplus wireless desktop"
|
||||
depends on HID
|
||||
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
|
||||
index 4e22940..3205d88 100644
|
||||
--- a/drivers/hid/Makefile
|
||||
+++ b/drivers/hid/Makefile
|
||||
@@ -92,6 +92,7 @@ obj-$(CONFIG_HID_SAMSUNG) += hid-samsung.o
|
||||
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
|
||||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
||||
index 32bcb50..11985b4 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -2291,6 +2291,10 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
#if IS_ENABLED(CONFIG_HID_ZYDACRON)
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ZYDACRON, USB_DEVICE_ID_ZYDACRON_REMOTE_CONTROL) },
|
||||
#endif
|
||||
+ { 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_PHILIPS, USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_4) },
|
||||
{ }
|
||||
};
|
||||
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index f3cd724..b67d5e5 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -841,6 +841,10 @@
|
||||
|
||||
#define USB_VENDOR_ID_PHILIPS 0x0471
|
||||
#define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617
|
||||
+#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_1 0x206c
|
||||
+#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_2 0x20cc
|
||||
+#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_3 0x0613
|
||||
+#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_4 0x2168
|
||||
|
||||
#define USB_VENDOR_ID_PI_ENGINEERING 0x05f3
|
||||
#define USB_DEVICE_ID_PI_ENGINEERING_VEC_USB_FOOTPEDAL 0xff
|
||||
diff --git a/drivers/hid/hid-spinelplus.c b/drivers/hid/hid-spinelplus.c
|
||||
new file mode 100644
|
||||
index 0000000..381c7b3
|
||||
--- /dev/null
|
||||
+++ b/drivers/hid/hid-spinelplus.c
|
||||
@@ -0,0 +1,95 @@
|
||||
+/*
|
||||
+ * HID driver for "PHILIPS MCE USB IR Receiver- Spinel plus" remotes
|
||||
+ *
|
||||
+ * Copyright (c) 2010 Panagiotis Skintzos
|
||||
+ *
|
||||
+ * Renamed to Spinel, cleanup and modified to also support
|
||||
+ * Spinel Plus 0471:20CC by Stephan Raue 2012.
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * 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/input.h>
|
||||
+#include <linux/hid.h>
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+#include "hid-ids.h"
|
||||
+
|
||||
+#define spinelplus_map_key(c) set_bit(EV_REP, hi->input->evbit); \
|
||||
+ hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c))
|
||||
+
|
||||
+static int spinelplus_input_mapping(struct hid_device *hdev,
|
||||
+ struct hid_input *hi, struct hid_field *field, struct hid_usage *usage,
|
||||
+ unsigned long **bit, int *max)
|
||||
+{
|
||||
+ switch (usage->hid) {
|
||||
+ case 0xffbc000d: spinelplus_map_key(KEY_MEDIA); break;
|
||||
+ case 0xffbc0024: spinelplus_map_key(KEY_MEDIA); break;
|
||||
+ case 0xffbc0027: spinelplus_map_key(KEY_ZOOM); break;
|
||||
+ case 0xffbc0033: spinelplus_map_key(KEY_HOME); break;
|
||||
+ case 0xffbc0035: spinelplus_map_key(KEY_CAMERA); break;
|
||||
+ case 0xffbc0036: spinelplus_map_key(KEY_EPG); break;
|
||||
+ case 0xffbc0037: spinelplus_map_key(KEY_DVD); break;
|
||||
+ case 0xffbc0038: spinelplus_map_key(KEY_HOME); break;
|
||||
+ case 0xffbc0039: spinelplus_map_key(KEY_MP3); break;
|
||||
+ case 0xffbc003a: spinelplus_map_key(KEY_VIDEO); break;
|
||||
+ case 0xffbc005a: spinelplus_map_key(KEY_TEXT); break;
|
||||
+ case 0xffbc005b: spinelplus_map_key(KEY_RED); break;
|
||||
+ case 0xffbc005c: spinelplus_map_key(KEY_GREEN); break;
|
||||
+ case 0xffbc005d: spinelplus_map_key(KEY_YELLOW); break;
|
||||
+ case 0xffbc005e: spinelplus_map_key(KEY_BLUE); break;
|
||||
+ default:
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static int spinelplus_probe(struct hid_device *hdev,
|
||||
+ const struct hid_device_id *id)
|
||||
+{
|
||||
+ int ret;
|
||||
+ /* Connect only to hid input (not hiddev & hidraw)*/
|
||||
+ unsigned int cmask = HID_CONNECT_HIDINPUT;
|
||||
+
|
||||
+ ret = hid_parse(hdev);
|
||||
+ if (ret) {
|
||||
+ dev_err(&hdev->dev, "parse failed\n");
|
||||
+ goto err_free;
|
||||
+ }
|
||||
+
|
||||
+ ret = hid_hw_start(hdev, cmask);
|
||||
+ if (ret) {
|
||||
+ dev_err(&hdev->dev, "hw start failed\n");
|
||||
+ goto err_free;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+err_free:
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static const struct hid_device_id spinelplus_devices[] = {
|
||||
+ { 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_PHILIPS,USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_4) },
|
||||
+ { }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(hid, spinelplus_devices);
|
||||
+
|
||||
+static struct hid_driver spinelplus_driver = {
|
||||
+ .name = "SpinelPlus",
|
||||
+ .id_table = spinelplus_devices,
|
||||
+ .input_mapping = spinelplus_input_mapping,
|
||||
+ .probe = spinelplus_probe,
|
||||
+};
|
||||
+
|
||||
+module_hid_driver(spinelplus_driver);
|
||||
+
|
||||
+MODULE_LICENSE("GPL");
|
||||
--
|
||||
2.7.4
|
||||
|
@ -0,0 +1,30 @@
|
||||
diff --git a/drivers/media/rc/ir-rc6-decoder.c b/drivers/media/rc/ir-rc6-decoder.c
|
||||
index 5d0d2fe..3d8cc1a 100644
|
||||
--- a/drivers/media/rc/ir-rc6-decoder.c
|
||||
+++ b/drivers/media/rc/ir-rc6-decoder.c
|
||||
@@ -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
|
||||
@@ -252,14 +251,9 @@ static int ir_rc6_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
||||
toggle = 0;
|
||||
break;
|
||||
case 32:
|
||||
- if ((scancode & RC6_6A_LCC_MASK) == RC6_6A_MCE_CC) {
|
||||
- protocol = RC_PROTO_RC6_MCE;
|
||||
- toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
|
||||
- scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
|
||||
- } else {
|
||||
- protocol = RC_PROTO_RC6_6A_32;
|
||||
- toggle = 0;
|
||||
- }
|
||||
+ protocol = RC_PROTO_RC6_MCE;
|
||||
+ toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
|
||||
+ scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
|
||||
break;
|
||||
default:
|
||||
IR_dprintk(1, "RC6(6A) unsupported length\n");
|
@ -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
|
@ -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...
|
||||
*/
|
@ -0,0 +1,54 @@
|
||||
From 907b5fbeaac54c4313132c0918c3090e967b80d4 Mon Sep 17 00:00:00 2001
|
||||
From: MilhouseVH <milhouseVH.github@nmacleod.com>
|
||||
Date: Wed, 7 Mar 2018 23:46:21 +0000
|
||||
Subject: [PATCH] Revert "Revert "softirq: Let ksoftirqd do its job""
|
||||
|
||||
This reverts commit 0d118e31780349beb5ffa1777fd77058cc464ad6.
|
||||
---
|
||||
kernel/softirq.c | 16 +++++++++++++++-
|
||||
1 file changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/kernel/softirq.c b/kernel/softirq.c
|
||||
index 3f3fbc2..e89c3b0 100644
|
||||
--- a/kernel/softirq.c
|
||||
+++ b/kernel/softirq.c
|
||||
@@ -77,6 +77,17 @@ static void wakeup_softirqd(void)
|
||||
wake_up_process(tsk);
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * If ksoftirqd is scheduled, we do not want to process pending softirqs
|
||||
+ * right now. Let ksoftirqd handle this at its own rate, to get fairness.
|
||||
+ */
|
||||
+static bool ksoftirqd_running(void)
|
||||
+{
|
||||
+ struct task_struct *tsk = __this_cpu_read(ksoftirqd);
|
||||
+
|
||||
+ return tsk && (tsk->state == TASK_RUNNING);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* preempt_count and SOFTIRQ_OFFSET usage:
|
||||
* - preempt_count is changed by SOFTIRQ_OFFSET on entering or leaving
|
||||
@@ -313,7 +324,7 @@ asmlinkage __visible void do_softirq(void)
|
||||
|
||||
pending = local_softirq_pending();
|
||||
|
||||
- if (pending)
|
||||
+ if (pending && !ksoftirqd_running())
|
||||
do_softirq_own_stack();
|
||||
|
||||
local_irq_restore(flags);
|
||||
@@ -340,6 +351,9 @@ void irq_enter(void)
|
||||
|
||||
static inline void invoke_softirq(void)
|
||||
{
|
||||
+ if (ksoftirqd_running())
|
||||
+ return;
|
||||
+
|
||||
if (!force_irqthreads) {
|
||||
#ifdef CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK
|
||||
/*
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,53 @@
|
||||
From 5839d34af2063552f83865fd5ebac651688087f9 Mon Sep 17 00:00:00 2001
|
||||
From: MilhouseVH <milhouseVH.github@nmacleod.com>
|
||||
Date: Thu, 1 Feb 2018 09:25:19 +0000
|
||||
Subject: [PATCH] Fix issues introduced by ksoftirqd change
|
||||
|
||||
---
|
||||
kernel/softirq.c | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/kernel/softirq.c b/kernel/softirq.c
|
||||
index 4e09821..d6772be 100644
|
||||
--- a/kernel/softirq.c
|
||||
+++ b/kernel/softirq.c
|
||||
@@ -79,12 +79,16 @@ static void wakeup_softirqd(void)
|
||||
|
||||
/*
|
||||
* If ksoftirqd is scheduled, we do not want to process pending softirqs
|
||||
- * right now. Let ksoftirqd handle this at its own rate, to get fairness.
|
||||
+ * right now. Let ksoftirqd handle this at its own rate, to get fairness,
|
||||
+ * unless we're doing some of the synchronous softirqs.
|
||||
*/
|
||||
-static bool ksoftirqd_running(void)
|
||||
+#define SOFTIRQ_NOW_MASK ((1 << HI_SOFTIRQ) | (1 << TASKLET_SOFTIRQ))
|
||||
+static bool ksoftirqd_running(unsigned long pending)
|
||||
{
|
||||
struct task_struct *tsk = __this_cpu_read(ksoftirqd);
|
||||
|
||||
+ if (pending & SOFTIRQ_NOW_MASK)
|
||||
+ return false;
|
||||
return tsk && (tsk->state == TASK_RUNNING);
|
||||
}
|
||||
|
||||
@@ -324,7 +328,7 @@ asmlinkage __visible void do_softirq(void)
|
||||
|
||||
pending = local_softirq_pending();
|
||||
|
||||
- if (pending && !ksoftirqd_running())
|
||||
+ if (pending && !ksoftirqd_running(pending))
|
||||
do_softirq_own_stack();
|
||||
|
||||
local_irq_restore(flags);
|
||||
@@ -351,7 +355,7 @@ void irq_enter(void)
|
||||
|
||||
static inline void invoke_softirq(void)
|
||||
{
|
||||
- if (ksoftirqd_running())
|
||||
+ if (ksoftirqd_running(local_softirq_pending()))
|
||||
return;
|
||||
|
||||
if (!force_irqthreads) {
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,14 @@
|
||||
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
|
||||
index b99a7fb..89d496c 100644
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -1602,7 +1602,7 @@ static const struct ethtool_ops lan78xx_ethtool_ops = {
|
||||
.get_sset_count = lan78xx_get_sset_count,
|
||||
.get_strings = lan78xx_get_strings,
|
||||
.get_wol = lan78xx_get_wol,
|
||||
- .set_wol = lan78xx_set_wol,
|
||||
+// .set_wol = lan78xx_set_wol,
|
||||
.get_eee = lan78xx_get_eee,
|
||||
.set_eee = lan78xx_set_eee,
|
||||
.get_pauseparam = lan78xx_get_pause,
|
||||
|
@ -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
|
||||
|
@ -17,8 +17,8 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="bcm2835-bootloader"
|
||||
PKG_VERSION="aa75533"
|
||||
PKG_SHA256="61feed41f35a8ab620aeb37e62e180936795f02ffb44ab89ab2e28d45f447a32"
|
||||
PKG_VERSION="6e3c5f8"
|
||||
PKG_SHA256="139c5c16fc2d7fbab18803ecb32093fd12e6731e5216ea526c45a5f6f8a13474"
|
||||
PKG_ARCH="arm"
|
||||
PKG_LICENSE="nonfree"
|
||||
PKG_SITE="http://www.broadcom.com"
|
||||
|
@ -34,6 +34,7 @@
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/start.elf $BOOT_ROOT
|
||||
[ -f $SYSTEM_ROOT/usr/share/bootloader/dt-blob.bin ] && cp -p $SYSTEM_ROOT/usr/share/bootloader/dt-blob.bin $BOOT_ROOT
|
||||
|
||||
rm -f $BOOT_ROOT/bcm283*.dtb # cleanup excess dtb's used by upstream kernels (ie. not LE)
|
||||
cp -p $SYSTEM_ROOT/usr/share/bootloader/*.dtb $BOOT_ROOT
|
||||
cp -pR $SYSTEM_ROOT/usr/share/bootloader/overlays $BOOT_ROOT
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
||||
|
||||
# Kernel to use. values can be:
|
||||
# default: default mainline kernel
|
||||
LINUX="default"
|
||||
LINUX="raspberrypi"
|
||||
|
||||
if [ "$DEVICE" = "RPi" -o "$DEVICE" = "Slice" ]; then
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,63 +0,0 @@
|
||||
## Raspberry Pi Linux Kernel Patch Instructions
|
||||
|
||||
This is needed because we drop a few commits from the upstream Raspberry Pi linux repo
|
||||
|
||||
The commit id's will change anytime the Raspberry Pi linux kernel is rebase against upstream
|
||||
|
||||
#### Clone the repo
|
||||
```
|
||||
git clone https://github.com/raspberrypi/linux.git
|
||||
cd linux
|
||||
```
|
||||
|
||||
#### Checkout the branch
|
||||
```
|
||||
git checkout rpi-4.4.y
|
||||
```
|
||||
|
||||
#### Find the rebase commit, for example
|
||||
```
|
||||
git log --grep 'Linux 4.4.6'
|
||||
```
|
||||
#### This will show a commit
|
||||
```
|
||||
commit 0d1912303e54ed1b2a371be0bba51c384dd57326
|
||||
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Date: Wed Mar 16 08:43:17 2016 -0700
|
||||
|
||||
Linux 4.4.6
|
||||
```
|
||||
|
||||
#### We need to rebase against this commit sha1
|
||||
```
|
||||
git rebase -i 0d1912303e54ed1b2a371be0bba51c384dd57326
|
||||
```
|
||||
|
||||
#### Then we need to remove some commits. These lines need to be removed
|
||||
```
|
||||
pick 9ee3100 Add non-mainline source for rtl8192cu wireless driver version v4.0.2_9000 as this is widely used. Disabled older rtlwifi driver
|
||||
pick 143ad45 rtl8192c_rf6052: PHY_RFShadowRefresh(): fix off-by-one
|
||||
pick 95641b7 rtl8192cu: Add PID for D-Link DWA 131
|
||||
pick fbd8454 Added Device IDs for August DVB-T 205
|
||||
```
|
||||
|
||||
#### Then we can create the patch using the same commit sha1
|
||||
```
|
||||
git format-patch 0d1912303e54ed1b2a371be0bba51c384dd57326 --cover-letter --stdout > linux-01-RPi_support.patch
|
||||
```
|
||||
|
||||
----
|
||||
#### Rebase conflict
|
||||
|
||||
```
|
||||
git reset --hard HEAD
|
||||
git checkout master
|
||||
git branch -D rpi-4.4.y
|
||||
git pull
|
||||
git checkout rpi-4.4.y
|
||||
```
|
||||
|
||||
----
|
||||
#### Further Discussion
|
||||
|
||||
https://github.com/LibreELEC/LibreELEC.tv/pull/31
|
@ -1,132 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
BIN=$(readlink -f $(dirname $0))
|
||||
|
||||
if git rev-parse --is-inside-work-tree &>/dev/null; then
|
||||
echo "Don't run this script inside a git reppository!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DEPTH=1000
|
||||
BRANCH="$1"
|
||||
|
||||
while [ $# -gt 1 ]; do
|
||||
if [ "${2,,}" == "rebase" ]; then
|
||||
REBASE="_rebase"
|
||||
elif [[ ${2,,} =~ [_-]rebase ]]; then
|
||||
REBASE="$2"
|
||||
elif [[ ${2} =~ ^[0-9a-f]*$ ]]; then
|
||||
BASEREV="${2}"
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
usage()
|
||||
{
|
||||
local me="$(basename $0)"
|
||||
|
||||
echo "Usage: ${me} <major.minor>|<major.minor.patch> [[_-]rebase] [baserev]"
|
||||
echo
|
||||
echo "Example: 4.4 (for rpi-4.4.y) or 4.4.6 - specifying an exact kernel version avoids fetching the upstream repo"
|
||||
echo " 4.4 rebase - use rpi-4.4.y_rebase branch"
|
||||
echo " 4.4 -rebase - use rpi-4.4.y-rebase branch"
|
||||
echo " 4.6-rc6"
|
||||
echo " 4.7 523d939ef98fd712632d93a5a2b588e477a7565e"
|
||||
echo " 4.7.0"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ -z "${BRANCH}" ]; then
|
||||
echo "ERROR: Branch must be specified!"
|
||||
echo
|
||||
usage
|
||||
fi
|
||||
|
||||
if [[ ${BRANCH} =~ [0-9]*\.[0-9]*\.[0-9]* ]]; then
|
||||
KERNEL="${BRANCH}"
|
||||
BRANCH="${BRANCH%.*}"
|
||||
elif [[ ${BRANCH} =~ [0-9]*\.[0-9]*-rc[0-9] ]]; then
|
||||
KERNEL="${BRANCH}"
|
||||
BRANCH="${BRANCH%-*}"
|
||||
fi
|
||||
|
||||
# On initial release, eg. 4.7.0, the kernel will actually be known as 4.7 in git so strip the trailing .0
|
||||
[[ ${KERNEL} =~ ^[0-9]*\.[0-9]*\.0*$ ]] && KERNEL="${KERNEL%.*}"
|
||||
|
||||
rm -fr raspberrypi-linux
|
||||
|
||||
# If we have a persisted version of the repo, quickly copy it
|
||||
if [ -d raspberrypi-linux.stash ]; then
|
||||
echo "Copying raspberrypi-linux.stash to raspberrypi-linux..."
|
||||
cp -r raspberrypi-linux.stash raspberrypi-linux
|
||||
cd raspberrypi-linux
|
||||
git checkout rpi-${BRANCH}.y${REBASE}
|
||||
else
|
||||
git clone -b rpi-${BRANCH}.y${REBASE} --depth=${DEPTH} --single-branch https://github.com/raspberrypi/linux.git raspberrypi-linux
|
||||
cd raspberrypi-linux
|
||||
fi
|
||||
|
||||
if [ -z "${KERNEL}" -a -z "${BASEREV}" ]; then
|
||||
git remote add -t linux-${BRANCH}.y linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
|
||||
fi
|
||||
|
||||
# Apply the following config change to reduce chance of duplicate hashes
|
||||
git config --local core.abbrev 40
|
||||
|
||||
git fetch --all --depth=${DEPTH} --no-tags
|
||||
git reset --hard origin/rpi-${BRANCH}.y${REBASE}
|
||||
|
||||
if [ -n "${BASEREV}" ]; then
|
||||
:
|
||||
elif [ -z "${KERNEL}" ]; then
|
||||
BASEREV="linux-stable/linux-${BRANCH}.y"
|
||||
KERNEL="$(git log --grep "Linux ${BRANCH}" --pretty=oneline | head -1 | awk '{ print $NF }')"
|
||||
else
|
||||
BASEREV="$(git log --grep "Linux ${KERNEL}" --pretty=oneline | head -1)"
|
||||
[ -z "${BASEREV}" ] && BASEREV="$(git log --grep "Linux v${KERNEL}" --pretty=oneline | head -1)"
|
||||
[ -z "${BASEREV}" ] && { echo "Unable to determine base revision for BRANCH=${BRANCH}, KERNEL=${KERNEL}"; exit 1; }
|
||||
|
||||
echo
|
||||
echo "FOUND BASE REV: ${BASEREV}"
|
||||
echo
|
||||
|
||||
BASEREV="${BASEREV%% *}"
|
||||
fi
|
||||
|
||||
GIT_SEQUENCE_EDITOR=${BIN}/rpi-linux-rebase.sh git rebase -Xours -i ${BASEREV}
|
||||
git format-patch --no-signature --stdout ${BASEREV} > /tmp/linux-01-RPi_support.patch
|
||||
|
||||
cd .. && rm -fr raspberrypi-linux
|
||||
|
||||
echo
|
||||
cat /tmp/dropped
|
||||
|
||||
echo
|
||||
echo "Dropped patches: /tmp/dropped"
|
||||
|
||||
LINE_START=$(grep -n '^DROP_COMMITS="$' ${BIN}/rpi-linux-rebase.sh | awk -F: '{print $1}')
|
||||
LINE_END=$(grep -n '^"$' ${BIN}/rpi-linux-rebase.sh | awk -F: '{print $1}')
|
||||
while read -r msg; do
|
||||
grep -qxE "drop [a-f0-9]{40} ${msg}$" /tmp/dropped || LINES+="${msg}\n"
|
||||
done <<< "$(sed -n "$((LINE_START + 1)),$((LINE_END - 1))p" ${BIN}/rpi-linux-rebase.sh | grep -v "^#### " | tr -d "\\\\")"
|
||||
|
||||
[ -n "${LINES}" ] && echo -e "*****\nThe following commits are no longer being dropped:\n\n${LINES}*****"
|
||||
|
||||
echo "New patch file : /tmp/linux-01-RPi_support.patch"
|
||||
|
||||
echo
|
||||
echo "## LibreELEC Update Notes ##"
|
||||
echo
|
||||
echo "cd LibreELEC.tv"
|
||||
echo "git checkout master"
|
||||
echo "git pull upstream master"
|
||||
echo "git checkout -b somebranch"
|
||||
|
||||
echo
|
||||
echo "cp /tmp/linux-01-RPi_support.patch projects/RPi/patches/linux/linux-01-RPi_support.patch"
|
||||
|
||||
echo
|
||||
echo "git commit -am \"RPi: update linux support patch for linux ${KERNEL:-${BRANCH}}\""
|
||||
|
||||
echo
|
@ -1,35 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Setup:
|
||||
# git clone -b rpi-4.4.y --depth=1000 --single-branch git@github.com:raspberrypi/linux.git raspberrypi-linux
|
||||
# git remote add -t linux-4.4.y linux-stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
|
||||
# git config --local core.abbrev 40
|
||||
# Update:
|
||||
# git fetch --all --depth=1000
|
||||
# git reset --hard origin/rpi-4.4.y
|
||||
# GIT_SEQUENCE_EDITOR=../rpi-linux-rebase.sh git rebase -i linux-stable/linux-4.4.y
|
||||
# git format-patch --no-signature --stdout linux-stable/linux-4.4.y > ../linux-01-RPi_support.patch
|
||||
|
||||
TODO=$1
|
||||
|
||||
# Drop commits not used
|
||||
DROP_COMMITS="
|
||||
Added Device IDs for August DVB-T 205
|
||||
net: Add non-mainline source for rtl8192cu wlan
|
||||
net: Fix rtl8192cu build errors on other platforms
|
||||
net: rtl8192cu: Normalize indentation
|
||||
net: rtl8192cu: Fix implicit fallthrough warnings
|
||||
ARM64: Fix build break for RTL8187\/RTL8192CU wifi
|
||||
Revert \"softirq: Let ksoftirqd do its job\"
|
||||
#### Following commits are dropped to avoid merge conflicts ####
|
||||
drm\/vc4: Release fence after signalling
|
||||
i2c: bcm2835: Set up the rising\/falling edge delays
|
||||
"
|
||||
|
||||
IFS=$'\n'
|
||||
for COMMIT in $DROP_COMMITS; do
|
||||
sed -i -E "s/^pick ([0-9a-f]+) (${COMMIT}.*)/drop \1 \2/g" $TODO
|
||||
done
|
||||
|
||||
grep -E "^drop " $TODO > /tmp/dropped
|
||||
sed -i -E "/^drop /d" $TODO
|
Loading…
x
Reference in New Issue
Block a user