mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge branch 'master' into openelec-pxe
Conflicts: projects/ATV/linux/linux.i386.conf projects/Generic/linux/linux.i386.conf projects/ION/linux/linux.i386.conf projects/ION/linux/linux.x86_64.conf projects/Intel/linux/linux.i386.conf projects/Intel/linux/linux.x86_64.conf
This commit is contained in:
commit
2297e39af2
@ -7,7 +7,7 @@
|
||||
<import addon="os.openelec.tv" version="@OS_VERSION@"/>
|
||||
<import addon="xbmc.python" version="1.0"/>
|
||||
</requires>
|
||||
<extension point="xbmc.python.pluginsource"
|
||||
<extension point="@PKG_ADDON_TYPE@"
|
||||
library="default.py">
|
||||
<provides>executable</provides>
|
||||
</extension>
|
||||
|
@ -20,7 +20,7 @@ PROJECT_DIR="$ROOT/projects"
|
||||
OPENELEC_VERSION=`cat VERSION`
|
||||
|
||||
if [ "$OPENELEC_VERSION" = "devel" ]; then
|
||||
OS_VERSION="0.90"
|
||||
OS_VERSION="0.99"
|
||||
else
|
||||
OS_MAJOR_VERSION=`echo "$OPENELEC_VERSION" | cut -f1 -d "."`
|
||||
OS_MINOR_VERSION=`echo "$OPENELEC_VERSION" | cut -f2 -d "."`
|
||||
|
@ -19,12 +19,12 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="atk"
|
||||
PKG_VERSION="1.33.6"
|
||||
PKG_VERSION="2.0.0"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://library.gnome.org/devel/atk/"
|
||||
PKG_URL="http://ftp.gnome.org/pub/gnome/sources/$PKG_NAME/1.33/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_URL="http://ftp.gnome.org/pub/gnome/sources/$PKG_NAME/2.0/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS="glib"
|
||||
PKG_BUILD_DEPENDS="toolchain glib"
|
||||
PKG_PRIORITY="optional"
|
||||
|
37
packages/addons/downloadmanager/SABnzbd/addon
Executable file
37
packages/addons/downloadmanager/SABnzbd/addon
Executable file
@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
. config/options $1
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/$1
|
||||
cp -PR $PKG_BUILD/* $ADDON_BUILD/$PKG_ADDON_ID/$1
|
||||
cp -PR $PKG_DIR/config/settings.xml* $ADDON_BUILD/$PKG_ADDON_ID/settings-default.xml
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp $BUILD/par2cmdline*/par2 $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp $BUILD/unrar/unrar $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp $BUILD/unzip*/unzip $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/pylib
|
||||
cp -R $BUILD/Cheetah*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib
|
||||
cp -R $BUILD/pyOpenSSL*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib
|
||||
cp -R $BUILD/yenc*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib
|
2
packages/addons/downloadmanager/SABnzbd/changelog.txt
Normal file
2
packages/addons/downloadmanager/SABnzbd/changelog.txt
Normal file
@ -0,0 +1,2 @@
|
||||
0.99.1
|
||||
- initial version SABnzbd-0.6.0RC2
|
@ -0,0 +1,5 @@
|
||||
<settings>
|
||||
<setting id="SABNZBD_IP" value="0.0.0.0" />
|
||||
<setting id="SABNZBD_PWD" value="" />
|
||||
<setting id="SABNZBD_USER" value="" />
|
||||
</settings>
|
BIN
packages/addons/downloadmanager/SABnzbd/icon/icon.png
Normal file
BIN
packages/addons/downloadmanager/SABnzbd/icon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
@ -19,19 +19,21 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="SABnzbd"
|
||||
PKG_VERSION="0.6.0Beta4"
|
||||
PKG_VERSION="0.6.0RC2"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://sabnzbd.org/"
|
||||
#PKG_URL="$SOURCEFORGE_SRC/sabnzbdplus/${PKG_NAME}-${PKG_VERSION}-src.tar.gz"
|
||||
PKG_URL="$SOURCEFORGE_SRC/sabnzbdplus/sabnzbdplus-beta/sabnzbd-0.6.0Beta4/${PKG_NAME}-${PKG_VERSION}-src.tar.gz"
|
||||
PKG_DEPENDS="Cheetah pyOpenSSL yenc unrar unzip par2cmdline"
|
||||
PKG_BUILD_DEPENDS="toolchain"
|
||||
PKG_URL="$SOURCEFORGE_SRC/sabnzbdplus/sabnzbdplus-beta/sabnzbd-${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}-src.tar.gz"
|
||||
PKG_DEPENDS="Python Cheetah pyOpenSSL yenc unrar unzip par2cmdline"
|
||||
PKG_BUILD_DEPENDS="toolchain Python Cheetah pyOpenSSL yenc unrar unzip par2cmdline"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="plugins"
|
||||
PKG_SHORTDESC="SABnzbd: makes Usenet as simple and streamlined as possible by automating everything we can."
|
||||
PKG_LONGDESC="SABnzbd makes Usenet as simple and streamlined as possible by automating everything we can. All you have to do is add an .nzb. SABnzbd takes over from there, where it will be automatically downloaded, verified, repaired, extracted and filed away with zero human interaction."
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_SECTION="downloadmanager"
|
||||
PKG_SHORTDESC="SABnzbd makes Usenet as simple and streamlined as possible by automating everything we can."
|
||||
PKG_LONGDESC="SABnzbd makes Usenet as simple and streamlined as possible by automating everything we can. All you have to do is add a .nzb file. SABnzbd+ takes over from there, where it will be automatically downloaded, verified, repaired, extracted and filed away with zero human interaction."
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
|
||||
PKG_AUTORECONF="no"
|
@ -0,0 +1,33 @@
|
||||
diff -Naur SABnzbd-0.6.0RC2/sabnzbd/constants.py SABnzbd-0.6.0RC2.patch/sabnzbd/constants.py
|
||||
--- SABnzbd-0.6.0RC2/sabnzbd/constants.py 2011-04-10 16:06:27.000000000 +0200
|
||||
+++ SABnzbd-0.6.0RC2.patch/sabnzbd/constants.py 2011-04-16 21:49:52.858788377 +0200
|
||||
@@ -70,8 +70,8 @@
|
||||
DB_HISTORY_NAME = 'history%s.db' % DB_HISTORY_VERSION
|
||||
DB_QUEUE_NAME = 'queue%s.db' % DB_QUEUE_VERSION
|
||||
|
||||
-DEF_DOWNLOAD_DIR = 'Downloads/incomplete'
|
||||
-DEF_COMPLETE_DIR = 'Downloads/complete'
|
||||
+DEF_DOWNLOAD_DIR = '/storage/downloads/incoming/'
|
||||
+DEF_COMPLETE_DIR = '/storage/downloads/'
|
||||
DEF_CACHE_DIR = 'cache'
|
||||
DEF_ADMIN_DIR = 'admin'
|
||||
DEF_LOG_DIR = 'logs'
|
||||
@@ -83,12 +83,12 @@
|
||||
DEF_STDINTF = 'smpl'
|
||||
DEF_SKIN_COLORS = {'smpl':'white', 'classic':'darkblue', 'mobile':'light', 'plush' : 'gold'}
|
||||
DEF_MAIN_TMPL = 'templates/main.tmpl'
|
||||
-DEF_INI_FILE = 'sabnzbd.ini'
|
||||
-DEF_HOST = 'localhost'
|
||||
-DEF_PORT_WIN = 8080
|
||||
-DEF_PORT_UNIX = 8080
|
||||
-DEF_PORT_WIN_SSL = 9090
|
||||
-DEF_PORT_UNIX_SSL= 9090
|
||||
+DEF_INI_FILE = 'sabnzbd.conf'
|
||||
+DEF_HOST = '0.0.0.0'
|
||||
+DEF_PORT_WIN = 8081
|
||||
+DEF_PORT_UNIX = 8081
|
||||
+DEF_PORT_WIN_SSL = 9081
|
||||
+DEF_PORT_UNIX_SSL= 9081
|
||||
DEF_WORKDIR = 'sabnzbd'
|
||||
DEF_LOG_FILE = 'sabnzbd.log'
|
||||
DEF_LOG_ERRFILE = 'sabnzbd.error.log'
|
@ -0,0 +1,70 @@
|
||||
diff -Naur SABnzbd-0.6.0RC2/interfaces/Classic/templates/config_general.tmpl SABnzbd-0.6.0RC2.patch/interfaces/Classic/templates/config_general.tmpl
|
||||
--- SABnzbd-0.6.0RC2/interfaces/Classic/templates/config_general.tmpl 2011-04-16 23:15:34.940298239 +0200
|
||||
+++ SABnzbd-0.6.0RC2.patch/interfaces/Classic/templates/config_general.tmpl 2011-04-16 23:21:11.140812740 +0200
|
||||
@@ -13,16 +13,6 @@
|
||||
|
||||
<legend>$T('webServer')</legend>
|
||||
<i>$T('restartRequired')</i><br/><br/>
|
||||
-<strong>$T('opt-host'):</strong><br>
|
||||
-$T('explain-host')<br>
|
||||
-<input type="text" name="host" value="$host">
|
||||
-<br>
|
||||
-<br>
|
||||
-<strong>$T('opt-port'):</strong><br>
|
||||
-$T('explain-port')<br>
|
||||
-<input type="text" name="port" value="$port">
|
||||
-<br>
|
||||
-<br>
|
||||
<strong>$T('opt-web_dir'):</strong><br>
|
||||
$T('explain-web_dir')<br>
|
||||
<select name="web_dir">
|
||||
diff -Naur SABnzbd-0.6.0RC2/interfaces/Plush/templates/config_general.tmpl SABnzbd-0.6.0RC2.patch/interfaces/Plush/templates/config_general.tmpl
|
||||
--- SABnzbd-0.6.0RC2/interfaces/Plush/templates/config_general.tmpl 2011-04-16 23:15:34.954297968 +0200
|
||||
+++ SABnzbd-0.6.0RC2.patch/interfaces/Plush/templates/config_general.tmpl 2011-04-16 23:23:32.496084161 +0200
|
||||
@@ -14,26 +14,6 @@
|
||||
</div>
|
||||
<fieldset class="component-group-list">
|
||||
<div class="field-pair">
|
||||
- <label class="nocheck clearfix" for="host">
|
||||
- <span class="component-title">$T('opt-host')</span>
|
||||
- <input type="text" name="host" id="host" value="$host"/>
|
||||
- </label>
|
||||
- <label class="nocheck clearfix">
|
||||
- <span class="component-title"> </span>
|
||||
- <span class="component-desc">$T('explain-host')</span>
|
||||
- </label>
|
||||
- </div>
|
||||
- <div class="field-pair alt">
|
||||
- <label class="nocheck clearfix" for="port">
|
||||
- <span class="component-title">$T('opt-port')</span>
|
||||
- <input type="text" name="port" id="port" size=8 value="$port"/>
|
||||
- </label>
|
||||
- <label class="nocheck clearfix">
|
||||
- <span class="component-title"> </span>
|
||||
- <span class="component-desc">$T('explain-port')</span>
|
||||
- </label>
|
||||
- </div>
|
||||
- <div class="field-pair">
|
||||
<label class="nocheck clearfix" for="username">
|
||||
<span class="component-title">$T('opt-web_username')</span>
|
||||
<input type="text" name="username" id="username" value="$username"/>
|
||||
diff -Naur SABnzbd-0.6.0RC2/interfaces/smpl/templates/config_general.tmpl SABnzbd-0.6.0RC2.patch/interfaces/smpl/templates/config_general.tmpl
|
||||
--- SABnzbd-0.6.0RC2/interfaces/smpl/templates/config_general.tmpl 2011-04-16 23:15:34.944298160 +0200
|
||||
+++ SABnzbd-0.6.0RC2.patch/interfaces/smpl/templates/config_general.tmpl 2011-04-16 23:22:14.877582554 +0200
|
||||
@@ -5,16 +5,6 @@
|
||||
<fieldset class="EntryFieldSet">
|
||||
<legend>$T('webServer') <i>($T('restartRequired'))</i></legend>
|
||||
<hr />
|
||||
- <label for "host" class="label">$T('opt-host'):</label>
|
||||
- <input type="text" name="host" value="$host">
|
||||
- <span class="tips">$T('explain-host')</span>
|
||||
- <br class="clear" />
|
||||
-
|
||||
- <label for "port" class="label">$T('opt-port'):</label>
|
||||
- <input type="text" name="port" value="$port">
|
||||
- <span class="tips">$T('explain-port')</span>
|
||||
- <br class="clear" />
|
||||
-
|
||||
<label for "userinterface" class="label">$T('opt-web_dir'):</label>
|
||||
|
||||
<select name="web_dir" id="webdir" class="select">
|
82
packages/addons/downloadmanager/SABnzbd/source/bin/ini_tool
Executable file
82
packages/addons/downloadmanager/SABnzbd/source/bin/ini_tool
Executable file
@ -0,0 +1,82 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from configobj import ConfigObj
|
||||
import sys
|
||||
import os
|
||||
|
||||
python_major = sys.version_info[0]
|
||||
python_minor = sys.version_info[1]
|
||||
|
||||
prog="ini_tool"
|
||||
description="""Read/Write config files.
|
||||
|
||||
Examples:
|
||||
%(prog)s --file config.ini --action read --section "general" --option username
|
||||
%(prog)s --file config.ini --action write --section "general" --option username --value foo""" % {'prog':prog}
|
||||
|
||||
def option_required_error(option):
|
||||
parser.print_usage()
|
||||
print prog + ": error: " + option + " is required"
|
||||
exit(2)
|
||||
|
||||
if python_major > 2 or (python_major == 2 and python_minor >= 7):
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
prog=prog,
|
||||
description=description,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
)
|
||||
|
||||
parser.add_argument('--file', help='file to read/write to/from', required=True)
|
||||
parser.add_argument('--action', help='read|write', required=True)
|
||||
parser.add_argument('--section', help='the config section', required=True)
|
||||
parser.add_argument('--option', help='the option key', required=True)
|
||||
parser.add_argument('--value', help='value to store in the given option (only for write action)')
|
||||
|
||||
options = parser.parse_args()
|
||||
|
||||
else:
|
||||
import optparse
|
||||
|
||||
parser = optparse.OptionParser(
|
||||
prog=prog,
|
||||
description=description,
|
||||
)
|
||||
|
||||
parser.add_option('--file', help='file to read/write to/from')
|
||||
parser.add_option('--action', help='read|write')
|
||||
parser.add_option('--section', help='the config section')
|
||||
parser.add_option('--option', help='the option key')
|
||||
parser.add_option('--value', help='value to store in the given option (only for write action)')
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
if not options.file:
|
||||
option_required_error("--file")
|
||||
if not options.action:
|
||||
option_required_error("--action")
|
||||
if not options.section:
|
||||
option_required_error("--section")
|
||||
if not options.option:
|
||||
option_required_error("--option")
|
||||
|
||||
|
||||
if options.action != "read" and options.action != "write":
|
||||
print "'" + options.action + "' is not a valid action"
|
||||
parser.print_help()
|
||||
exit(2)
|
||||
|
||||
if options.action == "read" and not os.path.isfile(options.file):
|
||||
print "'" + options.file + "' is not a file"
|
||||
exit(2)
|
||||
|
||||
config = ConfigObj(options.file)
|
||||
|
||||
if options.action == 'read':
|
||||
print config[options.section][options.option]
|
||||
elif options.action == 'write':
|
||||
config[options.section][options.option] = options.value
|
||||
config.write()
|
||||
else:
|
||||
exit(1)
|
@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# Copyright (C) 2009-2010 OpenELEC.tv
|
||||
# http://www.openelec.tv
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# 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
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
|
||||
<!-- SABnzbd -->
|
||||
<string id="1000">SABnzbd</string>
|
||||
<string id="1010">Gebruikers instellingen</string>
|
||||
<string id="1022">Gebruikersnaam</string>
|
||||
<string id="1023">Wachtwoord</string>
|
||||
<string id="2010">Netwerk instellingen</string>
|
||||
<string id="2021">Toegestane IP adressen</string>
|
||||
|
||||
</strings>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
|
||||
<!-- SABnzbd -->
|
||||
<string id="1000">SABnzbd</string>
|
||||
<string id="1010">User Settings</string>
|
||||
<string id="1022">Username</string>
|
||||
<string id="1023">Password</string>
|
||||
<string id="2010">Network Settings</string>
|
||||
<string id="2021">Allowed IP addresses</string>
|
||||
|
||||
</strings>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
|
||||
<!-- SABnzbd -->
|
||||
<string id="1000">SABnzbd</string>
|
||||
<string id="1010">Préférences utilisateur</string>
|
||||
<string id="1022">Nom d'utilisateur</string>
|
||||
<string id="1023">Mot de passe</string>
|
||||
<string id="2010">Préférences réseau</string>
|
||||
<string id="2021">Adresses IP autorisées</string>
|
||||
|
||||
</strings>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
|
||||
<!-- SABnzbd -->
|
||||
<string id="1000">SABnzbd</string>
|
||||
<string id="1010">Benutzer Einstellungen</string>
|
||||
<string id="1022">Benutzername</string>
|
||||
<string id="1023">Passwort</string>
|
||||
<string id="2010">Netzwerk Einstellungen</string>
|
||||
<string id="2021">Erlaubte IP Adressen</string>
|
||||
|
||||
</strings>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
|
||||
<!-- SABnzbd -->
|
||||
<string id="1000">SABnzbd</string>
|
||||
<string id="1010">Bruker Instillinger</string>
|
||||
<string id="1022">Brukernavn</string>
|
||||
<string id="1023">Passord</string>
|
||||
<string id="2010">Nettverksinstillinger</string>
|
||||
<string id="2021">Tilatte IP addresser</string>
|
||||
|
||||
</strings>
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
|
||||
<!-- SABnzbd -->
|
||||
<category label="1000">
|
||||
<setting label="1010" type="lsep"/>
|
||||
<setting type="sep" />
|
||||
<setting id="SABNZBD_USER" type="text" label="1022" default="openelec" enable="eq(-1,true)"/>
|
||||
<setting id="SABNZBD_PWD" type="text" label="1023" default="openelec" enable="eq(-2,true)"/>
|
||||
|
||||
<setting label="2010" type="lsep"/>
|
||||
<setting type="sep" />
|
||||
<setting id="SABNZBD_IP" type="text" label="2021" default="0.0.0.0"/>
|
||||
</category>
|
||||
</settings>
|
76
packages/addons/downloadmanager/SABnzbd/source/start.sh
Executable file
76
packages/addons/downloadmanager/SABnzbd/source/start.sh
Executable file
@ -0,0 +1,76 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
export PATH="$PATH:./bin"
|
||||
export PYTHONPATH="$PYTHONPATH:./pylib"
|
||||
|
||||
SABNZBD_HOME="$HOME/.xbmc/userdata/addon_data/addon.downloadmanager.SABnzbd"
|
||||
SABNZBD_SETTINGS="$SABNZBD_HOME/settings.xml"
|
||||
|
||||
SABNZBD_DISABLEAPIKEY="0"
|
||||
SABNZBD_HTTPPORT="8081"
|
||||
SABNZBD_HTTPSPORT="9081"
|
||||
SABNZBD_SKIN="Plush"
|
||||
SABNZBD_SKIN2="Plush"
|
||||
SABNZBD_WEBCOLOR="gold"
|
||||
SABNZBD_WEBCOLOR2="gold"
|
||||
|
||||
write_ini() {
|
||||
python bin/ini_tool --action=write \
|
||||
--file=$SABNZBD_HOME/sabnzbd.ini \
|
||||
--section="$1" \
|
||||
--option="$2" \
|
||||
--value="$3"
|
||||
}
|
||||
|
||||
mkdir -p $SABNZBD_HOME
|
||||
chmod +x ./bin/*
|
||||
|
||||
if [ ! -f "$SABNZBD_SETTINGS" ]; then
|
||||
cp settings-default.xml $SABNZBD_SETTINGS
|
||||
fi
|
||||
|
||||
mkdir -p /storage/downloads
|
||||
mkdir -p /storage/downloads/incoming
|
||||
mkdir -p /storage/downloads/watch
|
||||
|
||||
# use settings from xbmc setup dialog
|
||||
SABNZBD_USER=`grep SABNZBD_USER $SABNZBD_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||
SABNZBD_PWD=`grep SABNZBD_PWD $SABNZBD_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||
SABNZBD_IP=`grep SABNZBD_IP $SABNZBD_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||
|
||||
if [ -z "$SABNZBD_IP" ]; then
|
||||
SABNZBD_IP="0.0.0.0"
|
||||
fi
|
||||
|
||||
write_ini misc disable_api_key $SABNZBD_DISABLEAPIKEY
|
||||
write_ini misc username $SABNZBD_USER
|
||||
write_ini misc password $SABNZBD_PWD
|
||||
write_ini misc port $SABNZBD_HTTPPORT
|
||||
write_ini misc https_port $SABNZBD_HTTPSPORT
|
||||
write_ini misc host $SABNZBD_IP
|
||||
write_ini misc web_dir $SABNZBD_SKIN
|
||||
write_ini misc web_dir2 $SABNZBD_SKIN2
|
||||
write_ini misc web_color $SABNZBD_WEBCOLOR
|
||||
write_ini misc web_color2 $SABNZBD_WEBCOLOR2
|
||||
|
||||
python ./SABnzbd/SABnzbd.py -d -f $SABNZBD_HOME/sabnzbd.ini -l 0 > /dev/null 2>&1
|
31
packages/addons/downloadmanager/transmission/addon
Executable file
31
packages/addons/downloadmanager/transmission/addon
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
. config/options $1
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp $PKG_BUILD/daemon/transmission-daemon $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/web
|
||||
cp -R $PKG_BUILD/web/* $ADDON_BUILD/$PKG_ADDON_ID/web
|
||||
find $ADDON_BUILD/$PKG_ADDON_ID/web -name "Makefile*" -exec rm -rf {} ";"
|
||||
rm -rf $ADDON_BUILD/$PKG_ADDON_ID/web/LICENSE
|
@ -48,4 +48,4 @@ cd $PKG_BUILD
|
||||
--enable-daemon \
|
||||
--with-gnu-ld \
|
||||
|
||||
make
|
||||
make V=1
|
@ -0,0 +1,2 @@
|
||||
0.99.1
|
||||
- initial version transmission-2.20
|
BIN
packages/addons/downloadmanager/transmission/icon/icon.png
Normal file
BIN
packages/addons/downloadmanager/transmission/icon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
@ -25,12 +25,14 @@ PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.transmissionbt.com/"
|
||||
PKG_URL="http://download.transmissionbt.com/files/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS="zlib libiconv openssl curl libevent connman"
|
||||
PKG_DEPENDS="zlib libiconv openssl curl libevent"
|
||||
PKG_BUILD_DEPENDS="toolchain libiconv zlib openssl curl libevent"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="system"
|
||||
PKG_SECTION="downloadmanager"
|
||||
PKG_SHORTDESC="transmission: a fast, easy and free BitTorrent client"
|
||||
PKG_LONGDESC="transmission is a fast, easy and free BitTorrent client"
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
|
||||
PKG_AUTORECONF="yes"
|
@ -0,0 +1,26 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
import sys
|
||||
import xbmcaddon
|
||||
import os
|
||||
|
||||
if ( __name__ == "__main__" ):
|
||||
os.system("sh start.sh")
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
|
||||
<!-- Transmission -->
|
||||
<string id="1000">Transmission</string>
|
||||
<string id="1010">Gebruikers instellingen</string>
|
||||
<string id="1021">Gebruik verificatie</string>
|
||||
<string id="1022">Gebruikersnaam</string>
|
||||
<string id="1023">Wachtwoord</string>
|
||||
<string id="2010">Netwerk instellingen</string>
|
||||
<string id="2021">Toegestane IP adressen (gescheiden met een ',')</string>
|
||||
|
||||
</strings>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
|
||||
<!-- Transmission -->
|
||||
<string id="1000">Transmission</string>
|
||||
<string id="1010">User Settings</string>
|
||||
<string id="1021">Use authentification</string>
|
||||
<string id="1022">Username</string>
|
||||
<string id="1023">Password</string>
|
||||
<string id="2010">Network Settings</string>
|
||||
<string id="2021">Allowed IP addresses (comma-delimited)</string>
|
||||
|
||||
</strings>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
|
||||
<!-- Transmission -->
|
||||
<string id="1000">Transmission</string>
|
||||
<string id="1010">Préférences utilisateur</string>
|
||||
<string id="1021">Utiliser une authentification</string>
|
||||
<string id="1022">Nom d'utilisateur</string>
|
||||
<string id="1023">Mot de passe</string>
|
||||
<string id="2010">Préférences réseau</string>
|
||||
<string id="2021">Adresses IP autorisées (séparées par des virgules)</string>
|
||||
|
||||
</strings>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
|
||||
<!-- Transmission -->
|
||||
<string id="1000">Transmission</string>
|
||||
<string id="1010">Benutzer Einstellungen</string>
|
||||
<string id="1021">Authentifizierung verwenden</string>
|
||||
<string id="1022">Benutzername</string>
|
||||
<string id="1023">Passwort</string>
|
||||
<string id="2010">Netzwerk Einstellungen</string>
|
||||
<string id="2021">Erlaubte IP Adressen (durch Komma getrennt)</string>
|
||||
|
||||
</strings>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
|
||||
<!-- Transmission -->
|
||||
<string id="1000">Transmission</string>
|
||||
<string id="1010">Bruker Instillinger</string>
|
||||
<string id="1021">Bruk inlogging</string>
|
||||
<string id="1022">Brukernavn</string>
|
||||
<string id="1023">Passord</string>
|
||||
<string id="2010">Nettverksinstillinger</string>
|
||||
<string id="2021">Tilatte IP addresser (komma-avgrenser)</string>
|
||||
|
||||
</strings>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
|
||||
<!-- Transmission -->
|
||||
<category label="1000">
|
||||
<setting label="1010" type="lsep"/>
|
||||
<setting type="sep" />
|
||||
<setting id="TRANSMISSION_AUTH" type="bool" label="1021" default="false" />
|
||||
<setting id="TRANSMISSION_USER" type="text" label="1022" default="openelec" enable="eq(-1,true)"/>
|
||||
<setting id="TRANSMISSION_PWD" type="text" label="1023" default="openelec" enable="eq(-2,true)"/>
|
||||
|
||||
<setting label="2010" type="lsep"/>
|
||||
<setting type="sep" />
|
||||
<setting id="TRANSMISSION_IP" type="text" label="2021" default="*.*.*.*"/>
|
||||
</category>
|
||||
</settings>
|
62
packages/addons/downloadmanager/transmission/source/start.sh
Executable file
62
packages/addons/downloadmanager/transmission/source/start.sh
Executable file
@ -0,0 +1,62 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
export TRANSMISSION_WEB_HOME="./web"
|
||||
export PATH="$PATH:./bin"
|
||||
|
||||
OPENELEC_SETTINGS="$HOME/.xbmc/userdata/addon_data/addon.downloadmanager.transmission/settings.xml"
|
||||
|
||||
if [ ! -f "$OPENELEC_SETTINGS" ]; then
|
||||
cp settings.xml $OPENELEC_SETTINGS
|
||||
fi
|
||||
|
||||
TRANSMISSION_START=`grep TRANSMISSION_START $OPENELEC_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||
TRANSMISSION_AUTH=`grep TRANSMISSION_AUTH $OPENELEC_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||
TRANSMISSION_USER=`grep TRANSMISSION_USER $OPENELEC_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||
TRANSMISSION_PWD=`grep TRANSMISSION_PWD $OPENELEC_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||
TRANSMISSION_IP=`grep TRANSMISSION_IP $OPENELEC_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||
|
||||
mkdir -p /storage/downloads
|
||||
mkdir -p /storage/downloads/incoming
|
||||
mkdir -p /storage/downloads/watch
|
||||
|
||||
if [ -z "$TRANSMISSION_IP" ]; then
|
||||
TRANSMISSION_IP="*.*.*.*"
|
||||
fi
|
||||
|
||||
TRANSMISSION_ARG="$TRANSMISSION_ARG -w /storage/downloads"
|
||||
TRANSMISSION_ARG="$TRANSMISSION_ARG --incomplete-dir /storage/downloads/incoming"
|
||||
TRANSMISSION_ARG="$TRANSMISSION_ARG --watch-dir /storage/downloads/watch"
|
||||
TRANSMISSION_ARG="$TRANSMISSION_ARG -e /var/log/transmission.log"
|
||||
TRANSMISSION_ARG="$TRANSMISSION_ARG -g /storage/.cache/transmission"
|
||||
TRANSMISSION_ARG="$TRANSMISSION_ARG -a $TRANSMISSION_IP"
|
||||
|
||||
if [ "$TRANSMISSION_AUTH" = "true" ]; then
|
||||
TRANSMISSION_ARG="$TRANSMISSION_ARG -t"
|
||||
TRANSMISSION_ARG="$TRANSMISSION_ARG -u $TRANSMISSION_USER"
|
||||
TRANSMISSION_ARG="$TRANSMISSION_ARG -v $TRANSMISSION_PWD"
|
||||
else
|
||||
TRANSMISSION_ARG="$TRANSMISSION_ARG -T"
|
||||
fi
|
||||
|
||||
chmod +x ./bin/transmission-daemon
|
||||
transmission-daemon $TRANSMISSION_ARG
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="sqlite"
|
||||
PKG_VERSION="autoconf-3070500"
|
||||
PKG_VERSION="autoconf-3070602"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="PublicDomain"
|
||||
|
@ -1,33 +0,0 @@
|
||||
diff -Naur sqlite-3.6.13/Makefile.in sqlite-3.6.13.patch/Makefile.in
|
||||
--- sqlite-3.6.13/Makefile.in 2009-04-13 10:57:54.000000000 +0200
|
||||
+++ sqlite-3.6.13.patch/Makefile.in 2009-04-19 18:49:22.036813333 +0200
|
||||
@@ -158,6 +158,11 @@
|
||||
STRIP = @STRIP@
|
||||
THREADSAFE_FLAGS = @THREADSAFE_FLAGS@
|
||||
VERSION = @VERSION@
|
||||
+
|
||||
+# OE overrides
|
||||
+#
|
||||
+TARGET_LFLAGS = $(config_TARGET_LFLAGS)
|
||||
+
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
@@ -283,7 +288,7 @@
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libsqlite3.la: $(libsqlite3_la_OBJECTS) $(libsqlite3_la_DEPENDENCIES)
|
||||
- $(LINK) -rpath $(libdir) $(libsqlite3_la_LDFLAGS) $(libsqlite3_la_OBJECTS) $(libsqlite3_la_LIBADD) $(LIBS)
|
||||
+ $(LINK) -rpath $(libdir) $(libsqlite3_la_LDFLAGS) $(libsqlite3_la_OBJECTS) $(libsqlite3_la_LIBADD) $(TARGET_LFLAGS) $(LIBS)
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@@ -314,7 +319,7 @@
|
||||
done
|
||||
sqlite3$(EXEEXT): $(sqlite3_OBJECTS) $(sqlite3_DEPENDENCIES)
|
||||
@rm -f sqlite3$(EXEEXT)
|
||||
- $(LINK) $(sqlite3_LDFLAGS) $(sqlite3_OBJECTS) $(sqlite3_LDADD) $(LIBS)
|
||||
+ $(LINK) $(sqlite3_LDFLAGS) $(sqlite3_OBJECTS) $(sqlite3_LDADD) $(TARGET_LFLAGS) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="glib"
|
||||
PKG_VERSION="2.28.5"
|
||||
PKG_VERSION="2.28.6"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="LGPL"
|
||||
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="ncurses"
|
||||
PKG_VERSION="5.8"
|
||||
PKG_VERSION="5.7"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Mesa"
|
||||
PKG_VERSION="7.10.1"
|
||||
PKG_VERSION="7.10.2"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
@ -36,6 +36,6 @@ PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
if [ "$MESA_MASTER" = "yes" ]; then
|
||||
PKG_VERSION="ee8d182"
|
||||
PKG_VERSION="6067a2a"
|
||||
PKG_URL="$OPENELEC_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
fi
|
||||
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libdrm"
|
||||
PKG_VERSION="2.4.24"
|
||||
PKG_VERSION="2.4.25"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
76
packages/lang/php/build
Executable file
76
packages/lang/php/build
Executable file
@ -0,0 +1,76 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
. config/options $1
|
||||
|
||||
strip_lto
|
||||
|
||||
cd $PKG_BUILD
|
||||
./configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=/usr \
|
||||
--disable-static \
|
||||
--enable-shared \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--disable-all \
|
||||
--without-pear \
|
||||
--with-config-file-path=/etc \
|
||||
--localstatedir=/var \
|
||||
--disable-cli \
|
||||
--enable-cgi \
|
||||
--enable-fastcgi \
|
||||
--disable-sockets \
|
||||
--disable-posix \
|
||||
--disable-spl \
|
||||
--disable-session \
|
||||
--without-openssl \
|
||||
--disable-libxml \
|
||||
--disable-xml \
|
||||
--disable-xmlreader \
|
||||
--disable-xmlwriter \
|
||||
--disable-simplexml \
|
||||
--with-zlib=$SYSROOT_PREFIX/usr \
|
||||
--disable-exif \
|
||||
--disable-ftp \
|
||||
--without-gettext \
|
||||
--without-gmp \
|
||||
--disable-json \
|
||||
--without-readline \
|
||||
--without-ncurses \
|
||||
--disable-pcntl \
|
||||
--disable-sysvmsg \
|
||||
--disable-sysvsem \
|
||||
--disable-sysvshm \
|
||||
--disable-zip \
|
||||
--disable-filter \
|
||||
--disable-calendar \
|
||||
--with-curl=$SYSROOT_PREFIX/usr \
|
||||
--with-pcre-regex \
|
||||
--without-sqlite \
|
||||
--with-sqlite3=$SYSROOT_PREFIX/usr \
|
||||
--enable-sqlite-utf8 \
|
||||
--disable-pdo \
|
||||
--without-pdo-sqlite \
|
||||
--without-pdo-mysql \
|
||||
|
||||
make
|
37
packages/lang/php/install
Executable file
37
packages/lang/php/install
Executable file
@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
. config/options $1
|
||||
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
cp $PKG_BUILD/sapi/cgi/php-cgi $INSTALL/usr/bin
|
||||
|
||||
mkdir -p $INSTALL/etc
|
||||
cp $PKG_BUILD/php.ini-production $INSTALL/etc/php.ini
|
||||
sed -e "s|^doc_root[[:space:]]*=.*$|doc_root = /usr/www|" \
|
||||
-e "s|^.cgi.force_redirect[[:space:]]*=.*$|cgi.force_redirect = 0|" \
|
||||
-i $INSTALL/etc/php.ini
|
||||
|
||||
mkdir -p $INSTALL/usr/www
|
||||
echo "<?php" > $INSTALL/usr/www/test.php
|
||||
echo "phpinfo();" >> $INSTALL/usr/www/test.php
|
||||
echo "?>" >> $INSTALL/usr/www/test.php
|
36
packages/lang/php/meta
Normal file
36
packages/lang/php/meta
Normal file
@ -0,0 +1,36 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="php"
|
||||
PKG_VERSION="5.3.6"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OpenSource"
|
||||
PKG_SITE="http://www.php.net"
|
||||
PKG_URL="http://www.php.net/distributions/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS="zlib pcre sqlite curl"
|
||||
PKG_BUILD_DEPENDS="toolchain zlib pcre sqlite curl"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="web"
|
||||
PKG_SHORTDESC="php: Scripting language especially suited for Web development"
|
||||
PKG_LONGDESC="PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML."
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_AUTORECONF="no"
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="dvb-firmware"
|
||||
PKG_VERSION="0.0.6"
|
||||
PKG_VERSION="0.0.7"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="Free-to-use"
|
||||
|
@ -19,13 +19,13 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="linux"
|
||||
PKG_VERSION="2.6.38.2"
|
||||
PKG_VERSION="2.6.39-rc4"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.kernel.org"
|
||||
PKG_URL="http://www.kernel.org/pub/linux/kernel/v2.6/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
#PKG_URL="http://www.kernel.org/pub/linux/kernel/v2.6/testing/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
#PKG_URL="http://www.kernel.org/pub/linux/kernel/v2.6/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_URL="http://www.kernel.org/pub/linux/kernel/v2.6/testing/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS="busybox linux-drivers linux-firmware"
|
||||
PKG_BUILD_DEPENDS="toolchain busybox-hosttools xz"
|
||||
PKG_PRIORITY="optional"
|
||||
@ -37,7 +37,7 @@ PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
if [ "$LINUX_NEXT" = "yes" -a "$LINUX" = "default" ]; then
|
||||
PKG_VERSION="2.6.39-rc1"
|
||||
PKG_VERSION="2.6.39-rc2"
|
||||
# PKG_URL="http://www.kernel.org/pub/linux/kernel/v2.6/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_URL="http://www.kernel.org/pub/linux/kernel/v2.6/testing/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
fi
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,22 +0,0 @@
|
||||
diff -Naur linux-2.6.35-980.1release14/arch/arm/mach-omap2/Makefile linux-2.6.35-980.1release14a/arch/arm/mach-omap2/Makefile
|
||||
--- linux-2.6.35-980.1release14/arch/arm/mach-omap2/Makefile 2011-01-19 11:27:25.000000000 +0100
|
||||
+++ linux-2.6.35-980.1release14a/arch/arm/mach-omap2/Makefile 2011-02-27 17:50:38.370778859 +0100
|
||||
@@ -29,7 +29,9 @@
|
||||
obj-$(CONFIG_ARCH_OMAP4) += omap44xx-smc.o omap4-common.o \
|
||||
omap4-wakeupgen.o
|
||||
|
||||
-AFLAGS_omap44xx-smc.o :=-Wa,-march=armv7-a
|
||||
+plus_sec := $(call as-instr,.arch_extension sec,+sec)
|
||||
+AFLAGS_omap44xx-smc.o :=-Wa,-march=armv7-a$(plus_sec)
|
||||
+AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec)
|
||||
|
||||
# Functions loaded to SRAM
|
||||
obj-$(CONFIG_ARCH_OMAP2420) += sram242x.o
|
||||
@@ -63,6 +65,7 @@
|
||||
|
||||
AFLAGS_sleep24xx.o :=-Wa,-march=armv6
|
||||
AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a
|
||||
+AFLAGS_sleep44xx.o :=-Wa,-march=armv7-a$(plus_sec)
|
||||
|
||||
ifeq ($(CONFIG_PM_VERBOSE),y)
|
||||
CFLAGS_pm_bus.o += -DDEBUG
|
@ -1,22 +0,0 @@
|
||||
--- linux-2.6.24-rc2.orig/arch/x86/boot/tools/build.c 2007-10-06 12:26:14.000000000 +0200
|
||||
+++ linux-2.6.24-rc2/arch/x86/boot/tools/build.c 2007-10-06 12:27:36.000000000 +0200
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <stdarg.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
-#include <sys/sysmacros.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
@@ -42,6 +41,11 @@
|
||||
#define DEFAULT_MAJOR_ROOT 0
|
||||
#define DEFAULT_MINOR_ROOT 0
|
||||
|
||||
+#undef major
|
||||
+#define major(dev) ((int)(((dev) >> 8) & 0xff))
|
||||
+#undef minor
|
||||
+#define minor(dev) ((int)((dev) & 0xff))
|
||||
+
|
||||
/* Minimal number of setup sectors */
|
||||
#define SETUP_SECT_MIN 5
|
||||
#define SETUP_SECT_MAX 64
|
@ -1,15 +0,0 @@
|
||||
Index: linux-2.6.16/scripts/gen_initramfs_list.sh
|
||||
===================================================================
|
||||
--- linux-2.6.16.orig/scripts/gen_initramfs_list.sh 2006-03-20 18:41:34.000000000 +0100
|
||||
+++ linux-2.6.16/scripts/gen_initramfs_list.sh 2006-03-20 18:42:40.000000000 +0100
|
||||
@@ -56,9 +56,7 @@
|
||||
|
||||
parse() {
|
||||
local location="$1"
|
||||
- local name="${location/${srcdir}//}"
|
||||
- # change '//' into '/'
|
||||
- name="${name//\/\///}"
|
||||
+ local name="$(echo "$location" | sed -e 's%$srcdir%%' -e 's%//*%/%g')"
|
||||
local mode="$2"
|
||||
local uid="$3"
|
||||
local gid="$4"
|
@ -1,20 +0,0 @@
|
||||
diff -Naur linux-2.6.34-rc7/init/main.c linux-2.6.34-rc7.patch/init/main.c
|
||||
--- linux-2.6.34-rc7/init/main.c 2010-05-10 03:36:28.000000000 +0200
|
||||
+++ linux-2.6.34-rc7.patch/init/main.c 2010-05-15 12:28:34.767241760 +0200
|
||||
@@ -886,8 +886,14 @@
|
||||
do_basic_setup();
|
||||
|
||||
/* Open the /dev/console on the rootfs, this should never fail */
|
||||
- if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
|
||||
- printk(KERN_WARNING "Warning: unable to open an initial console.\n");
|
||||
+ char *console = "/dev_console";
|
||||
+
|
||||
+ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) {
|
||||
+ sys_mknod(console, S_IFCHR|0600, (TTYAUX_MAJOR<<8)|1);
|
||||
+ if (sys_open(console, O_RDWR, 0) < 0)
|
||||
+ printk(KERN_WARNING "Warning: unable to open an initial console.\n");
|
||||
+ sys_unlink(console);
|
||||
+ }
|
||||
|
||||
(void) sys_dup(0);
|
||||
(void) sys_dup(0);
|
@ -1,24 +0,0 @@
|
||||
diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/tty.c linux-2.6.23-rc9/arch/i386/boot/tty.c
|
||||
--- linux-2.6.23-rc9.orig/arch/x86/boot/tty.c 2007-10-06 12:26:14.000000000 +0200
|
||||
+++ linux-2.6.23-rc9/arch/x86/boot/tty.c 2007-10-06 12:37:47.000000000 +0200
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
int getchar_timeout(void)
|
||||
{
|
||||
- int cnt = 30;
|
||||
+ int cnt = 3;
|
||||
int t0, t1;
|
||||
|
||||
t0 = gettime();
|
||||
diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/video.c linux-2.6.23-rc9/arch/i386/boot/video.c
|
||||
--- linux-2.6.23-rc9.orig/arch/x86/boot/video.c 2007-10-06 12:26:14.000000000 +0200
|
||||
+++ linux-2.6.23-rc9/arch/x86/boot/video.c 2007-10-06 12:36:05.000000000 +0200
|
||||
@@ -329,7 +329,7 @@
|
||||
unsigned int sel;
|
||||
|
||||
puts("Press <ENTER> to see video modes available, "
|
||||
- "<SPACE> to continue, or wait 30 sec\n");
|
||||
+ "<SPACE> to continue, or wait 3 sec\n");
|
||||
|
||||
kbd_flush();
|
||||
while (1) {
|
@ -1,13 +0,0 @@
|
||||
Index: linux-2.6.16/scripts/kconfig/confdata.c
|
||||
===================================================================
|
||||
--- linux-2.6.16.orig/scripts/kconfig/confdata.c 2006-03-20 06:53:29.000000000 +0100
|
||||
+++ linux-2.6.16/scripts/kconfig/confdata.c 2006-03-20 18:47:06.000000000 +0100
|
||||
@@ -340,7 +340,7 @@
|
||||
int type, l;
|
||||
const char *str;
|
||||
time_t now;
|
||||
- int use_timestamp = 1;
|
||||
+ int use_timestamp = 0;
|
||||
char *env;
|
||||
|
||||
dirname[0] = 0;
|
@ -1,25 +0,0 @@
|
||||
diff -Naur linux-2.6.31-rc4.orig/fs/fat/inode.c linux-2.6.31-rc4/fs/fat/inode.c
|
||||
--- linux-2.6.31-rc4.orig/fs/fat/inode.c 2009-07-25 12:47:41.000000000 +0200
|
||||
+++ linux-2.6.31-rc4/fs/fat/inode.c 2009-07-25 13:38:18.000000000 +0200
|
||||
@@ -979,7 +979,8 @@
|
||||
}
|
||||
opts->name_check = 'n';
|
||||
opts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK = 0;
|
||||
- opts->utf8 = opts->unicode_xlate = 0;
|
||||
+ opts->utf8 = 1;
|
||||
+ opts->unicode_xlate = 0;
|
||||
opts->numtail = 1;
|
||||
opts->usefree = opts->nocase = 0;
|
||||
opts->tz_utc = 0;
|
||||
diff -Naur linux-2.6.31-rc4.orig/fs/isofs/inode.c linux-2.6.31-rc4/fs/isofs/inode.c
|
||||
--- linux-2.6.31-rc4.orig/fs/isofs/inode.c 2009-07-25 12:47:41.000000000 +0200
|
||||
+++ linux-2.6.31-rc4/fs/isofs/inode.c 2009-07-25 13:38:49.000000000 +0200
|
||||
@@ -377,7 +377,7 @@
|
||||
popt->gid = 0;
|
||||
popt->uid = 0;
|
||||
popt->iocharset = NULL;
|
||||
- popt->utf8 = 0;
|
||||
+ popt->utf8 = 1;
|
||||
popt->overriderockperm = 0;
|
||||
popt->session=-1;
|
||||
popt->sbsector=-1;
|
@ -1,30 +0,0 @@
|
||||
From 4ff58b642f80dedb20533978123d89b5ac9b1ed5 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
|
||||
Date: Tue, 30 Mar 2010 00:04:29 -0400
|
||||
Subject: die-floppy-die
|
||||
|
||||
Kill the floppy.ko pnp modalias. We were surviving just fine without
|
||||
autoloading floppy drivers, tyvm.
|
||||
|
||||
Please feel free to register all complaints in the wastepaper bin.
|
||||
---
|
||||
drivers/block/floppy.c | 3 +--
|
||||
1 files changed, 1 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
|
||||
index 90c4038..f4a0b90 100644
|
||||
--- a/drivers/block/floppy.c
|
||||
+++ b/drivers/block/floppy.c
|
||||
@@ -4619,8 +4619,7 @@ static const struct pnp_device_id floppy_pnpids[] = {
|
||||
{"PNP0700", 0},
|
||||
{}
|
||||
};
|
||||
-
|
||||
-MODULE_DEVICE_TABLE(pnp, floppy_pnpids);
|
||||
+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */
|
||||
|
||||
#else
|
||||
|
||||
--
|
||||
1.7.0.1
|
||||
|
@ -1,702 +0,0 @@
|
||||
From e11e9e78799a7641fe0dc5289f35f2604a4b71a3 Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Sun, 17 Jan 2010 00:40:15 +0000
|
||||
Subject: [PATCH] Input: add appleir USB driver
|
||||
|
||||
This driver was originally written by James McKenzie, updated by
|
||||
Greg Kroah-Hartman, further updated by myself, with suspend support
|
||||
added.
|
||||
|
||||
More recent versions of the IR receiver are also supported through
|
||||
a patch by Alex Karpenko. The patch also adds support for the 2nd
|
||||
and 5th generation of the controller, and the menu key on newer
|
||||
brushed metal remotes.
|
||||
|
||||
Tested on a MacbookAir1,1
|
||||
|
||||
Signed-off-by: Bastien Nocera <hadess@hadess.net>
|
||||
---
|
||||
Documentation/input/appleir.txt | 46 ++++
|
||||
drivers/hid/hid-apple.c | 4 -
|
||||
drivers/hid/hid-core.c | 7 +-
|
||||
drivers/hid/hid-ids.h | 5 +-
|
||||
drivers/input/misc/Kconfig | 13 +
|
||||
drivers/input/misc/Makefile | 1 +
|
||||
drivers/input/misc/appleir.c | 519 +++++++++++++++++++++++++++++++++++++++
|
||||
7 files changed, 588 insertions(+), 7 deletions(-)
|
||||
create mode 100644 Documentation/input/appleir.txt
|
||||
create mode 100644 drivers/input/misc/appleir.c
|
||||
|
||||
diff --git a/Documentation/input/appleir.txt b/Documentation/input/appleir.txt
|
||||
new file mode 100644
|
||||
index 0000000..db637fb
|
||||
--- /dev/null
|
||||
+++ b/Documentation/input/appleir.txt
|
||||
@@ -0,0 +1,46 @@
|
||||
+Apple IR receiver Driver (appleir)
|
||||
+----------------------------------
|
||||
+ Copyright (C) 2009 Bastien Nocera <hadess@hadess.net>
|
||||
+
|
||||
+The appleir driver is a kernel input driver to handle Apple's IR
|
||||
+receivers (and associated remotes) in the kernel.
|
||||
+
|
||||
+The driver is an input driver which only handles "official" remotes
|
||||
+as built and sold by Apple.
|
||||
+
|
||||
+Authors
|
||||
+-------
|
||||
+
|
||||
+James McKenzie (original driver)
|
||||
+Alex Karpenko (05ac:8242 support)
|
||||
+Greg Kroah-Hartman (cleanups and original submission)
|
||||
+Bastien Nocera (further cleanups, brushed metal "enter"
|
||||
+button support and suspend support)
|
||||
+
|
||||
+Supported hardware
|
||||
+------------------
|
||||
+
|
||||
+- All Apple laptops and desktops from 2005 onwards, except:
|
||||
+ - the unibody Macbook (2009)
|
||||
+ - Mac Pro (all versions)
|
||||
+- Apple TV (all revisions prior to September 2010)
|
||||
+
|
||||
+The remote will only support the 6 (old white) or 7 (brushed metal) buttons
|
||||
+of the remotes as sold by Apple. See the next section if you want to use
|
||||
+other remotes or want to use lirc with the device instead of the kernel driver.
|
||||
+
|
||||
+Using lirc (native) instead of the kernel driver
|
||||
+------------------------------------------------
|
||||
+
|
||||
+First, you will need to disable the kernel driver for the receiver.
|
||||
+
|
||||
+This can be achieved by passing quirks to the usbhid driver.
|
||||
+The quirk line would be:
|
||||
+usbhid.quirks=0x05ac:0x8242:0x40000010
|
||||
+
|
||||
+With 0x05ac being the vendor ID (Apple, you shouldn't need to change this)
|
||||
+With 0x8242 being the product ID (check the output of lsusb for your hardware)
|
||||
+And 0x10 being "HID_QUIRK_HIDDEV_FORCE" and 0x40000000 being "HID_QUIRK_NO_IGNORE"
|
||||
+
|
||||
+This should force the creation of a hiddev device for the receiver, and
|
||||
+make it usable under lirc.
|
||||
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
|
||||
index bba05d0..0059d5a 100644
|
||||
--- a/drivers/hid/hid-apple.c
|
||||
+++ b/drivers/hid/hid-apple.c
|
||||
@@ -361,10 +361,6 @@ static void apple_remove(struct hid_device *hdev)
|
||||
}
|
||||
|
||||
static const struct hid_device_id apple_devices[] = {
|
||||
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL),
|
||||
- .driver_data = APPLE_HIDDEV | APPLE_IGNORE_HIDINPUT },
|
||||
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4),
|
||||
- .driver_data = APPLE_HIDDEV | APPLE_IGNORE_HIDINPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE),
|
||||
.driver_data = APPLE_MIGHTYMOUSE | APPLE_INVERT_HWHEEL },
|
||||
|
||||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
||||
index baa25ad..abc5bd7 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -1244,8 +1244,6 @@ static const struct hid_device_id hid_blacklist[] = {
|
||||
#if defined(CONFIG_HID_ACRUX_FF) || defined(CONFIG_HID_ACRUX_FF_MODULE)
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802) },
|
||||
#endif
|
||||
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL) },
|
||||
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGICMOUSE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI) },
|
||||
@@ -1577,6 +1575,11 @@ static const struct hid_device_id hid_ignore_list[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_AIRCABLE, USB_DEVICE_ID_AIRCABLE1) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL2) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL3) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL5) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM)},
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM2)},
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) },
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index 11af537..360a5ca 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -100,8 +100,11 @@
|
||||
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b
|
||||
#define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a
|
||||
#define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b
|
||||
-#define USB_DEVICE_ID_APPLE_ATV_IRCONTROL 0x8241
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL2 0x1440
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL3 0x8241
|
||||
#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243
|
||||
|
||||
#define USB_VENDOR_ID_ASUS 0x0486
|
||||
#define USB_DEVICE_ID_ASUS_T91MT 0x0185
|
||||
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
|
||||
index 60de906..2f2f2e7 100644
|
||||
--- a/drivers/input/misc/Kconfig
|
||||
+++ b/drivers/input/misc/Kconfig
|
||||
@@ -209,6 +209,19 @@ config INPUT_KEYSPAN_REMOTE
|
||||
To compile this driver as a module, choose M here: the module will
|
||||
be called keyspan_remote.
|
||||
|
||||
+config INPUT_APPLEIR
|
||||
+ tristate "Apple infrared receiver (built in)"
|
||||
+ depends on USB_ARCH_HAS_HCD
|
||||
+ select USB
|
||||
+ help
|
||||
+ Say Y here if you want to use a Apple infrared remote control. All
|
||||
+ the Apple computers from 2005 onwards include such a port, except
|
||||
+ the unibody Macbook (2009), and Mac Pros. This receiver is also
|
||||
+ used in the Apple TV set-top box prior to the 2010 model.
|
||||
+
|
||||
+ To compile this driver as a module, choose M here: the module will
|
||||
+ be called appleir.
|
||||
+
|
||||
config INPUT_POWERMATE
|
||||
tristate "Griffin PowerMate and Contour Jog support"
|
||||
depends on USB_ARCH_HAS_HCD
|
||||
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
|
||||
index 1fe1f6c..d5ef2b9 100644
|
||||
--- a/drivers/input/misc/Makefile
|
||||
+++ b/drivers/input/misc/Makefile
|
||||
@@ -13,6 +13,7 @@ obj-$(CONFIG_INPUT_ADXL34X) += adxl34x.o
|
||||
obj-$(CONFIG_INPUT_ADXL34X_I2C) += adxl34x-i2c.o
|
||||
obj-$(CONFIG_INPUT_ADXL34X_SPI) += adxl34x-spi.o
|
||||
obj-$(CONFIG_INPUT_APANEL) += apanel.o
|
||||
+obj-$(CONFIG_INPUT_APPLEIR) += appleir.o
|
||||
obj-$(CONFIG_INPUT_ATI_REMOTE) += ati_remote.o
|
||||
obj-$(CONFIG_INPUT_ATI_REMOTE2) += ati_remote2.o
|
||||
obj-$(CONFIG_INPUT_ATLAS_BTNS) += atlas_btns.o
|
||||
diff --git a/drivers/input/misc/appleir.c b/drivers/input/misc/appleir.c
|
||||
new file mode 100644
|
||||
index 0000000..3817a3c
|
||||
--- /dev/null
|
||||
+++ b/drivers/input/misc/appleir.c
|
||||
@@ -0,0 +1,519 @@
|
||||
+/*
|
||||
+ * appleir: USB driver for the apple ir device
|
||||
+ *
|
||||
+ * Original driver written by James McKenzie
|
||||
+ * Ported to recent 2.6 kernel versions by Greg Kroah-Hartman <gregkh@suse.de>
|
||||
+ *
|
||||
+ * Copyright (C) 2006 James McKenzie
|
||||
+ * Copyright (C) 2008 Greg Kroah-Hartman <greg@kroah.com>
|
||||
+ * Copyright (C) 2008 Novell Inc.
|
||||
+ *
|
||||
+ * 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, version 2.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/input.h>
|
||||
+#include <linux/usb/input.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/usb.h>
|
||||
+#include <linux/usb/input.h>
|
||||
+#include <asm/unaligned.h>
|
||||
+#include <asm/byteorder.h>
|
||||
+
|
||||
+#define DRIVER_VERSION "v1.2"
|
||||
+#define DRIVER_AUTHOR "James McKenzie"
|
||||
+#define DRIVER_DESC "Apple infrared receiver driver"
|
||||
+#define DRIVER_LICENSE "GPL"
|
||||
+
|
||||
+MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||
+MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
+MODULE_LICENSE(DRIVER_LICENSE);
|
||||
+
|
||||
+#define USB_VENDOR_ID_APPLE 0x05ac
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL2 0x1440
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL3 0x8241
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243
|
||||
+
|
||||
+#define URB_SIZE 32
|
||||
+
|
||||
+#define MAX_KEYS 9
|
||||
+#define MAX_KEYS_MASK (MAX_KEYS - 1)
|
||||
+
|
||||
+#define dbginfo(dev, format, arg...) do { if (debug) dev_info(dev , format , ## arg); } while (0)
|
||||
+
|
||||
+static int debug;
|
||||
+module_param(debug, int, 0644);
|
||||
+MODULE_PARM_DESC(debug, "Enable extra debug messages and information");
|
||||
+
|
||||
+/* I have two devices both of which report the following */
|
||||
+/* 25 87 ee 83 0a + */
|
||||
+/* 25 87 ee 83 0c - */
|
||||
+/* 25 87 ee 83 09 << */
|
||||
+/* 25 87 ee 83 06 >> */
|
||||
+/* 25 87 ee 83 05 >" */
|
||||
+/* 25 87 ee 83 03 menu */
|
||||
+/* 26 00 00 00 00 for key repeat*/
|
||||
+
|
||||
+/* Thomas Glanzmann reports the following responses */
|
||||
+/* 25 87 ee ca 0b + */
|
||||
+/* 25 87 ee ca 0d - */
|
||||
+/* 25 87 ee ca 08 << */
|
||||
+/* 25 87 ee ca 07 >> */
|
||||
+/* 25 87 ee ca 04 >" */
|
||||
+/* 25 87 ee ca 02 menu */
|
||||
+/* 26 00 00 00 00 for key repeat*/
|
||||
+/* He also observes the following event sometimes */
|
||||
+/* sent after a key is release, which I interpret */
|
||||
+/* as a flat battery message */
|
||||
+/* 25 87 e0 ca 06 flat battery */
|
||||
+
|
||||
+/* Alexandre Karpenko reports the following responses for Device ID 0x8242 */
|
||||
+/* 25 87 ee 47 0b + */
|
||||
+/* 25 87 ee 47 0d - */
|
||||
+/* 25 87 ee 47 08 << */
|
||||
+/* 25 87 ee 47 07 >> */
|
||||
+/* 25 87 ee 47 04 >" */
|
||||
+/* 25 87 ee 47 02 menu */
|
||||
+/* 26 87 ee 47 ** for key repeat (** is the code of the key being held) */
|
||||
+
|
||||
+/* Bastien Nocera's "new" remote */
|
||||
+/* 25 87 ee 91 5f followed by
|
||||
+ * 25 87 ee 91 05 gives you >"
|
||||
+ *
|
||||
+ * 25 87 ee 91 5c followed by
|
||||
+ * 25 87 ee 91 05 gives you the middle button */
|
||||
+
|
||||
+static const unsigned short appleir_key_table[] = {
|
||||
+ KEY_RESERVED,
|
||||
+ KEY_MENU,
|
||||
+ KEY_PLAYPAUSE,
|
||||
+ KEY_FORWARD,
|
||||
+ KEY_BACK,
|
||||
+ KEY_VOLUMEUP,
|
||||
+ KEY_VOLUMEDOWN,
|
||||
+ KEY_ENTER,
|
||||
+ KEY_RESERVED,
|
||||
+};
|
||||
+
|
||||
+struct appleir {
|
||||
+ struct input_dev *input_dev;
|
||||
+ unsigned short keymap[ARRAY_SIZE(appleir_key_table)];
|
||||
+ u8 *data;
|
||||
+ dma_addr_t dma_buf;
|
||||
+ struct usb_device *usbdev;
|
||||
+ unsigned int flags;
|
||||
+ struct urb *urb;
|
||||
+ struct timer_list key_up_timer;
|
||||
+ int current_key;
|
||||
+ int prev_key_idx;
|
||||
+ char phys[32];
|
||||
+};
|
||||
+
|
||||
+static DEFINE_MUTEX(appleir_mutex);
|
||||
+
|
||||
+enum {
|
||||
+ APPLEIR_OPENED = 0x1,
|
||||
+ APPLEIR_SUSPENDED = 0x2,
|
||||
+};
|
||||
+
|
||||
+static struct usb_device_id appleir_ids[] = {
|
||||
+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL) },
|
||||
+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL2) },
|
||||
+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL3) },
|
||||
+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
|
||||
+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL5) },
|
||||
+ {}
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(usb, appleir_ids);
|
||||
+
|
||||
+static void dump_packet(struct appleir *appleir, char *msg, u8 *data, int len)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ printk(KERN_ERR "appleir: %s (%d bytes)", msg, len);
|
||||
+
|
||||
+ for (i = 0; i < len; ++i)
|
||||
+ printk(" %02x", data[i]);
|
||||
+ printk(" (should be command %d)\n", (data[4] >> 1) & MAX_KEYS_MASK);
|
||||
+}
|
||||
+
|
||||
+static int get_key(int data)
|
||||
+{
|
||||
+ switch (data) {
|
||||
+ case 0x02:
|
||||
+ case 0x03:
|
||||
+ /* menu */
|
||||
+ return 1;
|
||||
+ case 0x04:
|
||||
+ case 0x05:
|
||||
+ /* >" */
|
||||
+ return 2;
|
||||
+ case 0x06:
|
||||
+ case 0x07:
|
||||
+ /* >> */
|
||||
+ return 3;
|
||||
+ case 0x08:
|
||||
+ case 0x09:
|
||||
+ /* << */
|
||||
+ return 4;
|
||||
+ case 0x0a:
|
||||
+ case 0x0b:
|
||||
+ /* + */
|
||||
+ return 5;
|
||||
+ case 0x0c:
|
||||
+ case 0x0d:
|
||||
+ /* - */
|
||||
+ return 6;
|
||||
+ case 0x5c:
|
||||
+ /* Middle button, on newer remotes,
|
||||
+ * part of a 2 packet-command */
|
||||
+ return -7;
|
||||
+ default:
|
||||
+ return -1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void key_up(struct appleir *appleir, int key)
|
||||
+{
|
||||
+ dbginfo(&appleir->input_dev->dev, "key %d up\n", key);
|
||||
+ input_report_key(appleir->input_dev, key, 0);
|
||||
+ input_sync(appleir->input_dev);
|
||||
+}
|
||||
+
|
||||
+static void key_down(struct appleir *appleir, int key)
|
||||
+{
|
||||
+ dbginfo(&appleir->input_dev->dev, "key %d down\n", key);
|
||||
+ input_report_key(appleir->input_dev, key, 1);
|
||||
+ input_sync(appleir->input_dev);
|
||||
+}
|
||||
+
|
||||
+static void battery_flat(struct appleir *appleir)
|
||||
+{
|
||||
+ dev_err(&appleir->input_dev->dev, "possible flat battery?\n");
|
||||
+}
|
||||
+
|
||||
+static void key_up_tick(unsigned long data)
|
||||
+{
|
||||
+ struct appleir *appleir = (struct appleir *)data;
|
||||
+
|
||||
+ if (appleir->current_key) {
|
||||
+ key_up(appleir, appleir->current_key);
|
||||
+ appleir->current_key = 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void new_data(struct appleir *appleir, u8 *data, int len)
|
||||
+{
|
||||
+ static const u8 keydown[] = { 0x25, 0x87, 0xee };
|
||||
+ static const u8 keyrepeat[] = { 0x26, };
|
||||
+ static const u8 flatbattery[] = { 0x25, 0x87, 0xe0 };
|
||||
+
|
||||
+ if (debug)
|
||||
+ dump_packet(appleir, "received", data, len);
|
||||
+
|
||||
+ if (len != 5)
|
||||
+ return;
|
||||
+
|
||||
+ if (!memcmp(data, keydown, sizeof(keydown))) {
|
||||
+ int index;
|
||||
+
|
||||
+ /* If we already have a key down, take it up before marking
|
||||
+ this one down */
|
||||
+ if (appleir->current_key)
|
||||
+ key_up(appleir, appleir->current_key);
|
||||
+
|
||||
+ /* Handle dual packet commands */
|
||||
+ if (appleir->prev_key_idx > 0)
|
||||
+ index = appleir->prev_key_idx;
|
||||
+ else
|
||||
+ index = get_key(data[4]);
|
||||
+
|
||||
+ if (index > 0) {
|
||||
+ appleir->current_key = appleir->keymap[index];
|
||||
+
|
||||
+ key_down(appleir, appleir->current_key);
|
||||
+ /* Remote doesn't do key up, either pull them up, in the test
|
||||
+ above, or here set a timer which pulls them up after 1/8 s */
|
||||
+ mod_timer(&appleir->key_up_timer, jiffies + HZ / 8);
|
||||
+ appleir->prev_key_idx = 0;
|
||||
+ return;
|
||||
+ } else if (index == -7) {
|
||||
+ /* Remember key for next packet */
|
||||
+ appleir->prev_key_idx = 0 - index;
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ appleir->prev_key_idx = 0;
|
||||
+
|
||||
+ if (!memcmp(data, keyrepeat, sizeof(keyrepeat))) {
|
||||
+ key_down(appleir, appleir->current_key);
|
||||
+ /* Remote doesn't do key up, either pull them up, in the test
|
||||
+ above, or here set a timer which pulls them up after 1/8 s */
|
||||
+ mod_timer(&appleir->key_up_timer, jiffies + HZ / 8);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (!memcmp(data, flatbattery, sizeof(flatbattery))) {
|
||||
+ battery_flat(appleir);
|
||||
+ /* Fall through */
|
||||
+ }
|
||||
+
|
||||
+ dump_packet(appleir, "unknown packet", data, len);
|
||||
+}
|
||||
+
|
||||
+static void appleir_urb(struct urb *urb)
|
||||
+{
|
||||
+ struct appleir *appleir = urb->context;
|
||||
+ int status = urb->status;
|
||||
+ int retval;
|
||||
+
|
||||
+ switch (status) {
|
||||
+ case 0:
|
||||
+ new_data(appleir, urb->transfer_buffer, urb->actual_length);
|
||||
+ break;
|
||||
+ case -ECONNRESET:
|
||||
+ case -ENOENT:
|
||||
+ case -ESHUTDOWN:
|
||||
+ /* This urb is terminated, clean up */
|
||||
+ dbginfo(&appleir->input_dev->dev, "%s - urb shutting down with status: %d", __func__,
|
||||
+ urb->status);
|
||||
+ return;
|
||||
+ default:
|
||||
+ dbginfo(&appleir->input_dev->dev, "%s - nonzero urb status received: %d", __func__,
|
||||
+ urb->status);
|
||||
+ }
|
||||
+
|
||||
+ retval = usb_submit_urb(urb, GFP_ATOMIC);
|
||||
+ if (retval)
|
||||
+ err("%s - usb_submit_urb failed with result %d", __func__,
|
||||
+ retval);
|
||||
+}
|
||||
+
|
||||
+static int appleir_open(struct input_dev *dev)
|
||||
+{
|
||||
+ struct appleir *appleir = input_get_drvdata(dev);
|
||||
+ struct usb_interface *intf = usb_ifnum_to_if(appleir->usbdev, 0);
|
||||
+ int r;
|
||||
+
|
||||
+ r = usb_autopm_get_interface(intf);
|
||||
+ if (r) {
|
||||
+ dev_err(&intf->dev,
|
||||
+ "%s(): usb_autopm_get_interface() = %d\n", __func__, r);
|
||||
+ return r;
|
||||
+ }
|
||||
+
|
||||
+ mutex_lock(&appleir_mutex);
|
||||
+
|
||||
+ if (usb_submit_urb(appleir->urb, GFP_ATOMIC)) {
|
||||
+ r = -EIO;
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ appleir->flags |= APPLEIR_OPENED;
|
||||
+
|
||||
+ mutex_unlock(&appleir_mutex);
|
||||
+
|
||||
+ usb_autopm_put_interface(intf);
|
||||
+
|
||||
+ return 0;
|
||||
+fail:
|
||||
+ mutex_unlock(&appleir_mutex);
|
||||
+ usb_autopm_put_interface(intf);
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
+static void appleir_close(struct input_dev *dev)
|
||||
+{
|
||||
+ struct appleir *appleir = input_get_drvdata(dev);
|
||||
+
|
||||
+ mutex_lock(&appleir_mutex);
|
||||
+
|
||||
+ if (!(appleir->flags & APPLEIR_SUSPENDED)) {
|
||||
+ usb_kill_urb(appleir->urb);
|
||||
+ del_timer_sync(&appleir->key_up_timer);
|
||||
+ }
|
||||
+
|
||||
+ appleir->flags &= ~APPLEIR_OPENED;
|
||||
+
|
||||
+ mutex_unlock(&appleir_mutex);
|
||||
+}
|
||||
+
|
||||
+static int appleir_probe(struct usb_interface *intf,
|
||||
+ const struct usb_device_id *id)
|
||||
+{
|
||||
+ struct usb_device *dev = interface_to_usbdev(intf);
|
||||
+ struct usb_endpoint_descriptor *endpoint;
|
||||
+ struct appleir *appleir = NULL;
|
||||
+ struct input_dev *input_dev;
|
||||
+ int retval = -ENOMEM;
|
||||
+ int i;
|
||||
+
|
||||
+ appleir = kzalloc(sizeof(struct appleir), GFP_KERNEL);
|
||||
+ if (!appleir)
|
||||
+ goto allocfail;
|
||||
+
|
||||
+ appleir->data = usb_alloc_coherent(dev, URB_SIZE, GFP_KERNEL,
|
||||
+ &appleir->dma_buf);
|
||||
+ if (!appleir->data)
|
||||
+ goto usbfail;
|
||||
+
|
||||
+ appleir->urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
+ if (!appleir->urb)
|
||||
+ goto urbfail;
|
||||
+
|
||||
+ appleir->usbdev = dev;
|
||||
+
|
||||
+ input_dev = input_allocate_device();
|
||||
+ if (!input_dev)
|
||||
+ goto inputfail;
|
||||
+
|
||||
+ appleir->input_dev = input_dev;
|
||||
+
|
||||
+ usb_make_path(dev, appleir->phys, sizeof(appleir->phys));
|
||||
+ strlcpy(appleir->phys, "/input0", sizeof(appleir->phys));
|
||||
+
|
||||
+ input_dev->name = "Apple Infrared Remote Controller";
|
||||
+ input_dev->phys = appleir->phys;
|
||||
+ usb_to_input_id(dev, &input_dev->id);
|
||||
+ input_dev->dev.parent = &intf->dev;
|
||||
+ input_dev->keycode = appleir->keymap;
|
||||
+ input_dev->keycodesize = sizeof(unsigned short);
|
||||
+ input_dev->keycodemax = ARRAY_SIZE(appleir->keymap);
|
||||
+
|
||||
+ input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
|
||||
+
|
||||
+ memcpy(appleir->keymap, appleir_key_table, sizeof(appleir->keymap));
|
||||
+ for (i = 0; i < ARRAY_SIZE(appleir_key_table); i++)
|
||||
+ set_bit(appleir->keymap[i], input_dev->keybit);
|
||||
+ clear_bit(KEY_RESERVED, input_dev->keybit);
|
||||
+
|
||||
+ input_set_drvdata(input_dev, appleir);
|
||||
+ input_dev->open = appleir_open;
|
||||
+ input_dev->close = appleir_close;
|
||||
+
|
||||
+ endpoint = &intf->cur_altsetting->endpoint[0].desc;
|
||||
+
|
||||
+ usb_fill_int_urb(appleir->urb, dev,
|
||||
+ usb_rcvintpipe(dev, endpoint->bEndpointAddress),
|
||||
+ appleir->data, 8,
|
||||
+ appleir_urb, appleir, endpoint->bInterval);
|
||||
+
|
||||
+ appleir->urb->transfer_dma = appleir->dma_buf;
|
||||
+ appleir->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
|
||||
+
|
||||
+ setup_timer(&appleir->key_up_timer,
|
||||
+ key_up_tick, (unsigned long) appleir);
|
||||
+
|
||||
+ retval = input_register_device(appleir->input_dev);
|
||||
+ if (retval)
|
||||
+ goto inputfail;
|
||||
+
|
||||
+ usb_set_intfdata(intf, appleir);
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+inputfail:
|
||||
+ input_free_device(appleir->input_dev);
|
||||
+
|
||||
+urbfail:
|
||||
+ usb_free_urb(appleir->urb);
|
||||
+
|
||||
+usbfail:
|
||||
+ usb_free_coherent(dev, URB_SIZE, appleir->data,
|
||||
+ appleir->dma_buf);
|
||||
+
|
||||
+allocfail:
|
||||
+ kfree(appleir);
|
||||
+
|
||||
+ return retval;
|
||||
+}
|
||||
+
|
||||
+static void appleir_disconnect(struct usb_interface *intf)
|
||||
+{
|
||||
+ struct appleir *appleir = usb_get_intfdata(intf);
|
||||
+
|
||||
+ usb_set_intfdata(intf, NULL);
|
||||
+ input_unregister_device(appleir->input_dev);
|
||||
+ usb_free_urb(appleir->urb);
|
||||
+ usb_free_coherent(interface_to_usbdev(intf), URB_SIZE,
|
||||
+ appleir->data, appleir->dma_buf);
|
||||
+ kfree(appleir);
|
||||
+}
|
||||
+
|
||||
+static int appleir_suspend(struct usb_interface *interface,
|
||||
+ pm_message_t message)
|
||||
+{
|
||||
+ struct appleir *appleir = usb_get_intfdata(interface);
|
||||
+
|
||||
+ mutex_lock(&appleir_mutex);
|
||||
+ if (appleir->flags & APPLEIR_OPENED)
|
||||
+ usb_kill_urb(appleir->urb);
|
||||
+
|
||||
+ appleir->flags |= APPLEIR_SUSPENDED;
|
||||
+
|
||||
+ mutex_unlock(&appleir_mutex);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int appleir_resume(struct usb_interface *interface)
|
||||
+{
|
||||
+ struct appleir *appleir;
|
||||
+ int r = 0;
|
||||
+
|
||||
+ appleir = usb_get_intfdata(interface);
|
||||
+
|
||||
+ mutex_lock(&appleir_mutex);
|
||||
+ if (appleir->flags & APPLEIR_OPENED) {
|
||||
+ struct usb_endpoint_descriptor *endpoint;
|
||||
+
|
||||
+ endpoint = &interface->cur_altsetting->endpoint[0].desc;
|
||||
+ usb_fill_int_urb(appleir->urb, appleir->usbdev,
|
||||
+ usb_rcvintpipe(appleir->usbdev, endpoint->bEndpointAddress),
|
||||
+ appleir->data, 8,
|
||||
+ appleir_urb, appleir, endpoint->bInterval);
|
||||
+ appleir->urb->transfer_dma = appleir->dma_buf;
|
||||
+ appleir->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
|
||||
+
|
||||
+ /* And reset the USB device */
|
||||
+ if (usb_submit_urb(appleir->urb, GFP_ATOMIC))
|
||||
+ r = -EIO;
|
||||
+ }
|
||||
+
|
||||
+ appleir->flags &= ~APPLEIR_SUSPENDED;
|
||||
+
|
||||
+ mutex_unlock(&appleir_mutex);
|
||||
+
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
+static struct usb_driver appleir_driver = {
|
||||
+ .name = "appleir",
|
||||
+ .probe = appleir_probe,
|
||||
+ .disconnect = appleir_disconnect,
|
||||
+ .suspend = appleir_suspend,
|
||||
+ .resume = appleir_resume,
|
||||
+ .reset_resume = appleir_resume,
|
||||
+ .id_table = appleir_ids,
|
||||
+};
|
||||
+
|
||||
+static int __init appleir_init(void)
|
||||
+{
|
||||
+ return usb_register(&appleir_driver);
|
||||
+}
|
||||
+
|
||||
+static void __exit appleir_exit(void)
|
||||
+{
|
||||
+ usb_deregister(&appleir_driver);
|
||||
+}
|
||||
+
|
||||
+module_init(appleir_init);
|
||||
+module_exit(appleir_exit);
|
||||
--
|
||||
1.7.2.2
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,22 +0,0 @@
|
||||
--- linux-2.6.24-rc2.orig/arch/x86/boot/tools/build.c 2007-10-06 12:26:14.000000000 +0200
|
||||
+++ linux-2.6.24-rc2/arch/x86/boot/tools/build.c 2007-10-06 12:27:36.000000000 +0200
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <stdarg.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
-#include <sys/sysmacros.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
@@ -42,6 +41,11 @@
|
||||
#define DEFAULT_MAJOR_ROOT 0
|
||||
#define DEFAULT_MINOR_ROOT 0
|
||||
|
||||
+#undef major
|
||||
+#define major(dev) ((int)(((dev) >> 8) & 0xff))
|
||||
+#undef minor
|
||||
+#define minor(dev) ((int)((dev) & 0xff))
|
||||
+
|
||||
/* Minimal number of setup sectors */
|
||||
#define SETUP_SECT_MIN 5
|
||||
#define SETUP_SECT_MAX 64
|
@ -1,15 +0,0 @@
|
||||
Index: linux-2.6.16/scripts/gen_initramfs_list.sh
|
||||
===================================================================
|
||||
--- linux-2.6.16.orig/scripts/gen_initramfs_list.sh 2006-03-20 18:41:34.000000000 +0100
|
||||
+++ linux-2.6.16/scripts/gen_initramfs_list.sh 2006-03-20 18:42:40.000000000 +0100
|
||||
@@ -56,9 +56,7 @@
|
||||
|
||||
parse() {
|
||||
local location="$1"
|
||||
- local name="${location/${srcdir}//}"
|
||||
- # change '//' into '/'
|
||||
- name="${name//\/\///}"
|
||||
+ local name="$(echo "$location" | sed -e 's%$srcdir%%' -e 's%//*%/%g')"
|
||||
local mode="$2"
|
||||
local uid="$3"
|
||||
local gid="$4"
|
@ -1,20 +0,0 @@
|
||||
diff -Naur linux-2.6.34-rc7/init/main.c linux-2.6.34-rc7.patch/init/main.c
|
||||
--- linux-2.6.34-rc7/init/main.c 2010-05-10 03:36:28.000000000 +0200
|
||||
+++ linux-2.6.34-rc7.patch/init/main.c 2010-05-15 12:28:34.767241760 +0200
|
||||
@@ -886,8 +886,14 @@
|
||||
do_basic_setup();
|
||||
|
||||
/* Open the /dev/console on the rootfs, this should never fail */
|
||||
- if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
|
||||
- printk(KERN_WARNING "Warning: unable to open an initial console.\n");
|
||||
+ char *console = "/dev_console";
|
||||
+
|
||||
+ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) {
|
||||
+ sys_mknod(console, S_IFCHR|0600, (TTYAUX_MAJOR<<8)|1);
|
||||
+ if (sys_open(console, O_RDWR, 0) < 0)
|
||||
+ printk(KERN_WARNING "Warning: unable to open an initial console.\n");
|
||||
+ sys_unlink(console);
|
||||
+ }
|
||||
|
||||
(void) sys_dup(0);
|
||||
(void) sys_dup(0);
|
@ -1,24 +0,0 @@
|
||||
diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/tty.c linux-2.6.23-rc9/arch/i386/boot/tty.c
|
||||
--- linux-2.6.23-rc9.orig/arch/x86/boot/tty.c 2007-10-06 12:26:14.000000000 +0200
|
||||
+++ linux-2.6.23-rc9/arch/x86/boot/tty.c 2007-10-06 12:37:47.000000000 +0200
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
int getchar_timeout(void)
|
||||
{
|
||||
- int cnt = 30;
|
||||
+ int cnt = 3;
|
||||
int t0, t1;
|
||||
|
||||
t0 = gettime();
|
||||
diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/video.c linux-2.6.23-rc9/arch/i386/boot/video.c
|
||||
--- linux-2.6.23-rc9.orig/arch/x86/boot/video.c 2007-10-06 12:26:14.000000000 +0200
|
||||
+++ linux-2.6.23-rc9/arch/x86/boot/video.c 2007-10-06 12:36:05.000000000 +0200
|
||||
@@ -329,7 +329,7 @@
|
||||
unsigned int sel;
|
||||
|
||||
puts("Press <ENTER> to see video modes available, "
|
||||
- "<SPACE> to continue, or wait 30 sec\n");
|
||||
+ "<SPACE> to continue, or wait 3 sec\n");
|
||||
|
||||
kbd_flush();
|
||||
while (1) {
|
@ -1,13 +0,0 @@
|
||||
Index: linux-2.6.16/scripts/kconfig/confdata.c
|
||||
===================================================================
|
||||
--- linux-2.6.16.orig/scripts/kconfig/confdata.c 2006-03-20 06:53:29.000000000 +0100
|
||||
+++ linux-2.6.16/scripts/kconfig/confdata.c 2006-03-20 18:47:06.000000000 +0100
|
||||
@@ -340,7 +340,7 @@
|
||||
int type, l;
|
||||
const char *str;
|
||||
time_t now;
|
||||
- int use_timestamp = 1;
|
||||
+ int use_timestamp = 0;
|
||||
char *env;
|
||||
|
||||
dirname[0] = 0;
|
@ -1,25 +0,0 @@
|
||||
diff -Naur linux-2.6.31-rc4.orig/fs/fat/inode.c linux-2.6.31-rc4/fs/fat/inode.c
|
||||
--- linux-2.6.31-rc4.orig/fs/fat/inode.c 2009-07-25 12:47:41.000000000 +0200
|
||||
+++ linux-2.6.31-rc4/fs/fat/inode.c 2009-07-25 13:38:18.000000000 +0200
|
||||
@@ -979,7 +979,8 @@
|
||||
}
|
||||
opts->name_check = 'n';
|
||||
opts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK = 0;
|
||||
- opts->utf8 = opts->unicode_xlate = 0;
|
||||
+ opts->utf8 = 1;
|
||||
+ opts->unicode_xlate = 0;
|
||||
opts->numtail = 1;
|
||||
opts->usefree = opts->nocase = 0;
|
||||
opts->tz_utc = 0;
|
||||
diff -Naur linux-2.6.31-rc4.orig/fs/isofs/inode.c linux-2.6.31-rc4/fs/isofs/inode.c
|
||||
--- linux-2.6.31-rc4.orig/fs/isofs/inode.c 2009-07-25 12:47:41.000000000 +0200
|
||||
+++ linux-2.6.31-rc4/fs/isofs/inode.c 2009-07-25 13:38:49.000000000 +0200
|
||||
@@ -377,7 +377,7 @@
|
||||
popt->gid = 0;
|
||||
popt->uid = 0;
|
||||
popt->iocharset = NULL;
|
||||
- popt->utf8 = 0;
|
||||
+ popt->utf8 = 1;
|
||||
popt->overriderockperm = 0;
|
||||
popt->session=-1;
|
||||
popt->sbsector=-1;
|
@ -1,30 +0,0 @@
|
||||
From 4ff58b642f80dedb20533978123d89b5ac9b1ed5 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
|
||||
Date: Tue, 30 Mar 2010 00:04:29 -0400
|
||||
Subject: die-floppy-die
|
||||
|
||||
Kill the floppy.ko pnp modalias. We were surviving just fine without
|
||||
autoloading floppy drivers, tyvm.
|
||||
|
||||
Please feel free to register all complaints in the wastepaper bin.
|
||||
---
|
||||
drivers/block/floppy.c | 3 +--
|
||||
1 files changed, 1 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
|
||||
index 90c4038..f4a0b90 100644
|
||||
--- a/drivers/block/floppy.c
|
||||
+++ b/drivers/block/floppy.c
|
||||
@@ -4619,8 +4619,7 @@ static const struct pnp_device_id floppy_pnpids[] = {
|
||||
{"PNP0700", 0},
|
||||
{}
|
||||
};
|
||||
-
|
||||
-MODULE_DEVICE_TABLE(pnp, floppy_pnpids);
|
||||
+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */
|
||||
|
||||
#else
|
||||
|
||||
--
|
||||
1.7.0.1
|
||||
|
@ -1,59 +0,0 @@
|
||||
From 2a79554c864ac58fa2ad982f0fcee2cc2aa33eb5 Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Thu, 20 May 2010 10:30:31 -0400
|
||||
Subject: Disable i8042 checks on Intel Apple Macs
|
||||
|
||||
As those computers never had any i8042 controllers, and the
|
||||
current lookup code could potentially lock up/hang/wait for
|
||||
timeout for long periods of time.
|
||||
|
||||
Fixes intermittent hangs on boot on a MacbookAir1,1
|
||||
|
||||
Signed-off-by: Bastien Nocera <hadess@hadess.net>
|
||||
---
|
||||
drivers/input/serio/i8042.c | 22 ++++++++++++++++++++++
|
||||
1 files changed, 22 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
|
||||
index 6440a8f..4d7cf98 100644
|
||||
--- a/drivers/input/serio/i8042.c
|
||||
+++ b/drivers/input/serio/i8042.c
|
||||
@@ -1451,6 +1451,22 @@ static struct platform_driver i8042_driver = {
|
||||
.shutdown = i8042_shutdown,
|
||||
};
|
||||
|
||||
+#ifdef CONFIG_DMI
|
||||
+static struct dmi_system_id __initdata dmi_system_table[] = {
|
||||
+ {
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_BIOS_VENDOR, "Apple Computer, Inc.")
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_BIOS_VENDOR, "Apple Inc.")
|
||||
+ },
|
||||
+ },
|
||||
+ {}
|
||||
+};
|
||||
+#endif /*CONFIG_DMI*/
|
||||
+
|
||||
static int __init i8042_init(void)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
@@ -1458,6 +1474,12 @@ static int __init i8042_init(void)
|
||||
|
||||
dbg_init();
|
||||
|
||||
+#ifdef CONFIG_DMI
|
||||
+ /* Intel Apple Macs never have an i8042 controller */
|
||||
+ if (dmi_check_system(dmi_system_table) > 0)
|
||||
+ return -ENODEV;
|
||||
+#endif /*CONFIG_DMI*/
|
||||
+
|
||||
err = i8042_platform_init();
|
||||
if (err)
|
||||
return err;
|
||||
--
|
||||
1.7.0.1
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,113 +0,0 @@
|
||||
diff -Naur linux-2.6.37/drivers/hid/hid-aureal.c linux-2.6.37.patch/drivers/hid/hid-aureal.c
|
||||
--- linux-2.6.37/drivers/hid/hid-aureal.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.37.patch/drivers/hid/hid-aureal.c 2011-01-07 22:35:31.413389936 +0100
|
||||
@@ -0,0 +1,60 @@
|
||||
+/*
|
||||
+ * HID driver for some sunplus "special" devices
|
||||
+ *
|
||||
+ * Copyright (c) 1999 Andreas Gal
|
||||
+ * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz>
|
||||
+ * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc
|
||||
+ * Copyright (c) 2006-2007 Jiri Kosina
|
||||
+ * Copyright (c) 2007 Paul Walmsley
|
||||
+ * Copyright (c) 2008 Jiri Slaby
|
||||
+ * Copyright (c) 2010 Franco Catrin <fcatrin@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * This program is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License as published by the Free
|
||||
+ * Software Foundation; either version 2 of the License, or (at your option)
|
||||
+ * any later version.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/device.h>
|
||||
+#include <linux/hid.h>
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+#include "hid-ids.h"
|
||||
+
|
||||
+static __u8 *aureal_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
+ unsigned int *rsize)
|
||||
+{
|
||||
+ if (*rsize >= 54 && rdesc[52] == 0x25 && rdesc[53] == 0x01) {
|
||||
+ dev_info(&hdev->dev, "fixing Aureal Cy se W-01RN USB_V3.1 "
|
||||
+ "report descriptor. Keyboard Logical Maximum = 101\n");
|
||||
+ rdesc[53] = 0x65;
|
||||
+ } return rdesc;
|
||||
+}
|
||||
+
|
||||
+static const struct hid_device_id aureal_devices[] = {
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_AUREAL, USB_DEVICE_ID_AUREAL_W01RN) },
|
||||
+ { }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(hid, aureal_devices);
|
||||
+
|
||||
+static struct hid_driver aureal_driver = {
|
||||
+ .name = "aureal",
|
||||
+ .id_table = aureal_devices,
|
||||
+ .report_fixup = aureal_report_fixup,
|
||||
+};
|
||||
+
|
||||
+static int __init aureal_init(void)
|
||||
+{
|
||||
+ return hid_register_driver(&aureal_driver);
|
||||
+}
|
||||
+
|
||||
+static void __exit aureal_exit(void)
|
||||
+{
|
||||
+ hid_unregister_driver(&aureal_driver);
|
||||
+}
|
||||
+
|
||||
+module_init(aureal_init);
|
||||
+module_exit(aureal_exit);
|
||||
+MODULE_LICENSE("GPL");
|
||||
diff -Naur linux-2.6.37/drivers/hid/hid-ids.h linux-2.6.37.patch/drivers/hid/hid-ids.h
|
||||
--- linux-2.6.37/drivers/hid/hid-ids.h 2011-01-05 01:50:19.000000000 +0100
|
||||
+++ linux-2.6.37.patch/drivers/hid/hid-ids.h 2011-01-07 22:35:31.414389949 +0100
|
||||
@@ -6,6 +6,7 @@
|
||||
* Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc
|
||||
* Copyright (c) 2006-2007 Jiri Kosina
|
||||
* Copyright (c) 2007 Paul Walmsley
|
||||
+ * Copyright (c) 2010 Franco Catrin <fcatrin@gmail.com>
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -327,6 +328,9 @@
|
||||
#define USB_DEVICE_ID_KYE_ERGO_525V 0x0087
|
||||
#define USB_DEVICE_ID_KYE_GPEN_560 0x5003
|
||||
|
||||
+#define USB_VENDOR_ID_AUREAL 0x0755
|
||||
+#define USB_DEVICE_ID_AUREAL_W01RN 0x2626
|
||||
+
|
||||
#define USB_VENDOR_ID_LABTEC 0x1020
|
||||
#define USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD 0x0006
|
||||
|
||||
diff -Naur linux-2.6.37/drivers/hid/Kconfig linux-2.6.37.patch/drivers/hid/Kconfig
|
||||
--- linux-2.6.37/drivers/hid/Kconfig 2011-01-05 01:50:19.000000000 +0100
|
||||
+++ linux-2.6.37.patch/drivers/hid/Kconfig 2011-01-07 22:35:31.467390603 +0100
|
||||
@@ -87,6 +87,13 @@
|
||||
Say Y here if you want support for keyboards of Apple iBooks, PowerBooks,
|
||||
MacBooks, MacBook Pros and Apple Aluminum.
|
||||
|
||||
+config HID_AUREAL
|
||||
+ tristate "Aureal" if EMBEDDED
|
||||
+ depends on USB_HID
|
||||
+ default !EMBEDDED
|
||||
+ ---help---
|
||||
+ Support for Aureal Cy se W-01RN Remote Controller
|
||||
+
|
||||
config HID_BELKIN
|
||||
tristate "Belkin Flip KVM and Wireless keyboard" if EMBEDDED
|
||||
depends on USB_HID
|
||||
diff -Naur linux-2.6.37/drivers/hid/Makefile linux-2.6.37.patch/drivers/hid/Makefile
|
||||
--- linux-2.6.37/drivers/hid/Makefile 2011-01-05 01:50:19.000000000 +0100
|
||||
+++ linux-2.6.37.patch/drivers/hid/Makefile 2011-01-07 22:35:31.547391590 +0100
|
||||
@@ -29,6 +29,7 @@
|
||||
obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o
|
||||
obj-$(CONFIG_HID_ACRUX_FF) += hid-axff.o
|
||||
obj-$(CONFIG_HID_APPLE) += hid-apple.o
|
||||
+obj-$(CONFIG_HID_AUREAL) += hid-aureal.o
|
||||
obj-$(CONFIG_HID_BELKIN) += hid-belkin.o
|
||||
obj-$(CONFIG_HID_CANDO) += hid-cando.o
|
||||
obj-$(CONFIG_HID_CHERRY) += hid-cherry.o
|
@ -1,65 +0,0 @@
|
||||
diff -Naur linux-2.6.37-rc6/drivers/input/misc/ati_remote.c linux-2.6.37-rc6.patch/drivers/input/misc/ati_remote.c
|
||||
--- linux-2.6.37-rc6/drivers/input/misc/ati_remote.c 2010-12-16 02:24:48.000000000 +0100
|
||||
+++ linux-2.6.37-rc6.patch/drivers/input/misc/ati_remote.c 2010-12-16 12:35:04.454620549 +0100
|
||||
@@ -90,6 +90,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/module.h>
|
||||
+#include <linux/moduleparam.h>
|
||||
#include <linux/usb/input.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/jiffies.h>
|
||||
@@ -131,6 +132,10 @@
|
||||
module_param(debug, int, 0644);
|
||||
MODULE_PARM_DESC(debug, "Enable extra debug messages and information");
|
||||
|
||||
+static int keychange;
|
||||
+module_param(keychange, int, 0644);
|
||||
+MODULE_PARM_DESC(keychange, "Enable support for Keychange remotes");
|
||||
+
|
||||
static int repeat_filter = FILTER_TIME;
|
||||
module_param(repeat_filter, int, 0644);
|
||||
MODULE_PARM_DESC(repeat_filter, "Repeat filter time, default = 60 msec");
|
||||
@@ -285,6 +290,25 @@
|
||||
{KIND_FILTERED, 0xf4, 0x2F, EV_KEY, KEY_END, 1}, /* END */
|
||||
{KIND_FILTERED, 0xf5, 0x30, EV_KEY, KEY_SELECT, 1}, /* SELECT */
|
||||
|
||||
+ /* Coloured keys */
|
||||
+ {KIND_FILTERED, 0xf7, 0x32, EV_KEY, KEY_PLAYCD, 1}, /* TXT Rot */
|
||||
+ {KIND_FILTERED, 0xf8, 0x33, EV_KEY, KEY_PAUSECD, 1}, /* TXT Gr */
|
||||
+ {KIND_FILTERED, 0xf9, 0x34, EV_KEY, KEY_PROG3, 1}, /* TXT Gelb */
|
||||
+ {KIND_FILTERED, 0xfa, 0x35, EV_KEY, KEY_PROG4, 1}, /* TXT Blau */
|
||||
+
|
||||
+ /* More Keys */
|
||||
+ {KIND_FILTERED, 0xac, 0x37, EV_KEY, KEY_G, 1}, /* Acquire Image */
|
||||
+ {KIND_FILTERED, 0xfe, 0x39, EV_KEY, KEY_H, 1}, /* FULL SCREEN _| */
|
||||
+ {KIND_FILTERED, 0xfb, 0x36, EV_KEY, KEY_I, 1}, /* Rename */
|
||||
+ {KIND_FILTERED, 0xf1, 0x2c, EV_KEY, KEY_J, 1}, /* TV */
|
||||
+ {KIND_FILTERED, 0xf6, 0x31, EV_KEY, KEY_K, 1}, /* Video Desktop */
|
||||
+ {KIND_FILTERED, 0xa1, 0x00, EV_KEY, KEY_L, 1},
|
||||
+
|
||||
+ /* Keys added by torsten at archesoft.de */
|
||||
+ {KIND_FILTERED, 0xff, 0x3a, EV_KEY, KEY_M, 1}, /* dvd audio */
|
||||
+ {KIND_FILTERED, 0xfc, 0x37, EV_KEY, KEY_N, 1}, /* aquire image */
|
||||
+ {KIND_FILTERED, 0xfd, 0x38, EV_KEY, KEY_O, 1}, /* edit image */
|
||||
+
|
||||
{KIND_END, 0x00, 0x00, EV_MAX + 1, 0, 0}
|
||||
};
|
||||
|
||||
@@ -409,6 +433,16 @@
|
||||
{
|
||||
int i;
|
||||
|
||||
+ /* If keychange is enabled we undo the keychanges of the remote here */
|
||||
+
|
||||
+ if (keychange){
|
||||
+ if (d2 & 0x80) {
|
||||
+ d1 += 0x80;
|
||||
+ d2 -= 0x80;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
for (i = 0; ati_remote_tbl[i].kind != KIND_END; i++) {
|
||||
/*
|
||||
* Decide if the table entry matches the remote input.
|
@ -1,11 +0,0 @@
|
||||
diff -Naur linux-2.6.38-rc5/drivers/ata/libata-core.c linux-2.6.38-rc5.patch/drivers/ata/libata-core.c
|
||||
--- linux-2.6.38-rc5/drivers/ata/libata-core.c 2011-02-16 04:23:45.000000000 +0100
|
||||
+++ linux-2.6.38-rc5.patch/drivers/ata/libata-core.c 2011-02-22 00:57:25.789636966 +0100
|
||||
@@ -4139,6 +4139,7 @@
|
||||
*/
|
||||
{ "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER },
|
||||
{ "PIONEER DVD-RW DVR-212D", "1.28", ATA_HORKAGE_NOSETXFER },
|
||||
+ { "PIONEER DVD-RW DVR-216D", "1.07", ATA_HORKAGE_NOSETXFER },
|
||||
|
||||
/* End Marker */
|
||||
{ }
|
File diff suppressed because it is too large
Load Diff
@ -1,17 +0,0 @@
|
||||
---
|
||||
mm/vmscan.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: linux-2.6.37-ck2/mm/vmscan.c
|
||||
===================================================================
|
||||
--- linux-2.6.37-ck2.orig/mm/vmscan.c 2011-01-06 14:04:10.000000000 +1100
|
||||
+++ linux-2.6.37-ck2/mm/vmscan.c 2011-02-14 10:11:00.536252000 +1100
|
||||
@@ -133,7 +133,7 @@
|
||||
/*
|
||||
* From 0 .. 100. Higher means more swappy.
|
||||
*/
|
||||
-int vm_swappiness = 60;
|
||||
+int vm_swappiness;
|
||||
long vm_total_pages; /* The total number of pages which the VM controls */
|
||||
|
||||
static LIST_HEAD(shrinker_list);
|
@ -1,22 +0,0 @@
|
||||
--- linux-2.6.24-rc2.orig/arch/x86/boot/tools/build.c 2007-10-06 12:26:14.000000000 +0200
|
||||
+++ linux-2.6.24-rc2/arch/x86/boot/tools/build.c 2007-10-06 12:27:36.000000000 +0200
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <stdarg.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
-#include <sys/sysmacros.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
@@ -42,6 +41,11 @@
|
||||
#define DEFAULT_MAJOR_ROOT 0
|
||||
#define DEFAULT_MINOR_ROOT 0
|
||||
|
||||
+#undef major
|
||||
+#define major(dev) ((int)(((dev) >> 8) & 0xff))
|
||||
+#undef minor
|
||||
+#define minor(dev) ((int)((dev) & 0xff))
|
||||
+
|
||||
/* Minimal number of setup sectors */
|
||||
#define SETUP_SECT_MIN 5
|
||||
#define SETUP_SECT_MAX 64
|
@ -1,15 +0,0 @@
|
||||
Index: linux-2.6.16/scripts/gen_initramfs_list.sh
|
||||
===================================================================
|
||||
--- linux-2.6.16.orig/scripts/gen_initramfs_list.sh 2006-03-20 18:41:34.000000000 +0100
|
||||
+++ linux-2.6.16/scripts/gen_initramfs_list.sh 2006-03-20 18:42:40.000000000 +0100
|
||||
@@ -56,9 +56,7 @@
|
||||
|
||||
parse() {
|
||||
local location="$1"
|
||||
- local name="${location/${srcdir}//}"
|
||||
- # change '//' into '/'
|
||||
- name="${name//\/\///}"
|
||||
+ local name="$(echo "$location" | sed -e 's%$srcdir%%' -e 's%//*%/%g')"
|
||||
local mode="$2"
|
||||
local uid="$3"
|
||||
local gid="$4"
|
@ -1,20 +0,0 @@
|
||||
diff -Naur linux-2.6.34-rc7/init/main.c linux-2.6.34-rc7.patch/init/main.c
|
||||
--- linux-2.6.34-rc7/init/main.c 2010-05-10 03:36:28.000000000 +0200
|
||||
+++ linux-2.6.34-rc7.patch/init/main.c 2010-05-15 12:28:34.767241760 +0200
|
||||
@@ -886,8 +886,14 @@
|
||||
do_basic_setup();
|
||||
|
||||
/* Open the /dev/console on the rootfs, this should never fail */
|
||||
- if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
|
||||
- printk(KERN_WARNING "Warning: unable to open an initial console.\n");
|
||||
+ char *console = "/dev_console";
|
||||
+
|
||||
+ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) {
|
||||
+ sys_mknod(console, S_IFCHR|0600, (TTYAUX_MAJOR<<8)|1);
|
||||
+ if (sys_open(console, O_RDWR, 0) < 0)
|
||||
+ printk(KERN_WARNING "Warning: unable to open an initial console.\n");
|
||||
+ sys_unlink(console);
|
||||
+ }
|
||||
|
||||
(void) sys_dup(0);
|
||||
(void) sys_dup(0);
|
@ -1,24 +0,0 @@
|
||||
diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/tty.c linux-2.6.23-rc9/arch/i386/boot/tty.c
|
||||
--- linux-2.6.23-rc9.orig/arch/x86/boot/tty.c 2007-10-06 12:26:14.000000000 +0200
|
||||
+++ linux-2.6.23-rc9/arch/x86/boot/tty.c 2007-10-06 12:37:47.000000000 +0200
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
int getchar_timeout(void)
|
||||
{
|
||||
- int cnt = 30;
|
||||
+ int cnt = 3;
|
||||
int t0, t1;
|
||||
|
||||
t0 = gettime();
|
||||
diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/video.c linux-2.6.23-rc9/arch/i386/boot/video.c
|
||||
--- linux-2.6.23-rc9.orig/arch/x86/boot/video.c 2007-10-06 12:26:14.000000000 +0200
|
||||
+++ linux-2.6.23-rc9/arch/x86/boot/video.c 2007-10-06 12:36:05.000000000 +0200
|
||||
@@ -329,7 +329,7 @@
|
||||
unsigned int sel;
|
||||
|
||||
puts("Press <ENTER> to see video modes available, "
|
||||
- "<SPACE> to continue, or wait 30 sec\n");
|
||||
+ "<SPACE> to continue, or wait 3 sec\n");
|
||||
|
||||
kbd_flush();
|
||||
while (1) {
|
@ -1,13 +0,0 @@
|
||||
Index: linux-2.6.16/scripts/kconfig/confdata.c
|
||||
===================================================================
|
||||
--- linux-2.6.16.orig/scripts/kconfig/confdata.c 2006-03-20 06:53:29.000000000 +0100
|
||||
+++ linux-2.6.16/scripts/kconfig/confdata.c 2006-03-20 18:47:06.000000000 +0100
|
||||
@@ -340,7 +340,7 @@
|
||||
int type, l;
|
||||
const char *str;
|
||||
time_t now;
|
||||
- int use_timestamp = 1;
|
||||
+ int use_timestamp = 0;
|
||||
char *env;
|
||||
|
||||
dirname[0] = 0;
|
@ -1,25 +0,0 @@
|
||||
diff -Naur linux-2.6.31-rc4.orig/fs/fat/inode.c linux-2.6.31-rc4/fs/fat/inode.c
|
||||
--- linux-2.6.31-rc4.orig/fs/fat/inode.c 2009-07-25 12:47:41.000000000 +0200
|
||||
+++ linux-2.6.31-rc4/fs/fat/inode.c 2009-07-25 13:38:18.000000000 +0200
|
||||
@@ -979,7 +979,8 @@
|
||||
}
|
||||
opts->name_check = 'n';
|
||||
opts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK = 0;
|
||||
- opts->utf8 = opts->unicode_xlate = 0;
|
||||
+ opts->utf8 = 1;
|
||||
+ opts->unicode_xlate = 0;
|
||||
opts->numtail = 1;
|
||||
opts->usefree = opts->nocase = 0;
|
||||
opts->tz_utc = 0;
|
||||
diff -Naur linux-2.6.31-rc4.orig/fs/isofs/inode.c linux-2.6.31-rc4/fs/isofs/inode.c
|
||||
--- linux-2.6.31-rc4.orig/fs/isofs/inode.c 2009-07-25 12:47:41.000000000 +0200
|
||||
+++ linux-2.6.31-rc4/fs/isofs/inode.c 2009-07-25 13:38:49.000000000 +0200
|
||||
@@ -377,7 +377,7 @@
|
||||
popt->gid = 0;
|
||||
popt->uid = 0;
|
||||
popt->iocharset = NULL;
|
||||
- popt->utf8 = 0;
|
||||
+ popt->utf8 = 1;
|
||||
popt->overriderockperm = 0;
|
||||
popt->session=-1;
|
||||
popt->sbsector=-1;
|
@ -1,30 +0,0 @@
|
||||
From 4ff58b642f80dedb20533978123d89b5ac9b1ed5 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
|
||||
Date: Tue, 30 Mar 2010 00:04:29 -0400
|
||||
Subject: die-floppy-die
|
||||
|
||||
Kill the floppy.ko pnp modalias. We were surviving just fine without
|
||||
autoloading floppy drivers, tyvm.
|
||||
|
||||
Please feel free to register all complaints in the wastepaper bin.
|
||||
---
|
||||
drivers/block/floppy.c | 3 +--
|
||||
1 files changed, 1 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
|
||||
index 90c4038..f4a0b90 100644
|
||||
--- a/drivers/block/floppy.c
|
||||
+++ b/drivers/block/floppy.c
|
||||
@@ -4619,8 +4619,7 @@ static const struct pnp_device_id floppy_pnpids[] = {
|
||||
{"PNP0700", 0},
|
||||
{}
|
||||
};
|
||||
-
|
||||
-MODULE_DEVICE_TABLE(pnp, floppy_pnpids);
|
||||
+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */
|
||||
|
||||
#else
|
||||
|
||||
--
|
||||
1.7.0.1
|
||||
|
@ -1,47 +0,0 @@
|
||||
From c69fcbd1f60b0842f7c1ad2c95692ffd19c4932b Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
|
||||
Date: Mon, 29 Mar 2010 23:56:08 -0400
|
||||
Subject: hda_intel-prealloc-4mb-dmabuffer
|
||||
|
||||
---
|
||||
sound/pci/hda/hda_intel.c | 14 +++++++++++++-
|
||||
1 files changed, 13 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
|
||||
index 4bb9067..37db515 100644
|
||||
--- a/sound/pci/hda/hda_intel.c
|
||||
+++ b/sound/pci/hda/hda_intel.c
|
||||
@@ -1986,6 +1986,7 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
|
||||
struct azx_pcm *apcm;
|
||||
int pcm_dev = cpcm->device;
|
||||
int s, err;
|
||||
+ size_t prealloc_min = 64*1024; /* 64KB */
|
||||
|
||||
if (pcm_dev >= HDA_MAX_PCMS) {
|
||||
snd_printk(KERN_ERR SFX "Invalid PCM device number %d\n",
|
||||
@@ -2019,10 +2020,21 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
|
||||
if (cpcm->stream[s].substreams)
|
||||
snd_pcm_set_ops(pcm, s, &azx_pcm_ops);
|
||||
}
|
||||
+
|
||||
/* buffer pre-allocation */
|
||||
+
|
||||
+ /* subtle, don't allocate a big buffer for modems...
|
||||
+ * also, don't just test 32BIT_MASK, since azx supports
|
||||
+ * 64-bit DMA in some cases.
|
||||
+ */
|
||||
+ /* lennart wants a 2.2MB buffer for 2sec of 48khz */
|
||||
+ if (pcm->dev_class == SNDRV_PCM_CLASS_GENERIC &&
|
||||
+ chip->pci->dma_mask >= DMA_32BIT_MASK)
|
||||
+ prealloc_min = 4 * 1024 * 1024; /* 4MB */
|
||||
+
|
||||
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
|
||||
snd_dma_pci_data(chip->pci),
|
||||
- 1024 * 64, 32 * 1024 * 1024);
|
||||
+ prealloc_min, 32 * 1024 * 1024);
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
1.7.0.1
|
||||
|
@ -1,59 +0,0 @@
|
||||
From 2a79554c864ac58fa2ad982f0fcee2cc2aa33eb5 Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Thu, 20 May 2010 10:30:31 -0400
|
||||
Subject: Disable i8042 checks on Intel Apple Macs
|
||||
|
||||
As those computers never had any i8042 controllers, and the
|
||||
current lookup code could potentially lock up/hang/wait for
|
||||
timeout for long periods of time.
|
||||
|
||||
Fixes intermittent hangs on boot on a MacbookAir1,1
|
||||
|
||||
Signed-off-by: Bastien Nocera <hadess@hadess.net>
|
||||
---
|
||||
drivers/input/serio/i8042.c | 22 ++++++++++++++++++++++
|
||||
1 files changed, 22 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
|
||||
index 6440a8f..4d7cf98 100644
|
||||
--- a/drivers/input/serio/i8042.c
|
||||
+++ b/drivers/input/serio/i8042.c
|
||||
@@ -1451,6 +1451,22 @@ static struct platform_driver i8042_driver = {
|
||||
.shutdown = i8042_shutdown,
|
||||
};
|
||||
|
||||
+#ifdef CONFIG_DMI
|
||||
+static struct dmi_system_id __initdata dmi_system_table[] = {
|
||||
+ {
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_BIOS_VENDOR, "Apple Computer, Inc.")
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_BIOS_VENDOR, "Apple Inc.")
|
||||
+ },
|
||||
+ },
|
||||
+ {}
|
||||
+};
|
||||
+#endif /*CONFIG_DMI*/
|
||||
+
|
||||
static int __init i8042_init(void)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
@@ -1458,6 +1474,12 @@ static int __init i8042_init(void)
|
||||
|
||||
dbg_init();
|
||||
|
||||
+#ifdef CONFIG_DMI
|
||||
+ /* Intel Apple Macs never have an i8042 controller */
|
||||
+ if (dmi_check_system(dmi_system_table) > 0)
|
||||
+ return -ENODEV;
|
||||
+#endif /*CONFIG_DMI*/
|
||||
+
|
||||
err = i8042_platform_init();
|
||||
if (err)
|
||||
return err;
|
||||
--
|
||||
1.7.0.1
|
||||
|
@ -1,702 +0,0 @@
|
||||
From e11e9e78799a7641fe0dc5289f35f2604a4b71a3 Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Sun, 17 Jan 2010 00:40:15 +0000
|
||||
Subject: [PATCH] Input: add appleir USB driver
|
||||
|
||||
This driver was originally written by James McKenzie, updated by
|
||||
Greg Kroah-Hartman, further updated by myself, with suspend support
|
||||
added.
|
||||
|
||||
More recent versions of the IR receiver are also supported through
|
||||
a patch by Alex Karpenko. The patch also adds support for the 2nd
|
||||
and 5th generation of the controller, and the menu key on newer
|
||||
brushed metal remotes.
|
||||
|
||||
Tested on a MacbookAir1,1
|
||||
|
||||
Signed-off-by: Bastien Nocera <hadess@hadess.net>
|
||||
---
|
||||
Documentation/input/appleir.txt | 46 ++++
|
||||
drivers/hid/hid-apple.c | 4 -
|
||||
drivers/hid/hid-core.c | 7 +-
|
||||
drivers/hid/hid-ids.h | 5 +-
|
||||
drivers/input/misc/Kconfig | 13 +
|
||||
drivers/input/misc/Makefile | 1 +
|
||||
drivers/input/misc/appleir.c | 519 +++++++++++++++++++++++++++++++++++++++
|
||||
7 files changed, 588 insertions(+), 7 deletions(-)
|
||||
create mode 100644 Documentation/input/appleir.txt
|
||||
create mode 100644 drivers/input/misc/appleir.c
|
||||
|
||||
diff --git a/Documentation/input/appleir.txt b/Documentation/input/appleir.txt
|
||||
new file mode 100644
|
||||
index 0000000..db637fb
|
||||
--- /dev/null
|
||||
+++ b/Documentation/input/appleir.txt
|
||||
@@ -0,0 +1,46 @@
|
||||
+Apple IR receiver Driver (appleir)
|
||||
+----------------------------------
|
||||
+ Copyright (C) 2009 Bastien Nocera <hadess@hadess.net>
|
||||
+
|
||||
+The appleir driver is a kernel input driver to handle Apple's IR
|
||||
+receivers (and associated remotes) in the kernel.
|
||||
+
|
||||
+The driver is an input driver which only handles "official" remotes
|
||||
+as built and sold by Apple.
|
||||
+
|
||||
+Authors
|
||||
+-------
|
||||
+
|
||||
+James McKenzie (original driver)
|
||||
+Alex Karpenko (05ac:8242 support)
|
||||
+Greg Kroah-Hartman (cleanups and original submission)
|
||||
+Bastien Nocera (further cleanups, brushed metal "enter"
|
||||
+button support and suspend support)
|
||||
+
|
||||
+Supported hardware
|
||||
+------------------
|
||||
+
|
||||
+- All Apple laptops and desktops from 2005 onwards, except:
|
||||
+ - the unibody Macbook (2009)
|
||||
+ - Mac Pro (all versions)
|
||||
+- Apple TV (all revisions prior to September 2010)
|
||||
+
|
||||
+The remote will only support the 6 (old white) or 7 (brushed metal) buttons
|
||||
+of the remotes as sold by Apple. See the next section if you want to use
|
||||
+other remotes or want to use lirc with the device instead of the kernel driver.
|
||||
+
|
||||
+Using lirc (native) instead of the kernel driver
|
||||
+------------------------------------------------
|
||||
+
|
||||
+First, you will need to disable the kernel driver for the receiver.
|
||||
+
|
||||
+This can be achieved by passing quirks to the usbhid driver.
|
||||
+The quirk line would be:
|
||||
+usbhid.quirks=0x05ac:0x8242:0x40000010
|
||||
+
|
||||
+With 0x05ac being the vendor ID (Apple, you shouldn't need to change this)
|
||||
+With 0x8242 being the product ID (check the output of lsusb for your hardware)
|
||||
+And 0x10 being "HID_QUIRK_HIDDEV_FORCE" and 0x40000000 being "HID_QUIRK_NO_IGNORE"
|
||||
+
|
||||
+This should force the creation of a hiddev device for the receiver, and
|
||||
+make it usable under lirc.
|
||||
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
|
||||
index bba05d0..0059d5a 100644
|
||||
--- a/drivers/hid/hid-apple.c
|
||||
+++ b/drivers/hid/hid-apple.c
|
||||
@@ -361,10 +361,6 @@ static void apple_remove(struct hid_device *hdev)
|
||||
}
|
||||
|
||||
static const struct hid_device_id apple_devices[] = {
|
||||
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL),
|
||||
- .driver_data = APPLE_HIDDEV | APPLE_IGNORE_HIDINPUT },
|
||||
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4),
|
||||
- .driver_data = APPLE_HIDDEV | APPLE_IGNORE_HIDINPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE),
|
||||
.driver_data = APPLE_MIGHTYMOUSE | APPLE_INVERT_HWHEEL },
|
||||
|
||||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
||||
index baa25ad..abc5bd7 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -1244,8 +1244,6 @@ static const struct hid_device_id hid_blacklist[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_RP_649) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802) },
|
||||
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL) },
|
||||
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGICMOUSE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI) },
|
||||
@@ -1577,6 +1575,11 @@ static const struct hid_device_id hid_ignore_list[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_AIRCABLE, USB_DEVICE_ID_AIRCABLE1) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL2) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL3) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL5) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM)},
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM2)},
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) },
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index 11af537..360a5ca 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -100,8 +100,11 @@
|
||||
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b
|
||||
#define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a
|
||||
#define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b
|
||||
-#define USB_DEVICE_ID_APPLE_ATV_IRCONTROL 0x8241
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL2 0x1440
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL3 0x8241
|
||||
#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243
|
||||
|
||||
#define USB_VENDOR_ID_ASUS 0x0486
|
||||
#define USB_DEVICE_ID_ASUS_T91MT 0x0185
|
||||
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
|
||||
index 60de906..2f2f2e7 100644
|
||||
--- a/drivers/input/misc/Kconfig
|
||||
+++ b/drivers/input/misc/Kconfig
|
||||
@@ -209,6 +209,19 @@ config INPUT_KEYSPAN_REMOTE
|
||||
To compile this driver as a module, choose M here: the module will
|
||||
be called keyspan_remote.
|
||||
|
||||
+config INPUT_APPLEIR
|
||||
+ tristate "Apple infrared receiver (built in)"
|
||||
+ depends on USB_ARCH_HAS_HCD
|
||||
+ select USB
|
||||
+ help
|
||||
+ Say Y here if you want to use a Apple infrared remote control. All
|
||||
+ the Apple computers from 2005 onwards include such a port, except
|
||||
+ the unibody Macbook (2009), and Mac Pros. This receiver is also
|
||||
+ used in the Apple TV set-top box prior to the 2010 model.
|
||||
+
|
||||
+ To compile this driver as a module, choose M here: the module will
|
||||
+ be called appleir.
|
||||
+
|
||||
config INPUT_POWERMATE
|
||||
tristate "Griffin PowerMate and Contour Jog support"
|
||||
depends on USB_ARCH_HAS_HCD
|
||||
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
|
||||
index 1fe1f6c..d5ef2b9 100644
|
||||
--- a/drivers/input/misc/Makefile
|
||||
+++ b/drivers/input/misc/Makefile
|
||||
@@ -13,6 +13,7 @@ obj-$(CONFIG_INPUT_ADXL34X) += adxl34x.o
|
||||
obj-$(CONFIG_INPUT_ADXL34X_I2C) += adxl34x-i2c.o
|
||||
obj-$(CONFIG_INPUT_ADXL34X_SPI) += adxl34x-spi.o
|
||||
obj-$(CONFIG_INPUT_APANEL) += apanel.o
|
||||
+obj-$(CONFIG_INPUT_APPLEIR) += appleir.o
|
||||
obj-$(CONFIG_INPUT_ATI_REMOTE) += ati_remote.o
|
||||
obj-$(CONFIG_INPUT_ATI_REMOTE2) += ati_remote2.o
|
||||
obj-$(CONFIG_INPUT_ATLAS_BTNS) += atlas_btns.o
|
||||
diff --git a/drivers/input/misc/appleir.c b/drivers/input/misc/appleir.c
|
||||
new file mode 100644
|
||||
index 0000000..3817a3c
|
||||
--- /dev/null
|
||||
+++ b/drivers/input/misc/appleir.c
|
||||
@@ -0,0 +1,519 @@
|
||||
+/*
|
||||
+ * appleir: USB driver for the apple ir device
|
||||
+ *
|
||||
+ * Original driver written by James McKenzie
|
||||
+ * Ported to recent 2.6 kernel versions by Greg Kroah-Hartman <gregkh@suse.de>
|
||||
+ *
|
||||
+ * Copyright (C) 2006 James McKenzie
|
||||
+ * Copyright (C) 2008 Greg Kroah-Hartman <greg@kroah.com>
|
||||
+ * Copyright (C) 2008 Novell Inc.
|
||||
+ *
|
||||
+ * 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, version 2.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <linux/input.h>
|
||||
+#include <linux/usb/input.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/usb.h>
|
||||
+#include <linux/usb/input.h>
|
||||
+#include <asm/unaligned.h>
|
||||
+#include <asm/byteorder.h>
|
||||
+
|
||||
+#define DRIVER_VERSION "v1.2"
|
||||
+#define DRIVER_AUTHOR "James McKenzie"
|
||||
+#define DRIVER_DESC "Apple infrared receiver driver"
|
||||
+#define DRIVER_LICENSE "GPL"
|
||||
+
|
||||
+MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||
+MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
+MODULE_LICENSE(DRIVER_LICENSE);
|
||||
+
|
||||
+#define USB_VENDOR_ID_APPLE 0x05ac
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL2 0x1440
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL3 0x8241
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242
|
||||
+#define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243
|
||||
+
|
||||
+#define URB_SIZE 32
|
||||
+
|
||||
+#define MAX_KEYS 9
|
||||
+#define MAX_KEYS_MASK (MAX_KEYS - 1)
|
||||
+
|
||||
+#define dbginfo(dev, format, arg...) do { if (debug) dev_info(dev , format , ## arg); } while (0)
|
||||
+
|
||||
+static int debug;
|
||||
+module_param(debug, int, 0644);
|
||||
+MODULE_PARM_DESC(debug, "Enable extra debug messages and information");
|
||||
+
|
||||
+/* I have two devices both of which report the following */
|
||||
+/* 25 87 ee 83 0a + */
|
||||
+/* 25 87 ee 83 0c - */
|
||||
+/* 25 87 ee 83 09 << */
|
||||
+/* 25 87 ee 83 06 >> */
|
||||
+/* 25 87 ee 83 05 >" */
|
||||
+/* 25 87 ee 83 03 menu */
|
||||
+/* 26 00 00 00 00 for key repeat*/
|
||||
+
|
||||
+/* Thomas Glanzmann reports the following responses */
|
||||
+/* 25 87 ee ca 0b + */
|
||||
+/* 25 87 ee ca 0d - */
|
||||
+/* 25 87 ee ca 08 << */
|
||||
+/* 25 87 ee ca 07 >> */
|
||||
+/* 25 87 ee ca 04 >" */
|
||||
+/* 25 87 ee ca 02 menu */
|
||||
+/* 26 00 00 00 00 for key repeat*/
|
||||
+/* He also observes the following event sometimes */
|
||||
+/* sent after a key is release, which I interpret */
|
||||
+/* as a flat battery message */
|
||||
+/* 25 87 e0 ca 06 flat battery */
|
||||
+
|
||||
+/* Alexandre Karpenko reports the following responses for Device ID 0x8242 */
|
||||
+/* 25 87 ee 47 0b + */
|
||||
+/* 25 87 ee 47 0d - */
|
||||
+/* 25 87 ee 47 08 << */
|
||||
+/* 25 87 ee 47 07 >> */
|
||||
+/* 25 87 ee 47 04 >" */
|
||||
+/* 25 87 ee 47 02 menu */
|
||||
+/* 26 87 ee 47 ** for key repeat (** is the code of the key being held) */
|
||||
+
|
||||
+/* Bastien Nocera's "new" remote */
|
||||
+/* 25 87 ee 91 5f followed by
|
||||
+ * 25 87 ee 91 05 gives you >"
|
||||
+ *
|
||||
+ * 25 87 ee 91 5c followed by
|
||||
+ * 25 87 ee 91 05 gives you the middle button */
|
||||
+
|
||||
+static const unsigned short appleir_key_table[] = {
|
||||
+ KEY_RESERVED,
|
||||
+ KEY_MENU,
|
||||
+ KEY_PLAYPAUSE,
|
||||
+ KEY_FORWARD,
|
||||
+ KEY_BACK,
|
||||
+ KEY_VOLUMEUP,
|
||||
+ KEY_VOLUMEDOWN,
|
||||
+ KEY_ENTER,
|
||||
+ KEY_RESERVED,
|
||||
+};
|
||||
+
|
||||
+struct appleir {
|
||||
+ struct input_dev *input_dev;
|
||||
+ unsigned short keymap[ARRAY_SIZE(appleir_key_table)];
|
||||
+ u8 *data;
|
||||
+ dma_addr_t dma_buf;
|
||||
+ struct usb_device *usbdev;
|
||||
+ unsigned int flags;
|
||||
+ struct urb *urb;
|
||||
+ struct timer_list key_up_timer;
|
||||
+ int current_key;
|
||||
+ int prev_key_idx;
|
||||
+ char phys[32];
|
||||
+};
|
||||
+
|
||||
+static DEFINE_MUTEX(appleir_mutex);
|
||||
+
|
||||
+enum {
|
||||
+ APPLEIR_OPENED = 0x1,
|
||||
+ APPLEIR_SUSPENDED = 0x2,
|
||||
+};
|
||||
+
|
||||
+static struct usb_device_id appleir_ids[] = {
|
||||
+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL) },
|
||||
+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL2) },
|
||||
+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL3) },
|
||||
+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
|
||||
+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL5) },
|
||||
+ {}
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(usb, appleir_ids);
|
||||
+
|
||||
+static void dump_packet(struct appleir *appleir, char *msg, u8 *data, int len)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ printk(KERN_ERR "appleir: %s (%d bytes)", msg, len);
|
||||
+
|
||||
+ for (i = 0; i < len; ++i)
|
||||
+ printk(" %02x", data[i]);
|
||||
+ printk(" (should be command %d)\n", (data[4] >> 1) & MAX_KEYS_MASK);
|
||||
+}
|
||||
+
|
||||
+static int get_key(int data)
|
||||
+{
|
||||
+ switch (data) {
|
||||
+ case 0x02:
|
||||
+ case 0x03:
|
||||
+ /* menu */
|
||||
+ return 1;
|
||||
+ case 0x04:
|
||||
+ case 0x05:
|
||||
+ /* >" */
|
||||
+ return 2;
|
||||
+ case 0x06:
|
||||
+ case 0x07:
|
||||
+ /* >> */
|
||||
+ return 3;
|
||||
+ case 0x08:
|
||||
+ case 0x09:
|
||||
+ /* << */
|
||||
+ return 4;
|
||||
+ case 0x0a:
|
||||
+ case 0x0b:
|
||||
+ /* + */
|
||||
+ return 5;
|
||||
+ case 0x0c:
|
||||
+ case 0x0d:
|
||||
+ /* - */
|
||||
+ return 6;
|
||||
+ case 0x5c:
|
||||
+ /* Middle button, on newer remotes,
|
||||
+ * part of a 2 packet-command */
|
||||
+ return -7;
|
||||
+ default:
|
||||
+ return -1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void key_up(struct appleir *appleir, int key)
|
||||
+{
|
||||
+ dbginfo(&appleir->input_dev->dev, "key %d up\n", key);
|
||||
+ input_report_key(appleir->input_dev, key, 0);
|
||||
+ input_sync(appleir->input_dev);
|
||||
+}
|
||||
+
|
||||
+static void key_down(struct appleir *appleir, int key)
|
||||
+{
|
||||
+ dbginfo(&appleir->input_dev->dev, "key %d down\n", key);
|
||||
+ input_report_key(appleir->input_dev, key, 1);
|
||||
+ input_sync(appleir->input_dev);
|
||||
+}
|
||||
+
|
||||
+static void battery_flat(struct appleir *appleir)
|
||||
+{
|
||||
+ dev_err(&appleir->input_dev->dev, "possible flat battery?\n");
|
||||
+}
|
||||
+
|
||||
+static void key_up_tick(unsigned long data)
|
||||
+{
|
||||
+ struct appleir *appleir = (struct appleir *)data;
|
||||
+
|
||||
+ if (appleir->current_key) {
|
||||
+ key_up(appleir, appleir->current_key);
|
||||
+ appleir->current_key = 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void new_data(struct appleir *appleir, u8 *data, int len)
|
||||
+{
|
||||
+ static const u8 keydown[] = { 0x25, 0x87, 0xee };
|
||||
+ static const u8 keyrepeat[] = { 0x26, };
|
||||
+ static const u8 flatbattery[] = { 0x25, 0x87, 0xe0 };
|
||||
+
|
||||
+ if (debug)
|
||||
+ dump_packet(appleir, "received", data, len);
|
||||
+
|
||||
+ if (len != 5)
|
||||
+ return;
|
||||
+
|
||||
+ if (!memcmp(data, keydown, sizeof(keydown))) {
|
||||
+ int index;
|
||||
+
|
||||
+ /* If we already have a key down, take it up before marking
|
||||
+ this one down */
|
||||
+ if (appleir->current_key)
|
||||
+ key_up(appleir, appleir->current_key);
|
||||
+
|
||||
+ /* Handle dual packet commands */
|
||||
+ if (appleir->prev_key_idx > 0)
|
||||
+ index = appleir->prev_key_idx;
|
||||
+ else
|
||||
+ index = get_key(data[4]);
|
||||
+
|
||||
+ if (index > 0) {
|
||||
+ appleir->current_key = appleir->keymap[index];
|
||||
+
|
||||
+ key_down(appleir, appleir->current_key);
|
||||
+ /* Remote doesn't do key up, either pull them up, in the test
|
||||
+ above, or here set a timer which pulls them up after 1/8 s */
|
||||
+ mod_timer(&appleir->key_up_timer, jiffies + HZ / 8);
|
||||
+ appleir->prev_key_idx = 0;
|
||||
+ return;
|
||||
+ } else if (index == -7) {
|
||||
+ /* Remember key for next packet */
|
||||
+ appleir->prev_key_idx = 0 - index;
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ appleir->prev_key_idx = 0;
|
||||
+
|
||||
+ if (!memcmp(data, keyrepeat, sizeof(keyrepeat))) {
|
||||
+ key_down(appleir, appleir->current_key);
|
||||
+ /* Remote doesn't do key up, either pull them up, in the test
|
||||
+ above, or here set a timer which pulls them up after 1/8 s */
|
||||
+ mod_timer(&appleir->key_up_timer, jiffies + HZ / 8);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (!memcmp(data, flatbattery, sizeof(flatbattery))) {
|
||||
+ battery_flat(appleir);
|
||||
+ /* Fall through */
|
||||
+ }
|
||||
+
|
||||
+ dump_packet(appleir, "unknown packet", data, len);
|
||||
+}
|
||||
+
|
||||
+static void appleir_urb(struct urb *urb)
|
||||
+{
|
||||
+ struct appleir *appleir = urb->context;
|
||||
+ int status = urb->status;
|
||||
+ int retval;
|
||||
+
|
||||
+ switch (status) {
|
||||
+ case 0:
|
||||
+ new_data(appleir, urb->transfer_buffer, urb->actual_length);
|
||||
+ break;
|
||||
+ case -ECONNRESET:
|
||||
+ case -ENOENT:
|
||||
+ case -ESHUTDOWN:
|
||||
+ /* This urb is terminated, clean up */
|
||||
+ dbginfo(&appleir->input_dev->dev, "%s - urb shutting down with status: %d", __func__,
|
||||
+ urb->status);
|
||||
+ return;
|
||||
+ default:
|
||||
+ dbginfo(&appleir->input_dev->dev, "%s - nonzero urb status received: %d", __func__,
|
||||
+ urb->status);
|
||||
+ }
|
||||
+
|
||||
+ retval = usb_submit_urb(urb, GFP_ATOMIC);
|
||||
+ if (retval)
|
||||
+ err("%s - usb_submit_urb failed with result %d", __func__,
|
||||
+ retval);
|
||||
+}
|
||||
+
|
||||
+static int appleir_open(struct input_dev *dev)
|
||||
+{
|
||||
+ struct appleir *appleir = input_get_drvdata(dev);
|
||||
+ struct usb_interface *intf = usb_ifnum_to_if(appleir->usbdev, 0);
|
||||
+ int r;
|
||||
+
|
||||
+ r = usb_autopm_get_interface(intf);
|
||||
+ if (r) {
|
||||
+ dev_err(&intf->dev,
|
||||
+ "%s(): usb_autopm_get_interface() = %d\n", __func__, r);
|
||||
+ return r;
|
||||
+ }
|
||||
+
|
||||
+ mutex_lock(&appleir_mutex);
|
||||
+
|
||||
+ if (usb_submit_urb(appleir->urb, GFP_ATOMIC)) {
|
||||
+ r = -EIO;
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ appleir->flags |= APPLEIR_OPENED;
|
||||
+
|
||||
+ mutex_unlock(&appleir_mutex);
|
||||
+
|
||||
+ usb_autopm_put_interface(intf);
|
||||
+
|
||||
+ return 0;
|
||||
+fail:
|
||||
+ mutex_unlock(&appleir_mutex);
|
||||
+ usb_autopm_put_interface(intf);
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
+static void appleir_close(struct input_dev *dev)
|
||||
+{
|
||||
+ struct appleir *appleir = input_get_drvdata(dev);
|
||||
+
|
||||
+ mutex_lock(&appleir_mutex);
|
||||
+
|
||||
+ if (!(appleir->flags & APPLEIR_SUSPENDED)) {
|
||||
+ usb_kill_urb(appleir->urb);
|
||||
+ del_timer_sync(&appleir->key_up_timer);
|
||||
+ }
|
||||
+
|
||||
+ appleir->flags &= ~APPLEIR_OPENED;
|
||||
+
|
||||
+ mutex_unlock(&appleir_mutex);
|
||||
+}
|
||||
+
|
||||
+static int appleir_probe(struct usb_interface *intf,
|
||||
+ const struct usb_device_id *id)
|
||||
+{
|
||||
+ struct usb_device *dev = interface_to_usbdev(intf);
|
||||
+ struct usb_endpoint_descriptor *endpoint;
|
||||
+ struct appleir *appleir = NULL;
|
||||
+ struct input_dev *input_dev;
|
||||
+ int retval = -ENOMEM;
|
||||
+ int i;
|
||||
+
|
||||
+ appleir = kzalloc(sizeof(struct appleir), GFP_KERNEL);
|
||||
+ if (!appleir)
|
||||
+ goto allocfail;
|
||||
+
|
||||
+ appleir->data = usb_alloc_coherent(dev, URB_SIZE, GFP_KERNEL,
|
||||
+ &appleir->dma_buf);
|
||||
+ if (!appleir->data)
|
||||
+ goto usbfail;
|
||||
+
|
||||
+ appleir->urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
+ if (!appleir->urb)
|
||||
+ goto urbfail;
|
||||
+
|
||||
+ appleir->usbdev = dev;
|
||||
+
|
||||
+ input_dev = input_allocate_device();
|
||||
+ if (!input_dev)
|
||||
+ goto inputfail;
|
||||
+
|
||||
+ appleir->input_dev = input_dev;
|
||||
+
|
||||
+ usb_make_path(dev, appleir->phys, sizeof(appleir->phys));
|
||||
+ strlcpy(appleir->phys, "/input0", sizeof(appleir->phys));
|
||||
+
|
||||
+ input_dev->name = "Apple Infrared Remote Controller";
|
||||
+ input_dev->phys = appleir->phys;
|
||||
+ usb_to_input_id(dev, &input_dev->id);
|
||||
+ input_dev->dev.parent = &intf->dev;
|
||||
+ input_dev->keycode = appleir->keymap;
|
||||
+ input_dev->keycodesize = sizeof(unsigned short);
|
||||
+ input_dev->keycodemax = ARRAY_SIZE(appleir->keymap);
|
||||
+
|
||||
+ input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
|
||||
+
|
||||
+ memcpy(appleir->keymap, appleir_key_table, sizeof(appleir->keymap));
|
||||
+ for (i = 0; i < ARRAY_SIZE(appleir_key_table); i++)
|
||||
+ set_bit(appleir->keymap[i], input_dev->keybit);
|
||||
+ clear_bit(KEY_RESERVED, input_dev->keybit);
|
||||
+
|
||||
+ input_set_drvdata(input_dev, appleir);
|
||||
+ input_dev->open = appleir_open;
|
||||
+ input_dev->close = appleir_close;
|
||||
+
|
||||
+ endpoint = &intf->cur_altsetting->endpoint[0].desc;
|
||||
+
|
||||
+ usb_fill_int_urb(appleir->urb, dev,
|
||||
+ usb_rcvintpipe(dev, endpoint->bEndpointAddress),
|
||||
+ appleir->data, 8,
|
||||
+ appleir_urb, appleir, endpoint->bInterval);
|
||||
+
|
||||
+ appleir->urb->transfer_dma = appleir->dma_buf;
|
||||
+ appleir->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
|
||||
+
|
||||
+ setup_timer(&appleir->key_up_timer,
|
||||
+ key_up_tick, (unsigned long) appleir);
|
||||
+
|
||||
+ retval = input_register_device(appleir->input_dev);
|
||||
+ if (retval)
|
||||
+ goto inputfail;
|
||||
+
|
||||
+ usb_set_intfdata(intf, appleir);
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+inputfail:
|
||||
+ input_free_device(appleir->input_dev);
|
||||
+
|
||||
+urbfail:
|
||||
+ usb_free_urb(appleir->urb);
|
||||
+
|
||||
+usbfail:
|
||||
+ usb_free_coherent(dev, URB_SIZE, appleir->data,
|
||||
+ appleir->dma_buf);
|
||||
+
|
||||
+allocfail:
|
||||
+ kfree(appleir);
|
||||
+
|
||||
+ return retval;
|
||||
+}
|
||||
+
|
||||
+static void appleir_disconnect(struct usb_interface *intf)
|
||||
+{
|
||||
+ struct appleir *appleir = usb_get_intfdata(intf);
|
||||
+
|
||||
+ usb_set_intfdata(intf, NULL);
|
||||
+ input_unregister_device(appleir->input_dev);
|
||||
+ usb_free_urb(appleir->urb);
|
||||
+ usb_free_coherent(interface_to_usbdev(intf), URB_SIZE,
|
||||
+ appleir->data, appleir->dma_buf);
|
||||
+ kfree(appleir);
|
||||
+}
|
||||
+
|
||||
+static int appleir_suspend(struct usb_interface *interface,
|
||||
+ pm_message_t message)
|
||||
+{
|
||||
+ struct appleir *appleir = usb_get_intfdata(interface);
|
||||
+
|
||||
+ mutex_lock(&appleir_mutex);
|
||||
+ if (appleir->flags & APPLEIR_OPENED)
|
||||
+ usb_kill_urb(appleir->urb);
|
||||
+
|
||||
+ appleir->flags |= APPLEIR_SUSPENDED;
|
||||
+
|
||||
+ mutex_unlock(&appleir_mutex);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int appleir_resume(struct usb_interface *interface)
|
||||
+{
|
||||
+ struct appleir *appleir;
|
||||
+ int r = 0;
|
||||
+
|
||||
+ appleir = usb_get_intfdata(interface);
|
||||
+
|
||||
+ mutex_lock(&appleir_mutex);
|
||||
+ if (appleir->flags & APPLEIR_OPENED) {
|
||||
+ struct usb_endpoint_descriptor *endpoint;
|
||||
+
|
||||
+ endpoint = &interface->cur_altsetting->endpoint[0].desc;
|
||||
+ usb_fill_int_urb(appleir->urb, appleir->usbdev,
|
||||
+ usb_rcvintpipe(appleir->usbdev, endpoint->bEndpointAddress),
|
||||
+ appleir->data, 8,
|
||||
+ appleir_urb, appleir, endpoint->bInterval);
|
||||
+ appleir->urb->transfer_dma = appleir->dma_buf;
|
||||
+ appleir->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
|
||||
+
|
||||
+ /* And reset the USB device */
|
||||
+ if (usb_submit_urb(appleir->urb, GFP_ATOMIC))
|
||||
+ r = -EIO;
|
||||
+ }
|
||||
+
|
||||
+ appleir->flags &= ~APPLEIR_SUSPENDED;
|
||||
+
|
||||
+ mutex_unlock(&appleir_mutex);
|
||||
+
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
+static struct usb_driver appleir_driver = {
|
||||
+ .name = "appleir",
|
||||
+ .probe = appleir_probe,
|
||||
+ .disconnect = appleir_disconnect,
|
||||
+ .suspend = appleir_suspend,
|
||||
+ .resume = appleir_resume,
|
||||
+ .reset_resume = appleir_resume,
|
||||
+ .id_table = appleir_ids,
|
||||
+};
|
||||
+
|
||||
+static int __init appleir_init(void)
|
||||
+{
|
||||
+ return usb_register(&appleir_driver);
|
||||
+}
|
||||
+
|
||||
+static void __exit appleir_exit(void)
|
||||
+{
|
||||
+ usb_deregister(&appleir_driver);
|
||||
+}
|
||||
+
|
||||
+module_init(appleir_init);
|
||||
+module_exit(appleir_exit);
|
||||
--
|
||||
1.7.2.2
|
||||
|
@ -1,113 +0,0 @@
|
||||
diff -Naur linux-2.6.37/drivers/hid/hid-aureal.c linux-2.6.37.patch/drivers/hid/hid-aureal.c
|
||||
--- linux-2.6.37/drivers/hid/hid-aureal.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.37.patch/drivers/hid/hid-aureal.c 2011-01-07 22:35:31.413389936 +0100
|
||||
@@ -0,0 +1,60 @@
|
||||
+/*
|
||||
+ * HID driver for some sunplus "special" devices
|
||||
+ *
|
||||
+ * Copyright (c) 1999 Andreas Gal
|
||||
+ * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz>
|
||||
+ * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc
|
||||
+ * Copyright (c) 2006-2007 Jiri Kosina
|
||||
+ * Copyright (c) 2007 Paul Walmsley
|
||||
+ * Copyright (c) 2008 Jiri Slaby
|
||||
+ * Copyright (c) 2010 Franco Catrin <fcatrin@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * This program is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License as published by the Free
|
||||
+ * Software Foundation; either version 2 of the License, or (at your option)
|
||||
+ * any later version.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/device.h>
|
||||
+#include <linux/hid.h>
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+#include "hid-ids.h"
|
||||
+
|
||||
+static __u8 *aureal_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
+ unsigned int *rsize)
|
||||
+{
|
||||
+ if (*rsize >= 54 && rdesc[52] == 0x25 && rdesc[53] == 0x01) {
|
||||
+ dev_info(&hdev->dev, "fixing Aureal Cy se W-01RN USB_V3.1 "
|
||||
+ "report descriptor. Keyboard Logical Maximum = 101\n");
|
||||
+ rdesc[53] = 0x65;
|
||||
+ } return rdesc;
|
||||
+}
|
||||
+
|
||||
+static const struct hid_device_id aureal_devices[] = {
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_AUREAL, USB_DEVICE_ID_AUREAL_W01RN) },
|
||||
+ { }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(hid, aureal_devices);
|
||||
+
|
||||
+static struct hid_driver aureal_driver = {
|
||||
+ .name = "aureal",
|
||||
+ .id_table = aureal_devices,
|
||||
+ .report_fixup = aureal_report_fixup,
|
||||
+};
|
||||
+
|
||||
+static int __init aureal_init(void)
|
||||
+{
|
||||
+ return hid_register_driver(&aureal_driver);
|
||||
+}
|
||||
+
|
||||
+static void __exit aureal_exit(void)
|
||||
+{
|
||||
+ hid_unregister_driver(&aureal_driver);
|
||||
+}
|
||||
+
|
||||
+module_init(aureal_init);
|
||||
+module_exit(aureal_exit);
|
||||
+MODULE_LICENSE("GPL");
|
||||
diff -Naur linux-2.6.37/drivers/hid/hid-ids.h linux-2.6.37.patch/drivers/hid/hid-ids.h
|
||||
--- linux-2.6.37/drivers/hid/hid-ids.h 2011-01-05 01:50:19.000000000 +0100
|
||||
+++ linux-2.6.37.patch/drivers/hid/hid-ids.h 2011-01-07 22:35:31.414389949 +0100
|
||||
@@ -6,6 +6,7 @@
|
||||
* Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc
|
||||
* Copyright (c) 2006-2007 Jiri Kosina
|
||||
* Copyright (c) 2007 Paul Walmsley
|
||||
+ * Copyright (c) 2010 Franco Catrin <fcatrin@gmail.com>
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -327,6 +328,9 @@
|
||||
#define USB_DEVICE_ID_KYE_ERGO_525V 0x0087
|
||||
#define USB_DEVICE_ID_KYE_GPEN_560 0x5003
|
||||
|
||||
+#define USB_VENDOR_ID_AUREAL 0x0755
|
||||
+#define USB_DEVICE_ID_AUREAL_W01RN 0x2626
|
||||
+
|
||||
#define USB_VENDOR_ID_LABTEC 0x1020
|
||||
#define USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD 0x0006
|
||||
|
||||
diff -Naur linux-2.6.37/drivers/hid/Kconfig linux-2.6.37.patch/drivers/hid/Kconfig
|
||||
--- linux-2.6.37/drivers/hid/Kconfig 2011-01-05 01:50:19.000000000 +0100
|
||||
+++ linux-2.6.37.patch/drivers/hid/Kconfig 2011-01-07 22:35:31.467390603 +0100
|
||||
@@ -87,6 +87,13 @@
|
||||
Say Y here if you want support for keyboards of Apple iBooks, PowerBooks,
|
||||
MacBooks, MacBook Pros and Apple Aluminum.
|
||||
|
||||
+config HID_AUREAL
|
||||
+ tristate "Aureal" if EMBEDDED
|
||||
+ depends on USB_HID
|
||||
+ default !EMBEDDED
|
||||
+ ---help---
|
||||
+ Support for Aureal Cy se W-01RN Remote Controller
|
||||
+
|
||||
config HID_BELKIN
|
||||
tristate "Belkin Flip KVM and Wireless keyboard" if EMBEDDED
|
||||
depends on USB_HID
|
||||
diff -Naur linux-2.6.37/drivers/hid/Makefile linux-2.6.37.patch/drivers/hid/Makefile
|
||||
--- linux-2.6.37/drivers/hid/Makefile 2011-01-05 01:50:19.000000000 +0100
|
||||
+++ linux-2.6.37.patch/drivers/hid/Makefile 2011-01-07 22:35:31.547391590 +0100
|
||||
@@ -29,6 +29,7 @@
|
||||
obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o
|
||||
obj-$(CONFIG_HID_ACRUX_FF) += hid-axff.o
|
||||
obj-$(CONFIG_HID_APPLE) += hid-apple.o
|
||||
+obj-$(CONFIG_HID_AUREAL) += hid-aureal.o
|
||||
obj-$(CONFIG_HID_BELKIN) += hid-belkin.o
|
||||
obj-$(CONFIG_HID_CANDO) += hid-cando.o
|
||||
obj-$(CONFIG_HID_CHERRY) += hid-cherry.o
|
@ -1,65 +0,0 @@
|
||||
diff -Naur linux-2.6.37-rc6/drivers/input/misc/ati_remote.c linux-2.6.37-rc6.patch/drivers/input/misc/ati_remote.c
|
||||
--- linux-2.6.37-rc6/drivers/input/misc/ati_remote.c 2010-12-16 02:24:48.000000000 +0100
|
||||
+++ linux-2.6.37-rc6.patch/drivers/input/misc/ati_remote.c 2010-12-16 12:35:04.454620549 +0100
|
||||
@@ -90,6 +90,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/module.h>
|
||||
+#include <linux/moduleparam.h>
|
||||
#include <linux/usb/input.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/jiffies.h>
|
||||
@@ -131,6 +132,10 @@
|
||||
module_param(debug, int, 0644);
|
||||
MODULE_PARM_DESC(debug, "Enable extra debug messages and information");
|
||||
|
||||
+static int keychange;
|
||||
+module_param(keychange, int, 0644);
|
||||
+MODULE_PARM_DESC(keychange, "Enable support for Keychange remotes");
|
||||
+
|
||||
static int repeat_filter = FILTER_TIME;
|
||||
module_param(repeat_filter, int, 0644);
|
||||
MODULE_PARM_DESC(repeat_filter, "Repeat filter time, default = 60 msec");
|
||||
@@ -285,6 +290,25 @@
|
||||
{KIND_FILTERED, 0xf4, 0x2F, EV_KEY, KEY_END, 1}, /* END */
|
||||
{KIND_FILTERED, 0xf5, 0x30, EV_KEY, KEY_SELECT, 1}, /* SELECT */
|
||||
|
||||
+ /* Coloured keys */
|
||||
+ {KIND_FILTERED, 0xf7, 0x32, EV_KEY, KEY_PLAYCD, 1}, /* TXT Rot */
|
||||
+ {KIND_FILTERED, 0xf8, 0x33, EV_KEY, KEY_PAUSECD, 1}, /* TXT Gr */
|
||||
+ {KIND_FILTERED, 0xf9, 0x34, EV_KEY, KEY_PROG3, 1}, /* TXT Gelb */
|
||||
+ {KIND_FILTERED, 0xfa, 0x35, EV_KEY, KEY_PROG4, 1}, /* TXT Blau */
|
||||
+
|
||||
+ /* More Keys */
|
||||
+ {KIND_FILTERED, 0xac, 0x37, EV_KEY, KEY_G, 1}, /* Acquire Image */
|
||||
+ {KIND_FILTERED, 0xfe, 0x39, EV_KEY, KEY_H, 1}, /* FULL SCREEN _| */
|
||||
+ {KIND_FILTERED, 0xfb, 0x36, EV_KEY, KEY_I, 1}, /* Rename */
|
||||
+ {KIND_FILTERED, 0xf1, 0x2c, EV_KEY, KEY_J, 1}, /* TV */
|
||||
+ {KIND_FILTERED, 0xf6, 0x31, EV_KEY, KEY_K, 1}, /* Video Desktop */
|
||||
+ {KIND_FILTERED, 0xa1, 0x00, EV_KEY, KEY_L, 1},
|
||||
+
|
||||
+ /* Keys added by torsten at archesoft.de */
|
||||
+ {KIND_FILTERED, 0xff, 0x3a, EV_KEY, KEY_M, 1}, /* dvd audio */
|
||||
+ {KIND_FILTERED, 0xfc, 0x37, EV_KEY, KEY_N, 1}, /* aquire image */
|
||||
+ {KIND_FILTERED, 0xfd, 0x38, EV_KEY, KEY_O, 1}, /* edit image */
|
||||
+
|
||||
{KIND_END, 0x00, 0x00, EV_MAX + 1, 0, 0}
|
||||
};
|
||||
|
||||
@@ -409,6 +433,16 @@
|
||||
{
|
||||
int i;
|
||||
|
||||
+ /* If keychange is enabled we undo the keychanges of the remote here */
|
||||
+
|
||||
+ if (keychange){
|
||||
+ if (d2 & 0x80) {
|
||||
+ d1 += 0x80;
|
||||
+ d2 -= 0x80;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
for (i = 0; ati_remote_tbl[i].kind != KIND_END; i++) {
|
||||
/*
|
||||
* Decide if the table entry matches the remote input.
|
@ -1,11 +0,0 @@
|
||||
diff -Naur linux-2.6.38-rc5/drivers/ata/libata-core.c linux-2.6.38-rc5.patch/drivers/ata/libata-core.c
|
||||
--- linux-2.6.38-rc5/drivers/ata/libata-core.c 2011-02-16 04:23:45.000000000 +0100
|
||||
+++ linux-2.6.38-rc5.patch/drivers/ata/libata-core.c 2011-02-22 00:57:25.789636966 +0100
|
||||
@@ -4139,6 +4139,7 @@
|
||||
*/
|
||||
{ "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER },
|
||||
{ "PIONEER DVD-RW DVR-212D", "1.28", ATA_HORKAGE_NOSETXFER },
|
||||
+ { "PIONEER DVD-RW DVR-216D", "1.07", ATA_HORKAGE_NOSETXFER },
|
||||
|
||||
/* End Marker */
|
||||
{ }
|
@ -1,17 +0,0 @@
|
||||
---
|
||||
mm/vmscan.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: linux-2.6.37-ck2/mm/vmscan.c
|
||||
===================================================================
|
||||
--- linux-2.6.37-ck2.orig/mm/vmscan.c 2011-01-06 14:04:10.000000000 +1100
|
||||
+++ linux-2.6.37-ck2/mm/vmscan.c 2011-02-14 10:11:00.536252000 +1100
|
||||
@@ -133,7 +133,7 @@
|
||||
/*
|
||||
* From 0 .. 100. Higher means more swappy.
|
||||
*/
|
||||
-int vm_swappiness = 60;
|
||||
+int vm_swappiness;
|
||||
long vm_total_pages; /* The total number of pages which the VM controls */
|
||||
|
||||
static LIST_HEAD(shrinker_list);
|
@ -0,0 +1,89 @@
|
||||
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
|
||||
index d4d6449..bc5c1e2 100644
|
||||
--- a/drivers/media/rc/nuvoton-cir.c
|
||||
+++ b/drivers/media/rc/nuvoton-cir.c
|
||||
@@ -37,8 +37,6 @@
|
||||
|
||||
#include "nuvoton-cir.h"
|
||||
|
||||
-static char *chip_id = "w836x7hg";
|
||||
-
|
||||
/* write val to config reg */
|
||||
static inline void nvt_cr_write(struct nvt_dev *nvt, u8 val, u8 reg)
|
||||
{
|
||||
@@ -233,6 +231,8 @@ static int nvt_hw_detect(struct nvt_dev *nvt)
|
||||
unsigned long flags;
|
||||
u8 chip_major, chip_minor;
|
||||
int ret = 0;
|
||||
+ char chip_id[12];
|
||||
+ bool chip_unknown = false;
|
||||
|
||||
nvt_efm_enable(nvt);
|
||||
|
||||
@@ -246,15 +246,39 @@ static int nvt_hw_detect(struct nvt_dev *nvt)
|
||||
}
|
||||
|
||||
chip_minor = nvt_cr_read(nvt, CR_CHIP_ID_LO);
|
||||
- nvt_dbg("%s: chip id: 0x%02x 0x%02x", chip_id, chip_major, chip_minor);
|
||||
|
||||
- if (chip_major != CHIP_ID_HIGH ||
|
||||
- (chip_minor != CHIP_ID_LOW && chip_minor != CHIP_ID_LOW2)) {
|
||||
- nvt_pr(KERN_ERR, "%s: unsupported chip, id: 0x%02x 0x%02x",
|
||||
- chip_id, chip_major, chip_minor);
|
||||
- ret = -ENODEV;
|
||||
+ /* these are the known working chip revisions... */
|
||||
+ switch (chip_major) {
|
||||
+ case CHIP_ID_HIGH_667:
|
||||
+ strcpy(chip_id, "w83667hg\0");
|
||||
+ if (chip_minor != CHIP_ID_LOW_667)
|
||||
+ chip_unknown = true;
|
||||
+ break;
|
||||
+ case CHIP_ID_HIGH_677B:
|
||||
+ strcpy(chip_id, "w83677hg\0");
|
||||
+ if (chip_minor != CHIP_ID_LOW_677B2 &&
|
||||
+ chip_minor != CHIP_ID_LOW_677B3)
|
||||
+ chip_unknown = true;
|
||||
+ break;
|
||||
+ case CHIP_ID_HIGH_677C:
|
||||
+ strcpy(chip_id, "w83677hg-c\0");
|
||||
+ if (chip_minor != CHIP_ID_LOW_677C)
|
||||
+ chip_unknown = true;
|
||||
+ break;
|
||||
+ default:
|
||||
+ strcpy(chip_id, "w836x7hg\0");
|
||||
+ chip_unknown = true;
|
||||
+ break;
|
||||
}
|
||||
|
||||
+ /* warn, but still let the driver load, if we don't know this chip */
|
||||
+ if (chip_unknown)
|
||||
+ nvt_pr(KERN_WARNING, "%s: unknown chip, id: 0x%02x 0x%02x, "
|
||||
+ "it may not work...", chip_id, chip_major, chip_minor);
|
||||
+ else
|
||||
+ nvt_dbg("%s: chip id: 0x%02x 0x%02x",
|
||||
+ chip_id, chip_major, chip_minor);
|
||||
+
|
||||
nvt_efm_disable(nvt);
|
||||
|
||||
spin_lock_irqsave(&nvt->nvt_lock, flags);
|
||||
diff --git a/drivers/media/rc/nuvoton-cir.h b/drivers/media/rc/nuvoton-cir.h
|
||||
index 048135e..cc8cee3 100644
|
||||
--- a/drivers/media/rc/nuvoton-cir.h
|
||||
+++ b/drivers/media/rc/nuvoton-cir.h
|
||||
@@ -330,9 +330,13 @@ struct nvt_dev {
|
||||
#define EFER_EFM_DISABLE 0xaa
|
||||
|
||||
/* Chip IDs found in CR_CHIP_ID_{HI,LO} */
|
||||
-#define CHIP_ID_HIGH 0xb4
|
||||
-#define CHIP_ID_LOW 0x72
|
||||
-#define CHIP_ID_LOW2 0x73
|
||||
+#define CHIP_ID_HIGH_667 0xa5
|
||||
+#define CHIP_ID_HIGH_677B 0xb4
|
||||
+#define CHIP_ID_HIGH_677C 0xc3
|
||||
+#define CHIP_ID_LOW_667 0x13
|
||||
+#define CHIP_ID_LOW_677B2 0x72
|
||||
+#define CHIP_ID_LOW_677B3 0x73
|
||||
+#define CHIP_ID_LOW_677C 0x33
|
||||
|
||||
/* Config regs we need to care about */
|
||||
#define CR_SOFTWARE_RESET 0x02
|
@ -0,0 +1,63 @@
|
||||
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
|
||||
index bc5c1e2..5d93384 100644
|
||||
--- a/drivers/media/rc/nuvoton-cir.c
|
||||
+++ b/drivers/media/rc/nuvoton-cir.c
|
||||
@@ -291,13 +291,23 @@ static int nvt_hw_detect(struct nvt_dev *nvt)
|
||||
|
||||
static void nvt_cir_ldev_init(struct nvt_dev *nvt)
|
||||
{
|
||||
- u8 val;
|
||||
+ u8 val, psreg, psmask, psval;
|
||||
+
|
||||
+ if (nvt->chip_major == CHIP_ID_HIGH_667) {
|
||||
+ psreg = CR_MULTIFUNC_PIN_SEL;
|
||||
+ psmask = MULTIFUNC_PIN_SEL_MASK;
|
||||
+ psval = MULTIFUNC_ENABLE_CIR | MULTIFUNC_ENABLE_CIRWB;
|
||||
+ } else {
|
||||
+ psreg = CR_OUTPUT_PIN_SEL;
|
||||
+ psmask = OUTPUT_PIN_SEL_MASK;
|
||||
+ psval = OUTPUT_ENABLE_CIR | OUTPUT_ENABLE_CIRWB;
|
||||
+ }
|
||||
|
||||
- /* output pin selection (Pin95=CIRRX, Pin96=CIRTX1, WB enabled */
|
||||
- val = nvt_cr_read(nvt, CR_OUTPUT_PIN_SEL);
|
||||
- val &= OUTPUT_PIN_SEL_MASK;
|
||||
- val |= (OUTPUT_ENABLE_CIR | OUTPUT_ENABLE_CIRWB);
|
||||
- nvt_cr_write(nvt, val, CR_OUTPUT_PIN_SEL);
|
||||
+ /* output pin selection: enable CIR, with WB sensor enabled */
|
||||
+ val = nvt_cr_read(nvt, psreg);
|
||||
+ val &= psmask;
|
||||
+ val |= psval;
|
||||
+ nvt_cr_write(nvt, val, psreg);
|
||||
|
||||
/* Select CIR logical device and enable */
|
||||
nvt_select_logical_dev(nvt, LOGICAL_DEV_CIR);
|
||||
diff --git a/drivers/media/rc/nuvoton-cir.h b/drivers/media/rc/nuvoton-cir.h
|
||||
index cc8cee3..379795d 100644
|
||||
--- a/drivers/media/rc/nuvoton-cir.h
|
||||
+++ b/drivers/media/rc/nuvoton-cir.h
|
||||
@@ -345,6 +345,7 @@ struct nvt_dev {
|
||||
#define CR_CHIP_ID_LO 0x21
|
||||
#define CR_DEV_POWER_DOWN 0x22 /* bit 2 is CIR power, default power on */
|
||||
#define CR_OUTPUT_PIN_SEL 0x27
|
||||
+#define CR_MULTIFUNC_PIN_SEL 0x2c
|
||||
#define CR_LOGICAL_DEV_EN 0x30 /* valid for all logical devices */
|
||||
/* next three regs valid for both the CIR and CIR_WAKE logical devices */
|
||||
#define CR_CIR_BASE_ADDR_HI 0x60
|
||||
@@ -368,10 +369,16 @@ struct nvt_dev {
|
||||
#define CIR_INTR_MOUSE_IRQ_BIT 0x80
|
||||
#define PME_INTR_CIR_PASS_BIT 0x08
|
||||
|
||||
+/* w83677hg CIR pin config */
|
||||
#define OUTPUT_PIN_SEL_MASK 0xbc
|
||||
#define OUTPUT_ENABLE_CIR 0x01 /* Pin95=CIRRX, Pin96=CIRTX1 */
|
||||
#define OUTPUT_ENABLE_CIRWB 0x40 /* enable wide-band sensor */
|
||||
|
||||
+/* w83667hg CIR pin config */
|
||||
+#define MULTIFUNC_PIN_SEL_MASK 0x1f
|
||||
+#define MULTIFUNC_ENABLE_CIR 0x80 /* Pin75=CIRRX, Pin76=CIRTX1 */
|
||||
+#define MULTIFUNC_ENABLE_CIRWB 0x20 /* enable wide-band sensor */
|
||||
+
|
||||
/* MCE CIR signal length, related on sample period */
|
||||
|
||||
/* MCE CIR controller signal length: about 43ms
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user