You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6
Changes queued in gpio/next for the start of the 3.3 merge window * tag 'gpio-for-linus-20120104' of git://git.secretlab.ca/git/linux-2.6: gpio: Add decode of WM8994 GPIO configuration gpio: Convert GPIO drivers to module_platform_driver gpio: Fix typo in comment in Samsung driver gpio: Explicitly index samsung_gpio_cfgs gpio: Add Linus Walleij as gpio co-maintainer of: Add device tree selftests of: create of_phandle_args to simplify return of phandle parsing data gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags() gpio/microblaze: Eliminate duplication of of_get_named_gpio_flags() gpiolib: output basic details and consolidate gpio device drivers pch_gpio: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor pch_gpio: Support new device LAPIS Semiconductor ML7831 IOH spi/pl022: make the chip deselect handling thread safe spi/pl022: add support for pm_runtime autosuspend spi/pl022: disable the PL022 block when unused spi/pl022: move device disable to workqueue thread spi/pl022: skip default configuration before suspending spi/pl022: fix build warnings spi/pl022: only enable RX interrupts when TX is complete
This commit is contained in:
@@ -2912,6 +2912,7 @@ F: include/linux/gigaset_dev.h
|
||||
|
||||
GPIO SUBSYSTEM
|
||||
M: Grant Likely <grant.likely@secretlab.ca>
|
||||
M: Linus Walleij <linus.walleij@stericsson.com>
|
||||
S: Maintained
|
||||
T: git git://git.secretlab.ca/git/linux-2.6.git
|
||||
F: Documentation/gpio.txt
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
|
||||
/ {
|
||||
testcase-data {
|
||||
phandle-tests {
|
||||
provider0: provider0 {
|
||||
#phandle-cells = <0>;
|
||||
};
|
||||
|
||||
provider1: provider1 {
|
||||
#phandle-cells = <1>;
|
||||
};
|
||||
|
||||
provider2: provider2 {
|
||||
#phandle-cells = <2>;
|
||||
};
|
||||
|
||||
provider3: provider3 {
|
||||
#phandle-cells = <3>;
|
||||
};
|
||||
|
||||
consumer-a {
|
||||
phandle-list = <&provider1 1>,
|
||||
<&provider2 2 0>,
|
||||
<0>,
|
||||
<&provider3 4 4 3>,
|
||||
<&provider2 5 100>,
|
||||
<&provider0>,
|
||||
<&provider1 7>;
|
||||
phandle-list-names = "first", "second", "third";
|
||||
|
||||
phandle-list-bad-phandle = <12345678 0 0>;
|
||||
phandle-list-bad-args = <&provider2 1 0>,
|
||||
<&provider3 0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
/include/ "tests-phandle.dtsi"
|
||||
@@ -46,3 +46,5 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/include/ "testcases/tests.dtsi"
|
||||
|
||||
@@ -19,50 +19,11 @@
|
||||
static int handle; /* reset pin handle */
|
||||
static unsigned int reset_val;
|
||||
|
||||
static int of_reset_gpio_handle(void)
|
||||
{
|
||||
int ret; /* variable which stored handle reset gpio pin */
|
||||
struct device_node *root; /* root node */
|
||||
struct device_node *gpio; /* gpio node */
|
||||
struct gpio_chip *gc;
|
||||
u32 flags;
|
||||
const void *gpio_spec;
|
||||
|
||||
/* find out root node */
|
||||
root = of_find_node_by_path("/");
|
||||
|
||||
/* give me handle for gpio node to be possible allocate pin */
|
||||
ret = of_parse_phandles_with_args(root, "hard-reset-gpios",
|
||||
"#gpio-cells", 0, &gpio, &gpio_spec);
|
||||
if (ret) {
|
||||
pr_debug("%s: can't parse gpios property\n", __func__);
|
||||
goto err0;
|
||||
}
|
||||
|
||||
gc = of_node_to_gpiochip(gpio);
|
||||
if (!gc) {
|
||||
pr_debug("%s: gpio controller %s isn't registered\n",
|
||||
root->full_name, gpio->full_name);
|
||||
ret = -ENODEV;
|
||||
goto err1;
|
||||
}
|
||||
|
||||
ret = gc->of_xlate(gc, root, gpio_spec, &flags);
|
||||
if (ret < 0)
|
||||
goto err1;
|
||||
|
||||
ret += gc->base;
|
||||
err1:
|
||||
of_node_put(gpio);
|
||||
err0:
|
||||
pr_debug("%s exited with status %d\n", __func__, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void of_platform_reset_gpio_probe(void)
|
||||
{
|
||||
int ret;
|
||||
handle = of_reset_gpio_handle();
|
||||
handle = of_get_named_gpio(of_find_node_by_path("/"),
|
||||
"hard-reset-gpios", 0);
|
||||
|
||||
if (!gpio_is_valid(handle)) {
|
||||
printk(KERN_INFO "Skipping unavailable RESET gpio %d (%s)\n",
|
||||
|
||||
@@ -139,14 +139,10 @@ struct qe_pin {
|
||||
struct qe_pin *qe_pin_request(struct device_node *np, int index)
|
||||
{
|
||||
struct qe_pin *qe_pin;
|
||||
struct device_node *gpio_np;
|
||||
struct gpio_chip *gc;
|
||||
struct of_mm_gpio_chip *mm_gc;
|
||||
struct qe_gpio_chip *qe_gc;
|
||||
int err;
|
||||
int size;
|
||||
const void *gpio_spec;
|
||||
const u32 *gpio_cells;
|
||||
unsigned long flags;
|
||||
|
||||
qe_pin = kzalloc(sizeof(*qe_pin), GFP_KERNEL);
|
||||
@@ -155,45 +151,25 @@ struct qe_pin *qe_pin_request(struct device_node *np, int index)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
err = of_parse_phandles_with_args(np, "gpios", "#gpio-cells", index,
|
||||
&gpio_np, &gpio_spec);
|
||||
if (err) {
|
||||
pr_debug("%s: can't parse gpios property\n", __func__);
|
||||
err = of_get_gpio(np, index);
|
||||
if (err < 0)
|
||||
goto err0;
|
||||
gc = gpio_to_chip(err);
|
||||
if (WARN_ON(!gc))
|
||||
goto err0;
|
||||
}
|
||||
|
||||
if (!of_device_is_compatible(gpio_np, "fsl,mpc8323-qe-pario-bank")) {
|
||||
if (!of_device_is_compatible(gc->of_node, "fsl,mpc8323-qe-pario-bank")) {
|
||||
pr_debug("%s: tried to get a non-qe pin\n", __func__);
|
||||
err = -EINVAL;
|
||||
goto err1;
|
||||
goto err0;
|
||||
}
|
||||
|
||||
gc = of_node_to_gpiochip(gpio_np);
|
||||
if (!gc) {
|
||||
pr_debug("%s: gpio controller %s isn't registered\n",
|
||||
np->full_name, gpio_np->full_name);
|
||||
err = -ENODEV;
|
||||
goto err1;
|
||||
}
|
||||
|
||||
gpio_cells = of_get_property(gpio_np, "#gpio-cells", &size);
|
||||
if (!gpio_cells || size != sizeof(*gpio_cells) ||
|
||||
*gpio_cells != gc->of_gpio_n_cells) {
|
||||
pr_debug("%s: wrong #gpio-cells for %s\n",
|
||||
np->full_name, gpio_np->full_name);
|
||||
err = -EINVAL;
|
||||
goto err1;
|
||||
}
|
||||
|
||||
err = gc->of_xlate(gc, np, gpio_spec, NULL);
|
||||
if (err < 0)
|
||||
goto err1;
|
||||
|
||||
mm_gc = to_of_mm_gpio_chip(gc);
|
||||
qe_gc = to_qe_gpio_chip(mm_gc);
|
||||
|
||||
spin_lock_irqsave(&qe_gc->lock, flags);
|
||||
|
||||
err -= gc->base;
|
||||
if (test_and_set_bit(QE_PIN_REQUESTED, &qe_gc->pin_flags[err]) == 0) {
|
||||
qe_pin->controller = qe_gc;
|
||||
qe_pin->num = err;
|
||||
@@ -206,8 +182,6 @@ struct qe_pin *qe_pin_request(struct device_node *np, int index)
|
||||
|
||||
if (!err)
|
||||
return qe_pin;
|
||||
err1:
|
||||
of_node_put(gpio_np);
|
||||
err0:
|
||||
kfree(qe_pin);
|
||||
pr_debug("%s failed with status %d\n", __func__, err);
|
||||
|
||||
@@ -387,7 +387,7 @@ config GPIO_LANGWELL
|
||||
Say Y here to support Intel Langwell/Penwell GPIO.
|
||||
|
||||
config GPIO_PCH
|
||||
tristate "Intel EG20T PCH / OKI SEMICONDUCTOR ML7223 IOH GPIO"
|
||||
tristate "Intel EG20T PCH/LAPIS Semiconductor IOH(ML7223/ML7831) GPIO"
|
||||
depends on PCI && X86
|
||||
select GENERIC_IRQ_CHIP
|
||||
help
|
||||
@@ -395,11 +395,12 @@ config GPIO_PCH
|
||||
which is an IOH(Input/Output Hub) for x86 embedded processor.
|
||||
This driver can access PCH GPIO device.
|
||||
|
||||
This driver also can be used for OKI SEMICONDUCTOR IOH(Input/
|
||||
Output Hub), ML7223.
|
||||
This driver also can be used for LAPIS Semiconductor IOH(Input/
|
||||
Output Hub), ML7223 and ML7831.
|
||||
ML7223 IOH is for MP(Media Phone) use.
|
||||
ML7223 is companion chip for Intel Atom E6xx series.
|
||||
ML7223 is completely compatible for Intel EG20T PCH.
|
||||
ML7831 IOH is for general purpose use.
|
||||
ML7223/ML7831 is companion chip for Intel Atom E6xx series.
|
||||
ML7223/ML7831 is completely compatible for Intel EG20T PCH.
|
||||
|
||||
config GPIO_ML_IOH
|
||||
tristate "OKI SEMICONDUCTOR ML7213 IOH GPIO support"
|
||||
|
||||
@@ -193,17 +193,7 @@ static struct platform_driver adp5520_gpio_driver = {
|
||||
.remove = __devexit_p(adp5520_gpio_remove),
|
||||
};
|
||||
|
||||
static int __init adp5520_gpio_init(void)
|
||||
{
|
||||
return platform_driver_register(&adp5520_gpio_driver);
|
||||
}
|
||||
module_init(adp5520_gpio_init);
|
||||
|
||||
static void __exit adp5520_gpio_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&adp5520_gpio_driver);
|
||||
}
|
||||
module_exit(adp5520_gpio_exit);
|
||||
module_platform_driver(adp5520_gpio_driver);
|
||||
|
||||
MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
|
||||
MODULE_DESCRIPTION("GPIO ADP5520 Driver");
|
||||
|
||||
@@ -418,9 +418,8 @@ static int __devinit adp5588_gpio_probe(struct i2c_client *client,
|
||||
if (ret)
|
||||
goto err_irq;
|
||||
|
||||
dev_info(&client->dev, "gpios %d..%d (IRQ Base %d) on a %s Rev. %d\n",
|
||||
gc->base, gc->base + gc->ngpio - 1,
|
||||
pdata->irq_base, client->name, revid);
|
||||
dev_info(&client->dev, "IRQ Base: %d Rev.: %d\n",
|
||||
pdata->irq_base, revid);
|
||||
|
||||
if (pdata->setup) {
|
||||
ret = pdata->setup(client, gc->base, gc->ngpio, pdata->context);
|
||||
|
||||
@@ -223,9 +223,6 @@ static int bt8xxgpio_probe(struct pci_dev *dev,
|
||||
goto err_release_mem;
|
||||
}
|
||||
|
||||
printk(KERN_INFO "bt8xxgpio: Abusing BT8xx card for GPIOs %d to %d\n",
|
||||
bg->gpio.base, bg->gpio.base + BT8XXGPIO_NR_GPIOS - 1);
|
||||
|
||||
return 0;
|
||||
|
||||
err_release_mem:
|
||||
|
||||
@@ -347,7 +347,6 @@ static int __devinit cs5535_gpio_probe(struct platform_device *pdev)
|
||||
if (err)
|
||||
goto release_region;
|
||||
|
||||
dev_info(&pdev->dev, "GPIO support successfully loaded.\n");
|
||||
return 0;
|
||||
|
||||
release_region:
|
||||
@@ -382,18 +381,7 @@ static struct platform_driver cs5535_gpio_driver = {
|
||||
.remove = __devexit_p(cs5535_gpio_remove),
|
||||
};
|
||||
|
||||
static int __init cs5535_gpio_init(void)
|
||||
{
|
||||
return platform_driver_register(&cs5535_gpio_driver);
|
||||
}
|
||||
|
||||
static void __exit cs5535_gpio_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&cs5535_gpio_driver);
|
||||
}
|
||||
|
||||
module_init(cs5535_gpio_init);
|
||||
module_exit(cs5535_gpio_exit);
|
||||
module_platform_driver(cs5535_gpio_driver);
|
||||
|
||||
MODULE_AUTHOR("Andres Salomon <dilinger@queued.net>");
|
||||
MODULE_DESCRIPTION("AMD CS5535/CS5536 GPIO driver");
|
||||
|
||||
@@ -254,17 +254,7 @@ static struct platform_driver da9052_gpio_driver = {
|
||||
},
|
||||
};
|
||||
|
||||
static int __init da9052_gpio_init(void)
|
||||
{
|
||||
return platform_driver_register(&da9052_gpio_driver);
|
||||
}
|
||||
module_init(da9052_gpio_init);
|
||||
|
||||
static void __exit da9052_gpio_exit(void)
|
||||
{
|
||||
return platform_driver_unregister(&da9052_gpio_driver);
|
||||
}
|
||||
module_exit(da9052_gpio_exit);
|
||||
module_platform_driver(da9052_gpio_driver);
|
||||
|
||||
MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>");
|
||||
MODULE_DESCRIPTION("DA9052 GPIO Device Driver");
|
||||
|
||||
@@ -524,17 +524,7 @@ static struct platform_driver bgpio_driver = {
|
||||
.remove = __devexit_p(bgpio_pdev_remove),
|
||||
};
|
||||
|
||||
static int __init bgpio_platform_init(void)
|
||||
{
|
||||
return platform_driver_register(&bgpio_driver);
|
||||
}
|
||||
module_init(bgpio_platform_init);
|
||||
|
||||
static void __exit bgpio_platform_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&bgpio_driver);
|
||||
}
|
||||
module_exit(bgpio_platform_exit);
|
||||
module_platform_driver(bgpio_driver);
|
||||
|
||||
#endif /* CONFIG_GPIO_GENERIC_PLATFORM */
|
||||
|
||||
|
||||
@@ -201,8 +201,6 @@ static int __devinit ttl_probe(struct platform_device *pdev)
|
||||
goto out_iounmap_regs;
|
||||
}
|
||||
|
||||
dev_info(&pdev->dev, "module %d: registered GPIO device\n",
|
||||
pdata->modno);
|
||||
return 0;
|
||||
|
||||
out_iounmap_regs:
|
||||
@@ -239,20 +237,9 @@ static struct platform_driver ttl_driver = {
|
||||
.remove = __devexit_p(ttl_remove),
|
||||
};
|
||||
|
||||
static int __init ttl_init(void)
|
||||
{
|
||||
return platform_driver_register(&ttl_driver);
|
||||
}
|
||||
|
||||
static void __exit ttl_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&ttl_driver);
|
||||
}
|
||||
module_platform_driver(ttl_driver);
|
||||
|
||||
MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>");
|
||||
MODULE_DESCRIPTION("Janz MODULbus VMOD-TTL Driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("platform:janz-ttl");
|
||||
|
||||
module_init(ttl_init);
|
||||
module_exit(ttl_exit);
|
||||
|
||||
@@ -1150,8 +1150,8 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
|
||||
|
||||
nmk_gpio_init_irq(nmk_chip);
|
||||
|
||||
dev_info(&dev->dev, "Bits %i-%i at address %p\n",
|
||||
nmk_chip->chip.base, nmk_chip->chip.base+31, nmk_chip->addr);
|
||||
dev_info(&dev->dev, "at address %p\n",
|
||||
nmk_chip->addr);
|
||||
return 0;
|
||||
|
||||
out_free:
|
||||
|
||||
@@ -290,10 +290,7 @@ static int pcf857x_probe(struct i2c_client *client,
|
||||
* methods can't be called from sleeping contexts.
|
||||
*/
|
||||
|
||||
dev_info(&client->dev, "gpios %d..%d on a %s%s\n",
|
||||
gpio->chip.base,
|
||||
gpio->chip.base + gpio->chip.ngpio - 1,
|
||||
client->name,
|
||||
dev_info(&client->dev, "%s\n",
|
||||
client->irq ? " (irq ignored)" : "");
|
||||
|
||||
/* Let platform code set up the GPIOs and their users.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2010 OKI SEMICONDUCTOR Co., LTD.
|
||||
* Copyright (C) 2011 LAPIS Semiconductor Co., Ltd.
|
||||
*
|
||||
* 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
|
||||
@@ -49,8 +49,8 @@ struct pch_regs {
|
||||
|
||||
enum pch_type_t {
|
||||
INTEL_EG20T_PCH,
|
||||
OKISEMI_ML7223m_IOH, /* OKISEMI ML7223 IOH PCIe Bus-m */
|
||||
OKISEMI_ML7223n_IOH /* OKISEMI ML7223 IOH PCIe Bus-n */
|
||||
OKISEMI_ML7223m_IOH, /* LAPIS Semiconductor ML7223 IOH PCIe Bus-m */
|
||||
OKISEMI_ML7223n_IOH /* LAPIS Semiconductor ML7223 IOH PCIe Bus-n */
|
||||
};
|
||||
|
||||
/* Specifies number of GPIO PINS */
|
||||
@@ -524,6 +524,7 @@ static DEFINE_PCI_DEVICE_TABLE(pch_gpio_pcidev_id) = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8014) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8043) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8803) },
|
||||
{ 0, }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, pch_gpio_pcidev_id);
|
||||
|
||||
@@ -227,18 +227,7 @@ static struct platform_driver rdc321x_gpio_driver = {
|
||||
.remove = __devexit_p(rdc321x_gpio_remove),
|
||||
};
|
||||
|
||||
static int __init rdc321x_gpio_init(void)
|
||||
{
|
||||
return platform_driver_register(&rdc321x_gpio_driver);
|
||||
}
|
||||
|
||||
static void __exit rdc321x_gpio_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&rdc321x_gpio_driver);
|
||||
}
|
||||
|
||||
module_init(rdc321x_gpio_init);
|
||||
module_exit(rdc321x_gpio_exit);
|
||||
module_platform_driver(rdc321x_gpio_driver);
|
||||
|
||||
MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>");
|
||||
MODULE_DESCRIPTION("RDC321x GPIO driver");
|
||||
|
||||
+20
-11
@@ -230,7 +230,7 @@ static int samsung_gpio_setcfg_2bit(struct samsung_gpio_chip *chip,
|
||||
* @chip: The gpio chip that is being configured.
|
||||
* @off: The offset for the GPIO being configured.
|
||||
*
|
||||
* The reverse of samsung_gpio_setcfg_2bit(). Will return a value whicg
|
||||
* The reverse of samsung_gpio_setcfg_2bit(). Will return a value which
|
||||
* could be directly passed back to samsung_gpio_setcfg_2bit(), from the
|
||||
* S3C_GPIO_SPECIAL() macro.
|
||||
*/
|
||||
@@ -467,33 +467,42 @@ static struct samsung_gpio_cfg s5p64x0_gpio_cfg_rbank = {
|
||||
#endif
|
||||
|
||||
static struct samsung_gpio_cfg samsung_gpio_cfgs[] = {
|
||||
{
|
||||
[0] = {
|
||||
.cfg_eint = 0x0,
|
||||
}, {
|
||||
},
|
||||
[1] = {
|
||||
.cfg_eint = 0x3,
|
||||
}, {
|
||||
},
|
||||
[2] = {
|
||||
.cfg_eint = 0x7,
|
||||
}, {
|
||||
},
|
||||
[3] = {
|
||||
.cfg_eint = 0xF,
|
||||
}, {
|
||||
},
|
||||
[4] = {
|
||||
.cfg_eint = 0x0,
|
||||
.set_config = samsung_gpio_setcfg_2bit,
|
||||
.get_config = samsung_gpio_getcfg_2bit,
|
||||
}, {
|
||||
},
|
||||
[5] = {
|
||||
.cfg_eint = 0x2,
|
||||
.set_config = samsung_gpio_setcfg_2bit,
|
||||
.get_config = samsung_gpio_getcfg_2bit,
|
||||
}, {
|
||||
},
|
||||
[6] = {
|
||||
.cfg_eint = 0x3,
|
||||
.set_config = samsung_gpio_setcfg_2bit,
|
||||
.get_config = samsung_gpio_getcfg_2bit,
|
||||
}, {
|
||||
},
|
||||
[7] = {
|
||||
.set_config = samsung_gpio_setcfg_2bit,
|
||||
.get_config = samsung_gpio_getcfg_2bit,
|
||||
}, {
|
||||
},
|
||||
[8] = {
|
||||
.set_pull = exynos4_gpio_setpull,
|
||||
.get_pull = exynos4_gpio_getpull,
|
||||
}, {
|
||||
},
|
||||
[9] = {
|
||||
.cfg_eint = 0x3,
|
||||
.set_pull = exynos4_gpio_setpull,
|
||||
.get_pull = exynos4_gpio_getpull,
|
||||
|
||||
+1
-12
@@ -297,18 +297,7 @@ static struct platform_driver sch_gpio_driver = {
|
||||
.remove = __devexit_p(sch_gpio_remove),
|
||||
};
|
||||
|
||||
static int __init sch_gpio_init(void)
|
||||
{
|
||||
return platform_driver_register(&sch_gpio_driver);
|
||||
}
|
||||
|
||||
static void __exit sch_gpio_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&sch_gpio_driver);
|
||||
}
|
||||
|
||||
module_init(sch_gpio_init);
|
||||
module_exit(sch_gpio_exit);
|
||||
module_platform_driver(sch_gpio_driver);
|
||||
|
||||
MODULE_AUTHOR("Denis Turischev <denis@compulab.co.il>");
|
||||
MODULE_DESCRIPTION("GPIO interface for Intel Poulsbo SCH");
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user