aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-07 12:15:36 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-07 12:15:36 -0800
commitfbce1c234feedb5270468aa4b1770c1cab58a960 (patch)
tree7391d7bcce50eab43c750c4055b056ab1892d6b2 /include
parent7affca3537d74365128e477b40c529d6f2fe86c8 (diff)
parentd0ad5e89256c351ddd40167152c24a88efcb0f6d (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/gpio.h6
-rw-r--r--include/linux/amba/pl022.h4
-rw-r--r--include/linux/of.h11
-rw-r--r--include/linux/of_gpio.h10
4 files changed, 23 insertions, 8 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 8c8621097fa..d466c8d8826 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -4,6 +4,7 @@
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/errno.h>
+#include <linux/of.h>
#ifdef CONFIG_GPIOLIB
@@ -128,13 +129,14 @@ struct gpio_chip {
*/
struct device_node *of_node;
int of_gpio_n_cells;
- int (*of_xlate)(struct gpio_chip *gc, struct device_node *np,
- const void *gpio_spec, u32 *flags);
+ int (*of_xlate)(struct gpio_chip *gc,
+ const struct of_phandle_args *gpiospec, u32 *flags);
#endif
};
extern const char *gpiochip_is_requested(struct gpio_chip *chip,
unsigned offset);
+extern struct gpio_chip *gpio_to_chip(unsigned gpio);
extern int __must_check gpiochip_reserve(int start, int ngpio);
/* add/remove chips */
diff --git a/include/linux/amba/pl022.h b/include/linux/amba/pl022.h
index 4ce98f54186..572f637299c 100644
--- a/include/linux/amba/pl022.h
+++ b/include/linux/amba/pl022.h
@@ -238,6 +238,9 @@ struct dma_chan;
* @enable_dma: if true enables DMA driven transfers.
* @dma_rx_param: parameter to locate an RX DMA channel.
* @dma_tx_param: parameter to locate a TX DMA channel.
+ * @autosuspend_delay: delay in ms following transfer completion before the
+ * runtime power management system suspends the device. A setting of 0
+ * indicates no delay and the device will be suspended immediately.
*/
struct pl022_ssp_controller {
u16 bus_id;
@@ -246,6 +249,7 @@ struct pl022_ssp_controller {
bool (*dma_filter)(struct dma_chan *chan, void *filter_param);
void *dma_rx_param;
void *dma_tx_param;
+ int autosuspend_delay;
};
/**
diff --git a/include/linux/of.h b/include/linux/of.h
index 4948552d60f..ea44fd72af5 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -65,6 +65,13 @@ struct device_node {
#endif
};
+#define MAX_PHANDLE_ARGS 8
+struct of_phandle_args {
+ struct device_node *np;
+ int args_count;
+ uint32_t args[MAX_PHANDLE_ARGS];
+};
+
#ifdef CONFIG_OF
/* Pointer for first entry in chain of all nodes. */
@@ -230,9 +237,9 @@ extern int of_modalias_node(struct device_node *node, char *modalias, int len);
extern struct device_node *of_parse_phandle(struct device_node *np,
const char *phandle_name,
int index);
-extern int of_parse_phandles_with_args(struct device_node *np,
+extern int of_parse_phandle_with_args(struct device_node *np,
const char *list_name, const char *cells_name, int index,
- struct device_node **out_node, const void **out_args);
+ struct of_phandle_args *out_args);
extern void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align));
extern int of_alias_get_id(struct device_node *np, const char *stem);
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h
index 52280a2b5e6..b254052a49d 100644
--- a/include/linux/of_gpio.h
+++ b/include/linux/of_gpio.h
@@ -18,6 +18,7 @@
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/gpio.h>
+#include <linux/of.h>
struct device_node;
@@ -57,8 +58,9 @@ extern int of_mm_gpiochip_add(struct device_node *np,
extern void of_gpiochip_add(struct gpio_chip *gc);
extern void of_gpiochip_remove(struct gpio_chip *gc);
extern struct gpio_chip *of_node_to_gpiochip(struct device_node *np);
-extern int of_gpio_simple_xlate(struct gpio_chip *gc, struct device_node *np,
- const void *gpio_spec, u32 *flags);
+extern int of_gpio_simple_xlate(struct gpio_chip *gc,
+ const struct of_phandle_args *gpiospec,
+ u32 *flags);
#else /* CONFIG_OF_GPIO */
@@ -75,8 +77,8 @@ static inline unsigned int of_gpio_count(struct device_node *np)
}
static inline int of_gpio_simple_xlate(struct gpio_chip *gc,
- struct device_node *np,
- const void *gpio_spec, u32 *flags)
+ const struct of_phandle_args *gpiospec,
+ u32 *flags)
{
return -ENOSYS;
}