Merge pull request #2176 from lrusak/imx-removal

imx6: temporarily remove project
This commit is contained in:
MilhouseVH 2017-11-08 02:42:01 +00:00 committed by GitHub
commit adfe87b0e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
102 changed files with 0 additions and 39631 deletions

View File

@ -1,20 +0,0 @@
# make boot more quiet
console_arg=quiet morequiet
# or having quiet and serial console
#console_arg=console=ttymxc0,115200 quiet morequiet
# show messages in serial console
#console_arg=console=ttymxc0,115200 no_console_suspend=1
# enable ssh
#ssh_arg=ssh
# enable debugging (kodi debug)
#debugging_arg=debugging
# enable gigabit speed instead of 100mbit
#enable_giga_arg=fec.disable_giga=0
zImage=/KERNEL
bootfile=/KERNEL
mmcargs=setenv bootargs "boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 ${ssh_arg} ${console_arg} ${debugging_arg} ${enable_giga_arg} video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 dmfc=3 consoleblank=0"
uenvcmd=if test -n $ethaddr; then true; else setenv ethaddr 1E:ED:19:27:1A:B2; fi

View File

@ -1,34 +0,0 @@
# enable only one video output
# HDMI
video=mxcfb0:dev=hdmi,1920x1080M@60,bpp=32
# 7" LVDS
#video=mxcfb0:dev=ldb,800x480M@60,if=RGB666,bpp=32
#fdt_file=imx6q-udoo-7lvds.dtb
#fdt_file=imx6dl-udoo-7lvds.dtb
# 15.6" LVDS
#video=mxcfb0:dev=ldb,1360x768M@60,if=RGB24,bpp=32
#fdt_file=imx6q-udoo-15lvds.dtb
#fdt_file=imx6dl-udoo-15lvds.dtb
# make boot more quiet
console_arg=quiet morequiet
# or having quiet and serial console
#console_arg=console=ttymxc0,115200 quiet morequiet
# show messages in serial console
#console_arg=console=ttymxc0,115200 no_console_suspend=1
# enable ssh
#ssh_arg=ssh
# enable debugging (kodi debug)
#debugging_arg=debugging
# enable gigabit speed instead of 100mbit
#enable_giga_arg=fec.disable_giga=0
zImage=/KERNEL
bootfile=/KERNEL
mmcargs=setenv bootargs boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 ${ssh_arg} ${console_arg} ${debugging_arg} ${enable_giga_arg} video=${video} dmfc=3 consoleblank=0

View File

@ -1,22 +0,0 @@
# make boot more quiet
console_arg=quiet morequiet
# or having quiet and serial console
#console_arg=console=ttymxc0,115200 quiet morequiet
# show messages in serial console
#console_arg=console=ttymxc0,115200 no_console_suspend=1
# enable ssh
#ssh_arg=ssh
# enable debugging (kodi debug)
#debugging_arg=debugging
# overwrite dtb file
#fdt_file=imx6q-cubox-i.dtb
# enable gigabit speed instead of 100mbit
#enable_giga_arg=fec.disable_giga=0
zImage=/KERNEL
bootfile=/KERNEL
mmcargs=setenv bootargs "boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 ${ssh_arg} ${console_arg} ${debugging_arg} ${enable_giga_arg} video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 dmfc=3 consoleblank=0"

View File

@ -1,15 +0,0 @@
[Unit]
Description=imx6 poweroff service
Before=systemd-poweroff.service
After=kodi-poweroff.service
DefaultDependencies=no
[Service]
Type=oneshot
Environment=HOME=/storage
ExecStart=-/bin/sh -c "echo 0 > /sys/class/leds/imx6\:red\:front/brightness; echo 1 > /sys/class/graphics/fb0/blank"
StandardError=null
RemainAfterExit=yes
[Install]
WantedBy=poweroff.target

View File

@ -1,23 +0,0 @@
[Unit]
Description=Debug Shell on /dev/ttymxc0
DefaultDependencies=no
ConditionKernelCommandLine=console=ttymxc0,115200
[Service]
WorkingDirectory=/storage
Environment="ENV=/etc/profile"
ExecStartPre=/bin/reset
ExecStart=/bin/sh
Restart=always
RestartSec=0
StandardInput=tty
TTYPath=/dev/ttymxc0
TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no
# bash ignores SIGTERM
KillSignal=SIGHUP
[Install]
WantedBy=sysinit.target

View File

@ -1,32 +0,0 @@
#
# Configuration for iMX6 HDMI output - /usr/share/alsa/cards/imx-hdmi-soc.conf
#
<confdir:pcm/hdmi.conf>
imx-hdmi-soc.pcm.hdmi.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD { type string }
@args.AES0 { type integer }
@args.AES1 { type integer }
@args.AES2 { type integer }
@args.AES3 { type integer }
type hooks
slave.pcm {
type hw
card $CARD
}
hooks.0 {
type ctl_elems
hook_args [
{
interface MIXER
name "IEC958 Playback Default"
lock true
preserve true
optional true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
]
}
}

View File

@ -1,15 +0,0 @@
#
# Configuration for iMX6 sgtl5000 analog output - /usr/share/alsa/cards/imx-sgtl5000.conf
#
<confdir:pcm/front.conf>
imx-sgtl5000.pcm.front.0 {
@args [ CARD ]
@args.CARD {
type string
}
type hw
card $CARD
device 0
}

View File

@ -1,32 +0,0 @@
#
# Configuration for iMX6 SPDIF output - /usr/share/alsa/cards/imx-spdif.conf
#
<confdir:pcm/iec958.conf>
imx-spdif.pcm.iec958.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD { type string }
@args.AES0 { type integer }
@args.AES1 { type integer }
@args.AES2 { type integer }
@args.AES3 { type integer }
type hooks
slave.pcm {
type hw
card $CARD
}
hooks.0 {
type ctl_elems
hook_args [
{
interface MIXER
name "IEC958 Playback Default"
lock true
preserve true
optional true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
]
}
}

View File

@ -1,15 +0,0 @@
#
# Configuration for iMX6 VT1613 analog output - /usr/share/alsa/cards/imx-vt1613-audio.conf
#
<confdir:pcm/front.conf>
imx-vt1613-audio.pcm.front.0 {
@args [ CARD ]
@args.CARD {
type string
}
type hw
card $CARD
device 0
}

View File

@ -1,15 +0,0 @@
rsi_91x.fw
f2255usb.bin
mts_mt9234mu.fw
mts_mt9234zba.fw
wil6210.brd
wil6210.fw
ti-connectivity/wl1251-fw.bin
ti-connectivity/wl1251-nvs.bin
ti-connectivity/wl12{7,8}x-fw-{4,5}{,-mr,-plt,-sr}.bin
ti-connectivity/wl1271-nvs.bin
mrvl/{sd,usb}*.bin

View File

@ -1,4 +0,0 @@
<advancedsettings>
<cputempcommand>cputemp</cputempcommand>
<gputempcommand>gputemp</gputempcommand>
</advancedsettings>

View File

@ -1,5 +0,0 @@
<settings>
<audiooutput>
<audiodevice>ALSA:hdmi:CARD=imxhdmisoc,DEV=0</audiodevice>
</audiooutput>
</settings>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,132 +0,0 @@
################################################################################
# setup system defaults
################################################################################
# The TARGET_CPU variable controls which processor should be targeted for
# generated code.
case $TARGET_ARCH in
arm)
TARGET_CPU="cortex-a9"
TARGET_FLOAT="hard"
TARGET_FPU="neon"
TARGET_FEATURES="32bit neon"
;;
esac
# Bootloader to use (syslinux / u-boot / bcm2835-bootloader)
BOOTLOADER="u-boot"
# u-boot version to use (default)
UBOOT_VERSION="imx6-cuboxi"
# Configuration for u-boot
UBOOT_CONFIG="mx6_cubox-i_config \
matrix"
# for second u-boot
UBOOT_CONFIG_V2="udoo_config \
tbs2910_config"
# Target Configfile for u-boot
UBOOT_CONFIGFILE=""
# Kernel target
KERNEL_TARGET="zImage"
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET="
imx6q-cubox-i.dtb imx6dl-cubox-i.dtb \
imx6q-cubox-i-som-v15.dtb imx6dl-cubox-i-som-v15.dtb \
imx6q-hummingboard.dtb imx6dl-hummingboard.dtb \
imx6q-hummingboard-som-v15.dtb imx6dl-hummingboard-som-v15.dtb \
imx6q-hummingboard2.dtb imx6dl-hummingboard2.dtb \
imx6q-hummingboard2-som-v15.dtb imx6dl-hummingboard2-som-v15.dtb \
imx6q-tbs2910.dtb \
imx6q-udoo.dtb imx6dl-udoo.dtb \
imx6q-udoo-7lvds.dtb imx6dl-udoo-7lvds.dtb \
imx6q-udoo-15lvds.dtb imx6dl-udoo-15lvds.dtb"
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD=""
# Kernel to use.
# default is 4.4 from xbian
if [ "$LINUX_VERSION" = "3.14-sr" ]; then
LINUX="imx6-$LINUX_VERSION"
# OpenGL-ES implementation to use
OPENGLES="imx-gpu-viv"
elif [ "$LINUX_VERSION" = "4.8-xbian" ]; then
LINUX="imx6-$LINUX_VERSION"
# OpenGL-ES implementation to use
OPENGLES="gpu-viv-bin-mx6q"
elif [ "$LINUX_VERSION" = "4.10-xbian" ]; then
LINUX="imx6-$LINUX_VERSION"
# OpenGL-ES implementation to use
OPENGLES="gpu-viv-bin-mx6q"
else
LINUX="imx6-4.4-xbian"
# OpenGL-ES implementation to use
OPENGLES="imx-gpu-viv"
fi
################################################################################
# setup build defaults
################################################################################
# Project CFLAGS
PROJECT_CFLAGS=""
# SquashFS compression method (gzip / lzo / xz)
SQUASHFS_COMPRESSION="lzo"
################################################################################
# setup project defaults
################################################################################
# build and install ALSA Audio support (yes / no)
ALSA_SUPPORT="yes"
# OpenGL(X) implementation to use (no / mesa)
OPENGL="no"
# include uvesafb support (yes / no)
UVESAFB_SUPPORT="no"
# Displayserver to use (x11 / no)
DISPLAYSERVER="no"
# Windowmanager to use (ratpoison / fluxbox / none)
WINDOWMANAGER="none"
# Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia)
# Space separated list is supported,
# e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeonsi nvidia"
GRAPHIC_DRIVERS=""
# KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)
KODIPLAYER_DRIVER="libfslvpuwrap"
# Modules to install in initramfs for early boot
INITRAMFS_MODULES=""
# additional drivers to install:
# for a list of additional drivers see packages/linux-drivers
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS"
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
# Space separated list is supported,
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
FIRMWARE="misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware-imx"
# build and install ATV IR remote support (yes / no)
ATVCLIENT_SUPPORT="no"
# build with installer (yes / no)
INSTALLER_SUPPORT="no"

View File

@ -1,40 +0,0 @@
diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index 2b92c93..f3722fb 100644
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -659,7 +659,7 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter)
struct wlan_network *cur_network = &(pmlmepriv->cur_network);
struct wireless_dev *pwdev = padapter->rtw_wdev;
struct cfg80211_bss *bss = NULL;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
struct wiphy *wiphy = pwdev->wiphy;
int freq = 2412;
struct ieee80211_channel *notify_channel;
@@ -667,7 +667,7 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter)
DBG_871X(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
freq = rtw_ch2freq(cur_network->network.Configuration.DSConfig);
if (0)
@@ -723,7 +723,7 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter)
DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" BSS not found !!\n", FUNC_ADPT_ARG(padapter));
}
//notify cfg80211 that device joined an IBSS
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
notify_channel = ieee80211_get_channel(wiphy, freq);
cfg80211_ibss_joined(padapter->pnetdev, cur_network->network.MacAddress, notify_channel, GFP_ATOMIC);
#else
@@ -5739,7 +5739,7 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy,
u8 action_code,
u8 dialog_token,
u16 status_code,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
u32 peer_capability,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0))

View File

@ -1,40 +0,0 @@
diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index 5895645..e09b7c3 100644
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -613,7 +613,7 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter)
struct wlan_network *cur_network = &(pmlmepriv->cur_network);
struct wireless_dev *pwdev = padapter->rtw_wdev;
struct cfg80211_bss *bss = NULL;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
struct wiphy *wiphy = pwdev->wiphy;
int freq = 2412;
struct ieee80211_channel *notify_channel;
@@ -621,7 +621,7 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter)
RTW_INFO(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
freq = rtw_ch2freq(cur_network->network.Configuration.DSConfig);
if (0)
@@ -669,7 +669,7 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter)
RTW_PRINT(FUNC_ADPT_FMT" BSS not found !!\n", FUNC_ADPT_ARG(padapter));
}
/* notify cfg80211 that device joined an IBSS */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
notify_channel = ieee80211_get_channel(wiphy, freq);
cfg80211_ibss_joined(padapter->pnetdev, cur_network->network.MacAddress, notify_channel, GFP_ATOMIC);
#else
@@ -5512,7 +5512,7 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy,
u8 action_code,
u8 dialog_token,
u16 status_code,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
u32 peer_capability,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0))

View File

@ -1,13 +0,0 @@
diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
index 18a920f..cbe7e42 100644
--- a/src/conf/cards/aliases.conf
+++ b/src/conf/cards/aliases.conf
@@ -2,6 +2,8 @@
# Define aliases for various drivers
#
+'On-board_SPDIF' cards.imx-spdif
+'Integrated_SPDI' cards.imx-spdif
YMF724 cards.YMF744
YMF724F cards.YMF744
YMF740 cards.YMF744

View File

@ -1,743 +0,0 @@
From e9d9bfee5506a7b00312f62722009a0194f81dfd Mon Sep 17 00:00:00 2001
From: Peter Vicman <peter.vicman@gmail.com>
Date: Sat, 3 Dec 2016 13:53:30 +0100
Subject: [PATCH] patch for libcec from openbricks
libcec base: libcec-209884d
libcec openbricks:
https://github.com/warped-rudi/libcec/tree/libcec4-imx 47e1d6aba475616fc267aa0c2097949b55cfdedc
---
include/cectypes.h | 11 +
src/libcec/CECTypeUtils.h | 2 +
src/libcec/CMakeLists.txt | 2 +
src/libcec/adapter/AdapterFactory.cpp | 28 +-
.../adapter/IMX/IMXCECAdapterCommunication.cpp | 321 +++++++++++++++++++++
.../adapter/IMX/IMXCECAdapterCommunication.h | 115 ++++++++
src/libcec/adapter/IMX/IMXCECAdapterDetection.cpp | 42 +++
src/libcec/adapter/IMX/IMXCECAdapterDetection.h | 36 +++
src/libcec/cmake/CheckPlatformSupport.cmake | 13 +
src/libcec/cmake/DisplayPlatformSupport.cmake | 10 +-
src/libcec/env.h.in | 3 +
11 files changed, 579 insertions(+), 4 deletions(-)
create mode 100644 src/libcec/adapter/IMX/IMXCECAdapterCommunication.cpp
create mode 100644 src/libcec/adapter/IMX/IMXCECAdapterCommunication.h
create mode 100644 src/libcec/adapter/IMX/IMXCECAdapterDetection.cpp
create mode 100644 src/libcec/adapter/IMX/IMXCECAdapterDetection.h
diff --git a/include/cectypes.h b/include/cectypes.h
index 9c91842..68e90e0 100644
--- a/include/cectypes.h
+++ b/include/cectypes.h
@@ -292,6 +292,16 @@ namespace CEC {
#define CEC_AOCEC_VIRTUAL_COM "AOCEC"
/*!
+ * the path to use for the i.MX CEC wire
+ */
+#define CEC_IMX_PATH "/dev/mxc_hdmi_cec"
+
+/*!
+ * the name of the virtual COM port to use for the i.MX CEC wire
+ */
+#define CEC_IMX_VIRTUAL_COM "i.MX"
+
+/*!
* Mimimum client version
*/
#define CEC_MIN_LIB_VERSION 4
@@ -861,6 +871,7 @@ typedef enum cec_adapter_type
ADAPTERTYPE_RPI = 0x100,
ADAPTERTYPE_TDA995x = 0x200,
ADAPTERTYPE_EXYNOS = 0x300,
+ ADAPTERTYPE_IMX = 0x400,
ADAPTERTYPE_AOCEC = 0x500
} cec_adapter_type;
diff --git a/src/libcec/CECTypeUtils.h b/src/libcec/CECTypeUtils.h
index 0d0cf17..f6c818a 100644
--- a/src/libcec/CECTypeUtils.h
+++ b/src/libcec/CECTypeUtils.h
@@ -766,6 +766,8 @@ namespace CEC
return "Raspberry Pi";
case ADAPTERTYPE_TDA995x:
return "TDA995x";
+ case ADAPTERTYPE_IMX:
+ return "i.MX";
default:
return "unknown";
}
diff --git a/src/libcec/CMakeLists.txt b/src/libcec/CMakeLists.txt
index d3eefa3..a8fb9d0 100644
--- a/src/libcec/CMakeLists.txt
+++ b/src/libcec/CMakeLists.txt
@@ -103,6 +103,8 @@ set(CEC_HEADERS devices/CECRecordingDevice.h
adapter/RPi/RPiCECAdapterMessageQueue.h
adapter/RPi/RPiCECAdapterCommunication.h
adapter/RPi/RPiCECAdapterDetection.h
+ adapter/IMX/IMXCECAdapterCommunication.h
+ adapter/IMX/IMXCECAdapterDetection.h
CECInputBuffer.h
platform/util/baudrate.h
platform/util/edid.h
diff --git a/src/libcec/adapter/AdapterFactory.cpp b/src/libcec/adapter/AdapterFactory.cpp
index 1e946e6..045c93e 100644
--- a/src/libcec/adapter/AdapterFactory.cpp
+++ b/src/libcec/adapter/AdapterFactory.cpp
@@ -63,6 +63,11 @@
#include "AOCEC/AOCECAdapterCommunication.h"
#endif
+#if defined(HAVE_IMX_API)
+#include "IMX/IMXCECAdapterDetection.h"
+#include "IMX/IMXCECAdapterCommunication.h"
+#endif
+
using namespace CEC;
int8_t CAdapterFactory::FindAdapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */)
@@ -143,8 +148,21 @@ int8_t CAdapterFactory::DetectAdapters(cec_adapter_descriptor *deviceList, uint8
}
#endif
+#if defined(HAVE_IMX_API)
+ if (iAdaptersFound < iBufSize && CIMXCECAdapterDetection::FindAdapter() &&
+ (!strDevicePath || !strcmp(strDevicePath, CEC_IMX_VIRTUAL_COM)))
+ {
+ snprintf(deviceList[iAdaptersFound].strComPath, sizeof(deviceList[iAdaptersFound].strComPath), CEC_IMX_PATH);
+ snprintf(deviceList[iAdaptersFound].strComName, sizeof(deviceList[iAdaptersFound].strComName), CEC_IMX_VIRTUAL_COM);
+ deviceList[iAdaptersFound].iVendorId = IMX_ADAPTER_VID;
+ deviceList[iAdaptersFound].iProductId = IMX_ADAPTER_PID;
+ deviceList[iAdaptersFound].adapterType = ADAPTERTYPE_IMX;
+ iAdaptersFound++;
+ }
+#endif
-#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_AOCEC_API)
+#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && \
+ !defined(HAVE_EXYNOS_API) && !defined(HAVE_AOCEC_API) && !defined(HAVE_IMX_API)
#error "libCEC doesn't have support for any type of adapter. please check your build system or configuration"
#endif
@@ -173,11 +191,17 @@ IAdapterCommunication *CAdapterFactory::GetInstance(const char *strPort, uint16_
return new CRPiCECAdapterCommunication(m_lib->m_cec);
#endif
+#if defined(HAVE_IMX_API)
+ if (!strcmp(strPort, CEC_IMX_VIRTUAL_COM))
+ return new CIMXCECAdapterCommunication(m_lib->m_cec);
+#endif
+
#if defined(HAVE_P8_USB)
return new CUSBCECAdapterCommunication(m_lib->m_cec, strPort, iBaudRate);
#endif
-#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_EXYNOS_API) && !defined(HAVE_AOCEC_API)
+#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && \
+ !defined(HAVE_EXYNOS_API) && !defined(HAVE_AOCEC_API) && !defined(HAVE_IMX_API)
return NULL;
#endif
}
diff --git a/src/libcec/adapter/IMX/IMXCECAdapterCommunication.cpp b/src/libcec/adapter/IMX/IMXCECAdapterCommunication.cpp
new file mode 100644
index 0000000..f433b03
--- /dev/null
+++ b/src/libcec/adapter/IMX/IMXCECAdapterCommunication.cpp
@@ -0,0 +1,321 @@
+/*
+ * This file is part of the libCEC(R) library.
+ *
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
+ * libCEC(R) is an original work, containing original code.
+ *
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
+ *
+ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin
+ *
+ * You can redistribute this file 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ */
+
+#include "env.h"
+
+#if defined(HAVE_IMX_API)
+#include "IMXCECAdapterCommunication.h"
+
+#include "p8-platform/sockets/cdevsocket.h"
+#include "CECTypeUtils.h"
+#include "LibCEC.h"
+
+/*
+ * Ioctl definitions from kernel header
+ */
+#define HDMICEC_IOC_MAGIC 'H'
+#define HDMICEC_IOC_SETLOGICALADDRESS _IOW(HDMICEC_IOC_MAGIC, 1, unsigned char)
+#define HDMICEC_IOC_STARTDEVICE _IO(HDMICEC_IOC_MAGIC, 2)
+#define HDMICEC_IOC_STOPDEVICE _IO(HDMICEC_IOC_MAGIC, 3)
+#define HDMICEC_IOC_GETPHYADDRESS _IOR(HDMICEC_IOC_MAGIC, 4, unsigned char[4])
+
+#define MAX_CEC_MESSAGE_LEN 17
+
+#define MESSAGE_TYPE_RECEIVE_SUCCESS 1
+#define MESSAGE_TYPE_NOACK 2
+#define MESSAGE_TYPE_DISCONNECTED 3
+#define MESSAGE_TYPE_CONNECTED 4
+#define MESSAGE_TYPE_SEND_SUCCESS 5
+
+typedef struct hdmi_cec_event{
+ int event_type;
+ int msg_len;
+ unsigned char msg[MAX_CEC_MESSAGE_LEN];
+}hdmi_cec_event;
+
+
+using namespace std;
+using namespace CEC;
+using namespace P8PLATFORM;
+
+#define LIB_CEC m_callback->GetLib()
+
+// these are defined in nxp private header file
+#define CEC_MSG_SUCCESS 0x00 /*Message transmisson Succeed*/
+#define CEC_CSP_OFF_STATE 0x80 /*CSP in Off State*/
+#define CEC_BAD_REQ_SERVICE 0x81 /*Bad .req service*/
+#define CEC_MSG_FAIL_UNABLE_TO_ACCESS 0x82 /*Message transmisson failed: Unable to access CEC line*/
+#define CEC_MSG_FAIL_ARBITRATION_ERROR 0x83 /*Message transmisson failed: Arbitration error*/
+#define CEC_MSG_FAIL_BIT_TIMMING_ERROR 0x84 /*Message transmisson failed: Bit timming error*/
+#define CEC_MSG_FAIL_DEST_NOT_ACK 0x85 /*Message transmisson failed: Destination Address not aknowledged*/
+#define CEC_MSG_FAIL_DATA_NOT_ACK 0x86 /*Message transmisson failed: Databyte not acknowledged*/
+
+
+CIMXCECAdapterCommunication::CIMXCECAdapterCommunication(IAdapterCommunicationCallback *callback) :
+ IAdapterCommunication(callback)
+{
+ CLockObject lock(m_mutex);
+
+ m_iNextMessage = 0;
+ m_logicalAddress = CECDEVICE_UNKNOWN;
+ m_bLogicalAddressRegistered = false;
+ m_bInitialised = false;
+ m_dev = new CCDevSocket(CEC_IMX_PATH);
+}
+
+CIMXCECAdapterCommunication::~CIMXCECAdapterCommunication(void)
+{
+ Close();
+
+ CLockObject lock(m_mutex);
+ delete m_dev;
+ m_dev = 0;
+}
+
+bool CIMXCECAdapterCommunication::IsOpen(void)
+{
+ return IsInitialised() && m_dev->IsOpen();
+}
+
+bool CIMXCECAdapterCommunication::Open(uint32_t iTimeoutMs, bool UNUSED(bSkipChecks), bool bStartListening)
+{
+ if (m_dev->Open(iTimeoutMs))
+ {
+ if (!bStartListening || CreateThread()) {
+ if (m_dev->Ioctl(HDMICEC_IOC_STARTDEVICE, NULL) == 0) {
+ m_bInitialised = true;
+ return true;
+ }
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: Unable to start device\n", __func__);
+ }
+ m_dev->Close();
+ }
+
+ return false;
+}
+
+
+void CIMXCECAdapterCommunication::Close(void)
+{
+ StopThread(0);
+
+ CLockObject lock(m_mutex);
+ if (!m_bInitialised) {
+ return;
+ }
+ if (m_dev->Ioctl(HDMICEC_IOC_STOPDEVICE, NULL) != 0) {
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: Unable to stop device\n", __func__);
+ }
+ m_dev->Close();
+ m_bInitialised = false;
+}
+
+
+std::string CIMXCECAdapterCommunication::GetError(void) const
+{
+ std::string strError(m_strError);
+ return strError;
+}
+
+
+cec_adapter_message_state CIMXCECAdapterCommunication::Write(
+ const cec_command &data, bool &UNUSED(bRetry), uint8_t UNUSED(iLineTimeout), bool UNUSED(bIsReply))
+{
+ int error, msg_len = 1;
+ unsigned char message[MAX_CEC_MESSAGE_LEN];
+
+ if ((size_t)data.parameters.size + data.opcode_set + 1 > sizeof(message))
+ {
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: data size too large !", __func__);
+ return ADAPTER_MESSAGE_STATE_ERROR;
+ }
+
+ message[0] = (data.initiator << 4) | (data.destination & 0x0f);
+ if (data.opcode_set)
+ {
+ message[1] = data.opcode;
+ msg_len++;
+ memcpy(&message[2], data.parameters.data, data.parameters.size);
+ msg_len+=data.parameters.size;
+ }
+
+ if (m_dev->Write(message, msg_len) == msg_len)
+ return ADAPTER_MESSAGE_STATE_SENT_ACKED;
+
+ error = m_dev->GetErrorNumber();
+ if (error == EIO)
+ return ADAPTER_MESSAGE_STATE_SENT_NOT_ACKED;
+
+ if (error != EAGAIN)
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: write error %d", __func__, error);
+
+ return ADAPTER_MESSAGE_STATE_ERROR;
+}
+
+
+uint16_t CIMXCECAdapterCommunication::GetFirmwareVersion(void)
+{
+ /* FIXME add ioctl ? */
+ return 1;
+}
+
+
+cec_vendor_id CIMXCECAdapterCommunication::GetVendorId(void)
+{
+ return CEC_VENDOR_UNKNOWN;
+}
+
+
+uint16_t CIMXCECAdapterCommunication::GetPhysicalAddress(void)
+{
+ uint32_t info;
+ uint16_t phy_addr;
+
+ if (m_dev->Ioctl(HDMICEC_IOC_GETPHYADDRESS, &info) != 0)
+ {
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: HDMICEC_IOC_GETPHYADDRESS failed !", __func__);
+ return CEC_INVALID_PHYSICAL_ADDRESS;
+ }
+ /* Rebuild 16 bit raw value from fsl 32 bits value */
+ phy_addr = ((info & 0x0f) << 12) | (info & 0x0f00) |
+ ((info & 0x0f0000) >> 12) | ((info & 0x0f000000) >> 24);
+
+ return phy_addr;
+}
+
+
+cec_logical_addresses CIMXCECAdapterCommunication::GetLogicalAddresses(void)
+{
+ cec_logical_addresses addresses;
+ addresses.Clear();
+
+ CLockObject lock(m_mutex);
+ if ((m_logicalAddress & (CECDEVICE_UNKNOWN | CECDEVICE_UNREGISTERED)) == 0)
+ addresses.Set(m_logicalAddress);
+
+ return addresses;
+}
+
+void CIMXCECAdapterCommunication::HandleLogicalAddressLost(cec_logical_address UNUSED(oldAddress))
+{
+ UnregisterLogicalAddress();
+}
+
+bool CIMXCECAdapterCommunication::UnregisterLogicalAddress(void)
+{
+ CLockObject lock(m_mutex);
+ if (!m_bLogicalAddressRegistered)
+ return true;
+
+ if (m_dev->Ioctl(HDMICEC_IOC_SETLOGICALADDRESS, (void *)CECDEVICE_BROADCAST) != 0)
+ {
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: HDMICEC_IOC_SETLOGICALADDRESS failed !", __func__);
+ return false;
+ }
+
+ m_logicalAddress = CECDEVICE_UNKNOWN;
+ m_bLogicalAddressRegistered = false;
+ return true;
+}
+
+bool CIMXCECAdapterCommunication::RegisterLogicalAddress(const cec_logical_address address)
+{
+ CLockObject lock(m_mutex);
+
+ if (m_logicalAddress == address && m_bLogicalAddressRegistered)
+ {
+ return true;
+ }
+
+ if (m_dev->Ioctl(HDMICEC_IOC_SETLOGICALADDRESS, (void *)address) != 0)
+ {
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: HDMICEC_IOC_SETLOGICALADDRESS failed !", __func__);
+ return false;
+ }
+
+ m_logicalAddress = address;
+ m_bLogicalAddressRegistered = true;
+ return true;
+}
+
+bool CIMXCECAdapterCommunication::SetLogicalAddresses(const cec_logical_addresses &addresses)
+{
+ int log_addr = addresses.primary;
+
+ return RegisterLogicalAddress((cec_logical_address)log_addr);
+}
+
+void *CIMXCECAdapterCommunication::Process(void)
+{
+ hdmi_cec_event event;
+ int ret;
+
+ cec_logical_address initiator, destination;
+
+ while (!IsStopped())
+ {
+ ret = m_dev->Read((char *)&event, sizeof(event), 1000);
+ if (ret > 0)
+ {
+
+ initiator = cec_logical_address(event.msg[0] >> 4);
+ destination = cec_logical_address(event.msg[0] & 0x0f);
+
+ //LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s: Read data : type : %d initiator %d dest %d", __func__, event.event_type, initiator, destination);
+ if (event.event_type == MESSAGE_TYPE_RECEIVE_SUCCESS)
+ /* Message received */
+ {
+ cec_command cmd;
+
+ cec_command::Format(
+ cmd, initiator, destination,
+ ( event.msg_len > 1 ) ? cec_opcode(event.msg[1]) : CEC_OPCODE_NONE);
+
+ for( uint8_t i = 2; i < event.msg_len; i++ )
+ cmd.parameters.PushBack(event.msg[i]);
+
+ if (!IsStopped())
+ m_callback->OnCommandReceived(cmd);
+ }
+
+ if (event.event_type == MESSAGE_TYPE_CONNECTED)
+ /* HDMI has just been reconnected - Notify phy address*/
+ {
+ uint16_t iNewAddress = GetPhysicalAddress();
+ m_callback->HandlePhysicalAddressChanged(iNewAddress);
+ }
+ /* We are not interested in other events */
+ } /*else {
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s: Read returned %d", __func__, ret);
+ }*/
+
+ }
+
+ return 0;
+}
+
+#endif // HAVE_IMX_API
diff --git a/src/libcec/adapter/IMX/IMXCECAdapterCommunication.h b/src/libcec/adapter/IMX/IMXCECAdapterCommunication.h
new file mode 100644
index 0000000..7862656
--- /dev/null
+++ b/src/libcec/adapter/IMX/IMXCECAdapterCommunication.h
@@ -0,0 +1,115 @@
+#pragma once
+/*
+ * This file is part of the libCEC(R) library.
+ *
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
+ * libCEC(R) is an original work, containing original code.
+ *
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
+ *
+ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin
+ *
+ * You can redistribute this file 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ */
+
+#if defined(HAVE_IMX_API)
+
+#include "p8-platform/threads/mutex.h"
+#include "p8-platform/threads/threads.h"
+#include "p8-platform/sockets/socket.h"
+#include "adapter/AdapterCommunication.h"
+#include <map>
+
+#define IMX_ADAPTER_VID 0x0471 /*FIXME TBD*/
+#define IMX_ADAPTER_PID 0x1001
+
+
+
+namespace P8PLATFORM
+{
+ class CCDevSocket;
+};
+
+
+namespace CEC
+{
+ class CIMXCECAdapterCommunication : public IAdapterCommunication, public P8PLATFORM::CThread
+ {
+ public:
+ /*!
+ * @brief Create a new USB-CEC communication handler.
+ * @param callback The callback to use for incoming CEC commands.
+ */
+ CIMXCECAdapterCommunication(IAdapterCommunicationCallback *callback);
+ virtual ~CIMXCECAdapterCommunication(void);
+
+ /** @name IAdapterCommunication implementation */
+ ///{
+ bool Open(uint32_t iTimeoutMs = CEC_DEFAULT_CONNECT_TIMEOUT, bool bSkipChecks = false, bool bStartListening = true);
+ void Close(void);
+ bool IsOpen(void);
+ std::string GetError(void) const;
+ cec_adapter_message_state Write(const cec_command &data, bool &bRetry, uint8_t iLineTimeout, bool bIsReply);
+
+ bool SetLineTimeout(uint8_t UNUSED(iTimeout)) { return true; }
+ bool StartBootloader(void) { return false; }
+ bool SetLogicalAddresses(const cec_logical_addresses &addresses);
+ cec_logical_addresses GetLogicalAddresses(void);
+ bool PingAdapter(void) { return IsInitialised(); }
+ uint16_t GetFirmwareVersion(void);
+ uint32_t GetFirmwareBuildDate(void) { return 0; }
+ bool IsRunningLatestFirmware(void) { return true; }
+ bool PersistConfiguration(const libcec_configuration & UNUSED(configuration)) { return false; }
+ bool GetConfiguration(libcec_configuration & UNUSED(configuration)) { return false; }
+ std::string GetPortName(void) { return std::string("IMX"); }
+ uint16_t GetPhysicalAddress(void);
+ bool SetControlledMode(bool UNUSED(controlled)) { return true; }
+ cec_vendor_id GetVendorId(void);
+ bool SupportsSourceLogicalAddress(const cec_logical_address address) { return address > CECDEVICE_TV && address <= CECDEVICE_BROADCAST; }
+ cec_adapter_type GetAdapterType(void) { return ADAPTERTYPE_IMX; }
+ uint16_t GetAdapterVendorId(void) const { return IMX_ADAPTER_VID; }
+ uint16_t GetAdapterProductId(void) const { return IMX_ADAPTER_PID; }
+ void HandleLogicalAddressLost(cec_logical_address UNUSED(oldAddress));
+ void SetActiveSource(bool UNUSED(bSetTo), bool UNUSED(bClientUnregistered)) {}
+ bool RegisterLogicalAddress(const cec_logical_address address);
+ ///}
+
+ /** @name P8PLATFORM::CThread implementation */
+ ///{
+ void *Process(void);
+ ///}
+
+ private:
+ bool IsInitialised(void) const { return m_bInitialised; };
+ bool UnregisterLogicalAddress(void);
+
+ std::string m_strError; /**< current error message */
+
+ cec_logical_address m_logicalAddress;
+
+ P8PLATFORM::CMutex m_mutex;
+ P8PLATFORM::CCDevSocket *m_dev; /**< the device connection */
+ bool m_bLogicalAddressRegistered;
+ bool m_bInitialised;
+
+ P8PLATFORM::CMutex m_messageMutex;
+ uint32_t m_iNextMessage;
+ };
+
+};
+
+#endif
diff --git a/src/libcec/adapter/IMX/IMXCECAdapterDetection.cpp b/src/libcec/adapter/IMX/IMXCECAdapterDetection.cpp
new file mode 100644
index 0000000..dc4dca0
--- /dev/null
+++ b/src/libcec/adapter/IMX/IMXCECAdapterDetection.cpp
@@ -0,0 +1,42 @@
+/*
+ * This file is part of the libCEC(R) library.
+ *
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
+ * libCEC(R) is an original work, containing original code.
+ *
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
+ *
+ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin
+ *
+ * You can redistribute this file 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ */
+
+#include "env.h"
+#include <stdio.h>
+
+#if defined(HAVE_IMX_API)
+#include "IMXCECAdapterDetection.h"
+
+
+using namespace CEC;
+
+bool CIMXCECAdapterDetection::FindAdapter(void)
+{
+ return access(CEC_IMX_PATH, 0) == 0;
+}
+
+#endif
diff --git a/src/libcec/adapter/IMX/IMXCECAdapterDetection.h b/src/libcec/adapter/IMX/IMXCECAdapterDetection.h
new file mode 100644
index 0000000..14af8d8
--- /dev/null
+++ b/src/libcec/adapter/IMX/IMXCECAdapterDetection.h
@@ -0,0 +1,36 @@
+#pragma once
+/*
+ * This file is part of the libCEC(R) library.
+ *
+ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved.
+ * libCEC(R) is an original work, containing original code.
+ *
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
+ *
+ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin
+ *
+ * You can redistribute this file 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ */
+
+namespace CEC
+{
+ class CIMXCECAdapterDetection
+ {
+ public:
+ static bool FindAdapter(void);
+ };
+}
diff --git a/src/libcec/cmake/CheckPlatformSupport.cmake b/src/libcec/cmake/CheckPlatformSupport.cmake
index 532f213..4ef5d75 100644
--- a/src/libcec/cmake/CheckPlatformSupport.cmake
+++ b/src/libcec/cmake/CheckPlatformSupport.cmake
@@ -10,6 +10,7 @@
# HAVE_TDA995X_API ON if TDA995X is supported
# HAVE_EXYNOS_API ON if Exynos is supported
# HAVE_AOCEC_API ON if AOCEC is supported
+# HAVE_IMX_API ON if iMX.6 is supported
# HAVE_P8_USB ON if Pulse-Eight devices are supported
# HAVE_P8_USB_DETECT ON if Pulse-Eight devices can be auto-detected
# HAVE_DRM_EDID_PARSER ON if DRM EDID parsing is supported
@@ -148,6 +149,18 @@ else()
else()
set(HAVE_AOCEC_API 0)
endif()
+
+ # i.MX6
+ if (${HAVE_IMX_API})
+ set(LIB_INFO "${LIB_INFO}, 'i.MX6'")
+ set(HAVE_IMX_API 1)
+ set(CEC_SOURCES_ADAPTER_IMX adapter/IMX/IMXCECAdapterCommunication.cpp
+ adapter/IMX/IMXCECAdapterDetection.cpp)
+ source_group("Source Files\\adapter\\IMX" FILES ${CEC_SOURCES_ADAPTER_IMX})
+ list(APPEND CEC_SOURCES ${CEC_SOURCES_ADAPTER_IMX})
+ else()
+ set(HAVE_IMX_API 0)
+ endif()
endif()
# rt
diff --git a/src/libcec/cmake/DisplayPlatformSupport.cmake b/src/libcec/cmake/DisplayPlatformSupport.cmake
index 7ec10f5..2262638 100644
--- a/src/libcec/cmake/DisplayPlatformSupport.cmake
+++ b/src/libcec/cmake/DisplayPlatformSupport.cmake
@@ -50,6 +50,12 @@ else()
message(STATUS "AOCEC support: no")
endif()
+if (HAVE_IMX_API)
+ message(STATUS "i.MX6 support: yes")
+else()
+ message(STATUS "i.MX6 support: no")
+ endif()
+
if (HAVE_PYTHON)
message(STATUS "Python support: version ${PYTHONLIBS_VERSION_STRING} (${PYTHON_VERSION})")
else()
diff --git a/src/libcec/env.h.in b/src/libcec/env.h.in
index fe6c83d..e96bcd5 100644
--- a/src/libcec/env.h.in
+++ b/src/libcec/env.h.in
@@ -73,6 +73,9 @@
/* Define to 1 for TDA995x support */
#cmakedefine HAVE_TDA995X_API @HAVE_TDA995X_API@
+/* Define to 1 for IMX support */
+#cmakedefine HAVE_IMX_API @HAVE_IMX_API@
+
/* Define to 1 for Exynos support */
#cmakedefine HAVE_EXYNOS_API @HAVE_EXYNOS_API@
--
2.7.1

View File

@ -1,52 +0,0 @@
From aeea3592a13bf12861943e44fc48f1f270941f8d Mon Sep 17 00:00:00 2001
From: Behan Webster <behanw@converseincode.com>
Date: Wed, 24 Sep 2014 01:06:46 +0100
Subject: ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
With compilers which follow the C99 standard (like modern versions of gcc and
clang), "extern inline" does the wrong thing (emits code for an externally
linkable version of the inline function). In this case using static inline
and removing the NULL version of return_address in return_address.c does
the right thing.
Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/include/asm/ftrace.h | 2 +-
arch/arm/kernel/return_address.c | 5 -----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index 39eb16b..bfe2a2f 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -45,7 +45,7 @@ void *return_address(unsigned int);
#else
-extern inline void *return_address(unsigned int level)
+static inline void *return_address(unsigned int level)
{
return NULL;
}
diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
index fafedd8..f6aa84d 100644
--- a/arch/arm/kernel/return_address.c
+++ b/arch/arm/kernel/return_address.c
@@ -63,11 +63,6 @@ void *return_address(unsigned int level)
#warning "TODO: return_address should use unwind tables"
#endif
-void *return_address(unsigned int level)
-{
- return NULL;
-}
-
#endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
EXPORT_SYMBOL_GPL(return_address);
--
cgit v0.11.2

View File

@ -1,59 +0,0 @@
From a2561791169351cbf1ac5ca0c4299a0eef7eca65 Mon Sep 17 00:00:00 2001
From: Behan Webster <behanw@converseincode.com>
Date: Tue, 3 Sep 2013 22:27:26 -0400
Subject: [PATCH] ARM: LLVMLinux: Change "extern inline" to "static inline" in
glue-cache.h
With compilers which follow the C99 standard (like modern versions of gcc and
clang), "extern inline" does the wrong thing (emits code for an externally
linkable version of the inline function). "static inline" is the correct choice
instead.
Author: Behan Webster <behanw@converseincode.com>
Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
---
arch/arm/include/asm/glue-cache.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h
index c81adc0..a3c24cd 100644
--- a/arch/arm/include/asm/glue-cache.h
+++ b/arch/arm/include/asm/glue-cache.h
@@ -130,22 +130,22 @@
#endif
#ifndef __ASSEMBLER__
-extern inline void nop_flush_icache_all(void) { }
-extern inline void nop_flush_kern_cache_all(void) { }
-extern inline void nop_flush_kern_cache_louis(void) { }
-extern inline void nop_flush_user_cache_all(void) { }
-extern inline void nop_flush_user_cache_range(unsigned long a,
+static inline void nop_flush_icache_all(void) { }
+static inline void nop_flush_kern_cache_all(void) { }
+static inline void nop_flush_kern_cache_louis(void) { }
+static inline void nop_flush_user_cache_all(void) { }
+static inline void nop_flush_user_cache_range(unsigned long a,
unsigned long b, unsigned int c) { }
-extern inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { }
-extern inline int nop_coherent_user_range(unsigned long a,
+static inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { }
+static inline int nop_coherent_user_range(unsigned long a,
unsigned long b) { return 0; }
-extern inline void nop_flush_kern_dcache_area(void *a, size_t s) { }
+static inline void nop_flush_kern_dcache_area(void *a, size_t s) { }
-extern inline void nop_dma_flush_range(const void *a, const void *b) { }
+static inline void nop_dma_flush_range(const void *a, const void *b) { }
-extern inline void nop_dma_map_area(const void *s, size_t l, int f) { }
-extern inline void nop_dma_unmap_area(const void *s, size_t l, int f) { }
+static inline void nop_dma_map_area(const void *s, size_t l, int f) { }
+static inline void nop_dma_unmap_area(const void *s, size_t l, int f) { }
#endif
#ifndef MULTI_CACHE
--
2.1.4

View File

@ -1,67 +0,0 @@
From 99069dc5c3343339c31337cdc5175b2b527395cb Mon Sep 17 00:00:00 2001
From: Peter Vicman <peter.vicman@gmail.com>
Date: Fri, 31 Mar 2017 19:02:34 +0200
Subject: [PATCH] rename sgtl5000 codec
---
arch/arm/boot/dts/imx6qdl-hummingboard-som-v15.dtsi | 2 +-
arch/arm/boot/dts/imx6qdl-hummingboard.dtsi | 2 +-
arch/arm/boot/dts/imx6qdl-hummingboard2-som-v15.dtsi | 2 +-
arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard-som-v15.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard-som-v15.dtsi
index 4efdb27..f889904 100644
--- a/arch/arm/boot/dts/imx6qdl-hummingboard-som-v15.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard-som-v15.dtsi
@@ -135,7 +135,7 @@
"Mic Jack", "Mic Bias",
"Headphone Jack", "HP_OUT";
compatible = "fsl,imx-audio-sgtl5000";
- model = "On-board Codec";
+ model = "imx-sgtl5000";
mux-ext-port = <5>;
mux-int-port = <1>;
cpu-dai = <&ssi1>;
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
index b58db39..80b376c 100644
--- a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
@@ -135,7 +135,7 @@
"Mic Jack", "Mic Bias",
"Headphone Jack", "HP_OUT";
compatible = "fsl,imx-audio-sgtl5000";
- model = "On-board Codec";
+ model = "imx-sgtl5000";
mux-ext-port = <5>;
mux-int-port = <1>;
cpu-dai = <&ssi1>;
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2-som-v15.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2-som-v15.dtsi
index 76ecfa2..6cb5aab 100644
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2-som-v15.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2-som-v15.dtsi
@@ -168,7 +168,7 @@
"Mic Jack", "Mic Bias",
"Headphone Jack", "HP_OUT";
compatible = "fsl,imx-audio-sgtl5000";
- model = "On-board Codec";
+ model = "imx-sgtl5000";
mux-ext-port = <5>;
mux-int-port = <1>;
cpu-dai = <&ssi1>;
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
index eb9f3c9..fcfc87c 100644
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
@@ -168,7 +168,7 @@
"Mic Jack", "Mic Bias",
"Headphone Jack", "HP_OUT";
compatible = "fsl,imx-audio-sgtl5000";
- model = "On-board Codec";
+ model = "imx-sgtl5000";
mux-ext-port = <5>;
mux-int-port = <1>;
cpu-dai = <&ssi1>;
--
2.7.4

View File

@ -1,16 +0,0 @@
# see https://github.com/wongsyrone/openwrt-1/commit/93c0a5173414cfa7684547de3c3a1f3dc4240383
# and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932
diff -Naur linux-cuboxi-3.14-ea83bda.orig/arch/arm/Makefile linux-cuboxi-3.14-ea83bda/arch/arm/Makefile
--- linux-cuboxi-3.14-ea83bda.orig/arch/arm/Makefile 2015-05-06 10:05:43.000000000 -0700
+++ linux-cuboxi-3.14-ea83bda/arch/arm/Makefile 2015-10-05 13:51:43.641612713 -0700
@@ -120,7 +120,8 @@
endif
# Need -Uarm for gcc < 3.x
-KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
+# Maybe we need -fno-ipa-sra for gcc > 4.9.x
+KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm -fno-ipa-sra
KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float
CHECKFLAGS += -D__arm__

View File

@ -1,15 +0,0 @@
Fix build error when CONFIG_PM_SLEEP is not set
--- a/drivers/pci/host/pci-imx6.c 2017-01-14 19:50:14.159715318 +0100
+++ b/drivers/pci/host/pci-imx6.c 2017-01-14 19:50:42.182645605 +0100
@@ -1311,7 +1311,9 @@ static struct platform_driver imx6_pcie_
.name = "imx6q-pcie",
.owner = THIS_MODULE,
.of_match_table = imx6_pcie_of_match,
+#ifdef CONFIG_PM_SLEEP
.pm = &pci_imx_pm_ops,
+#endif
},
.shutdown = imx6_pcie_shutdown,
};

View File

@ -1,36 +0,0 @@
diff -urN a/drivers/of/fdt.c b/drivers/of/fdt.c
--- a/drivers/of/fdt.c 2015-01-13 20:49:42.799509145 +0100
+++ b/drivers/of/fdt.c 2015-01-13 20:56:29.118557900 +0100
@@ -804,6 +804,7 @@
{
unsigned long l;
char *p;
+ char tmp_command_line[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;
pr_debug("search \"chosen\", depth: %d, uname: %s\n", depth, uname);
@@ -822,12 +823,23 @@
* CONFIG_CMDLINE is meant to be a default in case nothing else
* managed to set the command line, unless CONFIG_CMDLINE_FORCE
* is set in which case we override whatever was found earlier.
+ *
+ * But we do prepend CONFIG_CMDLINE to bootloader arguments anyway.
*/
#ifdef CONFIG_CMDLINE
#ifndef CONFIG_CMDLINE_FORCE
if (!((char *)data)[0])
-#endif
strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
+ else {
+ /* append bootloader arguments to CONFIG_CMDLINE */
+ strlcat(tmp_command_line, " ", COMMAND_LINE_SIZE);
+ strlcat(tmp_command_line, data, COMMAND_LINE_SIZE);
+ /* copy everything back */
+ strlcpy(data, tmp_command_line, COMMAND_LINE_SIZE);
+ }
+#else
+ strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
+#endif /* CONFIG_CMDLINE_FORCE */
#endif /* CONFIG_CMDLINE */
pr_debug("Command line is: %s\n", (char*)data);

View File

@ -1,57 +0,0 @@
From 716d6bc9f73bd366d4b64b473055af79810d67fc Mon Sep 17 00:00:00 2001
From: Forest <web11.forest@tibit.com>
Date: Thu, 12 Mar 2015 23:43:12 -0700
Subject: [PATCH] hid: enable all buttons on the TiVo Slide Pro remote
The linux kernel has supported the TiVo Slide remote control for some time,
but does not recognize the USB ID of the newer Slide Pro. This patch adds
the missing data structures so the newer remote will be recognized by the
driver, thereby allowing the TiVo, LiveTV, and Thumbs Up/Down buttons to be
mapped with a hwdb file.
Signed-off-by: Forest <web11.forest@tibit.com>
---
drivers/hid/hid-core.c | 1 +
drivers/hid/hid-ids.h | 1 +
drivers/hid/hid-tivo.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 1d0f2b6..722a925 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1980,6 +1980,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb65a) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_TIVO, USB_DEVICE_ID_TIVO_SLIDE_BT) },
{ HID_USB_DEVICE(USB_VENDOR_ID_TIVO, USB_DEVICE_ID_TIVO_SLIDE) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_TIVO, USB_DEVICE_ID_TIVO_SLIDE_PRO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) },
{ HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED2, USB_DEVICE_ID_TOPSEED2_RF_COMBO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_TWINHAN, USB_DEVICE_ID_TWINHAN_IR_REMOTE) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 2dd6485..c739d3b 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -900,6 +900,7 @@
#define USB_VENDOR_ID_TIVO 0x150a
#define USB_DEVICE_ID_TIVO_SLIDE_BT 0x1200
#define USB_DEVICE_ID_TIVO_SLIDE 0x1201
+#define USB_DEVICE_ID_TIVO_SLIDE_PRO 0x1203
#define USB_VENDOR_ID_TOPSEED 0x0766
#define USB_DEVICE_ID_TOPSEED_CYBERLINK 0x0204
diff --git a/drivers/hid/hid-tivo.c b/drivers/hid/hid-tivo.c
index d790d8d..d986969 100644
--- a/drivers/hid/hid-tivo.c
+++ b/drivers/hid/hid-tivo.c
@@ -64,6 +64,7 @@ static const struct hid_device_id tivo_devices[] = {
/* TiVo Slide Bluetooth remote, pairs with a Broadcom dongle */
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_TIVO, USB_DEVICE_ID_TIVO_SLIDE_BT) },
{ HID_USB_DEVICE(USB_VENDOR_ID_TIVO, USB_DEVICE_ID_TIVO_SLIDE) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_TIVO, USB_DEVICE_ID_TIVO_SLIDE_PRO) },
{ }
};
MODULE_DEVICE_TABLE(hid, tivo_devices);
--
1.9.1

View File

@ -1,146 +0,0 @@
From 3fb136f3392dfb2530fd490718b0652f1001b36b Mon Sep 17 00:00:00 2001
From: Eric Nelson <eric@nelint.com>
Date: Wed, 23 Sep 2015 11:07:08 -0300
Subject: [PATCH] [media] rc: gpio-ir-recv: add timeout on idle
Many decoders require a trailing space (period without IR illumination)
to be delivered before completing a decode.
Since the gpio-ir-recv driver only delivers events on gpio transitions,
a single IR symbol (caused by a quick touch on an IR remote) will not
be properly decoded without the use of a timer to flush the tail end
state of the IR receiver.
This patch initializes and uses a timer and the timeout field of rcdev
to complete the stream and allow decode.
The timeout can be overridden through the use of the LIRC_SET_REC_TIMEOUT
ioctl.
Signed-off-by: Eric Nelson <eric@nelint.com>
Acked-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
---
drivers/media/rc/gpio-ir-recv.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c
index 6050de1..5b63b1f 100644
--- a/drivers/media/rc/gpio-ir-recv.c
+++ b/drivers/media/rc/gpio-ir-recv.c
@@ -30,6 +30,7 @@ struct gpio_rc_dev {
struct rc_dev *rcdev;
int gpio_nr;
bool active_low;
+ struct timer_list flush_timer;
};
#ifdef CONFIG_OF
@@ -93,12 +94,26 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
if (rc < 0)
goto err_get_value;
+ mod_timer(&gpio_dev->flush_timer,
+ jiffies + nsecs_to_jiffies(gpio_dev->rcdev->timeout));
+
ir_raw_event_handle(gpio_dev->rcdev);
err_get_value:
return IRQ_HANDLED;
}
+static void flush_timer(unsigned long arg)
+{
+ struct gpio_rc_dev *gpio_dev = (struct gpio_rc_dev *)arg;
+ DEFINE_IR_RAW_EVENT(ev);
+
+ ev.timeout = true;
+ ev.duration = gpio_dev->rcdev->timeout;
+ ir_raw_event_store(gpio_dev->rcdev, &ev);
+ ir_raw_event_handle(gpio_dev->rcdev);
+}
+
static int gpio_ir_recv_probe(struct platform_device *pdev)
{
struct gpio_rc_dev *gpio_dev;
@@ -144,6 +159,9 @@ static int gpio_ir_recv_probe(struct platform_device *pdev)
rcdev->input_id.version = 0x0100;
rcdev->dev.parent = &pdev->dev;
rcdev->driver_name = GPIO_IR_DRIVER_NAME;
+ rcdev->min_timeout = 0;
+ rcdev->timeout = IR_DEFAULT_TIMEOUT;
+ rcdev->max_timeout = 10 * IR_DEFAULT_TIMEOUT;
if (pdata->allowed_protos)
rcdev->allowed_protos = pdata->allowed_protos;
else
@@ -154,6 +172,9 @@ static int gpio_ir_recv_probe(struct platform_device *pdev)
gpio_dev->gpio_nr = pdata->gpio_nr;
gpio_dev->active_low = pdata->active_low;
+ setup_timer(&gpio_dev->flush_timer, flush_timer,
+ (unsigned long)gpio_dev);
+
rc = gpio_request(pdata->gpio_nr, "gpio-ir-recv");
if (rc < 0)
goto err_gpio_request;
@@ -196,6 +217,7 @@ static int gpio_ir_recv_remove(struct platform_device *pdev)
struct gpio_rc_dev *gpio_dev = platform_get_drvdata(pdev);
free_irq(gpio_to_irq(gpio_dev->gpio_nr), gpio_dev);
+ del_timer_sync(&gpio_dev->flush_timer);
rc_unregister_device(gpio_dev->rcdev);
gpio_free(gpio_dev->gpio_nr);
kfree(gpio_dev);
From f3331b8d48456a8113abbaf1985a0ca50e4d17a3 Mon Sep 17 00:00:00 2001
From: Eric Nelson <eric@nelint.com>
Date: Sat, 3 Oct 2015 08:18:50 -0700
Subject: [PATCH] [media] rc-core: define a default timeout for drivers
A default timeout value of 125 ms should work for all decoders.
Declare a constant to help standardize its' use.
Signed-off-by: Eric Nelson <eric@nelint.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
---
include/media/rc-core.h | 1 +
1 file changed, 1 insertion(+)
--- a/include/media/rc-core.h
+++ b/include/media/rc-core.h
@@ -194,6 +194,7 @@ static inline void init_ir_raw_event(str
memset(ev, 0, sizeof(*ev));
}
+#define IR_DEFAULT_TIMEOUT MS_TO_NS(125)
#define IR_MAX_DURATION 0xFFFFFFFF /* a bit more than 4 seconds */
#define US_TO_NS(usec) ((usec) * 1000)
#define MS_TO_US(msec) ((msec) * 1000)
From e9da7a4b685413c72c12320cb5b03cb5d5cb536a Mon Sep 17 00:00:00 2001
From: Peter Vicman <peter.vicman@gmail.com>
Date: Mon, 27 Mar 2017 18:55:18 +0200
Subject: [PATCH] export symbol nsecs_to_jiffies used by gpio-ir-recv
---
kernel/time.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/time.c b/kernel/time.c
index f60ffd0..d54d6db 100644
--- a/kernel/time.c
+++ b/kernel/time.c
@@ -704,6 +704,7 @@ unsigned long nsecs_to_jiffies(u64 n)
{
return (unsigned long)nsecs_to_jiffies64(n);
}
+EXPORT_SYMBOL(nsecs_to_jiffies);
/*
* Add two timespec values and do a safety check for overflow.
--
2.7.4

View File

@ -1,315 +0,0 @@
diff -Naur linux-3.15-rc6.orig/drivers/hid/hid-core.c linux-3.15-rc6/drivers/hid/hid-core.c
--- linux-3.15-rc6.orig/drivers/hid/hid-core.c 2014-06-06 13:46:49.711845049 -0700
+++ linux-3.15-rc6/drivers/hid/hid-core.c 2014-06-06 13:50:33.019965538 -0700
@@ -1848,6 +1848,7 @@
{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18) },
{ 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_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },
{ 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) },
diff -Naur linux-3.15-rc6.orig/drivers/hid/hid-ids.h linux-3.15-rc6/drivers/hid/hid-ids.h
--- linux-3.15-rc6.orig/drivers/hid/hid-ids.h 2014-06-06 13:46:49.711845049 -0700
+++ linux-3.15-rc6/drivers/hid/hid-ids.h 2014-06-06 13:51:36.146564828 -0700
@@ -700,6 +700,9 @@
#define USB_DEVICE_ID_ORTEK_PKB1700 0x1700
#define USB_DEVICE_ID_ORTEK_WKB2000 0x2000
+#define USB_VENDOR_ID_OUYA 0x2836
+#define USB_DEVICE_ID_OUYA_CONTROLLER 0x0001
+
#define USB_VENDOR_ID_PANASONIC 0x04da
#define USB_DEVICE_ID_PANABOARD_UBT780 0x1044
#define USB_DEVICE_ID_PANABOARD_UBT880 0x104d
diff -Naur linux-3.15-rc6.orig/drivers/hid/hid-ouya.c linux-3.15-rc6/drivers/hid/hid-ouya.c
--- linux-3.15-rc6.orig/drivers/hid/hid-ouya.c 1969-12-31 16:00:00.000000000 -0800
+++ linux-3.15-rc6/drivers/hid/hid-ouya.c 2014-06-06 13:52:22.785007560 -0700
@@ -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);
diff -Naur linux-3.15-rc6.orig/drivers/hid/Kconfig linux-3.15-rc6/drivers/hid/Kconfig
--- linux-3.15-rc6.orig/drivers/hid/Kconfig 2014-06-06 13:46:49.710845040 -0700
+++ linux-3.15-rc6/drivers/hid/Kconfig 2014-06-06 13:48:41.674908325 -0700
@@ -499,6 +499,12 @@
- 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 -Naur linux-3.15-rc6.orig/drivers/hid/Makefile linux-3.15-rc6/drivers/hid/Makefile
--- linux-3.15-rc6.orig/drivers/hid/Makefile 2014-06-06 13:46:49.710845040 -0700
+++ linux-3.15-rc6/drivers/hid/Makefile 2014-06-06 13:49:23.951309760 -0700
@@ -68,6 +68,7 @@
obj-$(CONFIG_HID_MULTITOUCH) += hid-multitouch.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_PETALYNX) += hid-petalynx.o

View File

@ -1,161 +0,0 @@
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
+#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_VENDOR_ID_PI_ENGINEERING 0x05f3
#define USB_DEVICE_ID_PI_ENGINEERING_VEC_USB_FOOTPEDAL 0xff
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
+ *
+ * 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) },
+ { }
+};
+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,
+};
+
+static int __init spinelplus_init(void)
+{
+ return hid_register_driver(&spinelplus_driver);
+}
+
+static void __exit spinelplus_exit(void)
+{
+ hid_unregister_driver(&spinelplus_driver);
+}
+
+module_init(spinelplus_init);
+module_exit(spinelplus_exit);
+MODULE_LICENSE("GPL");
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 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) remote
+
config HID_SUNPLUS
tristate "Sunplus wireless desktop"
depends on USB_HID
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

View File

@ -1,11 +0,0 @@
--- linux-3.2.2.orig/drivers/media/rc/mceusb.c 2012-01-30 23:37:12.374473509 +0100
+++ linux-3.2.2/drivers/media/rc/mceusb.c 2012-01-30 23:40:57.989652931 +0100
@@ -350,6 +350,8 @@
{ USB_DEVICE(VENDOR_FORMOSA, 0xe015) },
/* Formosa21 / eHome Infrared Receiver */
{ USB_DEVICE(VENDOR_FORMOSA, 0xe016) },
+ /* Formosa21 / eHome Infrared Receiver */
+ { USB_DEVICE(VENDOR_FORMOSA, 0xe042) },
/* Formosa aim / Trust MCE Infrared Receiver */
{ USB_DEVICE(VENDOR_FORMOSA, 0xe017),
.driver_info = MCE_GEN2_NO_TX },

View File

@ -1,21 +0,0 @@
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index baa1203..fee1f95 100644
--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -200,6 +200,7 @@ static bool debug;
#define VENDOR_CONEXANT 0x0572
#define VENDOR_TWISTEDMELON 0x2596
#define VENDOR_HAUPPAUGE 0x2040
+#define VENDOR_ADAPTEC 0x03f3
enum mceusb_model_type {
MCE_GEN2 = 0, /* Most boards */
@@ -414,6 +415,8 @@ static struct usb_device_id mceusb_dev_table[] = {
/* Hauppauge WINTV-HVR-HVR 930C-HD - based on cx231xx */
{ USB_DEVICE(VENDOR_HAUPPAUGE, 0xb130),
.driver_info = HAUPPAUGE_CX_HYBRID_TV },
+ /* Adaptec / HP eHome Receiver */
+ { USB_DEVICE(VENDOR_ADAPTEC, 0x0094) },
/* Terminating entry */
{ }
};

View File

@ -1,22 +0,0 @@
--- 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 {

View File

@ -1,13 +0,0 @@
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 */

View File

@ -1,59 +0,0 @@
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 -Naur linux-3.14/drivers/hid/hid-sony.c linux-3.14.patch/drivers/hid/hid-sony.c
--- linux-3.14/drivers/hid/hid-sony.c 2014-03-31 05:40:15.000000000 +0200
+++ linux-3.14.patch/drivers/hid/hid-sony.c 2014-03-31 11:50:35.755949680 +0200
@@ -546,6 +546,24 @@
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,
@@ -1074,6 +1092,8 @@
}
else if (sc->quirks & SIXAXIS_CONTROLLER_BT)
ret = sixaxis_set_operational_bt(hdev);
+ else if (sc->quirks & PS3REMOTE)
+ ret = ps3remote_setup_repeat(hdev);
else if (sc->quirks & DUALSHOCK4_CONTROLLER_USB) {
/* Report 5 (31 bytes) is used to send data to the controller via USB */
ret = sony_set_output_report(sc, 0x05, 248);

View File

@ -1,38 +0,0 @@
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 61b604f..0ad4515 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1828,6 +1828,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 0af8e93..f14b038 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -775,6 +775,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 1235405..69e2bf6 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -1153,6 +1153,9 @@ static const struct hid_device_id sony_devices[] = {
.driver_data = DUALSHOCK4_CONTROLLER_USB },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER),
.driver_data = DUALSHOCK4_CONTROLLER_BT },
+ /* 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);

View File

@ -1,11 +0,0 @@
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 }
};

View File

@ -1,12 +0,0 @@
diff -Naur linux-cuboxi-3.14-aab1674/drivers/media/usb/dvb-usb-v2/rtl28xxu.c linux-cuboxi-3.14-aab1674.patch/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
--- linux-cuboxi-3.14-aab1674/drivers/media/usb/dvb-usb-v2/rtl28xxu.c 2014-08-26 14:31:42.000000000 +0200
+++ linux-cuboxi-3.14-aab1674.patch/drivers/media/usb/dvb-usb-v2/rtl28xxu.c 2014-08-26 18:23:05.035432084 +0200
@@ -1441,6 +1441,8 @@
&rtl2832u_props, "Sveon STV20", NULL) },
{ DVB_USB_DEVICE(USB_VID_KWORLD_2, USB_PID_SVEON_STV27,
&rtl2832u_props, "Sveon STV27", NULL) },
+ { DVB_USB_DEVICE(USB_VID_GTEK, 0xa803,
+ &rtl2832u_props, "Realtek RTL2832U reference design", NULL) },
/* RTL2832P devices: */
{ DVB_USB_DEVICE(USB_VID_HANFTEK, 0x0131,

View File

@ -1,462 +0,0 @@
--- a/drivers/input/joystick/xpad.c 2016-11-02 11:32:23.105562200 +0100
+++ b/drivers/input/joystick/xpad.c 2016-11-02 11:33:00.065676100 +0100
@@ -281,17 +281,21 @@ struct usb_xpad {
struct urb *irq_out; /* urb for interrupt out report */
unsigned char *odata; /* output data */
dma_addr_t odata_dma;
- struct mutex odata_mutex;
+ spinlock_t odata_lock;
#endif
#if defined(CONFIG_JOYSTICK_XPAD_LEDS)
struct xpad_led *led;
#endif
+
+ int joydev_id;
char phys[64]; /* physical device path */
int mapping; /* map d-pad to buttons or to axes */
int xtype; /* type of xbox device */
+
+ const char *name;
};
/*
@@ -435,6 +439,109 @@ static void xpad360_process_packet(struc
input_sync(dev);
}
+static void xpad_send_led_command(struct usb_xpad *xpad, int command);
+static int xpad_open(struct input_dev *dev);
+static void xpad_close(struct input_dev *dev);
+static void xpad_set_up_abs(struct input_dev *input_dev, signed short abs);
+static int xpad_init_ff(struct usb_xpad *xpad);
+static int xpad_find_joydev(struct device *dev, void *data)
+{
+ if (strstr(dev_name(dev), "js"))
+ return 1;
+
+ return 0;
+}
+
+static struct workqueue_struct *my_wq;
+
+typedef struct {
+ struct work_struct my_work;
+ struct usb_xpad *xpad;
+} my_work_t;
+
+static void my_wq_function( struct work_struct *work)
+{
+ my_work_t *my_work = (my_work_t *)work;
+
+ struct usb_xpad *xpad = my_work->xpad;
+
+ if (xpad->pad_present) {
+
+ struct input_dev *input_dev;
+ int i;
+
+ input_dev = input_allocate_device();
+
+ xpad->dev = input_dev;
+ input_dev->name = xpad->name;
+ input_dev->phys = xpad->phys;
+ usb_to_input_id(xpad->udev, &input_dev->id);
+ input_dev->dev.parent = &xpad->intf->dev;
+
+ input_set_drvdata(input_dev, xpad);
+
+ input_dev->open = xpad_open;
+ input_dev->close = xpad_close;
+
+ input_dev->evbit[0] = BIT_MASK(EV_KEY);
+
+ if (!(xpad->mapping & MAP_STICKS_TO_NULL)) {
+ input_dev->evbit[0] |= BIT_MASK(EV_ABS);
+ /* set up axes */
+ for (i = 0; xpad_abs[i] >= 0; i++)
+ xpad_set_up_abs(input_dev, xpad_abs[i]);
+ }
+
+ /* set up standard buttons */
+ for (i = 0; xpad_common_btn[i] >= 0; i++)
+ __set_bit(xpad_common_btn[i], input_dev->keybit);
+
+ /* set up model-specific ones */
+ if (xpad->xtype == XTYPE_XBOX360 || xpad->xtype == XTYPE_XBOX360W) {
+ for (i = 0; xpad360_btn[i] >= 0; i++)
+ __set_bit(xpad360_btn[i], input_dev->keybit);
+ } else {
+ for (i = 0; xpad_btn[i] >= 0; i++)
+ __set_bit(xpad_btn[i], input_dev->keybit);
+ }
+
+ if (xpad->mapping & MAP_DPAD_TO_BUTTONS) {
+ for (i = 0; xpad_btn_pad[i] >= 0; i++)
+ __set_bit(xpad_btn_pad[i], input_dev->keybit);
+ } else {
+ for (i = 0; xpad_abs_pad[i] >= 0; i++)
+ xpad_set_up_abs(input_dev, xpad_abs_pad[i]);
+ }
+
+ if (xpad->mapping & MAP_TRIGGERS_TO_BUTTONS) {
+ for (i = 0; xpad_btn_triggers[i] >= 0; i++)
+ __set_bit(xpad_btn_triggers[i], input_dev->keybit);
+ } else {
+ for (i = 0; xpad_abs_triggers[i] >= 0; i++)
+ xpad_set_up_abs(input_dev, xpad_abs_triggers[i]);
+ }
+
+ input_register_device(xpad->dev);
+
+ {
+ struct device* joydev_dev = device_find_child(&xpad->dev->dev, NULL, xpad_find_joydev);
+
+ if (joydev_dev) {
+// printk("found joydev child with minor %i\n", MINOR(joydev_dev->devt));
+ xpad->joydev_id = MINOR(joydev_dev->devt);
+ xpad_send_led_command(xpad, (xpad->joydev_id % 4) + 2);
+ }
+ }
+
+ xpad_init_ff(xpad);
+ } else {
+ input_unregister_device(xpad->dev);
+ }
+
+ kfree( (void *)work );
+
+ return;
+}
/*
* xpad360w_process_packet
@@ -456,11 +563,35 @@ static void xpad360w_process_packet(stru
/* Presence change */
if (data[0] & 0x08) {
if (data[1] & 0x80) {
- xpad->pad_present = 1;
- usb_submit_urb(xpad->bulk_out, GFP_ATOMIC);
- } else
- xpad->pad_present = 0;
+
+ if (!xpad->pad_present)
+ {
+ my_work_t * work;
+ xpad->pad_present = 1;
+ usb_submit_urb(xpad->bulk_out, GFP_ATOMIC);
+
+ work = (my_work_t *)kmalloc(sizeof(my_work_t), GFP_KERNEL);
+ INIT_WORK( (struct work_struct *)work, my_wq_function );
+ work->xpad = xpad;
+ queue_work( my_wq, (struct work_struct *)work );
+ }
+
+ } else {
+ if (xpad->pad_present)
+ {
+ my_work_t * work;
+ xpad->pad_present = 0;
+
+ work = (my_work_t *)kmalloc(sizeof(my_work_t), GFP_KERNEL);
+ INIT_WORK( (struct work_struct *)work, my_wq_function );
+ work->xpad = xpad;
+ queue_work( my_wq, (struct work_struct *)work );
+ }
+// printk("got kill packet for id %i\n", xpad->joydev_id);
+ }
}
+
+// printk("xpad packet %hhX %hhX %hhX %hhX %hhX %hhX\n", data[0], data[1], data[2], data[3], data[4], data[5]);
/* Valid pad data */
if (!(data[1] & 0x1))
@@ -476,6 +607,8 @@ static void xpad_irq_in(struct urb *urb)
int retval, status;
status = urb->status;
+
+// printk("xpad_irq_in %i\n", status);
switch (status) {
case 0:
@@ -584,8 +717,6 @@ static int xpad_init_output(struct usb_i
goto fail1;
}
- mutex_init(&xpad->odata_mutex);
-
xpad->irq_out = usb_alloc_urb(0, GFP_KERNEL);
if (!xpad->irq_out) {
error = -ENOMEM;
@@ -714,15 +845,38 @@ struct xpad_led {
static void xpad_send_led_command(struct usb_xpad *xpad, int command)
{
- if (command >= 0 && command < 14) {
- mutex_lock(&xpad->odata_mutex);
- xpad->odata[0] = 0x01;
- xpad->odata[1] = 0x03;
- xpad->odata[2] = command;
- xpad->irq_out->transfer_buffer_length = 3;
- usb_submit_urb(xpad->irq_out, GFP_KERNEL);
- mutex_unlock(&xpad->odata_mutex);
+ if ((unsigned)command > 15)
+ return;
+
+ spin_lock(&xpad->odata_lock);
+
+ switch (xpad->xtype) {
+
+ case XTYPE_XBOX360:
+ xpad->odata[0] = 0x01;
+ xpad->odata[1] = 0x03;
+ xpad->odata[2] = command;
+ xpad->irq_out->transfer_buffer_length = 3;
+ break;
+ case XTYPE_XBOX360W:
+ xpad->odata[0] = 0x00;
+ xpad->odata[1] = 0x00;
+ xpad->odata[2] = 0x08;
+ xpad->odata[3] = 0x40 + (command % 0x0e);
+ xpad->odata[4] = 0x00;
+ xpad->odata[5] = 0x00;
+ xpad->odata[6] = 0x00;
+ xpad->odata[7] = 0x00;
+ xpad->odata[8] = 0x00;
+ xpad->odata[9] = 0x00;
+ xpad->odata[10] = 0x00;
+ xpad->odata[11] = 0x00;
+ xpad->irq_out->transfer_buffer_length = 12;
+ break;
}
+
+ usb_submit_urb(xpad->irq_out, GFP_KERNEL);
+ spin_unlock(&xpad->odata_lock);
}
static void xpad_led_set(struct led_classdev *led_cdev,
@@ -741,8 +895,10 @@ static int xpad_led_probe(struct usb_xpa
struct xpad_led *led;
struct led_classdev *led_cdev;
int error;
+
+// printk("xpad_led_probe\n");
- if (xpad->xtype != XTYPE_XBOX360)
+ if (xpad->xtype != XTYPE_XBOX360 && xpad->xtype != XTYPE_XBOX360W)
return 0;
xpad->led = led = kzalloc(sizeof(struct xpad_led), GFP_KERNEL);
@@ -765,11 +921,6 @@ static int xpad_led_probe(struct usb_xpa
return error;
}
- /*
- * Light up the segment corresponding to controller number
- */
- xpad_send_led_command(xpad, (led_no % 4) + 2);
-
return 0;
}
@@ -791,6 +942,7 @@ static void xpad_led_disconnect(struct u
static int xpad_open(struct input_dev *dev)
{
struct usb_xpad *xpad = input_get_drvdata(dev);
+// printk("xpad open driver data %x\n", (unsigned int)xpad);
/* URB was submitted in probe */
if (xpad->xtype == XTYPE_XBOX360W)
@@ -846,19 +998,20 @@ static int xpad_probe(struct usb_interfa
if (intf->cur_altsetting->desc.bNumEndpoints != 2)
return -ENODEV;
+ if (!my_wq) {
+ my_wq = create_workqueue("xpad_queue");
+ }
+
for (i = 0; xpad_device[i].idVendor; i++) {
if ((le16_to_cpu(udev->descriptor.idVendor) == xpad_device[i].idVendor) &&
(le16_to_cpu(udev->descriptor.idProduct) == xpad_device[i].idProduct))
break;
}
xpad = kzalloc(sizeof(struct usb_xpad), GFP_KERNEL);
- input_dev = input_allocate_device();
- if (!xpad || !input_dev) {
- error = -ENOMEM;
- goto fail1;
- }
+ xpad->name = xpad_device[i].name;
+
xpad->idata = usb_alloc_coherent(udev, XPAD_PKT_LEN,
GFP_KERNEL, &xpad->idata_dma);
if (!xpad->idata) {
@@ -894,65 +1047,12 @@ static int xpad_probe(struct usb_interfa
xpad->mapping |= MAP_STICKS_TO_NULL;
}
- xpad->dev = input_dev;
- usb_make_path(udev, xpad->phys, sizeof(xpad->phys));
- strlcat(xpad->phys, "/input0", sizeof(xpad->phys));
-
- input_dev->name = xpad_device[i].name;
- input_dev->phys = xpad->phys;
- usb_to_input_id(udev, &input_dev->id);
- input_dev->dev.parent = &intf->dev;
-
- input_set_drvdata(input_dev, xpad);
-
- input_dev->open = xpad_open;
- input_dev->close = xpad_close;
-
- input_dev->evbit[0] = BIT_MASK(EV_KEY);
-
- if (!(xpad->mapping & MAP_STICKS_TO_NULL)) {
- input_dev->evbit[0] |= BIT_MASK(EV_ABS);
- /* set up axes */
- for (i = 0; xpad_abs[i] >= 0; i++)
- xpad_set_up_abs(input_dev, xpad_abs[i]);
- }
-
- /* set up standard buttons */
- for (i = 0; xpad_common_btn[i] >= 0; i++)
- __set_bit(xpad_common_btn[i], input_dev->keybit);
-
- /* set up model-specific ones */
- if (xpad->xtype == XTYPE_XBOX360 || xpad->xtype == XTYPE_XBOX360W) {
- for (i = 0; xpad360_btn[i] >= 0; i++)
- __set_bit(xpad360_btn[i], input_dev->keybit);
- } else {
- for (i = 0; xpad_btn[i] >= 0; i++)
- __set_bit(xpad_btn[i], input_dev->keybit);
- }
-
- if (xpad->mapping & MAP_DPAD_TO_BUTTONS) {
- for (i = 0; xpad_btn_pad[i] >= 0; i++)
- __set_bit(xpad_btn_pad[i], input_dev->keybit);
- } else {
- for (i = 0; xpad_abs_pad[i] >= 0; i++)
- xpad_set_up_abs(input_dev, xpad_abs_pad[i]);
- }
-
- if (xpad->mapping & MAP_TRIGGERS_TO_BUTTONS) {
- for (i = 0; xpad_btn_triggers[i] >= 0; i++)
- __set_bit(xpad_btn_triggers[i], input_dev->keybit);
- } else {
- for (i = 0; xpad_abs_triggers[i] >= 0; i++)
- xpad_set_up_abs(input_dev, xpad_abs_triggers[i]);
- }
-
error = xpad_init_output(intf, xpad);
if (error)
goto fail3;
- error = xpad_init_ff(xpad);
- if (error)
- goto fail4;
+ usb_make_path(xpad->udev, xpad->phys, sizeof(xpad->phys));
+ strlcat(xpad->phys, "/input0", sizeof(xpad->phys));
error = xpad_led_probe(xpad);
if (error)
@@ -966,10 +1066,6 @@ static int xpad_probe(struct usb_interfa
xpad->irq_in->transfer_dma = xpad->idata_dma;
xpad->irq_in->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
- error = input_register_device(xpad->dev);
- if (error)
- goto fail6;
-
usb_set_intfdata(intf, xpad);
if (xpad->xtype == XTYPE_XBOX360W) {
@@ -977,6 +1073,7 @@ static int xpad_probe(struct usb_interfa
* Setup the message to set the LEDs on the
* controller when it shows up
*/
+ spin_lock(&xpad->odata_lock);
xpad->bulk_out = usb_alloc_urb(0, GFP_KERNEL);
if (!xpad->bulk_out) {
error = -ENOMEM;
@@ -1028,23 +1125,55 @@ static int xpad_probe(struct usb_interfa
*/
xpad->irq_in->dev = xpad->udev;
error = usb_submit_urb(xpad->irq_in, GFP_KERNEL);
+
+ spin_unlock(&xpad->odata_lock);
if (error)
goto fail9;
+
+ // I don't know how to check controller state on driver load so just slam them
+ // off so that people have to turn them on, triggering a state update
+
+ // got the power off packet from an OSX reverse-engineered driver:
+ // http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/OsxDriver#toc1
+ spin_lock(&xpad->odata_lock);
+ xpad->odata[0] = 0x00;
+ xpad->odata[1] = 0x00;
+ xpad->odata[2] = 0x08;
+ xpad->odata[3] = 0xC0;
+ xpad->odata[4] = 0x00;
+ xpad->odata[5] = 0x00;
+ xpad->odata[6] = 0x00;
+ xpad->odata[7] = 0x00;
+ xpad->odata[8] = 0x00;
+ xpad->odata[9] = 0x00;
+ xpad->odata[10] = 0x00;
+ xpad->odata[11] = 0x00;
+ xpad->irq_out->transfer_buffer_length = 12;
+ usb_submit_urb(xpad->irq_out, GFP_KERNEL);
+ spin_unlock(&xpad->odata_lock);
+ } else {
+ my_work_t *work;
+ xpad->pad_present = 1;
+
+ work = (my_work_t *)kmalloc(sizeof(my_work_t), GFP_KERNEL);
+ INIT_WORK( (struct work_struct *)work, my_wq_function );
+ work->xpad = xpad;
+ queue_work( my_wq, (struct work_struct *)work );
}
return 0;
fail9: kfree(xpad->bdata);
fail8: usb_free_urb(xpad->bulk_out);
- fail7: input_unregister_device(input_dev);
- input_dev = NULL;
+ fail7: //input_unregister_device(input_dev);
+ //input_dev = NULL;
fail6: xpad_led_disconnect(xpad);
- fail5: if (input_dev)
- input_ff_destroy(input_dev);
+ fail5: //if (input_dev)
+ //input_ff_destroy(input_dev);
fail4: xpad_deinit_output(xpad);
fail3: usb_free_urb(xpad->irq_in);
fail2: usb_free_coherent(udev, XPAD_PKT_LEN, xpad->idata, xpad->idata_dma);
- fail1: input_free_device(input_dev);
+ fail1: //input_free_device(input_dev);
kfree(xpad);
return error;
@@ -1054,8 +1183,14 @@ static void xpad_disconnect(struct usb_i
{
struct usb_xpad *xpad = usb_get_intfdata (intf);
+// printk("xpad_disconnect\n");
xpad_led_disconnect(xpad);
- input_unregister_device(xpad->dev);
+
+ if (xpad->pad_present)
+ {
+ xpad->pad_present = 0;
+ input_unregister_device(xpad->dev);
+ }
xpad_deinit_output(xpad);
if (xpad->xtype == XTYPE_XBOX360W) {

View File

@ -1,21 +0,0 @@
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

@ -1,12 +0,0 @@
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,
- .symbol_rate_min = 5000000,
+ .symbol_rate_min = 1000000,
.symbol_rate_max = 45000000,
.caps = FE_CAN_INVERSION_AUTO |

File diff suppressed because it is too large Load Diff

View File

@ -1,138 +0,0 @@
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;
- struct stb0899_params *params = &state->params;
short int derot_step, derot_freq = 0, derot_limit, next_loop = 3;
int index = 0;
@@ -216,10 +215,9 @@
/* timing loop computation & symbol rate optimisation */
derot_limit = (internal->sub_range / 2L) / internal->mclk;
- derot_step = (params->srate / 2L) / internal->mclk;
+ derot_step = internal->derot_step * 4; /* dertot_step = decreasing delta */
while ((stb0899_check_tmg(state) != TIMINGOK) && next_loop) {
- index++;
derot_freq += index * internal->direction * derot_step; /* next derot zig zag position */
if (abs(derot_freq) > derot_limit)
@@ -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 */
}
+ index++;
internal->direction = -internal->direction; /* Change zigzag direction */
}
@@ -278,14 +277,18 @@
{
struct stb0899_internal *internal = &state->internal;
- short int derot_freq = 0, last_derot_freq = 0, derot_limit, next_loop = 3;
+ short int derot_freq = 0, last_derot_freq = 0, derot_limit, derot_step, next_loop = 3;
int index = 0;
+ int base_freq;
u8 cfr[2];
u8 reg;
internal->status = NOCARRIER;
derot_limit = (internal->sub_range / 2L) / internal->mclk;
derot_freq = internal->derot_freq;
+ derot_step = internal->derot_step * 2;
+ last_derot_freq = internal->derot_freq;
+ base_freq = internal->derot_freq;
reg = stb0899_read_reg(state, STB0899_CFD);
STB0899_SETFIELD_VAL(CFD_ON, reg, 1);
@@ -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) {
- index++;
last_derot_freq = derot_freq;
- derot_freq += index * internal->direction * internal->derot_step; /* next zig zag derotator position */
+ derot_freq += index * internal->direction * derot_step; /* next zig zag derotator position */
- if(abs(derot_freq) > derot_limit)
+ if (derot_freq > base_freq + derot_limit || derot_freq < base_freq - derot_limit)
next_loop--;
if (next_loop) {
@@ -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 */
}
+ index++;
+ internal->direction = -internal->direction; /* Change zigzag direction */
}
- internal->direction = -internal->direction; /* Change zigzag direction */
} while ((internal->status != CARRIEROK) && next_loop);
if (internal->status == CARRIEROK) {
@@ -338,6 +341,7 @@
int lock = 0, index = 0, dataTime = 500, loop;
u8 reg;
+ msleep(1);
internal->status = NODATA;
/* RESET FEC */
@@ -348,6 +352,7 @@
reg = stb0899_read_reg(state, STB0899_TSTRES);
STB0899_SETFIELD_VAL(FRESACS, reg, 0);
stb0899_write_reg(state, STB0899_TSTRES, reg);
+ msleep(1);
if (params->srate <= 2000000)
dataTime = 2000;
@@ -363,6 +368,7 @@
stb0899_write_reg(state, STB0899_DSTATUS2, 0x00); /* force search loop */
while (1) {
+ msleep(1); // Alex: added 1 mSec
/* WARNING! VIT LOCKED has to be tested before VIT_END_LOOOP */
reg = stb0899_read_reg(state, STB0899_VSTATUS);
lock = STB0899_GETFIELD(VSTATUS_LOCKEDVIT, reg);
@@ -390,20 +396,21 @@
short int derot_freq, derot_step, derot_limit, next_loop = 3;
u8 cfr[2];
u8 reg;
- int index = 1;
+ int index = 0;
+ int base_freq;
struct stb0899_internal *internal = &state->internal;
- struct stb0899_params *params = &state->params;
- derot_step = (params->srate / 4L) / internal->mclk;
+ derot_step = internal->derot_step;
derot_limit = (internal->sub_range / 2L) / internal->mclk;
derot_freq = internal->derot_freq;
+ base_freq = internal->derot_freq;
do {
if ((internal->status != CARRIEROK) || (stb0899_check_data(state) != DATAOK)) {
derot_freq += index * internal->direction * derot_step; /* next zig zag derotator position */
- if (abs(derot_freq) > derot_limit)
+ if (derot_freq > base_freq + derot_limit || derot_freq < base_freq - derot_limit)
next_loop--;
if (next_loop) {
@@ -417,9 +424,9 @@
stb0899_write_regs(state, STB0899_CFRM, cfr, 2); /* derotator frequency */
stb0899_check_carrier(state);
- index++;
}
}
+ index++;
internal->direction = -internal->direction; /* change zig zag direction */
} while ((internal->status != DATAOK) && next_loop);

View File

@ -1,62 +0,0 @@
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);
}

View File

@ -1,17 +0,0 @@
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
}

View File

@ -1,97 +0,0 @@
diff --git a/drivers/media/dvb-frontends/cxd2820r.h b/drivers/media/dvb-frontends/cxd2820r.h
index 82b3d93..6095dbc 100644
--- a/drivers/media/dvb-frontends/cxd2820r.h
+++ b/drivers/media/dvb-frontends/cxd2820r.h
@@ -52,6 +52,12 @@ struct cxd2820r_config {
*/
u8 ts_mode;
+ /* TS clock inverted.
+ * Default: 0
+ * Values: 0, 1
+ */
+ bool ts_clock_inv;
+
/* IF AGC polarity.
* Default: 0
* Values: 0, 1
diff --git a/drivers/media/dvb-frontends/cxd2820r_c.c b/drivers/media/dvb-frontends/cxd2820r_c.c
index 5c6ab49..0f4657e 100644
--- a/drivers/media/dvb-frontends/cxd2820r_c.c
+++ b/drivers/media/dvb-frontends/cxd2820r_c.c
@@ -45,6 +45,7 @@ int cxd2820r_set_frontend_c(struct dvb_frontend *fe)
{ 0x1008b, 0x07, 0xff },
{ 0x1001f, priv->cfg.if_agc_polarity << 7, 0x80 },
{ 0x10070, priv->cfg.ts_mode, 0xff },
+ { 0x10071, !priv->cfg.ts_clock_inv << 4, 0x10 },
};
dev_dbg(&priv->i2c->dev, "%s: frequency=%d symbol_rate=%d\n", __func__,
diff --git a/drivers/media/dvb-frontends/cxd2820r_t.c b/drivers/media/dvb-frontends/cxd2820r_t.c
index fa184ca..9b5a45b 100644
--- a/drivers/media/dvb-frontends/cxd2820r_t.c
+++ b/drivers/media/dvb-frontends/cxd2820r_t.c
@@ -46,6 +46,7 @@ int cxd2820r_set_frontend_t(struct dvb_frontend *fe)
{ 0x00088, 0x01, 0xff },
{ 0x00070, priv->cfg.ts_mode, 0xff },
+ { 0x00071, !priv->cfg.ts_clock_inv << 4, 0x10 },
{ 0x000cb, priv->cfg.if_agc_polarity << 6, 0x40 },
{ 0x000a5, 0x00, 0x01 },
{ 0x00082, 0x20, 0x60 },
diff --git a/drivers/media/dvb-frontends/cxd2820r_t2.c b/drivers/media/dvb-frontends/cxd2820r_t2.c
index 2ba130e..9c0c4f4 100644
--- a/drivers/media/dvb-frontends/cxd2820r_t2.c
+++ b/drivers/media/dvb-frontends/cxd2820r_t2.c
@@ -47,6 +47,7 @@ int cxd2820r_set_frontend_t2(struct dvb_frontend *fe)
{ 0x02083, 0x0a, 0xff },
{ 0x020cb, priv->cfg.if_agc_polarity << 6, 0x40 },
{ 0x02070, priv->cfg.ts_mode, 0xff },
+ { 0x02071, !priv->cfg.ts_clock_inv << 6, 0x40 },
{ 0x020b5, priv->cfg.spec_inv << 4, 0x10 },
{ 0x02567, 0x07, 0x0f },
{ 0x02569, 0x03, 0x03 },
diff --git a/drivers/media/usb/dvb-usb/dw2102.c b/drivers/media/usb/dvb-usb/dw2102.c
index ae0f56a..7135a3e 100644
--- a/drivers/media/usb/dvb-usb/dw2102.c
+++ b/drivers/media/usb/dvb-usb/dw2102.c
@@ -1109,6 +1109,7 @@ static struct ds3000_config su3000_ds3000_config = {
static struct cxd2820r_config cxd2820r_config = {
.i2c_address = 0x6c, /* (0xd8 >> 1) */
.ts_mode = 0x38,
+ .ts_clock_inv = 1,
};
static struct tda18271_config tda18271_config = {
@@ -1387,20 +1388,27 @@ static int su3000_frontend_attach(struct dvb_usb_adapter *d)
static int t220_frontend_attach(struct dvb_usb_adapter *d)
{
- u8 obuf[3] = { 0xe, 0x80, 0 };
+ u8 obuf[3] = { 0xe, 0x87, 0 };
u8 ibuf[] = { 0 };
if (dvb_usb_generic_rw(d->dev, obuf, 3, ibuf, 1, 0) < 0)
err("command 0x0e transfer failed.");
obuf[0] = 0xe;
- obuf[1] = 0x83;
+ obuf[1] = 0x86;
+ obuf[2] = 1;
+
+ if (dvb_usb_generic_rw(d->dev, obuf, 3, ibuf, 1, 0) < 0)
+ err("command 0x0e transfer failed.");
+
+ obuf[0] = 0xe;
+ obuf[1] = 0x80;
obuf[2] = 0;
if (dvb_usb_generic_rw(d->dev, obuf, 3, ibuf, 1, 0) < 0)
err("command 0x0e transfer failed.");
- msleep(100);
+ msleep(50);
obuf[0] = 0xe;
obuf[1] = 0x80;

File diff suppressed because it is too large Load Diff

View File

@ -1,192 +0,0 @@
diff -rupN a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
--- a/drivers/media/usb/em28xx/em28xx-cards.c 2015-02-23 14:54:18.000000000 +0100
+++ b/drivers/media/usb/em28xx/em28xx-cards.c 2015-02-12 16:46:54.000000000 +0100
@@ -448,6 +448,18 @@ static struct em28xx_reg_seq speedlink_v
{ -1, -1, -1, -1},
};
+static struct em28xx_reg_seq pctv_292e[] = {
+ {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0},
+ {0x0d, 0xff, 0xff, 950},
+ {EM2874_R80_GPIO_P0_CTRL, 0xbd, 0xff, 100},
+ {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 410},
+ {EM2874_R80_GPIO_P0_CTRL, 0x7d, 0xff, 300},
+ {EM2874_R80_GPIO_P0_CTRL, 0x7c, 0xff, 60},
+ {0x0d, 0x42, 0xff, 50},
+ {EM2874_R5F_TS_ENABLE, 0x85, 0xff, 0},
+ {-1, -1, -1, -1},
+};
+
/*
* Button definitions
*/
@@ -2157,6 +2169,17 @@ struct em28xx_board em28xx_boards[] = {
.has_dvb = 1,
.ir_codes = RC_MAP_PINNACLE_PCTV_HD,
},
+ /* 2013:025f PCTV tripleStick (292e).
+ * Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2157 */
+ [EM28178_BOARD_PCTV_292E] = {
+ .name = "PCTV tripleStick (292e)",
+ .def_i2c_bus = 1,
+ .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ,
+ .tuner_type = TUNER_ABSENT,
+ .tuner_gpio = pctv_292e,
+ .has_dvb = 1,
+ .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
+ },
};
EXPORT_SYMBOL_GPL(em28xx_boards);
@@ -2330,6 +2353,8 @@ struct usb_device_id em28xx_id_table[] =
.driver_info = EM2765_BOARD_SPEEDLINK_VAD_LAPLACE },
{ USB_DEVICE(0x2013, 0x0258),
.driver_info = EM28178_BOARD_PCTV_461E },
+ { USB_DEVICE(0x2013, 0x025f),
+ .driver_info = EM28178_BOARD_PCTV_292E },
{ },
};
MODULE_DEVICE_TABLE(usb, em28xx_id_table);
diff -rupN a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
--- a/drivers/media/usb/em28xx/em28xx-dvb.c 2014-11-02 14:07:11.000000000 +0100
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c 2015-02-24 16:39:35.000000000 +0100
@@ -53,6 +53,8 @@
#include "mb86a20s.h"
#include "m88ds3103.h"
#include "m88ts2022.h"
+#include "si2168.h"
+#include "si2157.h"
MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");
MODULE_LICENSE("GPL");
@@ -91,6 +93,7 @@ struct em28xx_dvb {
struct semaphore pll_mutex;
bool dont_attach_fe1;
int lna_gpio;
+ struct i2c_client *i2c_client_demod;
struct i2c_client *i2c_client_tuner;
};
@@ -719,6 +722,21 @@ static int em28xx_pctv_290e_set_lna(stru
#endif
}
+static int em28xx_pctv_292e_set_lna(struct dvb_frontend *fe)
+{
+ struct dtv_frontend_properties *c = &fe->dtv_property_cache;
+ struct em28xx_i2c_bus *i2c_bus = fe->dvb->priv;
+ struct em28xx *dev = i2c_bus->dev;
+ u8 lna;
+
+ if (c->lna == 1)
+ lna = 0x01;
+ else
+ lna = 0x00;
+
+ return em28xx_write_reg_bits(dev, EM2874_R80_GPIO_P0_CTRL, lna, 0x01);
+}
+
static int em28xx_mt352_terratec_xs_init(struct dvb_frontend *fe)
{
/* Values extracted from a USB trace of the Terratec Windows driver */
@@ -1413,6 +1431,66 @@ static int em28xx_dvb_init(struct em28xx
}
}
break;
+ case EM28178_BOARD_PCTV_292E:
+ {
+ struct i2c_adapter *adapter;
+ struct i2c_client *client;
+ struct i2c_board_info info;
+ struct si2168_config si2168_config;
+ struct si2157_config si2157_config;
+
+ /* attach demod */
+ memset(&si2168_config, 0, sizeof(si2168_config));
+ si2168_config.i2c_adapter = &adapter;
+ si2168_config.fe = &dvb->fe[0];
+ si2168_config.ts_mode = SI2168_TS_PARALLEL;
+ memset(&info, 0, sizeof(struct i2c_board_info));
+ strlcpy(info.type, "si2168", I2C_NAME_SIZE);
+ info.addr = 0x64;
+ info.platform_data = &si2168_config;
+ request_module(info.type);
+ client = i2c_new_device(&dev->i2c_adap[dev->def_i2c_bus], &info);
+ if (client == NULL || client->dev.driver == NULL) {
+ result = -ENODEV;
+ goto out_free;
+ }
+
+ if (!try_module_get(client->dev.driver->owner)) {
+ i2c_unregister_device(client);
+ result = -ENODEV;
+ goto out_free;
+ }
+
+ dvb->i2c_client_demod = client;
+
+ /* attach tuner */
+ memset(&si2157_config, 0, sizeof(si2157_config));
+ si2157_config.fe = dvb->fe[0];
+ memset(&info, 0, sizeof(struct i2c_board_info));
+ strlcpy(info.type, "si2157", I2C_NAME_SIZE);
+ info.addr = 0x60;
+ info.platform_data = &si2157_config;
+ request_module(info.type);
+ client = i2c_new_device(adapter, &info);
+ if (client == NULL || client->dev.driver == NULL) {
+ module_put(dvb->i2c_client_demod->dev.driver->owner);
+ i2c_unregister_device(dvb->i2c_client_demod);
+ result = -ENODEV;
+ goto out_free;
+ }
+
+ if (!try_module_get(client->dev.driver->owner)) {
+ i2c_unregister_device(client);
+ module_put(dvb->i2c_client_demod->dev.driver->owner);
+ i2c_unregister_device(dvb->i2c_client_demod);
+ result = -ENODEV;
+ goto out_free;
+ }
+
+ dvb->i2c_client_tuner = client;
+ dvb->fe[0]->ops.set_lna = em28xx_pctv_292e_set_lna;
+ }
+ break;
default:
em28xx_errdev("/2: The frontend of your DVB/ATSC card"
" isn't supported yet\n");
@@ -1485,6 +1563,10 @@ static int em28xx_dvb_fini(struct em28xx
}
i2c_release_client(dvb->i2c_client_tuner);
+ /* remove I2C demod */
+ if (dvb->i2c_client_demod) {
+ i2c_unregister_device(dvb->i2c_client_demod);
+ }
em28xx_unregister_dvb(dvb);
kfree(dvb);
dev->dvb = NULL;
diff -rupN a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h
--- a/drivers/media/usb/em28xx/em28xx.h 2014-11-02 14:07:11.000000000 +0100
+++ b/drivers/media/usb/em28xx/em28xx.h 2015-02-23 15:28:11.000000000 +0100
@@ -137,6 +137,7 @@
#define EM2874_BOARD_KWORLD_UB435Q_V2 90
#define EM2765_BOARD_SPEEDLINK_VAD_LAPLACE 91
#define EM28178_BOARD_PCTV_461E 92
+#define EM28178_BOARD_PCTV_292E 94
/* Limits minimum and default number of buffers */
#define EM28XX_MIN_BUF 4
diff -rupN a/drivers/media/usb/em28xx/Kconfig b/drivers/media/usb/em28xx/Kconfig
--- a/drivers/media/usb/em28xx/Kconfig 2014-11-02 14:07:11.000000000 +0100
+++ b/drivers/media/usb/em28xx/Kconfig 2015-02-12 16:46:54.000000000 +0100
@@ -55,6 +55,8 @@ config VIDEO_EM28XX_DVB
select MEDIA_TUNER_TDA18271 if MEDIA_SUBDRV_AUTOSELECT
select DVB_M88DS3103 if MEDIA_SUBDRV_AUTOSELECT
select MEDIA_TUNER_M88TS2022 if MEDIA_SUBDRV_AUTOSELECT
+ select DVB_SI2168 if MEDIA_SUBDRV_AUTOSELECT
+ select MEDIA_TUNER_SI2157 if MEDIA_SUBDRV_AUTOSELECT
---help---
This adds support for DVB cards based on the
Empiatech em28xx chips.

View File

@ -1,15 +0,0 @@
diff -Naur linux-cuboxi-3.14-ea83bda.orig/drivers/media/usb/dvb-usb-v2/dvbsky.c linux-cuboxi-3.14-ea83bda/drivers/media/usb/dvb-usb-v2/dvbsky.c
--- linux-cuboxi-3.14-ea83bda.orig/drivers/media/usb/dvb-usb-v2/dvbsky.c 2015-05-12 07:55:11.516604741 +0200
+++ linux-cuboxi-3.14-ea83bda/drivers/media/usb/dvb-usb-v2/dvbsky.c 2015-05-12 07:58:19.750871492 +0200
@@ -280,7 +280,11 @@
.i2c_wr_max = 33,
.clock_out = 0,
.ts_mode = M88DS3103_TS_CI,
+ .ts_clk = 16000,
+ .ts_clk_pol = 0,
.agc = 0x99,
+ .lnb_hv_pol = 1,
+ .lnb_en_pol = 1,
};
static int dvbsky_s960_attach(struct dvb_usb_adapter *adap)

View File

@ -1,25 +0,0 @@
--- a/arch/arm/boot/dts/imx6q-tbs2910.dts 2016-09-17 15:27:28.950265621 +0200
+++ b/arch/arm/boot/dts/imx6q-tbs2910.dts 2016-09-17 15:28:25.984089674 +0200
@@ -84,17 +84,14 @@
gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
};
- };
- fan {
- compatible = "gpio-fan";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_gpio_fan>;
- gpios = <&gpio3 28 GPIO_ACTIVE_HIGH>;
- gpio-fan,speed-map = <0 0
- 3000 1>;
+ fan {
+ gpios = <&gpio3 28 0>;
+ default-state = "off";
+ };
};
+
sound {
compatible = "fsl,imx-audio-sgtl5000";
model = "imx-sgtl5000";

View File

@ -1,340 +0,0 @@
From 21ecd35bd9e5030a6b33a41dea3a2653609b09d7 Mon Sep 17 00:00:00 2001
From: Peter Vicman <peter.vicman@gmail.com>
Date: Thu, 24 Mar 2016 15:53:56 +0100
Subject: [PATCH] dts: udoo: add both lvds displays
---
arch/arm/boot/dts/Makefile | 4 +++
arch/arm/boot/dts/imx6dl-udoo-15lvds.dts | 54 +++++++++++++++++++++++++++++
arch/arm/boot/dts/imx6dl-udoo-7lvds.dts | 49 +++++++++++++++++++++++++++
arch/arm/boot/dts/imx6q-udoo-15lvds.dts | 58 ++++++++++++++++++++++++++++++++
arch/arm/boot/dts/imx6q-udoo-7lvds.dts | 53 +++++++++++++++++++++++++++++
arch/arm/boot/dts/imx6qdl-udoo.dtsi | 5 +--
6 files changed, 221 insertions(+), 2 deletions(-)
create mode 100644 arch/arm/boot/dts/imx6dl-udoo-15lvds.dts
create mode 100644 arch/arm/boot/dts/imx6dl-udoo-7lvds.dts
create mode 100644 arch/arm/boot/dts/imx6q-udoo-15lvds.dts
create mode 100644 arch/arm/boot/dts/imx6q-udoo-7lvds.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 08ff98a..ffffb8c 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -167,6 +167,8 @@ dtb-$(CONFIG_ARCH_MXC) += \
imx6dl-sabresd-pf200.dtb \
imx6dl-sabresd-hdcp.dtb \
imx6dl-udoo.dtb \
+ imx6dl-udoo-7lvds.dtb \
+ imx6dl-udoo-15lvds.dtb \
imx6dl-sbc-fx6.dtb \
imx6dl-sbc-fx6m.dtb \
imx6dl-wandboard.dtb \
@@ -192,6 +194,8 @@ dtb-$(CONFIG_ARCH_MXC) += \
imx6q-sbc-fx6m.dtb \
imx6q-sbc6x.dtb \
imx6q-udoo.dtb \
+ imx6q-udoo-7lvds.dtb \
+ imx6q-udoo-15lvds.dtb \
imx6q-wandboard.dtb \
imx6q-tbs2910.dtb \
imx6sl-evk.dtb \
diff --git a/arch/arm/boot/dts/imx6dl-udoo-15lvds.dts b/arch/arm/boot/dts/imx6dl-udoo-15lvds.dts
new file mode 100644
index 0000000..ac189cc
--- /dev/null
+++ b/arch/arm/boot/dts/imx6dl-udoo-15lvds.dts
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * Author: Fabio Estevam <fabio.estevam@freescale.com>
+ * Author: Ettore Chimenti <ettore.chimenti@udoo.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+/dts-v1/;
+#include "imx6dl.dtsi"
+#include "imx6qdl-udoo.dtsi"
+
+/ {
+ model = "Udoo i.MX6 Dual-lite Board";
+ compatible = "udoo,imx6dl-udoo", "fsl,imx6dl";
+
+ mxcfb2: fb@1 {
+ compatible = "fsl,mxc_sdc_fb";
+ disp_dev = "ldb";
+ interface_pix_fmt = "RGB24";
+ mode_str = "1360x768M@60";
+ default_bpp = <32>;
+ int_clk = <0>;
+ late_init = <1>;
+ status = "okay";
+ };
+
+ regulators {
+ reg_lcd0_pwr: regulator@1 {
+ status = "okay";
+ };
+
+ reg_lcd0_backlight: regulator@2 {
+ status = "okay";
+ };
+ };
+};
+
+&dcic1 {
+ status = "disabled";
+};
+
+&dcic2 {
+ dcic_id = <0>;
+ status = "okay";
+};
+
+&ldb {
+ status = "okay";
+
+ lvds-channel@0 {
+ status = "okay";
+ fsl,data-width = <24>;
+
+ display-timings {
+ native-mode = <&timing2>;
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/imx6dl-udoo-7lvds.dts b/arch/arm/boot/dts/imx6dl-udoo-7lvds.dts
new file mode 100644
index 0000000..da6ba4d
--- /dev/null
+++ b/arch/arm/boot/dts/imx6dl-udoo-7lvds.dts
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * Author: Fabio Estevam <fabio.estevam@freescale.com>
+ * Author: Ettore Chimenti <ettore.chimenti@udoo.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+/dts-v1/;
+#include "imx6dl.dtsi"
+#include "imx6qdl-udoo.dtsi"
+
+/ {
+ model = "Udoo i.MX6 Dual-lite Board";
+ compatible = "udoo,imx6dl-udoo", "fsl,imx6dl";
+
+ mxcfb2: fb@1 {
+ compatible = "fsl,mxc_sdc_fb";
+ disp_dev = "ldb";
+ interface_pix_fmt = "RGB666";
+ mode_str = "800x480M@60";
+ default_bpp = <32>;
+ int_clk = <0>;
+ late_init = <0>;
+ status = "okay";
+ };
+
+ regulators {
+ reg_lcd0_pwr: regulator@1 {
+ status = "okay";
+ };
+
+ reg_lcd0_backlight: regulator@2 {
+ status = "okay";
+ };
+ };
+};
+
+&dcic1 {
+ status = "disabled";
+};
+
+&dcic2 {
+ dcic_id = <0>;
+ status = "okay";
+};
+
+&ldb {
+ status = "okay";
+
+ lvds-channel@0 {
+ status = "okay";
+ };
+};
diff --git a/arch/arm/boot/dts/imx6q-udoo-15lvds.dts b/arch/arm/boot/dts/imx6q-udoo-15lvds.dts
new file mode 100644
index 0000000..35e7651
--- /dev/null
+++ b/arch/arm/boot/dts/imx6q-udoo-15lvds.dts
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * Author: Fabio Estevam <fabio.estevam@freescale.com>
+ * Author: Ettore Chimenti <ettore.chimenti@udoo.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+/dts-v1/;
+#include "imx6q.dtsi"
+#include "imx6qdl-udoo.dtsi"
+
+/ {
+ model = "Udoo i.MX6 Quad Board";
+ compatible = "udoo,imx6q-udoo", "fsl,imx6q";
+
+ mxcfb2: fb@1 {
+ compatible = "fsl,mxc_sdc_fb";
+ disp_dev = "ldb";
+ interface_pix_fmt = "RGB24";
+ mode_str = "1360x768M@60";
+ default_bpp = <32>;
+ int_clk = <0>;
+ late_init = <1>;
+ status = "okay";
+ };
+
+ regulators {
+ reg_lcd0_pwr: regulator@1 {
+ status = "okay";
+ };
+
+ reg_lcd0_backlight: regulator@2 {
+ status = "okay";
+ };
+ };
+};
+
+&sata {
+ status = "okay";
+};
+
+&dcic1 {
+ status = "disabled";
+};
+
+&dcic2 {
+ dcic_id = <0>;
+ status = "okay";
+};
+
+&ldb {
+ status = "okay";
+
+ lvds-channel@0 {
+ status = "okay";
+ fsl,data-width = <24>;
+
+ display-timings {
+ native-mode = <&timing2>;
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/imx6q-udoo-7lvds.dts b/arch/arm/boot/dts/imx6q-udoo-7lvds.dts
new file mode 100644
index 0000000..e5f3125
--- /dev/null
+++ b/arch/arm/boot/dts/imx6q-udoo-7lvds.dts
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * Author: Fabio Estevam <fabio.estevam@freescale.com>
+ * Author: Ettore Chimenti <ettore.chimenti@udoo.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+/dts-v1/;
+#include "imx6q.dtsi"
+#include "imx6qdl-udoo.dtsi"
+
+/ {
+ model = "Udoo i.MX6 Quad Board";
+ compatible = "udoo,imx6q-udoo", "fsl,imx6q";
+
+ mxcfb2: fb@1 {
+ compatible = "fsl,mxc_sdc_fb";
+ disp_dev = "ldb";
+ interface_pix_fmt = "RGB666";
+ mode_str = "800x480M@60";
+ default_bpp = <32>;
+ int_clk = <0>;
+ late_init = <0>;
+ status = "okay";
+ };
+
+ regulators {
+ reg_lcd0_pwr: regulator@1 {
+ status = "okay";
+ };
+
+ reg_lcd0_backlight: regulator@2 {
+ status = "okay";
+ };
+ };
+};
+
+&sata {
+ status = "okay";
+};
+
+&dcic1 {
+ status = "disabled";
+};
+
+&dcic2 {
+ dcic_id = <0>;
+ status = "okay";
+};
+
+&ldb {
+ status = "okay";
+
+ lvds-channel@0 {
+ status = "okay";
+ };
+};
diff --git a/arch/arm/boot/dts/imx6qdl-udoo.dtsi b/arch/arm/boot/dts/imx6qdl-udoo.dtsi
index 2f6ec9a..7dca6db 100755
--- a/arch/arm/boot/dts/imx6qdl-udoo.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-udoo.dtsi
@@ -202,7 +202,7 @@
&dcic2 {
dcic_id = <1>;
dcic_mux = "dcic-lvds1";
- status = "okay";
+ status = "disabled";
};
&gpc { // General power controller
@@ -254,9 +254,10 @@
vsync-len = <2>;
};
- timing2: 1366x768 { // 15.6" display
+ // IPU needs X and Y by modulo 8
+ timing2: 1360x768 { // 15.6" display
clock-frequency = <76000000>;
- hactive = <1366>;
+ hactive = <1360>;
vactive = <768>;
hback-porch = <220>;
hfront-porch = <40>;

View File

@ -1,20 +0,0 @@
--- a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi 2014-11-25 19:23:06.332485391 +0100
+++ b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi 2014-11-25 19:23:24.675776865 +0100
@@ -31,6 +31,7 @@
label = "imx6:red:front";
max-brightness = <248>;
pwms = <&pwm1 0 50000>;
+ linux,default-trigger = "heartbeat";
};
};
--- a/arch/arm/boot/dts/imx6qdl-cubox-i-som-v15.dtsi 2014-11-25 19:23:06.332485391 +0100
+++ b/arch/arm/boot/dts/imx6qdl-cubox-i-som-v15.dtsi 2014-11-25 19:23:24.675776865 +0100
@@ -31,6 +31,7 @@
label = "imx6:red:front";
max-brightness = <248>;
pwms = <&pwm1 0 50000>;
+ linux,default-trigger = "heartbeat";
};
};

View File

@ -1,55 +0,0 @@
From a868ebd7d7e9ee8dc97b41ac89e5fa8d8cfc65d7 Mon Sep 17 00:00:00 2001
From: Peter Vicman <peter.vicman@gmail.com>
Date: Wed, 9 May 2017 20:18:07 +0200
Subject: [PATCH] limit eth speed 100mbits
default ethernet speed is set to 100mbits which works reliable
to enable gigabit speed module parameter via kernel command line
must be set in form fec.disable_giga=0
based on https://github.com/boundarydevices/linux-imx6/commit/aef0deef3c95aa0daf4fa5d082cca4ed2057c65f
---
drivers/net/ethernet/freescale/fec_main.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 716fcb1..af01828 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -140,6 +140,10 @@ static unsigned char macaddr[ETH_ALEN];
module_param_array(macaddr, byte, NULL, 0);
MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address");
+static int disable_giga = 1;
+module_param(disable_giga, int, 0644);
+MODULE_PARM_DESC(disable_giga, "disable gigabit speeds");
+
#if defined(CONFIG_M5272)
/*
* Some hardware gets it MAC address out of local flash memory.
@@ -1948,15 +1952,18 @@ static int fec_enet_mii_probe(struct net
}
/* mask with MAC supported features */
- if (fep->quirks & FEC_QUIRK_HAS_GBIT) {
+ if (!disable_giga && (fep->quirks & FEC_QUIRK_HAS_GBIT)) {
+ netdev_info(ndev, "set 1000mbps\n");
phy_dev->supported &= PHY_GBIT_FEATURES;
phy_dev->supported &= ~SUPPORTED_1000baseT_Half;
#if !defined(CONFIG_M5272)
phy_dev->supported |= SUPPORTED_Pause;
#endif
}
- else
+ else {
+ netdev_info(ndev, "set 100mbps\n");
phy_dev->supported &= PHY_BASIC_FEATURES;
+ }
phy_dev->advertising = phy_dev->supported;
--
2.7.4

View File

@ -1,28 +0,0 @@
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

View File

@ -1,10 +0,0 @@
--- 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) },

View File

@ -1,11 +0,0 @@
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 */

View File

@ -1,17 +0,0 @@
diff -Naur linux-3.10.10/include/uapi/linux/ptrace.h linux-3.10.10.patch/include/uapi/linux/ptrace.h
--- linux-3.10.10/include/uapi/linux/ptrace.h 2013-08-29 18:47:51.000000000 +0200
+++ linux-3.10.10.patch/include/uapi/linux/ptrace.h 2013-09-04 16:38:10.182685149 +0200
@@ -55,11 +55,13 @@
#define PTRACE_PEEKSIGINFO 0x4209
+#ifdef __KERNEL__
struct ptrace_peeksiginfo_args {
__u64 off; /* from which siginfo to start */
__u32 flags;
__s32 nr; /* how may siginfos to take */
};
+#endif /* __KERNEL__ */
/* Read signals from a shared (process wide) queue */
#define PTRACE_PEEKSIGINFO_SHARED (1 << 0)

View File

@ -1,48 +0,0 @@
rt2800usb:fix efuse detection
From: Michael Braun <michael-dev@fami-braun.de>
The device 057c:8501 (AVM Fritz! WLAN v2 rev. B) currently does not
load. One thing observed is that the vendors driver detects EFUSE mode
for this device, but rt2800usb does not. This is due to rt2800usb
lacking a check for the firmware mode present in the vendors driver,
that this patch adopts for rt2800usb.
With this patch applied, the 'RF chipset' detection does no longer fail.
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
---
drivers/net/wireless/rt2x00/rt2800usb.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index a49c3d7..b601422 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -735,11 +735,25 @@ static void rt2800usb_fill_rxdone(struct queue_entry *entry,
/*
* Device probe functions.
*/
+static int rt2800usb_efuse_detect(struct rt2x00_dev *rt2x00dev)
+{
+ __le32 fwMode;
+
+ rt2x00usb_vendor_request(rt2x00dev, USB_DEVICE_MODE,
+ USB_VENDOR_REQUEST_IN, 0, 0x11, &fwMode,
+ sizeof(fwMode), REGISTER_TIMEOUT_FIRMWARE);
+
+ if ((fwMode & 0x00000003) == 2)
+ return 1;
+
+ return rt2800_efuse_detect(rt2x00dev);
+}
+
static int rt2800usb_read_eeprom(struct rt2x00_dev *rt2x00dev)
{
int retval;
- if (rt2800_efuse_detect(rt2x00dev))
+ if (rt2800usb_efuse_detect(rt2x00dev))
retval = rt2800_read_eeprom_efuse(rt2x00dev);
else
retval = rt2x00usb_eeprom_read(rt2x00dev, rt2x00dev->eeprom,

View File

@ -1,48 +0,0 @@
rt2800usb:fix hang during firmware load
From: Michael Braun <michael-dev@fami-braun.de>
The device 057c:8501 (AVM Fritz! WLAN v2 rev. B) boots into a state that does not actually require loading a firmware file.
The vendors driver finds out about this by checking a firmware state
register, so this patch adopts this here.
Finally, with this patch applied, my wifi dongle actually becomes
usefull (scan + connect to wpa network works).
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
---
drivers/net/wireless/rt2x00/rt2800usb.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index b601422..71bf101 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -240,6 +240,7 @@ static int rt2800usb_write_firmware(struct rt2x00_dev *rt2x00dev,
int status;
u32 offset;
u32 length;
+ __le32 fwMode;
/*
* Check which section of the firmware we need.
@@ -257,8 +258,17 @@ static int rt2800usb_write_firmware(struct rt2x00_dev *rt2x00dev,
/*
* Write firmware to device.
*/
- rt2x00usb_register_multiwrite(rt2x00dev, FIRMWARE_IMAGE_BASE,
- data + offset, length);
+ rt2x00usb_vendor_request(rt2x00dev, USB_DEVICE_MODE,
+ USB_VENDOR_REQUEST_IN, 0, 0x11, &fwMode,
+ sizeof(fwMode), REGISTER_TIMEOUT_FIRMWARE);
+
+ if ((fwMode & 0x00000003) == 2) {
+ rt2x00_info(rt2x00dev,
+ "Firmware loading not required - NIC in AutoRun mode\n");
+ } else {
+ rt2x00usb_register_multiwrite(rt2x00dev, FIRMWARE_IMAGE_BASE,
+ data + offset, length);
+ }
rt2x00usb_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0);
rt2x00usb_register_write(rt2x00dev, H2M_MAILBOX_STATUS, ~0);

View File

@ -1,25 +0,0 @@
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

@ -1,92 +0,0 @@
--- linux-3.14.1/drivers/media/rc/mceusb.c 2014-04-09 12:37:46.510492000 -0500
+++ linux-3.14.1/drivers/media/rc/mceusb.c 2014-04-23 17:58:17.224854949 -0500
@@ -761,11 +761,18 @@ static void mce_request_packet(struct mc
}
/* outbound data */
- pipe = usb_sndintpipe(ir->usbdev,
- ir->usb_ep_out->bEndpointAddress);
- usb_fill_int_urb(async_urb, ir->usbdev, pipe,
- async_buf, size, mce_async_callback,
- ir, ir->usb_ep_out->bInterval);
+ if (usb_endpoint_xfer_int(ir->usb_ep_out)) {
+ pipe = usb_sndintpipe(ir->usbdev,
+ ir->usb_ep_out->bEndpointAddress);
+ usb_fill_int_urb(async_urb, ir->usbdev, pipe, async_buf,
+ size, mce_async_callback, ir,
+ ir->usb_ep_out->bInterval);
+ } else {
+ pipe = usb_sndbulkpipe(ir->usbdev,
+ ir->usb_ep_out->bEndpointAddress);
+ usb_fill_bulk_urb(async_urb, ir->usbdev, pipe, async_buf,
+ size, mce_async_callback, ir);
+ }
memcpy(async_buf, data, size);
} else if (urb_type == MCEUSB_RX) {
@@ -1283,34 +1290,26 @@ static int mceusb_dev_probe(struct usb_i
for (i = 0; i < idesc->desc.bNumEndpoints; ++i) {
ep = &idesc->endpoint[i].desc;
- if ((ep_in == NULL)
- && ((ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK)
- == USB_DIR_IN)
- && (((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
- == USB_ENDPOINT_XFER_BULK)
- || ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
- == USB_ENDPOINT_XFER_INT))) {
-
- ep_in = ep;
- ep_in->bmAttributes = USB_ENDPOINT_XFER_INT;
- ep_in->bInterval = 1;
- mce_dbg(&intf->dev, "acceptable inbound endpoint "
- "found\n");
+ if (ep_in == NULL) {
+ if (usb_endpoint_is_bulk_in(ep)) {
+ ep_in = ep;
+ mce_dbg(&intf->dev, "acceptable bulk inbound endpoint found\n");
+ } else if (usb_endpoint_is_int_in(ep)) {
+ ep_in = ep;
+ ep_in->bInterval = 1;
+ mce_dbg(&intf->dev, "acceptable interrupt inbound endpoint found\n");
+ }
}
- if ((ep_out == NULL)
- && ((ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK)
- == USB_DIR_OUT)
- && (((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
- == USB_ENDPOINT_XFER_BULK)
- || ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
- == USB_ENDPOINT_XFER_INT))) {
-
- ep_out = ep;
- ep_out->bmAttributes = USB_ENDPOINT_XFER_INT;
- ep_out->bInterval = 1;
- mce_dbg(&intf->dev, "acceptable outbound endpoint "
- "found\n");
+ if (ep_out == NULL) {
+ if (usb_endpoint_is_bulk_out(ep)) {
+ ep_out = ep;
+ mce_dbg(&intf->dev, "acceptable bulk outbound endpoint found\n");
+ } else if (usb_endpoint_is_int_out(ep)) {
+ ep_out = ep;
+ ep_out->bInterval = 1;
+ mce_dbg(&intf->dev, "acceptable interrupt outbound endpoint found\n");
+ }
}
}
if (ep_in == NULL) {
@@ -1318,7 +1317,11 @@ static int mceusb_dev_probe(struct usb_i
return -ENODEV;
}
- pipe = usb_rcvintpipe(dev, ep_in->bEndpointAddress);
+ if (usb_endpoint_xfer_int(ep_in)) {
+ pipe = usb_rcvintpipe(dev, ep_in->bEndpointAddress);
+ } else {
+ pipe = usb_rcvbulkpipe(dev, ep_in->bEndpointAddress);
+ }
maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
ir = kzalloc(sizeof(struct mceusb_dev), GFP_KERNEL);

View File

@ -1,24 +0,0 @@
https://github.com/systemd/systemd/issues/1143
fix for
Time has been changed
Set up TFD_TIMER_CANCEL_ON_SET timerfd.
which happen on bad RTC battery
Maybe not setting RTC_HCTOSYS is sufficient enough and not used this patch.
diff --git a/fs/timerfd.c b/fs/timerfd.c
index b94fa6c..8ec3aeb 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -134,7 +134,7 @@ static void timerfd_setup_cancel(struct timerfd_ctx *ctx, int flags)
{
if ((ctx->clockid == CLOCK_REALTIME ||
ctx->clockid == CLOCK_REALTIME_ALARM) &&
- (flags & TFD_TIMER_ABSTIME) && (flags & TFD_TIMER_CANCEL_ON_SET)) {
+ (flags & TFD_TIMER_CANCEL_ON_SET)) {
if (!ctx->might_cancel) {
ctx->might_cancel = true;
spin_lock(&cancel_lock);
list_add_rcu(&ctx->clist, &cancel_list);
spin_unlock(&cancel_lock);

View File

@ -1,16 +0,0 @@
# see https://github.com/wongsyrone/openwrt-1/commit/93c0a5173414cfa7684547de3c3a1f3dc4240383
# and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
--- a/arch/arm/Makefile 2015-10-11 11:09:45.000000000 -0700
+++ b/arch/arm/Makefile 2015-10-20 12:24:44.507102957 -0700
@@ -130,7 +130,8 @@
endif
# Need -Uarm for gcc < 3.x
-KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
+# Maybe we need -fno-ipa-sra for gcc > 4.9.x
+KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm -fno-ipa-sra
KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float
CHECKFLAGS += -D__arm__

View File

@ -1,35 +0,0 @@
--- a/drivers/of/fdt.c 2016-01-17 14:32:52.792880390 +0100
+++ b/drivers/of/fdt.c 2016-01-17 14:34:00.170297953 +0100
@@ -934,6 +934,7 @@
{
int l;
const char *p;
+ char tmp_command_line[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;
pr_debug("search \"chosen\", depth: %d, uname: %s\n", depth, uname);
@@ -952,12 +953,23 @@
* CONFIG_CMDLINE is meant to be a default in case nothing else
* managed to set the command line, unless CONFIG_CMDLINE_FORCE
* is set in which case we override whatever was found earlier.
+ *
+ * But we do prepend CONFIG_CMDLINE to bootloader arguments anyway.
*/
#ifdef CONFIG_CMDLINE
#ifndef CONFIG_CMDLINE_FORCE
if (!((char *)data)[0])
-#endif
strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
+ else {
+ /* append bootloader arguments to CONFIG_CMDLINE */
+ strlcat(tmp_command_line, " ", COMMAND_LINE_SIZE);
+ strlcat(tmp_command_line, data, COMMAND_LINE_SIZE);
+ /* copy everything back */
+ strlcpy(data, tmp_command_line, COMMAND_LINE_SIZE);
+ }
+#else
+ strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
+#endif /* CONFIG_CMDLINE_FORCE */
#endif /* CONFIG_CMDLINE */
pr_debug("Command line is: %s\n", (char*)data);

View File

@ -1,120 +0,0 @@
From 3fb136f3392dfb2530fd490718b0652f1001b36b Mon Sep 17 00:00:00 2001
From: Eric Nelson <eric@nelint.com>
Date: Wed, 23 Sep 2015 11:07:08 -0300
Subject: [PATCH] [media] rc: gpio-ir-recv: add timeout on idle
Many decoders require a trailing space (period without IR illumination)
to be delivered before completing a decode.
Since the gpio-ir-recv driver only delivers events on gpio transitions,
a single IR symbol (caused by a quick touch on an IR remote) will not
be properly decoded without the use of a timer to flush the tail end
state of the IR receiver.
This patch initializes and uses a timer and the timeout field of rcdev
to complete the stream and allow decode.
The timeout can be overridden through the use of the LIRC_SET_REC_TIMEOUT
ioctl.
Signed-off-by: Eric Nelson <eric@nelint.com>
Acked-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
---
drivers/media/rc/gpio-ir-recv.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c
index 6050de1..5b63b1f 100644
--- a/drivers/media/rc/gpio-ir-recv.c
+++ b/drivers/media/rc/gpio-ir-recv.c
@@ -30,6 +30,7 @@ struct gpio_rc_dev {
struct rc_dev *rcdev;
int gpio_nr;
bool active_low;
+ struct timer_list flush_timer;
};
#ifdef CONFIG_OF
@@ -93,12 +94,26 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
if (rc < 0)
goto err_get_value;
+ mod_timer(&gpio_dev->flush_timer,
+ jiffies + nsecs_to_jiffies(gpio_dev->rcdev->timeout));
+
ir_raw_event_handle(gpio_dev->rcdev);
err_get_value:
return IRQ_HANDLED;
}
+static void flush_timer(unsigned long arg)
+{
+ struct gpio_rc_dev *gpio_dev = (struct gpio_rc_dev *)arg;
+ DEFINE_IR_RAW_EVENT(ev);
+
+ ev.timeout = true;
+ ev.duration = gpio_dev->rcdev->timeout;
+ ir_raw_event_store(gpio_dev->rcdev, &ev);
+ ir_raw_event_handle(gpio_dev->rcdev);
+}
+
static int gpio_ir_recv_probe(struct platform_device *pdev)
{
struct gpio_rc_dev *gpio_dev;
@@ -144,6 +159,9 @@ static int gpio_ir_recv_probe(struct platform_device *pdev)
rcdev->input_id.version = 0x0100;
rcdev->dev.parent = &pdev->dev;
rcdev->driver_name = GPIO_IR_DRIVER_NAME;
+ rcdev->min_timeout = 0;
+ rcdev->timeout = IR_DEFAULT_TIMEOUT;
+ rcdev->max_timeout = 10 * IR_DEFAULT_TIMEOUT;
if (pdata->allowed_protos)
rcdev->allowed_protocols = pdata->allowed_protos;
else
@@ -154,6 +172,9 @@ static int gpio_ir_recv_probe(struct platform_device *pdev)
gpio_dev->gpio_nr = pdata->gpio_nr;
gpio_dev->active_low = pdata->active_low;
+ setup_timer(&gpio_dev->flush_timer, flush_timer,
+ (unsigned long)gpio_dev);
+
rc = gpio_request(pdata->gpio_nr, "gpio-ir-recv");
if (rc < 0)
goto err_gpio_request;
@@ -196,6 +217,7 @@ static int gpio_ir_recv_remove(struct platform_device *pdev)
struct gpio_rc_dev *gpio_dev = platform_get_drvdata(pdev);
free_irq(gpio_to_irq(gpio_dev->gpio_nr), gpio_dev);
+ del_timer_sync(&gpio_dev->flush_timer);
rc_unregister_device(gpio_dev->rcdev);
gpio_free(gpio_dev->gpio_nr);
kfree(gpio_dev);
From f3331b8d48456a8113abbaf1985a0ca50e4d17a3 Mon Sep 17 00:00:00 2001
From: Eric Nelson <eric@nelint.com>
Date: Sat, 3 Oct 2015 08:18:50 -0700
Subject: [PATCH] [media] rc-core: define a default timeout for drivers
A default timeout value of 125 ms should work for all decoders.
Declare a constant to help standardize its' use.
Signed-off-by: Eric Nelson <eric@nelint.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
---
include/media/rc-core.h | 1 +
1 file changed, 1 insertion(+)
--- a/include/media/rc-core.h
+++ b/include/media/rc-core.h
@@ -239,6 +239,7 @@ static inline void init_ir_raw_event(str
memset(ev, 0, sizeof(*ev));
}
+#define IR_DEFAULT_TIMEOUT MS_TO_NS(125)
#define IR_MAX_DURATION 500000000 /* 500 ms */
#define US_TO_NS(usec) ((usec) * 1000)
#define MS_TO_US(msec) ((msec) * 1000)

View File

@ -1,315 +0,0 @@
diff -Naur linux-3.19.orig/drivers/hid/hid-core.c linux-3.19/drivers/hid/hid-core.c
--- linux-3.19.orig/drivers/hid/hid-core.c 2015-02-20 14:01:17.080322846 -0800
+++ linux-3.19/drivers/hid/hid-core.c 2015-02-20 14:03:30.375519421 -0800
@@ -1884,6 +1884,7 @@
{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18) },
{ 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_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },
{ HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_6000) },
{ 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) },
diff -Naur linux-3.19.orig/drivers/hid/hid-ids.h linux-3.19/drivers/hid/hid-ids.h
--- linux-3.19.orig/drivers/hid/hid-ids.h 2015-02-20 14:01:17.080322846 -0800
+++ linux-3.19/drivers/hid/hid-ids.h 2015-02-20 14:03:30.382519482 -0800
@@ -721,6 +721,9 @@
#define USB_DEVICE_ID_ORTEK_PKB1700 0x1700
#define USB_DEVICE_ID_ORTEK_WKB2000 0x2000
+#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 -Naur linux-3.19.orig/drivers/hid/hid-ouya.c linux-3.19/drivers/hid/hid-ouya.c
--- linux-3.19.orig/drivers/hid/hid-ouya.c 1969-12-31 16:00:00.000000000 -0800
+++ linux-3.19/drivers/hid/hid-ouya.c 2015-02-20 14:03:30.371519386 -0800
@@ -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);
diff -Naur linux-3.19.orig/drivers/hid/Kconfig linux-3.19/drivers/hid/Kconfig
--- linux-3.19.orig/drivers/hid/Kconfig 2015-02-20 14:01:17.081322855 -0800
+++ linux-3.19/drivers/hid/Kconfig 2015-02-20 14:03:30.381519473 -0800
@@ -528,6 +528,12 @@
- 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 -Naur linux-3.19.orig/drivers/hid/Makefile linux-3.19/drivers/hid/Makefile
--- linux-3.19.orig/drivers/hid/Makefile 2015-02-20 14:01:17.081322855 -0800
+++ linux-3.19/drivers/hid/Makefile 2015-02-20 14:03:30.382519482 -0800
@@ -70,6 +70,7 @@
obj-$(CONFIG_HID_MULTITOUCH) += hid-multitouch.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

View File

@ -1,164 +0,0 @@
diff -Naur linux-3.19/drivers/hid/hid-core.c linux-3.19.patch/drivers/hid/hid-core.c
--- linux-3.19/drivers/hid/hid-core.c 2015-02-09 03:54:22.000000000 +0100
+++ linux-3.19.patch/drivers/hid/hid-core.c 2015-02-11 00:06:14.966131308 +0100
@@ -1886,6 +1886,10 @@
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
{ HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_6000) },
{ 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_PHILIPS, USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_4) },
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, HID_ANY_ID) },
{ HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_KEYBOARD) },
#if IS_ENABLED(CONFIG_HID_ROCCAT)
diff -Naur linux-3.19/drivers/hid/hid-ids.h linux-3.19.patch/drivers/hid/hid-ids.h
--- linux-3.19/drivers/hid/hid-ids.h 2015-02-09 03:54:22.000000000 +0100
+++ linux-3.19.patch/drivers/hid/hid-ids.h 2015-02-11 00:04:45.885977057 +0100
@@ -743,6 +743,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 -Naur linux-3.19/drivers/hid/hid-spinelplus.c linux-3.19.patch/drivers/hid/hid-spinelplus.c
--- linux-3.19/drivers/hid/hid-spinelplus.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-3.19.patch/drivers/hid/hid-spinelplus.c 2015-02-11 00:04:45.886977059 +0100
@@ -0,0 +1,105 @@
+/*
+ * 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,
+};
+
+static int __init spinelplus_init(void)
+{
+ return hid_register_driver(&spinelplus_driver);
+}
+
+static void __exit spinelplus_exit(void)
+{
+ hid_unregister_driver(&spinelplus_driver);
+}
+
+module_init(spinelplus_init);
+module_exit(spinelplus_exit);
+MODULE_LICENSE("GPL");
diff -Naur linux-3.19/drivers/hid/Kconfig linux-3.19.patch/drivers/hid/Kconfig
--- linux-3.19/drivers/hid/Kconfig 2015-02-09 03:54:22.000000000 +0100
+++ linux-3.19.patch/drivers/hid/Kconfig 2015-02-11 00:04:45.886977059 +0100
@@ -702,6 +702,12 @@
---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 -Naur linux-3.19/drivers/hid/Makefile linux-3.19.patch/drivers/hid/Makefile
--- linux-3.19/drivers/hid/Makefile 2015-02-09 03:54:22.000000000 +0100
+++ linux-3.19.patch/drivers/hid/Makefile 2015-02-11 00:04:45.886977059 +0100
@@ -107,6 +107,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

View File

@ -1,21 +0,0 @@
diff -Naur linux-3.17.1/drivers/media/rc/mceusb.c linux-3.17.1.patch/drivers/media/rc/mceusb.c
--- linux-3.17.1/drivers/media/rc/mceusb.c 2014-10-15 12:29:30.000000000 +0200
+++ linux-3.17.1.patch/drivers/media/rc/mceusb.c 2014-10-16 11:45:57.480176874 +0200
@@ -188,6 +188,8 @@
#define VENDOR_TWISTEDMELON 0x2596
#define VENDOR_HAUPPAUGE 0x2040
#define VENDOR_PCTV 0x2013
+#define VENDOR_ADAPTEC 0x03f3
+
enum mceusb_model_type {
MCE_GEN2 = 0, /* Most boards */
@@ -401,6 +403,8 @@
.driver_info = HAUPPAUGE_CX_HYBRID_TV },
{ USB_DEVICE(VENDOR_PCTV, 0x025e),
.driver_info = HAUPPAUGE_CX_HYBRID_TV },
+ /* Adaptec / HP eHome Receiver */
+ { USB_DEVICE(VENDOR_ADAPTEC, 0x0094) },
/* Terminating entry */
{ }

View File

@ -1,28 +0,0 @@
--- 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
@@ -257,14 +256,9 @@ again:
toggle = 0;
break;
case 32:
- if ((scancode & RC6_6A_LCC_MASK) == RC6_6A_MCE_CC) {
- protocol = RC_TYPE_RC6_MCE;
- toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
- scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
- } else {
- protocol = RC_BIT_RC6_6A_32;
- toggle = 0;
- }
+ protocol = RC_TYPE_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");

View File

@ -1,13 +0,0 @@
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 */

View File

@ -1,70 +0,0 @@
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 3.17
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 | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 661f94f..2256e35 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -1111,6 +1111,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)
{
@@ -2339,6 +2358,8 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
sony_init_work(sc, dualshock4_state_worker);
} else if (sc->quirks & MOTION_CONTROLLER) {
sony_init_work(sc, motion_state_worker);
+ } else if (sc->quirks & PS3REMOTE) {
+ ret = ps3remote_setup_repeat(hdev);
} else {
ret = 0;
}
--
1.9.1

View File

@ -1,21 +0,0 @@
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

@ -1,963 +0,0 @@
From 627e828fcf1bb9fc71dbbeca29acd33162efb448 Mon Sep 17 00:00:00 2001
From: Matt DeVillier <matt.devillier@gmail.com>
Date: Wed, 2 Mar 2016 23:11:33 -0600
Subject: [PATCH 1/1] linux/drivers/input/joystick/xpad: fixes for xbox360/one controllers
merged from https://github.com/paroj/xpad
- fixed blinking LED on Xbox 360 Wireless Controllers
- only expose actually connected Xbox 360 Wireless Controllers
- fixed kernel warnings due to submitting active URB requests
- updated Xbox One controller force feedback
- controller still works after suspend/ resume
- Xbox 360 Wireless button mappings are now compatible with Xbox 360 (non-wireless) mappings
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
---
drivers/input/joystick/xpad.c | 608 ++++++++++++++++++++++++++++++------------
1 file changed, 432 insertions(+), 176 deletions(-)
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index fd4100d..1ee6626 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -74,12 +74,15 @@
*
* Later changes can be tracked in SCM.
*/
-
+#define DEBUG
#include <linux/kernel.h>
+#include <linux/input.h>
+#include <linux/rcupdate.h>
#include <linux/slab.h>
#include <linux/stat.h>
#include <linux/module.h>
#include <linux/usb/input.h>
+#include <linux/usb/quirks.h>
#define DRIVER_AUTHOR "Marko Friedemann <mfr@bmx-chemnitz.de>"
#define DRIVER_DESC "X-Box pad driver"
@@ -125,7 +128,8 @@ static const struct xpad_device {
{ 0x045e, 0x0289, "Microsoft X-Box pad v2 (US)", 0, XTYPE_XBOX },
{ 0x045e, 0x028e, "Microsoft X-Box 360 pad", 0, XTYPE_XBOX360 },
{ 0x045e, 0x02d1, "Microsoft X-Box One pad", 0, XTYPE_XBOXONE },
- { 0x045e, 0x02dd, "Microsoft X-Box One pad (Covert Forces)", 0, XTYPE_XBOXONE },
+ { 0x045e, 0x02dd, "Microsoft X-Box One pad (Firmware 2015)", 0, XTYPE_XBOXONE },
+ { 0x0e6f, 0x0139, "Afterglow Prismatic Wired Controller", 0, XTYPE_XBOXONE },
{ 0x045e, 0x0291, "Xbox 360 Wireless Receiver (XBOX)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W },
{ 0x045e, 0x0719, "Xbox 360 Wireless Receiver", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W },
{ 0x044f, 0x0f07, "Thrustmaster, Inc. Controller", 0, XTYPE_XBOX },
@@ -298,6 +302,7 @@ static struct usb_device_id xpad_table[] = {
XPAD_XBOX360_VENDOR(0x044f), /* Thrustmaster X-Box 360 controllers */
XPAD_XBOX360_VENDOR(0x045e), /* Microsoft X-Box 360 controllers */
XPAD_XBOXONE_VENDOR(0x045e), /* Microsoft X-Box One controllers */
+ XPAD_XBOXONE_VENDOR(0x0e6f), /* 0x0e6f X-Box One controllers */
XPAD_XBOX360_VENDOR(0x046d), /* Logitech X-Box 360 style controllers */
XPAD_XBOX360_VENDOR(0x0738), /* Mad Catz X-Box 360 controllers */
{ USB_DEVICE(0x0738, 0x4540) }, /* Mad Catz Beat Pad */
@@ -317,21 +322,42 @@ static struct usb_device_id xpad_table[] = {
MODULE_DEVICE_TABLE(usb, xpad_table);
+struct xpad_output_packet {
+ u8 data[XPAD_PKT_LEN];
+ u8 len;
+ bool pending;
+};
+
+#define XPAD_OUT_CMD_IDX 0
+#define XPAD_OUT_FF_IDX 1
+#define XPAD_OUT_LED_IDX (1 + IS_ENABLED(CONFIG_JOYSTICK_XPAD_FF))
+#define XPAD_NUM_OUT_PACKETS (1 + \
+ IS_ENABLED(CONFIG_JOYSTICK_XPAD_FF) + \
+ IS_ENABLED(CONFIG_JOYSTICK_XPAD_LEDS))
+
struct usb_xpad {
struct input_dev *dev; /* input device interface */
+ struct input_dev __rcu *x360w_dev;
struct usb_device *udev; /* usb device */
struct usb_interface *intf; /* usb interface */
- int pad_present;
+ bool pad_present;
+ bool input_created;
struct urb *irq_in; /* urb for interrupt in report */
unsigned char *idata; /* input data */
dma_addr_t idata_dma;
struct urb *irq_out; /* urb for interrupt out report */
+ struct usb_anchor irq_out_anchor;
+ bool irq_out_active; /* we must not use an active URB */
+ u8 odata_serial; /* serial number for xbox one protocol */
unsigned char *odata; /* output data */
dma_addr_t odata_dma;
- struct mutex odata_mutex;
+ spinlock_t odata_lock;
+
+ struct xpad_output_packet out_packets[XPAD_NUM_OUT_PACKETS];
+ int last_out_packet;
#if defined(CONFIG_JOYSTICK_XPAD_LEDS)
struct xpad_led *led;
@@ -343,8 +369,12 @@ struct usb_xpad {
int xtype; /* type of xbox device */
int pad_nr; /* the order x360 pads were attached */
const char *name; /* name of the device */
+ struct work_struct work; /* init/remove device from callback */
};
+static int xpad_init_input(struct usb_xpad *xpad);
+static void xpad_deinit_input(struct usb_xpad *xpad);
+
/*
* xpad_process_packet
*
@@ -424,11 +454,9 @@ static void xpad_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *d
* http://www.free60.org/wiki/Gamepad
*/
-static void xpad360_process_packet(struct usb_xpad *xpad,
+static void xpad360_process_packet(struct usb_xpad *xpad, struct input_dev *dev,
u16 cmd, unsigned char *data)
{
- struct input_dev *dev = xpad->dev;
-
/* digital pad */
if (xpad->mapping & MAP_DPAD_TO_BUTTONS) {
/* dpad as buttons (left, right, up, down) */
@@ -495,7 +523,30 @@ static void xpad360_process_packet(struct usb_xpad *xpad,
input_sync(dev);
}
-static void xpad_identify_controller(struct usb_xpad *xpad);
+static void xpad_presence_work(struct work_struct *work)
+{
+ struct usb_xpad *xpad = container_of(work, struct usb_xpad, work);
+ int error;
+
+ if (xpad->pad_present) {
+ error = xpad_init_input(xpad);
+ if (error) {
+ /* complain only, not much else we can do here */
+ dev_err(&xpad->dev->dev,
+ "unable to init device: %d\n", error);
+ } else {
+ rcu_assign_pointer(xpad->x360w_dev, xpad->dev);
+ }
+ } else {
+ RCU_INIT_POINTER(xpad->x360w_dev, NULL);
+ synchronize_rcu();
+ /*
+ * Now that we are sure xpad360w_process_packet is not
+ * using input device we can get rid of it.
+ */
+ xpad_deinit_input(xpad);
+ }
+}
/*
* xpad360w_process_packet
@@ -513,24 +564,28 @@ static void xpad_identify_controller(struct usb_xpad *xpad);
*/
static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char *data)
{
+ struct input_dev *dev;
+ bool present;
+
/* Presence change */
if (data[0] & 0x08) {
- if (data[1] & 0x80) {
- xpad->pad_present = 1;
- /*
- * Light up the segment corresponding to
- * controller number.
- */
- xpad_identify_controller(xpad);
- } else
- xpad->pad_present = 0;
+ present = (data[1] & 0x80) != 0;
+
+ if (xpad->pad_present != present) {
+ xpad->pad_present = present;
+ schedule_work(&xpad->work);
+ }
}
/* Valid pad data */
- if (!(data[1] & 0x1))
+ if (data[1] != 0x1)
return;
- xpad360_process_packet(xpad, cmd, &data[4]);
+ rcu_read_lock();
+ dev = rcu_dereference(xpad->x360w_dev);
+ if (dev)
+ xpad360_process_packet(xpad, dev, cmd, &data[4]);
+ rcu_read_unlock();
}
/*
@@ -659,7 +714,7 @@ static void xpad_irq_in(struct urb *urb)
switch (xpad->xtype) {
case XTYPE_XBOX360:
- xpad360_process_packet(xpad, 0, xpad->idata);
+ xpad360_process_packet(xpad, xpad->dev, 0, xpad->idata);
break;
case XTYPE_XBOX360W:
xpad360w_process_packet(xpad, 0, xpad->idata);
@@ -678,18 +733,73 @@ exit:
__func__, retval);
}
+/* Callers must hold xpad->odata_lock spinlock */
+static bool xpad_prepare_next_out_packet(struct usb_xpad *xpad)
+{
+ struct xpad_output_packet *pkt, *packet = NULL;
+ int i;
+
+ for (i = 0; i < XPAD_NUM_OUT_PACKETS; i++) {
+ if (++xpad->last_out_packet >= XPAD_NUM_OUT_PACKETS)
+ xpad->last_out_packet = 0;
+
+ pkt = &xpad->out_packets[xpad->last_out_packet];
+ if (pkt->pending) {
+ dev_dbg(&xpad->intf->dev,
+ "%s - found pending output packet %d\n",
+ __func__, xpad->last_out_packet);
+ packet = pkt;
+ break;
+ }
+ }
+
+ if (packet) {
+ memcpy(xpad->odata, packet->data, packet->len);
+ xpad->irq_out->transfer_buffer_length = packet->len;
+ return true;
+ }
+
+ return false;
+}
+
+/* Callers must hold xpad->odata_lock spinlock */
+static int xpad_try_sending_next_out_packet(struct usb_xpad *xpad)
+{
+ int error;
+
+ if (!xpad->irq_out_active && xpad_prepare_next_out_packet(xpad)) {
+ usb_anchor_urb(xpad->irq_out, &xpad->irq_out_anchor);
+ error = usb_submit_urb(xpad->irq_out, GFP_ATOMIC);
+ if (error) {
+ dev_err(&xpad->intf->dev,
+ "%s - usb_submit_urb failed with result %d\n",
+ __func__, error);
+ usb_unanchor_urb(xpad->irq_out);
+ return -EIO;
+ }
+
+ xpad->irq_out_active = true;
+ }
+
+ return 0;
+}
+
static void xpad_irq_out(struct urb *urb)
{
struct usb_xpad *xpad = urb->context;
struct device *dev = &xpad->intf->dev;
- int retval, status;
+ int status = urb->status;
+ int error;
+ unsigned long flags;
- status = urb->status;
+ spin_lock_irqsave(&xpad->odata_lock, flags);
switch (status) {
case 0:
/* success */
- return;
+ xpad->out_packets[xpad->last_out_packet].pending = false;
+ xpad->irq_out_active = xpad_prepare_next_out_packet(xpad);
+ break;
case -ECONNRESET:
case -ENOENT:
@@ -697,43 +807,52 @@ static void xpad_irq_out(struct urb *urb)
/* this urb is terminated, clean up */
dev_dbg(dev, "%s - urb shutting down with status: %d\n",
__func__, status);
- return;
+ xpad->irq_out_active = false;
+ break;
default:
dev_dbg(dev, "%s - nonzero urb status received: %d\n",
__func__, status);
- goto exit;
+ break;
}
-exit:
- retval = usb_submit_urb(urb, GFP_ATOMIC);
- if (retval)
- dev_err(dev, "%s - usb_submit_urb failed with result %d\n",
- __func__, retval);
+ if (xpad->irq_out_active) {
+ usb_anchor_urb(urb, &xpad->irq_out_anchor);
+ error = usb_submit_urb(urb, GFP_ATOMIC);
+ if (error) {
+ dev_err(dev,
+ "%s - usb_submit_urb failed with result %d\n",
+ __func__, error);
+ usb_unanchor_urb(urb);
+ xpad->irq_out_active = false;
+ }
+ }
+
+ spin_unlock_irqrestore(&xpad->odata_lock, flags);
}
static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad)
{
struct usb_endpoint_descriptor *ep_irq_out;
int ep_irq_out_idx;
- int error;
if (xpad->xtype == XTYPE_UNKNOWN)
return 0;
+ init_usb_anchor(&xpad->irq_out_anchor);
+
xpad->odata = usb_alloc_coherent(xpad->udev, XPAD_PKT_LEN,
GFP_KERNEL, &xpad->odata_dma);
if (!xpad->odata) {
- error = -ENOMEM;
- goto fail1;
+ return -ENOMEM;
}
- mutex_init(&xpad->odata_mutex);
+ spin_lock_init(&xpad->odata_lock);
xpad->irq_out = usb_alloc_urb(0, GFP_KERNEL);
if (!xpad->irq_out) {
- error = -ENOMEM;
- goto fail2;
+ usb_free_coherent(xpad->udev, XPAD_PKT_LEN, xpad->odata, xpad->odata_dma);
+ return -ENOMEM;
}
/* Xbox One controller has in/out endpoints swapped. */
@@ -748,15 +867,18 @@ static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad)
xpad->irq_out->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
return 0;
-
- fail2: usb_free_coherent(xpad->udev, XPAD_PKT_LEN, xpad->odata, xpad->odata_dma);
- fail1: return error;
}
static void xpad_stop_output(struct usb_xpad *xpad)
{
- if (xpad->xtype != XTYPE_UNKNOWN)
- usb_kill_urb(xpad->irq_out);
+ if (xpad->xtype != XTYPE_UNKNOWN) {
+ if (!usb_wait_anchor_empty_timeout(&xpad->irq_out_anchor,
+ 5000)) {
+ dev_warn(&xpad->intf->dev,
+ "timed out waiting for output URB to complete, killing\n");
+ usb_kill_anchored_urbs(&xpad->irq_out_anchor);
+ }
+ }
}
static void xpad_deinit_output(struct usb_xpad *xpad)
@@ -770,27 +892,60 @@ static void xpad_deinit_output(struct usb_xpad *xpad)
static int xpad_inquiry_pad_presence(struct usb_xpad *xpad)
{
+ struct xpad_output_packet *packet =
+ &xpad->out_packets[XPAD_OUT_CMD_IDX];
+ unsigned long flags;
+ int retval;
+
+ spin_lock_irqsave(&xpad->odata_lock, flags);
+
+ packet->data[0] = 0x08;
+ packet->data[1] = 0x00;
+ packet->data[2] = 0x0F;
+ packet->data[3] = 0xC0;
+ packet->data[4] = 0x00;
+ packet->data[5] = 0x00;
+ packet->data[6] = 0x00;
+ packet->data[7] = 0x00;
+ packet->data[8] = 0x00;
+ packet->data[9] = 0x00;
+ packet->data[10] = 0x00;
+ packet->data[11] = 0x00;
+ packet->len = 12;
+ packet->pending = true;
+
+ /* Reset the sequence so we send out presence first */
+ xpad->last_out_packet = -1;
+ retval = xpad_try_sending_next_out_packet(xpad);
+
+ spin_unlock_irqrestore(&xpad->odata_lock, flags);
+
+ return retval;
+}
+
+static int xpad_start_xbox_one(struct usb_xpad *xpad)
+{
+ struct xpad_output_packet *packet =
+ &xpad->out_packets[XPAD_OUT_CMD_IDX];
+ unsigned long flags;
int retval;
- mutex_lock(&xpad->odata_mutex);
+ spin_lock_irqsave(&xpad->odata_lock, flags);
- xpad->odata[0] = 0x08;
- xpad->odata[1] = 0x00;
- xpad->odata[2] = 0x0F;
- xpad->odata[3] = 0xC0;
- xpad->odata[4] = 0x00;
- xpad->odata[5] = 0x00;
- xpad->odata[6] = 0x00;
- xpad->odata[7] = 0x00;
- xpad->odata[8] = 0x00;
- xpad->odata[9] = 0x00;
- xpad->odata[10] = 0x00;
- xpad->odata[11] = 0x00;
- xpad->irq_out->transfer_buffer_length = 12;
+ /* Xbox one controller needs to be initialized. */
+ packet->data[0] = 0x05;
+ packet->data[1] = 0x20;
+ packet->data[2] = xpad->odata_serial++; /* packet serial */
+ packet->data[3] = 0x01; /* rumble bit enable? */
+ packet->data[4] = 0x00;
+ packet->len = 5;
+ packet->pending = true;
- retval = usb_submit_urb(xpad->irq_out, GFP_KERNEL);
+ /* Reset the sequence so we send out start packet first */
+ xpad->last_out_packet = -1;
+ retval = xpad_try_sending_next_out_packet(xpad);
- mutex_unlock(&xpad->odata_mutex);
+ spin_unlock_irqrestore(&xpad->odata_lock, flags);
return retval;
}
@@ -799,8 +954,11 @@ static int xpad_inquiry_pad_presence(struct usb_xpad *xpad)
static int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect)
{
struct usb_xpad *xpad = input_get_drvdata(dev);
+ struct xpad_output_packet *packet = &xpad->out_packets[XPAD_OUT_FF_IDX];
__u16 strong;
__u16 weak;
+ int retval;
+ unsigned long flags;
if (effect->type != FF_RUMBLE)
return 0;
@@ -808,69 +966,81 @@ static int xpad_play_effect(struct input_dev *dev, void *data, struct ff_effect
strong = effect->u.rumble.strong_magnitude;
weak = effect->u.rumble.weak_magnitude;
+ spin_lock_irqsave(&xpad->odata_lock, flags);
+
switch (xpad->xtype) {
case XTYPE_XBOX:
- xpad->odata[0] = 0x00;
- xpad->odata[1] = 0x06;
- xpad->odata[2] = 0x00;
- xpad->odata[3] = strong / 256; /* left actuator */
- xpad->odata[4] = 0x00;
- xpad->odata[5] = weak / 256; /* right actuator */
- xpad->irq_out->transfer_buffer_length = 6;
+ packet->data[0] = 0x00;
+ packet->data[1] = 0x06;
+ packet->data[2] = 0x00;
+ packet->data[3] = strong / 256; /* left actuator */
+ packet->data[4] = 0x00;
+ packet->data[5] = weak / 256; /* right actuator */
+ packet->len = 6;
+ packet->pending = true;
break;
case XTYPE_XBOX360:
- xpad->odata[0] = 0x00;
- xpad->odata[1] = 0x08;
- xpad->odata[2] = 0x00;
- xpad->odata[3] = strong / 256; /* left actuator? */
- xpad->odata[4] = weak / 256; /* right actuator? */
- xpad->odata[5] = 0x00;
- xpad->odata[6] = 0x00;
- xpad->odata[7] = 0x00;
- xpad->irq_out->transfer_buffer_length = 8;
+ packet->data[0] = 0x00;
+ packet->data[1] = 0x08;
+ packet->data[2] = 0x00;
+ packet->data[3] = strong / 256; /* left actuator? */
+ packet->data[4] = weak / 256; /* right actuator? */
+ packet->data[5] = 0x00;
+ packet->data[6] = 0x00;
+ packet->data[7] = 0x00;
+ packet->len = 8;
+ packet->pending = true;
break;
case XTYPE_XBOX360W:
- xpad->odata[0] = 0x00;
- xpad->odata[1] = 0x01;
- xpad->odata[2] = 0x0F;
- xpad->odata[3] = 0xC0;
- xpad->odata[4] = 0x00;
- xpad->odata[5] = strong / 256;
- xpad->odata[6] = weak / 256;
- xpad->odata[7] = 0x00;
- xpad->odata[8] = 0x00;
- xpad->odata[9] = 0x00;
- xpad->odata[10] = 0x00;
- xpad->odata[11] = 0x00;
- xpad->irq_out->transfer_buffer_length = 12;
+ packet->data[0] = 0x00;
+ packet->data[1] = 0x01;
+ packet->data[2] = 0x0F;
+ packet->data[3] = 0xC0;
+ packet->data[4] = 0x00;
+ packet->data[5] = strong / 256;
+ packet->data[6] = weak / 256;
+ packet->data[7] = 0x00;
+ packet->data[8] = 0x00;
+ packet->data[9] = 0x00;
+ packet->data[10] = 0x00;
+ packet->data[11] = 0x00;
+ packet->len = 12;
+ packet->pending = true;
break;
case XTYPE_XBOXONE:
- xpad->odata[0] = 0x09; /* activate rumble */
- xpad->odata[1] = 0x08;
- xpad->odata[2] = 0x00;
- xpad->odata[3] = 0x08; /* continuous effect */
- xpad->odata[4] = 0x00; /* simple rumble mode */
- xpad->odata[5] = 0x03; /* L and R actuator only */
- xpad->odata[6] = 0x00; /* TODO: LT actuator */
- xpad->odata[7] = 0x00; /* TODO: RT actuator */
- xpad->odata[8] = strong / 256; /* left actuator */
- xpad->odata[9] = weak / 256; /* right actuator */
- xpad->odata[10] = 0x80; /* length of pulse */
- xpad->odata[11] = 0x00; /* stop period of pulse */
- xpad->irq_out->transfer_buffer_length = 12;
+ packet->data[0] = 0x09; /* activate rumble */
+ packet->data[1] = 0x08;
+ packet->data[2] = xpad->odata_serial++;
+ packet->data[3] = 0x08; /* continuous effect */
+ packet->data[4] = 0x00; /* simple rumble mode */
+ packet->data[5] = 0x03; /* L and R actuator only */
+ packet->data[6] = 0x00; /* TODO: LT actuator */
+ packet->data[7] = 0x00; /* TODO: RT actuator */
+ packet->data[8] = strong / 512; /* left actuator */
+ packet->data[9] = weak / 512; /* right actuator */
+ packet->data[10] = 0x80; /* length of pulse */
+ packet->data[11] = 0x00; /* stop period of pulse */
+ packet->data[12] = 0x00;
+ packet->len = 13;
+ packet->pending = true;
break;
default:
dev_dbg(&xpad->dev->dev,
"%s - rumble command sent to unsupported xpad type: %d\n",
__func__, xpad->xtype);
- return -EINVAL;
+ retval = -EINVAL;
+ goto out;
}
- return usb_submit_urb(xpad->irq_out, GFP_ATOMIC);
+ retval = xpad_try_sending_next_out_packet(xpad);
+
+out:
+ spin_unlock_irqrestore(&xpad->odata_lock, flags);
+ return retval;
}
static int xpad_init_ff(struct usb_xpad *xpad)
@@ -921,36 +1091,44 @@ struct xpad_led {
*/
static void xpad_send_led_command(struct usb_xpad *xpad, int command)
{
+ struct xpad_output_packet *packet =
+ &xpad->out_packets[XPAD_OUT_LED_IDX];
+ unsigned long flags;
+
command %= 16;
- mutex_lock(&xpad->odata_mutex);
+ spin_lock_irqsave(&xpad->odata_lock, flags);
switch (xpad->xtype) {
case XTYPE_XBOX360:
- xpad->odata[0] = 0x01;
- xpad->odata[1] = 0x03;
- xpad->odata[2] = command;
- xpad->irq_out->transfer_buffer_length = 3;
+ packet->data[0] = 0x01;
+ packet->data[1] = 0x03;
+ packet->data[2] = command;
+ packet->len = 3;
+ packet->pending = true;
break;
+
case XTYPE_XBOX360W:
- xpad->odata[0] = 0x00;
- xpad->odata[1] = 0x00;
- xpad->odata[2] = 0x08;
- xpad->odata[3] = 0x40 + command;
- xpad->odata[4] = 0x00;
- xpad->odata[5] = 0x00;
- xpad->odata[6] = 0x00;
- xpad->odata[7] = 0x00;
- xpad->odata[8] = 0x00;
- xpad->odata[9] = 0x00;
- xpad->odata[10] = 0x00;
- xpad->odata[11] = 0x00;
- xpad->irq_out->transfer_buffer_length = 12;
+ packet->data[0] = 0x00;
+ packet->data[1] = 0x00;
+ packet->data[2] = 0x08;
+ packet->data[3] = 0x40 + command;
+ packet->data[4] = 0x00;
+ packet->data[5] = 0x00;
+ packet->data[6] = 0x00;
+ packet->data[7] = 0x00;
+ packet->data[8] = 0x00;
+ packet->data[9] = 0x00;
+ packet->data[10] = 0x00;
+ packet->data[11] = 0x00;
+ packet->len = 12;
+ packet->pending = true;
break;
}
- usb_submit_urb(xpad->irq_out, GFP_KERNEL);
- mutex_unlock(&xpad->odata_mutex);
+ xpad_try_sending_next_out_packet(xpad);
+
+ spin_unlock_irqrestore(&xpad->odata_lock, flags);
}
/*
@@ -959,7 +1137,7 @@ static void xpad_send_led_command(struct usb_xpad *xpad, int command)
*/
static void xpad_identify_controller(struct usb_xpad *xpad)
{
- xpad_send_led_command(xpad, (xpad->pad_nr % 4) + 2);
+ led_set_brightness(&xpad->led->led_cdev, (xpad->pad_nr % 4) + 2);
}
static void xpad_led_set(struct led_classdev *led_cdev,
@@ -1001,14 +1179,7 @@ static int xpad_led_probe(struct usb_xpad *xpad)
if (error)
goto err_free_id;
- if (xpad->xtype == XTYPE_XBOX360) {
- /*
- * Light up the segment corresponding to controller
- * number on wired devices. On wireless we'll do that
- * when they respond to "presence" packet.
- */
- xpad_identify_controller(xpad);
- }
+ xpad_identify_controller(xpad);
return 0;
@@ -1036,37 +1207,73 @@ static void xpad_led_disconnect(struct usb_xpad *xpad) { }
static void xpad_identify_controller(struct usb_xpad *xpad) { }
#endif
-static int xpad_open(struct input_dev *dev)
+static int xpad_start_input(struct usb_xpad *xpad)
{
- struct usb_xpad *xpad = input_get_drvdata(dev);
-
- /* URB was submitted in probe */
- if (xpad->xtype == XTYPE_XBOX360W)
- return 0;
+ int error;
- xpad->irq_in->dev = xpad->udev;
if (usb_submit_urb(xpad->irq_in, GFP_KERNEL))
return -EIO;
if (xpad->xtype == XTYPE_XBOXONE) {
- /* Xbox one controller needs to be initialized. */
- xpad->odata[0] = 0x05;
- xpad->odata[1] = 0x20;
- xpad->irq_out->transfer_buffer_length = 2;
- return usb_submit_urb(xpad->irq_out, GFP_KERNEL);
+ error = xpad_start_xbox_one(xpad);
+ if (error) {
+ usb_kill_urb(xpad->irq_in);
+ return error;
+ }
}
return 0;
}
-static void xpad_close(struct input_dev *dev)
+static void xpad_stop_input(struct usb_xpad *xpad)
{
- struct usb_xpad *xpad = input_get_drvdata(dev);
+ usb_kill_urb(xpad->irq_in);
+}
+
+static int xpad360w_start_input(struct usb_xpad *xpad)
+{
+ int error;
+
+ error = usb_submit_urb(xpad->irq_in, GFP_KERNEL);
+ if (error)
+ return -EIO;
- if (xpad->xtype != XTYPE_XBOX360W)
+ /*
+ * Send presence packet.
+ * This will force the controller to resend connection packets.
+ * This is useful in the case we activate the module after the
+ * adapter has been plugged in, as it won't automatically
+ * send us info about the controllers.
+ */
+ error = xpad_inquiry_pad_presence(xpad);
+ if (error) {
usb_kill_urb(xpad->irq_in);
+ return error;
+ }
- xpad_stop_output(xpad);
+ return 0;
+}
+
+static void xpad360w_stop_input(struct usb_xpad *xpad)
+{
+ usb_kill_urb(xpad->irq_in);
+
+ /* Make sure we are done with presence work if it was scheduled */
+ flush_work(&xpad->work);
+}
+
+static int xpad_open(struct input_dev *dev)
+{
+ struct usb_xpad *xpad = input_get_drvdata(dev);
+
+ return xpad_start_input(xpad);
+}
+
+static void xpad_close(struct input_dev *dev)
+{
+ struct usb_xpad *xpad = input_get_drvdata(dev);
+
+ xpad_stop_input(xpad);
}
static void xpad_set_up_abs(struct input_dev *input_dev, signed short abs)
@@ -1097,8 +1304,11 @@ static void xpad_set_up_abs(struct input_dev *input_dev, signed short abs)
static void xpad_deinit_input(struct usb_xpad *xpad)
{
- xpad_led_disconnect(xpad);
- input_unregister_device(xpad->dev);
+ if (xpad->input_created) {
+ xpad->input_created = false;
+ xpad_led_disconnect(xpad);
+ input_unregister_device(xpad->dev);
+ }
}
static int xpad_init_input(struct usb_xpad *xpad)
@@ -1118,8 +1328,10 @@ static int xpad_init_input(struct usb_xpad *xpad)
input_set_drvdata(input_dev, xpad);
- input_dev->open = xpad_open;
- input_dev->close = xpad_close;
+ if (xpad->xtype != XTYPE_XBOX360W) {
+ input_dev->open = xpad_open;
+ input_dev->close = xpad_close;
+ }
__set_bit(EV_KEY, input_dev->evbit);
@@ -1181,6 +1393,7 @@ static int xpad_init_input(struct usb_xpad *xpad)
if (error)
goto err_disconnect_led;
+ xpad->input_created = true;
return 0;
err_disconnect_led:
@@ -1241,6 +1454,7 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
xpad->mapping = xpad_device[i].mapping;
xpad->xtype = xpad_device[i].xtype;
xpad->name = xpad_device[i].name;
+ INIT_WORK(&xpad->work, xpad_presence_work);
if (xpad->xtype == XTYPE_UNKNOWN) {
if (intf->cur_altsetting->desc.bInterfaceClass == USB_CLASS_VENDOR_SPEC) {
@@ -1277,10 +1491,6 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
usb_set_intfdata(intf, xpad);
- error = xpad_init_input(xpad);
- if (error)
- goto err_deinit_output;
-
if (xpad->xtype == XTYPE_XBOX360W) {
/*
* Submit the int URB immediately rather than waiting for open
@@ -1289,28 +1499,24 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
* exactly the message that a controller has arrived that
* we're waiting for.
*/
- xpad->irq_in->dev = xpad->udev;
- error = usb_submit_urb(xpad->irq_in, GFP_KERNEL);
+ error = xpad360w_start_input(xpad);
if (error)
- goto err_deinit_input;
-
+ goto err_deinit_output;
/*
- * Send presence packet.
- * This will force the controller to resend connection packets.
- * This is useful in the case we activate the module after the
- * adapter has been plugged in, as it won't automatically
- * send us info about the controllers.
+ * Wireless controllers require RESET_RESUME to work properly
+ * after suspend. Ideally this quirk should be in usb core
+ * quirk list, but we have too many vendors producing these
+ * controllers and we'd need to maintain 2 identical lists
+ * here in this driver and in usb core.
*/
- error = xpad_inquiry_pad_presence(xpad);
+ udev->quirks |= USB_QUIRK_RESET_RESUME;
+ } else {
+ error = xpad_init_input(xpad);
if (error)
- goto err_kill_in_urb;
+ goto err_deinit_output;
}
return 0;
-err_kill_in_urb:
- usb_kill_urb(xpad->irq_in);
-err_deinit_input:
- xpad_deinit_input(xpad);
err_deinit_output:
xpad_deinit_output(xpad);
err_free_in_urb:
@@ -1320,19 +1526,24 @@ err_free_idata:
err_free_mem:
kfree(xpad);
return error;
-
}
static void xpad_disconnect(struct usb_interface *intf)
{
- struct usb_xpad *xpad = usb_get_intfdata (intf);
+ struct usb_xpad *xpad = usb_get_intfdata(intf);
+
+ if (xpad->xtype == XTYPE_XBOX360W)
+ xpad360w_stop_input(xpad);
xpad_deinit_input(xpad);
- xpad_deinit_output(xpad);
- if (xpad->xtype == XTYPE_XBOX360W) {
- usb_kill_urb(xpad->irq_in);
- }
+ /*
+ * Now that both input device and LED device are gone we can
+ * stop output URB.
+ */
+ xpad_stop_output(xpad);
+
+ xpad_deinit_output(xpad);
usb_free_urb(xpad->irq_in);
usb_free_coherent(xpad->udev, XPAD_PKT_LEN,
@@ -1343,10 +1554,55 @@ static void xpad_disconnect(struct usb_interface *intf)
usb_set_intfdata(intf, NULL);
}
+static int xpad_suspend(struct usb_interface *intf, pm_message_t message)
+{
+ struct usb_xpad *xpad = usb_get_intfdata(intf);
+ struct input_dev *input = xpad->dev;
+
+ if (xpad->xtype == XTYPE_XBOX360W) {
+ /*
+ * Wireless controllers always listen to input so
+ * they are notified when controller shows up
+ * or goes away.
+ */
+ xpad360w_stop_input(xpad);
+ } else {
+ mutex_lock(&input->mutex);
+ if (input->users)
+ xpad_stop_input(xpad);
+ mutex_unlock(&input->mutex);
+ }
+
+ xpad_stop_output(xpad);
+
+ return 0;
+}
+
+static int xpad_resume(struct usb_interface *intf)
+{
+ struct usb_xpad *xpad = usb_get_intfdata(intf);
+ struct input_dev *input = xpad->dev;
+ int retval = 0;
+
+ if (xpad->xtype == XTYPE_XBOX360W) {
+ retval = xpad360w_start_input(xpad);
+ } else {
+ mutex_lock(&input->mutex);
+ if (input->users)
+ retval = xpad_start_input(xpad);
+ mutex_unlock(&input->mutex);
+ }
+
+ return retval;
+}
+
static struct usb_driver xpad_driver = {
.name = "xpad",
.probe = xpad_probe,
.disconnect = xpad_disconnect,
+ .suspend = xpad_suspend,
+ .resume = xpad_resume,
+ .reset_resume = xpad_resume,
.id_table = xpad_table,
};
@@ -1354,4 +1610,4 @@ module_usb_driver(xpad_driver);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL");
\ No newline at end of file
--
2.5.0

View File

@ -1,12 +0,0 @@
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,
- .symbol_rate_min = 5000000,
+ .symbol_rate_min = 1000000,
.symbol_rate_max = 45000000,
.caps = FE_CAN_INVERSION_AUTO |

View File

@ -1,138 +0,0 @@
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;
- struct stb0899_params *params = &state->params;
short int derot_step, derot_freq = 0, derot_limit, next_loop = 3;
int index = 0;
@@ -216,10 +215,9 @@
/* timing loop computation & symbol rate optimisation */
derot_limit = (internal->sub_range / 2L) / internal->mclk;
- derot_step = (params->srate / 2L) / internal->mclk;
+ derot_step = internal->derot_step * 4; /* dertot_step = decreasing delta */
while ((stb0899_check_tmg(state) != TIMINGOK) && next_loop) {
- index++;
derot_freq += index * internal->direction * derot_step; /* next derot zig zag position */
if (abs(derot_freq) > derot_limit)
@@ -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 */
}
+ index++;
internal->direction = -internal->direction; /* Change zigzag direction */
}
@@ -278,14 +277,18 @@
{
struct stb0899_internal *internal = &state->internal;
- short int derot_freq = 0, last_derot_freq = 0, derot_limit, next_loop = 3;
+ short int derot_freq = 0, last_derot_freq = 0, derot_limit, derot_step, next_loop = 3;
int index = 0;
+ int base_freq;
u8 cfr[2];
u8 reg;
internal->status = NOCARRIER;
derot_limit = (internal->sub_range / 2L) / internal->mclk;
derot_freq = internal->derot_freq;
+ derot_step = internal->derot_step * 2;
+ last_derot_freq = internal->derot_freq;
+ base_freq = internal->derot_freq;
reg = stb0899_read_reg(state, STB0899_CFD);
STB0899_SETFIELD_VAL(CFD_ON, reg, 1);
@@ -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) {
- index++;
last_derot_freq = derot_freq;
- derot_freq += index * internal->direction * internal->derot_step; /* next zig zag derotator position */
+ derot_freq += index * internal->direction * derot_step; /* next zig zag derotator position */
- if(abs(derot_freq) > derot_limit)
+ if (derot_freq > base_freq + derot_limit || derot_freq < base_freq - derot_limit)
next_loop--;
if (next_loop) {
@@ -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 */
}
+ index++;
+ internal->direction = -internal->direction; /* Change zigzag direction */
}
- internal->direction = -internal->direction; /* Change zigzag direction */
} while ((internal->status != CARRIEROK) && next_loop);
if (internal->status == CARRIEROK) {
@@ -338,6 +341,7 @@
int lock = 0, index = 0, dataTime = 500, loop;
u8 reg;
+ msleep(1);
internal->status = NODATA;
/* RESET FEC */
@@ -348,6 +352,7 @@
reg = stb0899_read_reg(state, STB0899_TSTRES);
STB0899_SETFIELD_VAL(FRESACS, reg, 0);
stb0899_write_reg(state, STB0899_TSTRES, reg);
+ msleep(1);
if (params->srate <= 2000000)
dataTime = 2000;
@@ -363,6 +368,7 @@
stb0899_write_reg(state, STB0899_DSTATUS2, 0x00); /* force search loop */
while (1) {
+ msleep(1); // Alex: added 1 mSec
/* WARNING! VIT LOCKED has to be tested before VIT_END_LOOOP */
reg = stb0899_read_reg(state, STB0899_VSTATUS);
lock = STB0899_GETFIELD(VSTATUS_LOCKEDVIT, reg);
@@ -390,20 +396,21 @@
short int derot_freq, derot_step, derot_limit, next_loop = 3;
u8 cfr[2];
u8 reg;
- int index = 1;
+ int index = 0;
+ int base_freq;
struct stb0899_internal *internal = &state->internal;
- struct stb0899_params *params = &state->params;
- derot_step = (params->srate / 4L) / internal->mclk;
+ derot_step = internal->derot_step;
derot_limit = (internal->sub_range / 2L) / internal->mclk;
derot_freq = internal->derot_freq;
+ base_freq = internal->derot_freq;
do {
if ((internal->status != CARRIEROK) || (stb0899_check_data(state) != DATAOK)) {
derot_freq += index * internal->direction * derot_step; /* next zig zag derotator position */
- if (abs(derot_freq) > derot_limit)
+ if (derot_freq > base_freq + derot_limit || derot_freq < base_freq - derot_limit)
next_loop--;
if (next_loop) {
@@ -417,9 +424,9 @@
stb0899_write_regs(state, STB0899_CFRM, cfr, 2); /* derotator frequency */
stb0899_check_carrier(state);
- index++;
}
}
+ index++;
internal->direction = -internal->direction; /* change zig zag direction */
} while ((internal->status != DATAOK) && next_loop);

View File

@ -1,62 +0,0 @@
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);
}

View File

@ -1,17 +0,0 @@
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
}

View File

@ -1,41 +0,0 @@
From 1efc21701d94ed0c5b91467b042bed8b8becd5cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arno=20Bauern=C3=B6ppel?= <arno@aziraphale.net>
Date: Sun, 15 Nov 2015 19:24:10 -0200
Subject: [media] Add support for dvb usb stick Hauppauge WinTV-soloHD
This patch adds support for the DVB-T/C/T2 usb stick WinTV-soloHD from
Hauppauge. It adds the usb ID 2040:0264 Hauppauge to the cards of the
driver em28xx.
I successfully tested DVB-T/C and the IR remote control with the
firmware dvb-demod-si2168-b40-01.fw.
Signed-off-by: Arno Bauernoeppel <arno@aziraphale.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h
index 0a46580..1c1c298 100644
--- a/drivers/media/dvb-core/dvb-usb-ids.h
+++ b/drivers/media/dvb-core/dvb-usb-ids.h
@@ -389,4 +389,5 @@
#define USB_PID_PCTV_2002E_SE 0x025d
#define USB_PID_SVEON_STV27 0xd3af
#define USB_PID_TURBOX_DTT_2000 0xd3a4
+#define USB_PID_WINTV_SOLOHD 0x0264
#endif
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
index 5373dce..a1b6ef5 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -2475,6 +2475,8 @@ struct usb_device_id em28xx_id_table[] = {
.driver_info = EM28178_BOARD_PCTV_461E },
{ USB_DEVICE(0x2013, 0x025f),
.driver_info = EM28178_BOARD_PCTV_292E },
+ { USB_DEVICE(0x2040, 0x0264), /* Hauppauge WinTV-soloHD */
+ .driver_info = EM28178_BOARD_PCTV_292E },
{ USB_DEVICE(0x0413, 0x6f07),
.driver_info = EM2861_BOARD_LEADTEK_VC100 },
{ USB_DEVICE(0xeb1a, 0x8179),
--
cgit v0.10.2

View File

@ -1,18 +0,0 @@
diff -rupN a/drivers/media/dvb-frontends/ds3000.c b/drivers/media/dvb-frontends/ds3000.c
--- a/drivers/media/dvb-frontends/ds3000.c 2015-01-28 23:24:59.000000000 +0100
+++ b/drivers/media/dvb-frontends/ds3000.c 2015-01-29 21:57:56.000000000 +0100
@@ -958,6 +958,14 @@ static int ds3000_set_frontend(struct dv
/* enable ac coupling */
ds3000_writereg(state, 0x25, 0x8a);
+ dprintk("%s() frequency:%u symbol_rate:%u\n", __func__, c->frequency, c->symbol_rate);
+
+ if (c->symbol_rate < ds3000_ops.info.symbol_rate_min || c->symbol_rate > ds3000_ops.info.symbol_rate_max ) {
+ dprintk("%s() symbol_rate %u out of range (%u ... %u)\n", __func__, c->symbol_rate,
+ ds3000_ops.info.symbol_rate_min, ds3000_ops.info.symbol_rate_max);
+ return 1;
+ }
+
/* enhance symbol rate performance */
if ((c->symbol_rate / 1000) <= 5000) {
value = 29777 / (c->symbol_rate / 1000) + 1;

View File

@ -1,25 +0,0 @@
diff -urN a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h
--- a/drivers/media/dvb-core/dvb-usb-ids.h 2016-01-11 01:01:32.000000000 +0200
+++ b/drivers/media/dvb-core/dvb-usb-ids.h 2016-01-13 12:42:17.648388583 +0200
@@ -247,6 +247,7 @@
#define USB_PID_TECHNOTREND_CONNECT_CT3650 0x300d
#define USB_PID_TECHNOTREND_CONNECT_S2_4600 0x3011
#define USB_PID_TECHNOTREND_CONNECT_CT2_4650_CI 0x3012
+#define USB_PID_TECHNOTREND_CONNECT_CT2_4650_CI_2 0x3015
#define USB_PID_TECHNOTREND_TVSTICK_CT2_4400 0x3014
#define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY 0x005a
#define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY_2 0x0081
diff -urN a/drivers/media/usb/dvb-usb-v2/dvbsky.c b/drivers/media/usb/dvb-usb-v2/dvbsky.c
--- a/drivers/media/usb/dvb-usb-v2/dvbsky.c 2016-01-11 01:01:32.000000000 +0200
+++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c 2016-01-13 12:41:17.480386735 +0200
@@ -847,6 +847,10 @@
USB_PID_TECHNOTREND_CONNECT_CT2_4650_CI,
&dvbsky_t680c_props, "TechnoTrend TT-connect CT2-4650 CI",
RC_MAP_TT_1500) },
+ { DVB_USB_DEVICE(USB_VID_TECHNOTREND,
+ USB_PID_TECHNOTREND_CONNECT_CT2_4650_CI_2,
+ &dvbsky_t680c_props, "TechnoTrend TT-connect CT2-4650 CI v1.1",
+ RC_MAP_TT_1500) },
{ DVB_USB_DEVICE(USB_VID_TERRATEC,
USB_PID_TERRATEC_H7_3,
&dvbsky_t680c_props, "Terratec H7 Rev.4",

View File

@ -1,25 +0,0 @@
taken from https://bugzilla.kernel.org/show_bug.cgi?id=108691
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c
--- a/drivers/media/usb/dvb-usb-v2/af9035.c
+++ b/drivers/media/usb/dvb-usb-v2/af9035.c
@@ -2053,6 +2053,8 @@ static const struct usb_device_id af9035_id_table[] = {
&af9035_props, "Avermedia A835B(3835)", RC_MAP_IT913X_V2) },
{ DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A835B_4835,
&af9035_props, "Avermedia A835B(4835)", RC_MAP_IT913X_V2) },
+ { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_TD110,
+ &af9035_props, "Avermedia AverTV Volar HD 2 (TD110)", RC_MAP_AVERMEDIA_RM_KS) },
{ DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_H335,
&af9035_props, "Avermedia H335", RC_MAP_IT913X_V2) },
{ DVB_USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_UB499_2T_T09,
diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h
--- a/drivers/media/dvb-core/dvb-usb-ids.h
+++ b/drivers/media/dvb-core/dvb-usb-ids.h
@@ -242,6 +242,7 @@
#define USB_PID_AVERMEDIA_1867 0x1867
#define USB_PID_AVERMEDIA_A867 0xa867
#define USB_PID_AVERMEDIA_H335 0x0335
+#define USB_PID_AVERMEDIA_TD110 0xa110
#define USB_PID_AVERMEDIA_TWINSTAR 0x0825
#define USB_PID_TECHNOTREND_CONNECT_S2400 0x3006
#define USB_PID_TECHNOTREND_CONNECT_S2400_8KEEPROM 0x3009

View File

@ -1,50 +0,0 @@
diff --git a/drivers/media/usb/dvb-usb/az6027.c b/drivers/media/usb/dvb-usb/az6027.c
index 92e47d6..2e71136 100644
--- a/drivers/media/usb/dvb-usb/az6027.c
+++ b/drivers/media/usb/dvb-usb/az6027.c
@@ -1090,6 +1090,7 @@ static struct usb_device_id az6027_usb_table[] = {
{ USB_DEVICE(USB_VID_TECHNISAT, USB_PID_TECHNISAT_USB2_HDCI_V2) },
{ USB_DEVICE(USB_VID_ELGATO, USB_PID_ELGATO_EYETV_SAT) },
{ USB_DEVICE(USB_VID_ELGATO, USB_PID_ELGATO_EYETV_SAT_V2) },
+ { USB_DEVICE(USB_VID_ELGATO, USB_PID_ELGATO_EYETV_SAT_V3) },
{ },
};
@@ -1138,7 +1139,7 @@ static struct dvb_usb_device_properties az6027_properties = {
.i2c_algo = &az6027_i2c_algo,
- .num_device_descs = 7,
+ .num_device_descs = 8,
.devices = {
{
.name = "AZUREWAVE DVB-S/S2 USB2.0 (AZ6027)",
@@ -1168,6 +1169,10 @@ static struct dvb_usb_device_properties az6027_properties = {
.name = "Elgato EyeTV Sat",
.cold_ids = { &az6027_usb_table[6], NULL },
.warm_ids = { NULL },
+ }, {
+ .name = "Elgato EyeTV Sat",
+ .cold_ids = { &az6027_usb_table[7], NULL },
+ .warm_ids = { NULL },
},
{ NULL },
}
warning: LF will be replaced by CRLF in az6027.c.
The file will have its original line endings in your working directory.
diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h
index c117fb3..7552f38 100644
--- a/drivers/media/dvb-core/dvb-usb-ids.h
+++ b/drivers/media/dvb-core/dvb-usb-ids.h
@@ -365,6 +365,7 @@
#define USB_PID_ELGATO_EYETV_DTT_Dlx 0x0020
#define USB_PID_ELGATO_EYETV_SAT 0x002a
#define USB_PID_ELGATO_EYETV_SAT_V2 0x0025
+#define USB_PID_ELGATO_EYETV_SAT_V3 0x0036
#define USB_PID_DVB_T_USB_STICK_HIGH_SPEED_COLD 0x5000
#define USB_PID_DVB_T_USB_STICK_HIGH_SPEED_WARM 0x5001
#define USB_PID_FRIIO_WHITE 0x0001
warning: LF will be replaced by CRLF in dvb-usb-ids.h.
The file will have its original line endings in your working directory.

View File

@ -1,22 +0,0 @@
diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c
index 31765aa..f041b69 100644
--- a/drivers/media/pci/cx23885/cx23885-dvb.c
+++ b/drivers/media/pci/cx23885/cx23885-dvb.c
@@ -1139,7 +1139,7 @@ static int dvb_register_ci_mac(struct cx23885_tsport *port)
u8 eeprom[256]; /* 24C02 i2c eeprom */
struct sp2_config sp2_config;
struct i2c_board_info info;
- struct cx23885_i2c *i2c_bus2 = &dev->i2c_bus[1];
+ struct cx23885_i2c *i2c_bus = &dev->i2c_bus[0];
/* attach CI */
memset(&sp2_config, 0, sizeof(sp2_config));
@@ -1151,7 +1151,7 @@ static int dvb_register_ci_mac(struct cx23885_tsport *port)
info.addr = 0x40;
info.platform_data = &sp2_config;
request_module(info.type);
- client_ci = i2c_new_device(&i2c_bus2->i2c_adap, &info);
+ client_ci = i2c_new_device(&i2c_bus->i2c_adap, &info);
if (client_ci == NULL || client_ci->dev.driver == NULL)
return -ENODEV;
if (!try_module_get(client_ci->dev.driver->owner)) {

View File

@ -1,48 +0,0 @@
From: cvh <namerp@googlemail.com>
Date: Sun, 29 May 2016 23:00:40 +0200
Subject: [PATCH] [media] Add support for Terratec Cinergy S2 Rev.3
---
drivers/media/usb/dvb-usb/dw2102.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/media/usb/dvb-usb/dw2102.c b/drivers/media/usb/dvb-usb/dw2102.c
index 49b55d7..961f64e 100644
--- a/drivers/media/usb/dvb-usb/dw2102.c
+++ b/drivers/media/usb/dvb-usb/dw2102.c
@@ -1683,6 +1683,7 @@ enum dw2102_table_entry {
TEVII_S421,
TEVII_S632,
TERRATEC_CINERGY_S2_R2,
+ TERRATEC_CINERGY_S2_R3,
GOTVIEW_SAT_HD,
GENIATECH_T220,
TECHNOTREND_S2_4600,
@@ -1709,6 +1710,7 @@ static struct usb_device_id dw2102_table[] = {
[TEVII_S421] = {USB_DEVICE(0x9022, USB_PID_TEVII_S421)},
[TEVII_S632] = {USB_DEVICE(0x9022, USB_PID_TEVII_S632)},
[TERRATEC_CINERGY_S2_R2] = {USB_DEVICE(USB_VID_TERRATEC, 0x00b0)},
+ [TERRATEC_CINERGY_S2_R3] = {USB_DEVICE(USB_VID_TERRATEC, 0x0102)},
[GOTVIEW_SAT_HD] = {USB_DEVICE(0x1FE1, USB_PID_GOTVIEW_SAT_HD)},
[GENIATECH_T220] = {USB_DEVICE(0x1f4d, 0xD220)},
[TECHNOTREND_S2_4600] = {USB_DEVICE(USB_VID_TECHNOTREND,
@@ -2118,7 +2120,7 @@ static struct dvb_usb_device_properties su3000_properties = {
}},
}
},
- .num_device_descs = 5,
+ .num_device_descs = 6,
.devices = {
{ "SU3000HD DVB-S USB2.0",
{ &dw2102_table[GENIATECH_SU3000], NULL },
@@ -2136,6 +2138,10 @@ static struct dvb_usb_device_properties su3000_properties = {
{ &dw2102_table[TERRATEC_CINERGY_S2_R2], NULL },
{ NULL },
},
+ { "Terratec Cinergy S2 USB HD Rev.3",
+ { &dw2102_table[TERRATEC_CINERGY_S2_R3], NULL },
+ { NULL },
+ },
{ "GOTVIEW Satellite HD",
{ &dw2102_table[GOTVIEW_SAT_HD], NULL },
{ NULL },

View File

@ -1,10 +0,0 @@
--- a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi 2014-11-25 19:23:06.332485391 +0100
+++ b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi 2014-11-25 19:23:24.675776865 +0100
@@ -31,6 +31,7 @@
label = "imx6:red:front";
max-brightness = <248>;
pwms = <&pwm1 0 50000>;
+ linux,default-trigger = "heartbeat";
};
};

View File

@ -1,55 +0,0 @@
From a868ebd7d7e9ee8dc97b41ac89e5fa8d8cfc65d7 Mon Sep 17 00:00:00 2001
From: Peter Vicman <peter.vicman@gmail.com>
Date: Wed, 9 May 2017 20:18:07 +0200
Subject: [PATCH] limit eth speed 100mbits
default ethernet speed is set to 100mbits which works reliable
to enable gigabit speed module parameter via kernel command line
must be set in form fec.disable_giga=0
based on https://github.com/boundarydevices/linux-imx6/commit/aef0deef3c95aa0daf4fa5d082cca4ed2057c65f
---
drivers/net/ethernet/freescale/fec_main.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 716fcb1..af01828 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -142,6 +142,10 @@ static unsigned char macaddr[ETH_ALEN];
module_param_array(macaddr, byte, NULL, 0);
MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address");
+static int disable_giga = 1;
+module_param(disable_giga, int, 0644);
+MODULE_PARM_DESC(disable_giga, "disable gigabit speeds");
+
#if defined(CONFIG_M5272)
/*
* Some hardware gets it MAC address out of local flash memory.
@@ -1973,15 +1977,18 @@ static int fec_enet_mii_probe(struct net
}
/* mask with MAC supported features */
- if (fep->quirks & FEC_QUIRK_HAS_GBIT) {
+ if (!disable_giga && (fep->quirks & FEC_QUIRK_HAS_GBIT)) {
+ netdev_info(ndev, "set 1000mbps\n");
phy_dev->supported &= PHY_GBIT_FEATURES;
phy_dev->supported &= ~SUPPORTED_1000baseT_Half;
#if !defined(CONFIG_M5272)
phy_dev->supported |= SUPPORTED_Pause;
#endif
}
- else
+ else {
+ netdev_info(ndev, "set 100mbps\n");
phy_dev->supported &= PHY_BASIC_FEATURES;
+ }
phy_dev->advertising = phy_dev->supported;
--
2.7.4

View File

@ -1,104 +0,0 @@
* HDMI kernel panics (or at best, audio issues). Usually the user just reports a black screen when booting.
https://github.com/osmc/vero-linux/commit/aa30301610e7cc363390fa1614ae36bcd759f258
* Random freezes in Kodi after some time.
https://github.com/osmc/vero-linux/commit/ddf2e9f60ceb9dc8f287d8ee7c31ccd9419701fa
https://github.com/osmc/vero-linux/commit/a1cb4557060bb94f0453922bf8e31aba9ab29826
From 8bbbf9004aa0989df680d4ce8e13c013143b41d6 Mon Sep 17 00:00:00 2001
From: Peter Vicman <peter.vicman@gmail.com>
Date: Sun, 12 Mar 2017 15:12:54 +0100
Subject: [PATCH] linux kernel fixes from vero
---
drivers/mfd/mxc-hdmi-core.c | 24 +++++++---------------
.../mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c | 5 -----
.../mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h | 2 +-
3 files changed, 8 insertions(+), 23 deletions(-)
diff --git a/drivers/mfd/mxc-hdmi-core.c b/drivers/mfd/mxc-hdmi-core.c
index 8376e8e..43a7fb4 100644
--- a/drivers/mfd/mxc-hdmi-core.c
+++ b/drivers/mfd/mxc-hdmi-core.c
@@ -434,7 +434,7 @@ static const struct mxc_hdmi_ctsn mxc_hdmi_ctsn_tbl[] = {
{148500, { { 32000, 4096, 148500 }, { 44100, 6272, 165000 }, { 48000, 6144, 148500 } } }, /* 148.50 MHz */
};
-static bool hdmi_compute_cts_n(unsigned int freq, unsigned long pixel_clk,
+static void hdmi_compute_cts_n(unsigned int freq, unsigned long pixel_clk,
unsigned int *N, unsigned int *CTS)
{
int n, cts;
@@ -460,17 +460,13 @@ static bool hdmi_compute_cts_n(unsigned int freq, unsigned long pixel_clk,
cts *= mul;
/* Check that we are in spec (not always possible) */
- if (n < (128*freq/1500)) {
- pr_warn("%s: calculated ACR N value is too small. Audio might not work correctly.\n", __func__);
- return false;
- } else if (n > (128*freq/300)) {
- pr_warn("%s: calculated ACR N value is too large. Audio might not work correctly.\n", __func__);
- return false;
- }
+ if (n < (128*freq/1500))
+ pr_warn("%s: calculated ACR N value is too small. You may experience audio problems.\n", __func__);
+ if (n > (128*freq/300))
+ pr_warn("%s: calculated ACR N value is too large. You may experience audio problems.\n", __func__);
*N = n;
*CTS = cts;
- return true;
}
static void hdmi_lookup_cts_n(unsigned int freq, unsigned long pixel_clk,
@@ -521,15 +517,9 @@ static void hdmi_set_clk_regenerator(void)
hdmi_lookup_cts_n(sample_rate, pixel_clk_rate, &clk_n, &clk_cts);
- if (clk_cts == 0 && hdmi_compute_cts_n(sample_rate, pixel_clk_rate, &clk_n, &clk_cts))
+ if (clk_cts == 0) {
pr_debug("%s: pixel clock not supported - using fallback calculation.\n", __func__);
- else if (clk_cts == 0) {
- pr_err("%s: cts/n fallback calculation out of safe values, disabling hdmi audio\n", __func__);
-
- mxc_hdmi_abort_stream();
- if (!hdmi_audio_stream_playback)
- hdmi_abort_state = 1;
- return;
+ hdmi_compute_cts_n(sample_rate, pixel_clk_rate, &clk_n, &clk_cts);
}
if (hdmi_ratio != 100)
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c
index 525c21f..fb4f2eb 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c
+++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_event.c
@@ -2501,11 +2501,6 @@ gckEVENT_Notify(
"Handled interrupt 0x%x", mask);
}
- if (IDs == 0)
- {
- gcmkONERROR(_TryToIdleGPU(Event));
- }
-
/* We are out the notify loop. */
Event->inNotify = gcvFALSE;
diff --git a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h
index d1f76ed..9fd844d 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h
+++ b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h
@@ -694,7 +694,7 @@
This define enables the recovery code.
*/
#ifndef gcdENABLE_RECOVERY
-# define gcdENABLE_RECOVERY 0
+# define gcdENABLE_RECOVERY 1
#endif
/*
--
2.7.4

View File

@ -1,13 +0,0 @@
diff --git a/Makefile b/Makefile
index d95c4a4..1763a50 100644
--- a/Makefile
+++ b/Makefile
@@ -768,7 +768,7 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=strict-prototypes)
KBUILD_CFLAGS += $(call cc-option,-Werror=date-time)
# enforce correct pointer usage
-KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types)
+#KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types)
# use the deterministic mode of AR if available
KBUILD_ARFLAGS := $(call ar-option,D)

View File

@ -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/card/block.c b/drivers/mmc/card/block.c
index 4409d79..56df902 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/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

View File

@ -1,46 +0,0 @@
--- u-boot-imx6-a06fada/include/configs/mx6_cubox-i.h.orig 2014-08-20 21:24:00.000000000 +0200
+++ u-boot-imx6-a06fada/include/configs/mx6_cubox-i.h 2014-08-21 08:12:57.282325080 +0200
@@ -155,6 +155,7 @@
#define CONFIG_SYS_CONSOLE_IS_IN_ENV
#define CONFIG_EXTRA_ENV_SETTINGS \
+ "zImage=zImage\0" \
"script=boot.scr\0" \
"bootfile=auto\0" \
"bootenv=uEnv.txt\0" \
@@ -217,7 +218,7 @@
"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
"env import -t ${loadaddr} ${filesize};\0" \
"autoboot=echo Booting ${boot_file}; " \
- "if test ${boot_file} = zImage; then " \
+ "if test ${boot_file} = ${zImage}; then " \
"bootz ${loadaddr} ${ramdisk_addr} ${fdt_addr}; " \
"else " \
"bootm ${loadaddr} ${ramdisk_addr} ${fdt_addr}; " \
@@ -232,7 +233,7 @@
"else " \
"setenv ramdisk_addr -; " \
"fi; " \
- "if test ${boot_file} = zImage; then " \
+ "if test ${boot_file} = ${zImage}; then " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if run loadfdt; then " \
"echo Loaded ${fdt_file}; " \
@@ -269,7 +270,7 @@
"setenv get_cmd tftp; " \
"fi; " \
"if test ${bootfile} = auto; then " \
- "setenv bootfile zImage; " \
+ "setenv bootfile ${zImage}; " \
"if ${get_cmd} ${bootfile}; then " \
"run bootit; " \
"else " \
@@ -295,7 +296,7 @@
"fi; " \
"if test ${bootfile} = auto; then " \
"setenv origbootfile auto; " \
- "setenv bootfile zImage; " \
+ "setenv bootfile ${zImage}; " \
"if run loadbootfile; then " \
"run mmcboot; " \
"else " \

View File

@ -1,11 +0,0 @@
--- a/include/configs/mx6_cubox-i.h 2016-04-04 10:59:46.012325017 +0200
+++ b/include/configs/mx6_cubox-i.h 2016-04-04 10:59:55.487968181 +0200
@@ -59,7 +59,7 @@
#define CONFIG_CMD_SETEXPR
#define CONFIG_CMD_MEMTEST
-#define CONFIG_BOOTDELAY 3
+#define CONFIG_BOOTDELAY 1
#define CONFIG_SYS_MEMTEST_START 0x10000000
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)

View File

@ -1,24 +0,0 @@
commit c3b3b538666cfa2a33f231e8ffb7424761f1a638
Author: Matus Kral <matuskral@me.com>
Date: Tue Dec 29 15:43:03 2015 +0100
fix for HB1
the SR's uboot tree after commit 144b1e90d15f3a94f0c8183827d4f1b93f6f2e68
is keeping IPU started - what is keeping gfx in 4.x+ kernels from starting
diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c
index 5c3c080..ca74901 100644
--- a/arch/arm/imx-common/cpu.c
+++ b/arch/arm/imx-common/cpu.c
@@ -176,5 +176,9 @@ void arch_preboot_os(void)
{
/* disable video before launching O/S */
ipuv3_fb_shutdown();
+
+ struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
+ setbits_le32(&ccm->analog_pll_video, BM_ANADIG_PLL_VIDEO_POWERDOWN);
+
}
#endif

View File

@ -1,109 +0,0 @@
From c99113f2c2fc3a269c2f490288420deaa0771a39 Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Fri, 15 Mar 2013 10:20:35 -0500
Subject: [PATCH] mx6qsabre_common: uEnv.txt, bootz, n fixes
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
include/configs/mx6sabre_common.h | 53 +++++++++++++++++++++++++++----------
1 file changed, 39 insertions(+), 14 deletions(-)
diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
index 53cc559..6dfc108 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -40,6 +40,11 @@
#define CONFIG_MMC
#define CONFIG_CMD_MMC
+#define CONFIG_FS_FAT
+#define CONFIG_FS_EXT4
+#define CONFIG_CMD_FS_GENERIC /* Generic load commands */
+#define CONFIG_CMD_BOOTZ /* bootz zImage support */
+#define CONFIG_SUPPORT_RAW_INITRD /* bootz raw initrd support */
#define CONFIG_GENERIC_MMC
#define CONFIG_BOUNCE_BUFFER
#define CONFIG_CMD_EXT2
@@ -85,12 +90,13 @@
"fdt_addr=0x11000000\0" \
"boot_fdt=try\0" \
"ip_dyn=yes\0" \
- "console=" CONFIG_CONSOLE_DEV "\0" \
+ "console=ttymxc0,115200\0" \
+ "optargs=\0" \
+ "video=\0" \
"fdt_high=0xffffffff\0" \
"initrd_high=0xffffffff\0" \
"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
"mmcpart=1\0" \
- "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
"update_sd_firmware=" \
"if test ${ip_dyn} = yes; then " \
"setenv get_cmd dhcp; " \
@@ -104,16 +110,29 @@
"mmc write ${loadaddr} 0x2 ${fw_sz}; " \
"fi; " \
"fi\0" \
- "mmcargs=setenv bootargs console=${console},${baudrate} " \
- "root=${mmcroot}\0" \
+ "mmcroot=/dev/mmcblk0p2 ro\0" \
+ "mmcrootfstype=ext4 rootwait fixrtc\0" \
+ "mmcargs=setenv bootargs console=${console}" \
+ "${optargs} " \
+ "root=${mmcroot} " \
+ "rootfstype=${mmcrootfstype} " \
+ "video=${video}\0" \
"loadbootscript=" \
"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
+ "loadbootenv=" \
+ "load mmc ${mmcdev}:${mmcpart} ${loadaddr} uEnv.txt;\0" \
+ "importbootenv=echo Importing environment from mmc (uEnv.txt)...; " \
+ "env import -t ${loadaddr} ${filesize}\0" \
"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
- "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
+ "loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} zImage\0" \
+ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /dtbs/${fdt_file}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
+ "bootz ${loadaddr} - ${fdt_addr};\0" \
+ "mmcdefault=echo Booting from mmc ...; " \
+ "run mmcargs; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if run loadfdt; then " \
"bootm ${loadaddr} - ${fdt_addr}; " \
@@ -155,15 +174,21 @@
#define CONFIG_BOOTCOMMAND \
"mmc dev ${mmcdev};" \
"if mmc rescan; then " \
- "if run loadbootscript; then " \
- "run bootscript; " \
- "else " \
- "if run loaduimage; then " \
- "run mmcboot; " \
- "else run netboot; " \
- "fi; " \
- "fi; " \
- "else run netboot; fi"
+ "echo SD/MMC found on device ${mmcdev};" \
+ "if run loadbootenv; then " \
+ "run importbootenv;" \
+ "fi;" \
+ "echo Checking if uenvcmd is set ...;" \
+ "if test -n $uenvcmd; then " \
+ "echo Running uenvcmd ...;" \
+ "run uenvcmd;" \
+ "fi;" \
+ "echo Running default loadzimage ...;" \
+ "if run loadzimage; then " \
+ "run loadfdt;" \
+ "run mmcboot;" \
+ "fi;" \
+ "fi;"
#define CONFIG_ARP_TIMEOUT 200UL
--
1.7.10.4

View File

@ -1,49 +0,0 @@
diff -urN a/boards.cfg b/boards.cfg
--- a/boards.cfg 2014-04-13 01:27:26.000000000 +0200
+++ b/boards.cfg 2014-08-23 16:58:28.000000000 +0200
@@ -301,6 +301,7 @@
Active arm armv7 mx6 freescale mx6qsabreauto mx6qsabreauto mx6qsabreauto:IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg,MX6Q Fabio Estevam <fabio.estevam@freescale.com>
Active arm armv7 mx6 freescale mx6sabresd mx6dlsabresd mx6sabresd:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl.cfg,MX6DL Fabio Estevam <fabio.estevam@freescale.com>
Active arm armv7 mx6 freescale mx6sabresd mx6qsabresd mx6sabresd:IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg,MX6Q Fabio Estevam <fabio.estevam@freescale.com>
+Active arm armv7 mx6 freescale mx6sabresd matrix mx6sabresd:IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q2g.cfg,MX6Q,DDR_MB=2048 -
Active arm armv7 mx6 freescale mx6slevk mx6slevk mx6slevk:IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL Fabio Estevam <fabio.estevam@freescale.com>
Active arm armv7 mx6 freescale titanium titanium titanium:IMX_CONFIG=board/freescale/titanium/imximage.cfg Stefan Roese <sr@denx.de>
Active arm armv7 mx6 solidrun mx6_c1 mx6_c1solo mx6_c1:IMX_CONFIG=board/solidrun/mx6_c1/mx6_c1solo.cfg,MX6S,DDR_MB=512
diff -urN a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
--- a/include/configs/mx6sabresd.h 2014-04-13 01:27:26.000000000 +0200
+++ b/include/configs/mx6sabresd.h 2014-08-23 17:01:13.000000000 +0200
@@ -17,17 +17,17 @@
#define CONFIG_CONSOLE_DEV "ttymxc0"
#define CONFIG_MMCROOT "/dev/mmcblk1p2"
#if defined(CONFIG_MX6Q)
-#define CONFIG_DEFAULT_FDT_FILE "imx6q-sabresd.dtb"
+#define CONFIG_DEFAULT_FDT_FILE "imx6q-tbs2910.dtb"
#elif defined(CONFIG_MX6DL)
#define CONFIG_DEFAULT_FDT_FILE "imx6dl-sabresd.dtb"
#endif
-#define PHYS_SDRAM_SIZE (1u * 1024 * 1024 * 1024)
+#define PHYS_SDRAM_SIZE (2u * 1024 * 1024 * 1024)
#include "mx6sabre_common.h"
#define CONFIG_SYS_FSL_USDHC_NUM 3
#if defined(CONFIG_ENV_IS_IN_MMC)
-#define CONFIG_SYS_MMC_ENV_DEV 1 /* SDHC3 */
+#define CONFIG_SYS_MMC_ENV_DEV 2 /* eMMC/uSDHC4 */
#endif
/* Framebuffer */
diff -urN a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
--- a/include/configs/mx6sabre_common.h 2014-03-20 18:04:26.942867502 -0600
+++ b/include/configs/mx6sabre_common.h 2014-03-20 18:04:49.350866727 -0600
@@ -61,7 +61,7 @@
#define IMX_FEC_BASE ENET_BASE_ADDR
#define CONFIG_FEC_XCV_TYPE RGMII
#define CONFIG_ETHPRIME "FEC"
-#define CONFIG_FEC_MXC_PHYADDR 1
+#define CONFIG_FEC_MXC_PHYADDR 4
#define CONFIG_PHYLIB
#define CONFIG_PHY_ATHEROS

View File

@ -1,84 +0,0 @@
diff -urN a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
--- a/include/configs/mx6sabre_common.h 2014-08-23 18:24:27.000000000 +0200
+++ b/include/configs/mx6sabre_common.h 2014-08-23 18:26:05.000000000 +0200
@@ -51,6 +51,8 @@
#define CONFIG_CMD_FAT
#define CONFIG_DOS_PARTITION
+#define CONFIG_CMD_EXT4
+
#define CONFIG_CMD_PING
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_MII
@@ -84,10 +86,11 @@
#define CONFIG_SYS_TEXT_BASE 0x17800000
#define CONFIG_EXTRA_ENV_SETTINGS \
+ "zImage=KERNEL\0" \
"script=boot.scr\0" \
"uimage=uImage\0" \
"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
- "fdt_addr=0x11000000\0" \
+ "fdt_addr=0x18000000\0" \
"boot_fdt=try\0" \
"ip_dyn=yes\0" \
"console=ttymxc0,115200\0" \
@@ -126,25 +129,22 @@
"importbootenv=echo Importing environment from mmc (uEnv.txt)...; " \
"env import -t ${loadaddr} ${filesize}\0" \
"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
- "loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} zImage\0" \
- "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /dtbs/${fdt_file}\0" \
+ "loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${zImage}\0" \
+ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
- "bootz ${loadaddr} - ${fdt_addr};\0" \
- "mmcdefault=echo Booting from mmc ...; " \
- "run mmcargs; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if run loadfdt; then " \
- "bootm ${loadaddr} - ${fdt_addr}; " \
+ "bootz ${loadaddr} - ${fdt_addr}; " \
"else " \
"if test ${boot_fdt} = try; then " \
- "bootm; " \
+ "bootz; " \
"else " \
"echo WARN: Cannot load the DT; " \
"fi; " \
"fi; " \
"else " \
- "bootm; " \
+ "bootz; " \
"fi;\0" \
"netargs=setenv bootargs console=${console},${baudrate} " \
"root=/dev/nfs " \
@@ -159,16 +159,16 @@
"${get_cmd} ${uimage}; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
"if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
- "bootm ${loadaddr} - ${fdt_addr}; " \
+ "bootz ${loadaddr} - ${fdt_addr}; " \
"else " \
"if test ${boot_fdt} = try; then " \
- "bootm; " \
+ "bootz; " \
"else " \
"echo WARN: Cannot load the DT; " \
"fi; " \
"fi; " \
"else " \
- "bootm; " \
+ "bootz; " \
"fi;\0"
#define CONFIG_BOOTCOMMAND \
@@ -185,7 +185,6 @@
"fi;" \
"echo Running default loadzimage ...;" \
"if run loadzimage; then " \
- "run loadfdt;" \
"run mmcboot;" \
"fi;" \
"fi;"

View File

@ -1,36 +0,0 @@
diff -urN a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
--- a/include/configs/mx6sabre_common.h 2014-08-23 17:07:04.000000000 +0200
+++ b/include/configs/mx6sabre_common.h 2014-08-23 17:09:10.000000000 +0200
@@ -184,6 +184,32 @@
"fi;\0"
#define CONFIG_BOOTCOMMAND \
+ "echo; " \
+ "echo SD/MMC device set to ${mmcdev} but checking 0, 1 and 2; " \
+ "setenv mmcdevold ${mmcdev}; " \
+ "setenv mmcdev 0; " \
+ "echo Checking mmc dev ${mmcdev} (microSD card);" \
+ "mmc dev ${mmcdev};" \
+ "if mmc rescan && run loadbootenv; then " \
+ "else " \
+ "setenv mmcdev 1; " \
+ "echo Checking mmc dev ${mmcdev} (SD card);" \
+ "mmc dev ${mmcdev};" \
+ "if mmc rescan && run loadbootenv; then " \
+ "else " \
+ "setenv mmcdev 2; " \
+ "echo Checking mmc dev ${mmcdev} (internal eMMC);" \
+ "mmc dev ${mmcdev};" \
+ "if mmc rescan && run loadbootenv; then " \
+ "else " \
+ "echo No SD/MMC with uEnv.txt found on device 0 to 2;" \
+ "setenv mmcdev ${mmcdevold}; " \
+ "fi; " \
+ "fi; " \
+ "fi; " \
+ "setenv mmcdevold; " \
+ "echo; " \
+ "echo Using SD/MMC device ${mmcdev};" \
"mmc dev ${mmcdev};" \
"if mmc rescan; then " \
"echo SD/MMC found on device ${mmcdev};" \

Some files were not shown because too many files have changed in this diff Show More