diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-28 02:30:40 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-28 02:30:40 -0400 |
commit | d65d830ca06040ffe6a35ce7cb06ee642ddbd6a8 (patch) | |
tree | 27cda8b58a24eb8b1acdc3c14f902b90ab3d9eb1 /include | |
parent | 837b41b5de356aa67abb2cadb5eef3efc7776f91 (diff) | |
parent | 284b01897340974000bcc84de87a4e1becc8a83d (diff) |
Merge commit 'gcl/gcl-next'
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/of.h | 1 | ||||
-rw-r--r-- | include/linux/of_spi.h | 18 | ||||
-rw-r--r-- | include/linux/spi/spi.h | 12 |
3 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index 59a61bdc98b6..79886ade070f 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -70,5 +70,6 @@ extern int of_n_addr_cells(struct device_node *np); | |||
70 | extern int of_n_size_cells(struct device_node *np); | 70 | extern int of_n_size_cells(struct device_node *np); |
71 | extern const struct of_device_id *of_match_node( | 71 | extern const struct of_device_id *of_match_node( |
72 | const struct of_device_id *matches, const struct device_node *node); | 72 | const struct of_device_id *matches, const struct device_node *node); |
73 | extern int of_modalias_node(struct device_node *node, char *modalias, int len); | ||
73 | 74 | ||
74 | #endif /* _LINUX_OF_H */ | 75 | #endif /* _LINUX_OF_H */ |
diff --git a/include/linux/of_spi.h b/include/linux/of_spi.h new file mode 100644 index 000000000000..5f71ee8c0868 --- /dev/null +++ b/include/linux/of_spi.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * OpenFirmware SPI support routines | ||
3 | * Copyright (C) 2008 Secret Lab Technologies Ltd. | ||
4 | * | ||
5 | * Support routines for deriving SPI device attachments from the device | ||
6 | * tree. | ||
7 | */ | ||
8 | |||
9 | #ifndef __LINUX_OF_SPI_H | ||
10 | #define __LINUX_OF_SPI_H | ||
11 | |||
12 | #include <linux/of.h> | ||
13 | #include <linux/spi/spi.h> | ||
14 | |||
15 | extern void of_register_spi_devices(struct spi_master *master, | ||
16 | struct device_node *np); | ||
17 | |||
18 | #endif /* __LINUX_OF_SPI */ | ||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index a9cc29d46653..4be01bb44377 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -778,8 +778,20 @@ spi_register_board_info(struct spi_board_info const *info, unsigned n) | |||
778 | * use spi_new_device() to describe each device. You can also call | 778 | * use spi_new_device() to describe each device. You can also call |
779 | * spi_unregister_device() to start making that device vanish, but | 779 | * spi_unregister_device() to start making that device vanish, but |
780 | * normally that would be handled by spi_unregister_master(). | 780 | * normally that would be handled by spi_unregister_master(). |
781 | * | ||
782 | * You can also use spi_alloc_device() and spi_add_device() to use a two | ||
783 | * stage registration sequence for each spi_device. This gives the caller | ||
784 | * some more control over the spi_device structure before it is registered, | ||
785 | * but requires that caller to initialize fields that would otherwise | ||
786 | * be defined using the board info. | ||
781 | */ | 787 | */ |
782 | extern struct spi_device * | 788 | extern struct spi_device * |
789 | spi_alloc_device(struct spi_master *master); | ||
790 | |||
791 | extern int | ||
792 | spi_add_device(struct spi_device *spi); | ||
793 | |||
794 | extern struct spi_device * | ||
783 | spi_new_device(struct spi_master *, struct spi_board_info *); | 795 | spi_new_device(struct spi_master *, struct spi_board_info *); |
784 | 796 | ||
785 | static inline void | 797 | static inline void |