Skip to content

Commit

Permalink
Merge branch 'spi/next' of git://git.secretlab.ca/git/linux-2.6
Browse files Browse the repository at this point in the history
* 'spi/next' of git://git.secretlab.ca/git/linux-2.6: (34 commits)
  spi/dw_spi: move dw_spi.h into drivers/spi
  spi/dw_spi: Fix missing header
  gpio/langwell: Clear edge bit before handling
  gpio/langwell: Simplify demux loop
  gpio/langwell: Convert irq name space
  gpio/langwell: Fix broken irq_eoi change.
  gpio; Make Intel chipset gpio drivers depend on x86
  gpio/cs5535-gpio: Fix section mismatch
  spi/rtc-{ds1390,ds3234,m41t94}: Use spi_get_drvdata() for SPI devices
  spi/davinci: Support DMA transfers larger than 65535 words
  spi/davinci: Use correct length parameter to dma_map_single calls
  gpio: Use __devexit at necessary places
  gpio: add MODULE_DEVICE_TABLE to pch_gpio and ml_ioh_gpio
  gpio/mcp23s08: support mcp23s17 variant
  of_mmc_spi: add card detect irq support
  spi/omap_mcspi: catch xfers of non-multiple SPI word size
  spi/omap_mcspi: Off-by-one error in finding the right divisor
  gpio/pca953x: Fix wrong pointer type
  spi/pl022: rid dangling labels
  spi: add support for SuperH SPI
  ...
  • Loading branch information
Linus Torvalds committed Mar 18, 2011
2 parents 99f4065 + 568a60e commit b061c59
Show file tree
Hide file tree
Showing 35 changed files with 1,920 additions and 261 deletions.
9 changes: 8 additions & 1 deletion Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ Required properties:
- voltage-ranges : two cells are required, first cell specifies minimum
slot voltage (mV), second cell specifies maximum slot voltage (mV).
Several ranges could be specified.
- gpios : (optional) may specify GPIOs in this order: Card-Detect GPIO,

Optional properties:
- gpios : may specify GPIOs in this order: Card-Detect GPIO,
Write-Protect GPIO.
- interrupts : the interrupt of a card detect interrupt.
- interrupt-parent : the phandle for the interrupt controller that
services interrupts for this device.

Example:

Expand All @@ -20,4 +25,6 @@ Example:
&qe_pio_d 15 0>;
voltage-ranges = <3300 3300>;
spi-max-frequency = <50000000>;
interrupts = <42>;
interrupt-parent = <&PIC>;
};
4 changes: 4 additions & 0 deletions Documentation/devicetree/bindings/spi/spi_altera.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Altera SPI

Required properties:
- compatible : should be "ALTR,spi-1.0".
12 changes: 12 additions & 0 deletions Documentation/devicetree/bindings/spi/spi_oc_tiny.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
OpenCores tiny SPI

Required properties:
- compatible : should be "opencores,tiny-spi-rtlsvn2".
- gpios : should specify GPIOs used for chipselect.
Optional properties:
- clock-frequency : input clock frequency to the core.
- baud-width: width, in bits, of the programmable divider used to scale
the input clock to SCLK.

The clock-frequency and baud-width properties are needed only if the divider
is programmable. They are not needed if the divider is fixed.
2 changes: 1 addition & 1 deletion drivers/gpio/74x164.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static int __devinit gen_74x164_probe(struct spi_device *spi)
return ret;
}

static int gen_74x164_remove(struct spi_device *spi)
static int __devexit gen_74x164_remove(struct spi_device *spi)
{
struct gen_74x164_chip *chip;
int ret;
Expand Down
12 changes: 6 additions & 6 deletions drivers/gpio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ config GPIO_VR41XX

config GPIO_SCH
tristate "Intel SCH GPIO"
depends on GPIOLIB && PCI
depends on GPIOLIB && PCI && X86
select MFD_CORE
select LPC_SCH
help
Expand Down Expand Up @@ -321,13 +321,13 @@ config GPIO_BT8XX

config GPIO_LANGWELL
bool "Intel Langwell/Penwell GPIO support"
depends on PCI
depends on PCI && X86
help
Say Y here to support Intel Langwell/Penwell GPIO.

config GPIO_PCH
tristate "PCH GPIO of Intel Topcliff"
depends on PCI
depends on PCI && X86
help
This driver is for PCH(Platform controller Hub) GPIO of Intel Topcliff
which is an IOH(Input/Output Hub) for x86 embedded processor.
Expand Down Expand Up @@ -368,11 +368,11 @@ config GPIO_MAX7301
GPIO driver for Maxim MAX7301 SPI-based GPIO expander.

config GPIO_MCP23S08
tristate "Microchip MCP23S08 I/O expander"
tristate "Microchip MCP23Sxx I/O expander"
depends on SPI_MASTER
help
SPI driver for Microchip MCP23S08 I/O expander. This provides
a GPIO interface supporting inputs and outputs.
SPI driver for Microchip MCP23S08/MPC23S17 I/O expanders.
This provides a GPIO interface supporting inputs and outputs.

config GPIO_MC33880
tristate "Freescale MC33880 high-side/low-side switch"
Expand Down
6 changes: 3 additions & 3 deletions drivers/gpio/cs5535-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ static int __devexit cs5535_gpio_remove(struct platform_device *pdev)
return 0;
}

static struct platform_driver cs5535_gpio_drv = {
static struct platform_driver cs5535_gpio_driver = {
.driver = {
.name = DRV_NAME,
.owner = THIS_MODULE,
Expand All @@ -384,12 +384,12 @@ static struct platform_driver cs5535_gpio_drv = {

static int __init cs5535_gpio_init(void)
{
return platform_driver_register(&cs5535_gpio_drv);
return platform_driver_register(&cs5535_gpio_driver);
}

static void __exit cs5535_gpio_exit(void)
{
platform_driver_unregister(&cs5535_gpio_drv);
platform_driver_unregister(&cs5535_gpio_driver);
}

module_init(cs5535_gpio_init);
Expand Down
43 changes: 20 additions & 23 deletions drivers/gpio/langwell_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,31 +187,28 @@ MODULE_DEVICE_TABLE(pci, lnw_gpio_ids);

static void lnw_irq_handler(unsigned irq, struct irq_desc *desc)
{
struct lnw_gpio *lnw = get_irq_data(irq);
u32 base, gpio;
struct irq_data *data = irq_desc_get_irq_data(desc);
struct lnw_gpio *lnw = irq_data_get_irq_handler_data(data);
struct irq_chip *chip = irq_data_get_irq_chip(data);
u32 base, gpio, mask;
unsigned long pending;
void __iomem *gedr;
u32 gedr_v;

/* check GPIO controller to check which pin triggered the interrupt */
for (base = 0; base < lnw->chip.ngpio; base += 32) {
gedr = gpio_reg(&lnw->chip, base, GEDR);
gedr_v = readl(gedr);
if (!gedr_v)
continue;
for (gpio = base; gpio < base + 32; gpio++)
if (gedr_v & BIT(gpio % 32)) {
pr_debug("pin %d triggered\n", gpio);
generic_handle_irq(lnw->irq_base + gpio);
}
/* clear the edge detect status bit */
writel(gedr_v, gedr);
pending = readl(gedr);
while (pending) {
gpio = __ffs(pending) - 1;
mask = BIT(gpio);
pending &= ~mask;
/* Clear before handling so we can't lose an edge */
writel(mask, gedr);
generic_handle_irq(lnw->irq_base + base + gpio);
}
}

if (desc->chip->irq_eoi)
desc->chip->irq_eoi(irq_get_irq_data(irq));
else
dev_warn(lnw->chip.dev, "missing EOI handler for irq %d\n", irq);

chip->irq_eoi(data);
}

static int __devinit lnw_gpio_probe(struct pci_dev *pdev,
Expand Down Expand Up @@ -279,12 +276,12 @@ static int __devinit lnw_gpio_probe(struct pci_dev *pdev,
dev_err(&pdev->dev, "langwell gpiochip_add error %d\n", retval);
goto err5;
}
set_irq_data(pdev->irq, lnw);
set_irq_chained_handler(pdev->irq, lnw_irq_handler);
irq_set_handler_data(pdev->irq, lnw);
irq_set_chained_handler(pdev->irq, lnw_irq_handler);
for (i = 0; i < lnw->chip.ngpio; i++) {
set_irq_chip_and_handler_name(i + lnw->irq_base, &lnw_irqchip,
handle_simple_irq, "demux");
set_irq_chip_data(i + lnw->irq_base, lnw);
irq_set_chip_and_handler_name(i + lnw->irq_base, &lnw_irqchip,
handle_simple_irq, "demux");
irq_set_chip_data(i + lnw->irq_base, lnw);
}

spin_lock_init(&lnw->lock);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/mc33880.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static int __devinit mc33880_probe(struct spi_device *spi)
return ret;
}

static int mc33880_remove(struct spi_device *spi)
static int __devexit mc33880_remove(struct spi_device *spi)
{
struct mc33880 *mc;
int ret;
Expand Down
Loading

0 comments on commit b061c59

Please sign in to comment.