add gpios for Dream
PATCH 4/6 add gpios for Dream
This adds gpio infrastructure for HTC Dream. Other pieces depend on it, including camera driver.
Signed-off-by Pavel Machek <[email protected]>
drivers/staging/dream/Makefile +1 -0
@@ -2,4 +2,5 @@ obj-$(CONFIG_MSM_ADSP) += qdsp5/ smd/ obj-$(CONFIG_MSM_CAMERA) += camera/ obj-$(CONFIG_INPUT_GPIO) += gpio_axis.o gpio_event.o gpio_input.o gpio_matrix.o gpio_output.o obj-$(CONFIG_ANDROID_PMEM) += pmem.o +obj-y += generic_gpio.o
drivers/staging/dream/generic_gpio.c new file +274 -0
274 lines not on this page · raw message
drivers/staging/dream/gpio_chip.h new file +38 -0
@@ -0,0 +1,38 @@ +/* arch/arm/mach-msm/gpio_chip.h +* +* Copyright (C) 2007 Google, Inc. +* +* This software is licensed under the terms of the GNU General Public +* License version 2, as published by the Free Software Foundation, and +* may be copied, distributed, and modified under those terms. +* +* 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. +* +*/ + +#ifndef _LINUX_GPIO_CHIP_H +#define _LINUX_GPIO_CHIP_H + +#include <linux/list.h> + +struct gpio_chip { +struct list_head list; +struct gpio_state *state; + +unsigned int start; +unsigned int end; + +int (*configure)(struct gpio_chip *chip,unsigned int gpio,unsigned long flags); +int (*get_irq_num)(struct gpio_chip *chip,unsigned int gpio,unsigned int *irqp,unsigned long *irqnumflagsp); +int (*read)(struct gpio_chip *chip,unsigned int gpio); +int (*write)(struct gpio_chip *chip,unsigned int gpio,unsigned on); +int (*read_detect_status)(struct gpio_chip *chip,unsigned int gpio); +int (*clear_detect_status)(struct gpio_chip *chip,unsigned int gpio); +}; + +int register_gpio_chip (struct gpio_chip *gpio_chip); + +#endif
drivers/staging/dream/gpio_hw.h new file +100 -0
100 lines not on this page · raw message
Signature · 8 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ----- End forwarded message ----- -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html