mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Linux 3.6-rc4
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iQEcBAABAgAGBQJQQkiRAAoJEHm+PkMAQRiGk64H/Rp67mBWom2xMmU8gul3gr7d MFq7dQOShoHZVyuCtKFNF+RTFkHDT2mw0ZkdszHdMkPEznIVRNklieN6GayOwj7C XcRb50z/C0CTvEskLOzWsaC+Rok6doOi5VCgkkZ+6N4CvWQNEqWLfWW5H6wZ7juo ME1xx/59GDm/4TYMUXzPI9UygptGGXvH/18n/z47FQpvL5EbAECTVt1nPX1uvn/S ZzdSLG8MrbK+IX+62JZqRG5M6TUC2b8ggog2cFfP20JNK0TwU9dMQPtbk2Y+LZRg JiUqyRUOuQJFbCgE+b1JuleJHAlsAgqIs7tkY9VfdFYfh+NQcaccWjDjdeB7Hjo= =Ooia -----END PGP SIGNATURE----- Merge tag 'v3.6-rc4' into next Linux 3.6-rc4 # gpg: Signature made Sat 01 Sep 2012 10:40:33 AM PDT using RSA key ID 00411886 # gpg: Good signature from "Linus Torvalds <[email protected]>"
This commit is contained in:
commit
e6c340171f
8123 changed files with 470129 additions and 201931 deletions
|
|
@ -142,6 +142,7 @@ static const struct xpad_device {
|
|||
{ 0x0c12, 0x880a, "Pelican Eclipse PL-2023", 0, XTYPE_XBOX },
|
||||
{ 0x0c12, 0x8810, "Zeroplus Xbox Controller", 0, XTYPE_XBOX },
|
||||
{ 0x0c12, 0x9902, "HAMA VibraX - *FAULTY HARDWARE*", 0, XTYPE_XBOX },
|
||||
{ 0x0d2f, 0x0002, "Andamiro Pump It Up pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
|
||||
{ 0x0e4c, 0x1097, "Radica Gamester Controller", 0, XTYPE_XBOX },
|
||||
{ 0x0e4c, 0x2390, "Radica Games Jtech Controller", 0, XTYPE_XBOX },
|
||||
{ 0x0e6f, 0x0003, "Logic3 Freebird wireless Controller", 0, XTYPE_XBOX },
|
||||
|
|
@ -164,6 +165,7 @@ static const struct xpad_device {
|
|||
{ 0x1bad, 0x0003, "Harmonix Rock Band Drumkit", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
|
||||
{ 0x0f0d, 0x0016, "Hori Real Arcade Pro.EX", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
|
||||
{ 0x0f0d, 0x000d, "Hori Fighting Stick EX2", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
|
||||
{ 0x1689, 0xfd00, "Razer Onza Tournament Edition", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
|
||||
{ 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX },
|
||||
{ 0x0000, 0x0000, "Generic X-Box pad", 0, XTYPE_UNKNOWN }
|
||||
};
|
||||
|
|
@ -238,12 +240,14 @@ static struct usb_device_id xpad_table [] = {
|
|||
XPAD_XBOX360_VENDOR(0x045e), /* Microsoft X-Box 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x046d), /* Logitech X-Box 360 style controllers */
|
||||
XPAD_XBOX360_VENDOR(0x0738), /* Mad Catz X-Box 360 controllers */
|
||||
{ USB_DEVICE(0x0738, 0x4540) }, /* Mad Catz Beat Pad */
|
||||
XPAD_XBOX360_VENDOR(0x0e6f), /* 0x0e6f X-Box 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x12ab), /* X-Box 360 dance pads */
|
||||
XPAD_XBOX360_VENDOR(0x1430), /* RedOctane X-Box 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x146b), /* BigBen Interactive Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x1bad), /* Harminix Rock Band Guitar and Drums */
|
||||
XPAD_XBOX360_VENDOR(0x0f0d), /* Hori Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x0f0d), /* Hori Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x1689), /* Razer Onza */
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ static void lm8333_key_handler(struct lm8333 *lm8333)
|
|||
return;
|
||||
}
|
||||
|
||||
for (i = 0; keys[i] && i < LM8333_FIFO_TRANSFER_SIZE; i++) {
|
||||
for (i = 0; i < LM8333_FIFO_TRANSFER_SIZE && keys[i]; i++) {
|
||||
pressed = keys[i] & 0x80;
|
||||
code = keys[i] & 0x7f;
|
||||
|
||||
|
|
|
|||
|
|
@ -492,7 +492,7 @@ static int tegra_kbc_start(struct tegra_kbc *kbc)
|
|||
unsigned int debounce_cnt;
|
||||
u32 val = 0;
|
||||
|
||||
clk_enable(kbc->clk);
|
||||
clk_prepare_enable(kbc->clk);
|
||||
|
||||
/* Reset the KBC controller to clear all previous status.*/
|
||||
tegra_periph_reset_assert(kbc->clk);
|
||||
|
|
@ -556,7 +556,7 @@ static void tegra_kbc_stop(struct tegra_kbc *kbc)
|
|||
disable_irq(kbc->irq);
|
||||
del_timer_sync(&kbc->timer);
|
||||
|
||||
clk_disable(kbc->clk);
|
||||
clk_disable_unprepare(kbc->clk);
|
||||
}
|
||||
|
||||
static int tegra_kbc_open(struct input_dev *dev)
|
||||
|
|
|
|||
168
drivers/input/misc/88pm80x_onkey.c
Normal file
168
drivers/input/misc/88pm80x_onkey.c
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
/*
|
||||
* Marvell 88PM80x ONKEY driver
|
||||
*
|
||||
* Copyright (C) 2012 Marvell International Ltd.
|
||||
* Haojian Zhuang <haojian.zhuang@marvell.com>
|
||||
* Qiao Zhou <zhouqiao@marvell.com>
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General
|
||||
* Public License. See the file "COPYING" in the main directory of this
|
||||
* archive for more details.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/mfd/88pm80x.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#define PM800_LONG_ONKEY_EN (1 << 0)
|
||||
#define PM800_LONG_KEY_DELAY (8) /* 1 .. 16 seconds */
|
||||
#define PM800_LONKEY_PRESS_TIME ((PM800_LONG_KEY_DELAY-1) << 4)
|
||||
#define PM800_LONKEY_PRESS_TIME_MASK (0xF0)
|
||||
#define PM800_SW_PDOWN (1 << 5)
|
||||
|
||||
struct pm80x_onkey_info {
|
||||
struct input_dev *idev;
|
||||
struct pm80x_chip *pm80x;
|
||||
struct regmap *map;
|
||||
int irq;
|
||||
};
|
||||
|
||||
/* 88PM80x gives us an interrupt when ONKEY is held */
|
||||
static irqreturn_t pm80x_onkey_handler(int irq, void *data)
|
||||
{
|
||||
struct pm80x_onkey_info *info = data;
|
||||
int ret = 0;
|
||||
unsigned int val;
|
||||
|
||||
ret = regmap_read(info->map, PM800_STATUS_1, &val);
|
||||
if (ret < 0) {
|
||||
dev_err(info->idev->dev.parent, "failed to read status: %d\n", ret);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
val &= PM800_ONKEY_STS1;
|
||||
|
||||
input_report_key(info->idev, KEY_POWER, val);
|
||||
input_sync(info->idev);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(pm80x_onkey_pm_ops, pm80x_dev_suspend,
|
||||
pm80x_dev_resume);
|
||||
|
||||
static int __devinit pm80x_onkey_probe(struct platform_device *pdev)
|
||||
{
|
||||
|
||||
struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent);
|
||||
struct pm80x_onkey_info *info;
|
||||
int err;
|
||||
|
||||
info = kzalloc(sizeof(struct pm80x_onkey_info), GFP_KERNEL);
|
||||
if (!info)
|
||||
return -ENOMEM;
|
||||
|
||||
info->pm80x = chip;
|
||||
|
||||
info->irq = platform_get_irq(pdev, 0);
|
||||
if (info->irq < 0) {
|
||||
dev_err(&pdev->dev, "No IRQ resource!\n");
|
||||
err = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
info->map = info->pm80x->regmap;
|
||||
if (!info->map) {
|
||||
dev_err(&pdev->dev, "no regmap!\n");
|
||||
err = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
info->idev = input_allocate_device();
|
||||
if (!info->idev) {
|
||||
dev_err(&pdev->dev, "Failed to allocate input dev\n");
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
info->idev->name = "88pm80x_on";
|
||||
info->idev->phys = "88pm80x_on/input0";
|
||||
info->idev->id.bustype = BUS_I2C;
|
||||
info->idev->dev.parent = &pdev->dev;
|
||||
info->idev->evbit[0] = BIT_MASK(EV_KEY);
|
||||
__set_bit(KEY_POWER, info->idev->keybit);
|
||||
|
||||
err = pm80x_request_irq(info->pm80x, info->irq, pm80x_onkey_handler,
|
||||
IRQF_ONESHOT, "onkey", info);
|
||||
if (err < 0) {
|
||||
dev_err(&pdev->dev, "Failed to request IRQ: #%d: %d\n",
|
||||
info->irq, err);
|
||||
goto out_reg;
|
||||
}
|
||||
|
||||
err = input_register_device(info->idev);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "Can't register input device: %d\n", err);
|
||||
goto out_irq;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, info);
|
||||
|
||||
/* Enable long onkey detection */
|
||||
regmap_update_bits(info->map, PM800_RTC_MISC4, PM800_LONG_ONKEY_EN,
|
||||
PM800_LONG_ONKEY_EN);
|
||||
/* Set 8-second interval */
|
||||
regmap_update_bits(info->map, PM800_RTC_MISC3,
|
||||
PM800_LONKEY_PRESS_TIME_MASK,
|
||||
PM800_LONKEY_PRESS_TIME);
|
||||
|
||||
device_init_wakeup(&pdev->dev, 1);
|
||||
return 0;
|
||||
|
||||
out_irq:
|
||||
pm80x_free_irq(info->pm80x, info->irq, info);
|
||||
out_reg:
|
||||
input_free_device(info->idev);
|
||||
out:
|
||||
kfree(info);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int __devexit pm80x_onkey_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct pm80x_onkey_info *info = platform_get_drvdata(pdev);
|
||||
|
||||
device_init_wakeup(&pdev->dev, 0);
|
||||
pm80x_free_irq(info->pm80x, info->irq, info);
|
||||
input_unregister_device(info->idev);
|
||||
kfree(info);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver pm80x_onkey_driver = {
|
||||
.driver = {
|
||||
.name = "88pm80x-onkey",
|
||||
.owner = THIS_MODULE,
|
||||
.pm = &pm80x_onkey_pm_ops,
|
||||
},
|
||||
.probe = pm80x_onkey_probe,
|
||||
.remove = __devexit_p(pm80x_onkey_remove),
|
||||
};
|
||||
|
||||
module_platform_driver(pm80x_onkey_driver);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("Marvell 88PM80x ONKEY driver");
|
||||
MODULE_AUTHOR("Qiao Zhou <[email protected]>");
|
||||
MODULE_ALIAS("platform:88pm80x-onkey");
|
||||
|
|
@ -22,6 +22,16 @@ config INPUT_88PM860X_ONKEY
|
|||
To compile this driver as a module, choose M here: the module
|
||||
will be called 88pm860x_onkey.
|
||||
|
||||
config INPUT_88PM80X_ONKEY
|
||||
tristate "88PM80x ONKEY support"
|
||||
depends on MFD_88PM800
|
||||
help
|
||||
Support the ONKEY of Marvell 88PM80x PMICs as an input device
|
||||
reporting power button status.
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called 88pm80x_onkey.
|
||||
|
||||
config INPUT_AB8500_PONKEY
|
||||
tristate "AB8500 Pon (PowerOn) Key"
|
||||
depends on AB8500_CORE
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
# Each configuration option enables a list of files.
|
||||
|
||||
obj-$(CONFIG_INPUT_88PM860X_ONKEY) += 88pm860x_onkey.o
|
||||
obj-$(CONFIG_INPUT_88PM80X_ONKEY) += 88pm80x_onkey.o
|
||||
obj-$(CONFIG_INPUT_AB8500_PONKEY) += ab8500-ponkey.o
|
||||
obj-$(CONFIG_INPUT_AD714X) += ad714x.o
|
||||
obj-$(CONFIG_INPUT_AD714X_I2C) += ad714x-i2c.o
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ static int __devinit ab8500_ponkey_probe(struct platform_device *pdev)
|
|||
|
||||
ponkey->idev = input;
|
||||
ponkey->ab8500 = ab8500;
|
||||
ponkey->irq_dbf = irq_dbf;
|
||||
ponkey->irq_dbr = irq_dbr;
|
||||
ponkey->irq_dbf = ab8500_irq_get_virq(ab8500, irq_dbf);
|
||||
ponkey->irq_dbr = ab8500_irq_get_virq(ab8500, irq_dbr);
|
||||
|
||||
input->name = "AB8500 POn(PowerOn) Key";
|
||||
input->dev.parent = &pdev->dev;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
/*
|
||||
* Bit weights in mg for bit 0, other bits need
|
||||
* multipy factor 2^n. Eight bit is the sign bit.
|
||||
* multiply factor 2^n. Eight bit is the sign bit.
|
||||
*/
|
||||
#define BIT_TO_2G 18
|
||||
#define BIT_TO_8G 71
|
||||
|
|
|
|||
|
|
@ -79,6 +79,10 @@
|
|||
#define USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI 0x0252
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO 0x0253
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS 0x0254
|
||||
/* MacbookPro10,1 (unibody, June 2012) */
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI 0x0262
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING7_ISO 0x0263
|
||||
#define USB_DEVICE_ID_APPLE_WELLSPRING7_JIS 0x0264
|
||||
|
||||
#define BCM5974_DEVICE(prod) { \
|
||||
.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
|
||||
|
|
@ -128,6 +132,10 @@ static const struct usb_device_id bcm5974_table[] = {
|
|||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI),
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO),
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS),
|
||||
/* MacbookPro10,1 */
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI),
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ISO),
|
||||
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_JIS),
|
||||
/* Terminating entry */
|
||||
{}
|
||||
};
|
||||
|
|
@ -354,6 +362,18 @@ static const struct bcm5974_config bcm5974_config_table[] = {
|
|||
{ DIM_X, DIM_X / SN_COORD, -4620, 5140 },
|
||||
{ DIM_Y, DIM_Y / SN_COORD, -150, 6600 }
|
||||
},
|
||||
{
|
||||
USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI,
|
||||
USB_DEVICE_ID_APPLE_WELLSPRING7_ISO,
|
||||
USB_DEVICE_ID_APPLE_WELLSPRING7_JIS,
|
||||
HAS_INTEGRATED_BUTTON,
|
||||
0x84, sizeof(struct bt_data),
|
||||
0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS,
|
||||
{ DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 },
|
||||
{ DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 },
|
||||
{ DIM_X, DIM_X / SN_COORD, -4750, 5280 },
|
||||
{ DIM_Y, DIM_Y / SN_COORD, -150, 6730 }
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -878,7 +878,7 @@ static int __init hp_sdc_init(void)
|
|||
#endif
|
||||
|
||||
errstr = "IRQ not available for";
|
||||
if (request_irq(hp_sdc.irq, &hp_sdc_isr, IRQF_SHARED|IRQF_SAMPLE_RANDOM,
|
||||
if (request_irq(hp_sdc.irq, &hp_sdc_isr, IRQF_SHARED,
|
||||
"HP SDC", &hp_sdc))
|
||||
goto err1;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ struct eeti_ts_priv {
|
|||
struct input_dev *input;
|
||||
struct work_struct work;
|
||||
struct mutex mutex;
|
||||
int irq, irq_active_high;
|
||||
int irq_gpio, irq, irq_active_high;
|
||||
};
|
||||
|
||||
#define EETI_TS_BITDEPTH (11)
|
||||
|
|
@ -62,7 +62,7 @@ struct eeti_ts_priv {
|
|||
|
||||
static inline int eeti_ts_irq_active(struct eeti_ts_priv *priv)
|
||||
{
|
||||
return gpio_get_value(irq_to_gpio(priv->irq)) == priv->irq_active_high;
|
||||
return gpio_get_value(priv->irq_gpio) == priv->irq_active_high;
|
||||
}
|
||||
|
||||
static void eeti_ts_read(struct work_struct *work)
|
||||
|
|
@ -157,7 +157,7 @@ static void eeti_ts_close(struct input_dev *dev)
|
|||
static int __devinit eeti_ts_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *idp)
|
||||
{
|
||||
struct eeti_ts_platform_data *pdata;
|
||||
struct eeti_ts_platform_data *pdata = client->dev.platform_data;
|
||||
struct eeti_ts_priv *priv;
|
||||
struct input_dev *input;
|
||||
unsigned int irq_flags;
|
||||
|
|
@ -199,9 +199,12 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
|
|||
|
||||
priv->client = client;
|
||||
priv->input = input;
|
||||
priv->irq = client->irq;
|
||||
priv->irq_gpio = pdata->irq_gpio;
|
||||
priv->irq = gpio_to_irq(pdata->irq_gpio);
|
||||
|
||||
pdata = client->dev.platform_data;
|
||||
err = gpio_request_one(pdata->irq_gpio, GPIOF_IN, client->name);
|
||||
if (err < 0)
|
||||
goto err1;
|
||||
|
||||
if (pdata)
|
||||
priv->irq_active_high = pdata->irq_active_high;
|
||||
|
|
@ -215,13 +218,13 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
|
|||
|
||||
err = input_register_device(input);
|
||||
if (err)
|
||||
goto err1;
|
||||
goto err2;
|
||||
|
||||
err = request_irq(priv->irq, eeti_ts_isr, irq_flags,
|
||||
client->name, priv);
|
||||
if (err) {
|
||||
dev_err(&client->dev, "Unable to request touchscreen IRQ.\n");
|
||||
goto err2;
|
||||
goto err3;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -233,9 +236,11 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
|
|||
device_init_wakeup(&client->dev, 0);
|
||||
return 0;
|
||||
|
||||
err2:
|
||||
err3:
|
||||
input_unregister_device(input);
|
||||
input = NULL; /* so we dont try to free it below */
|
||||
err2:
|
||||
gpio_free(pdata->irq_gpio);
|
||||
err1:
|
||||
input_free_device(input);
|
||||
kfree(priv);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/jornada720.h>
|
||||
|
|
|
|||
Loading…
Reference in a new issue