diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-28 16:30:40 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-28 16:30:40 +1000 |
commit | d65d830ca06040ffe6a35ce7cb06ee642ddbd6a8 (patch) | |
tree | 27cda8b58a24eb8b1acdc3c14f902b90ab3d9eb1 /include | |
parent | 837b41b5de356aa67abb2cadb5eef3efc7776f91 (diff) | |
parent | 284b01897340974000bcc84de87a4e1becc8a83d (diff) | |
download | kernel_samsung_smdk4412-d65d830ca06040ffe6a35ce7cb06ee642ddbd6a8.zip kernel_samsung_smdk4412-d65d830ca06040ffe6a35ce7cb06ee642ddbd6a8.tar.gz kernel_samsung_smdk4412-d65d830ca06040ffe6a35ce7cb06ee642ddbd6a8.tar.bz2 |
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 59a61bd..79886ad 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); extern int of_n_size_cells(struct device_node *np); extern const struct of_device_id *of_match_node( const struct of_device_id *matches, const struct device_node *node); +extern int of_modalias_node(struct device_node *node, char *modalias, int len); #endif /* _LINUX_OF_H */ diff --git a/include/linux/of_spi.h b/include/linux/of_spi.h new file mode 100644 index 0000000..5f71ee8 --- /dev/null +++ b/include/linux/of_spi.h @@ -0,0 +1,18 @@ +/* + * OpenFirmware SPI support routines + * Copyright (C) 2008 Secret Lab Technologies Ltd. + * + * Support routines for deriving SPI device attachments from the device + * tree. + */ + +#ifndef __LINUX_OF_SPI_H +#define __LINUX_OF_SPI_H + +#include <linux/of.h> +#include <linux/spi/spi.h> + +extern void of_register_spi_devices(struct spi_master *master, + struct device_node *np); + +#endif /* __LINUX_OF_SPI */ diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index a9cc29d..4be01bb 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) * use spi_new_device() to describe each device. You can also call * spi_unregister_device() to start making that device vanish, but * normally that would be handled by spi_unregister_master(). + * + * You can also use spi_alloc_device() and spi_add_device() to use a two + * stage registration sequence for each spi_device. This gives the caller + * some more control over the spi_device structure before it is registered, + * but requires that caller to initialize fields that would otherwise + * be defined using the board info. */ extern struct spi_device * +spi_alloc_device(struct spi_master *master); + +extern int +spi_add_device(struct spi_device *spi); + +extern struct spi_device * spi_new_device(struct spi_master *, struct spi_board_info *); static inline void |