Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256680
b: refs/heads/master
c: 8c31b16
h: refs/heads/master
v: v3
  • Loading branch information
Grant Likely committed Jun 6, 2011
1 parent bb392a8 commit acc64f7
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 62 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2ce420da39078a6135d1c004a0e4436fdc1458b4
refs/heads/master: 8c31b1635b91e48f867e010cd7bcd06393e5858a
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-ep93xx/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Makefile for the linux kernel.
#
obj-y := core.o clock.o dma-m2p.o gpio.o
obj-y := core.o clock.o dma-m2p.o
obj-m :=
obj-n :=
obj- :=
Expand Down
27 changes: 11 additions & 16 deletions trunk/drivers/gpio/74x164.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,13 @@
#include <linux/gpio.h>
#include <linux/slab.h>

#define GEN_74X164_GPIO_COUNT 8


struct gen_74x164_chip {
struct spi_device *spi;
struct gpio_chip gpio_chip;
struct mutex lock;
u8 port_config;
};

static void gen_74x164_set_value(struct gpio_chip *, unsigned, int);

static struct gen_74x164_chip *gpio_to_chip(struct gpio_chip *gc)
{
return container_of(gc, struct gen_74x164_chip, gpio_chip);
Expand All @@ -39,13 +34,6 @@ static int __gen_74x164_write_config(struct gen_74x164_chip *chip)
&chip->port_config, sizeof(chip->port_config));
}

static int gen_74x164_direction_output(struct gpio_chip *gc,
unsigned offset, int val)
{
gen_74x164_set_value(gc, offset, val);
return 0;
}

static int gen_74x164_get_value(struct gpio_chip *gc, unsigned offset)
{
struct gen_74x164_chip *chip = gpio_to_chip(gc);
Expand Down Expand Up @@ -73,6 +61,13 @@ static void gen_74x164_set_value(struct gpio_chip *gc,
mutex_unlock(&chip->lock);
}

static int gen_74x164_direction_output(struct gpio_chip *gc,
unsigned offset, int val)
{
gen_74x164_set_value(gc, offset, val);
return 0;
}

static int __devinit gen_74x164_probe(struct spi_device *spi)
{
struct gen_74x164_chip *chip;
Expand Down Expand Up @@ -104,12 +99,12 @@ static int __devinit gen_74x164_probe(struct spi_device *spi)

chip->spi = spi;

chip->gpio_chip.label = GEN_74X164_DRIVER_NAME,
chip->gpio_chip.direction_output = gen_74x164_direction_output;
chip->gpio_chip.label = spi->modalias;
chip->gpio_chip.direction_output = gen_74x164_direction_output;
chip->gpio_chip.get = gen_74x164_get_value;
chip->gpio_chip.set = gen_74x164_set_value;
chip->gpio_chip.base = pdata->base;
chip->gpio_chip.ngpio = GEN_74X164_GPIO_COUNT;
chip->gpio_chip.ngpio = 8;
chip->gpio_chip.can_sleep = 1;
chip->gpio_chip.dev = &spi->dev;
chip->gpio_chip.owner = THIS_MODULE;
Expand Down Expand Up @@ -157,7 +152,7 @@ static int __devexit gen_74x164_remove(struct spi_device *spi)

static struct spi_driver gen_74x164_driver = {
.driver = {
.name = GEN_74X164_DRIVER_NAME,
.name = "74x164",
.owner = THIS_MODULE,
},
.probe = gen_74x164_probe,
Expand Down
32 changes: 12 additions & 20 deletions trunk/drivers/gpio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,13 @@ config GPIO_IT8761E
help
Say yes here to support GPIO functionality of IT8761E super I/O chip.

config GPIO_EP93XX
def_bool y
depends on ARCH_EP93XX

config GPIO_EXYNOS4
bool "Samsung Exynos4 GPIO library support"
default y if CPU_EXYNOS4210
depends on ARM
help
Say yes here to support Samsung Exynos4 series SoCs GPIO library
def_bool y
depends on CPU_EXYNOS4210

config GPIO_MXS
def_bool y
Expand All @@ -103,25 +104,16 @@ config GPIO_MXC
select GPIO_BASIC_MMIO_CORE

config GPIO_PLAT_SAMSUNG
bool "Samsung SoCs GPIO library support"
default y if SAMSUNG_GPIOLIB_4BIT
depends on ARM
help
Say yes here to support Samsung SoCs GPIO library
def_bool y
depends on SAMSUNG_GPIOLIB_4BIT

config GPIO_S5PC100
bool "Samsung S5PC100 GPIO library support"
default y if CPU_S5PC100
depends on ARM
help
Say yes here to support Samsung S5PC100 SoCs GPIO library
def_bool y
depends on CPU_S5PC100

config GPIO_S5PV210
bool "Samsung S5PV210/S5PC110 GPIO library support"
default y if CPU_S5PV210
depends on ARM
help
Say yes here to support Samsung S5PV210/S5PC110 SoCs GPIO library
def_bool y
depends on CPU_S5PV210

config GPIO_PL061
bool "PrimeCell PL061 GPIO support"
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/gpio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ obj-$(CONFIG_GPIO_ADP5520) += adp5520-gpio.o
obj-$(CONFIG_GPIO_ADP5588) += adp5588-gpio.o
obj-$(CONFIG_GPIO_BASIC_MMIO_CORE) += basic_mmio_gpio.o
obj-$(CONFIG_GPIO_BASIC_MMIO) += basic_mmio_gpio.o
obj-$(CONFIG_GPIO_EP93XX) += gpio-ep93xx.o
obj-$(CONFIG_GPIO_EXYNOS4) += gpio-exynos4.o
obj-$(CONFIG_GPIO_MXC) += gpio-mxc.o
obj-$(CONFIG_GPIO_MXS) += gpio-mxs.o
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion trunk/drivers/gpio/pca953x.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,6 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,
ret = request_threaded_irq(client->irq,
NULL,
pca953x_irq_handler,
IRQF_TRIGGER_RISING |
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
dev_name(&client->dev), chip);
if (ret) {
Expand Down
19 changes: 1 addition & 18 deletions trunk/drivers/leds/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ config LEDS_NET48XX
config LEDS_NET5501
tristate "LED Support for Soekris net5501 series Error LED"
depends on LEDS_TRIGGERS
depends on X86 && LEDS_GPIO_PLATFORM && GPIO_CS5535
depends on X86 && GPIO_CS5535
select LEDS_TRIGGER_DEFAULT_ON
default n
help
Expand Down Expand Up @@ -183,23 +183,6 @@ config LEDS_GPIO
defined as platform devices and/or OpenFirmware platform devices.
The code to use these bindings can be selected below.

config LEDS_GPIO_PLATFORM
bool "Platform device bindings for GPIO LEDs"
depends on LEDS_GPIO
default y
help
Let the leds-gpio driver drive LEDs which have been defined as
platform devices. If you don't know what this means, say yes.

config LEDS_GPIO_OF
bool "OpenFirmware platform device bindings for GPIO LEDs"
depends on LEDS_GPIO && OF_DEVICE
default y
help
Let the leds-gpio driver drive LEDs which have been defined as
of_platform devices. For instance, LEDs which are listed in a "dts"
file.

config LEDS_LP3944
tristate "LED Support for N.S. LP3944 (Fun Light) I2C chip"
depends on LEDS_CLASS
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/leds/leds-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static inline int sizeof_gpio_leds_priv(int num_leds)
}

/* Code to create from OpenFirmware platform devices */
#ifdef CONFIG_LEDS_GPIO_OF
#ifdef CONFIG_OF_GPIO
static struct gpio_leds_priv * __devinit gpio_leds_create_of(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node, *child;
Expand Down Expand Up @@ -223,13 +223,13 @@ static const struct of_device_id of_gpio_leds_match[] = {
{ .compatible = "gpio-leds", },
{},
};
#else
#else /* CONFIG_OF_GPIO */
static struct gpio_leds_priv * __devinit gpio_leds_create_of(struct platform_device *pdev)
{
return NULL;
}
#define of_gpio_leds_match NULL
#endif
#endif /* CONFIG_OF_GPIO */


static int __devinit gpio_led_probe(struct platform_device *pdev)
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/linux/spi/74x164.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef LINUX_SPI_74X164_H
#define LINUX_SPI_74X164_H

#define GEN_74X164_DRIVER_NAME "74x164"

struct gen_74x164_chip_platform_data {
/* number assigned to the first GPIO */
unsigned base;
Expand Down

0 comments on commit acc64f7

Please sign in to comment.