of: Introduce of_phandle_iterator_args()

This helper function can be used to copy the arguments of a
phandle to an array.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
Joerg Roedel 2016-04-04 17:49:21 +02:00 committed by Rob Herring
parent f623ce95a5
commit abdaa77b18
2 changed files with 33 additions and 6 deletions

View file

@ -359,6 +359,9 @@ extern int of_phandle_iterator_init(struct of_phandle_iterator *it,
int cell_count);
extern int of_phandle_iterator_next(struct of_phandle_iterator *it);
extern int of_phandle_iterator_args(struct of_phandle_iterator *it,
uint32_t *args,
int size);
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);
@ -648,6 +651,13 @@ static inline int of_phandle_iterator_next(struct of_phandle_iterator *it)
return -ENOSYS;
}
static inline int of_phandle_iterator_args(struct of_phandle_iterator *it,
uint32_t *args,
int size)
{
return 0;
}
static inline int of_alias_get_id(struct device_node *np, const char *stem)
{
return -ENOSYS;