mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
dm: gpio: Add live tree support
Add support for requesting GPIOs with a live device tree. This involves adjusting the function signature for the legacy function gpio_request_by_name_nodev(), so fix up all callers. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes to stm32f746-disco.c: Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@ -7,6 +7,8 @@
|
||||
#ifndef _ASM_GENERIC_GPIO_H_
|
||||
#define _ASM_GENERIC_GPIO_H_
|
||||
|
||||
#include <dm/ofnode.h>
|
||||
|
||||
struct ofnode_phandle_args;
|
||||
|
||||
/*
|
||||
@ -488,9 +490,8 @@ int gpio_get_list_count(struct udevice *dev, const char *list_name);
|
||||
* This is a version of gpio_request_list_by_name() that does not use a
|
||||
* device. Avoid it unless the caller is not yet using driver model
|
||||
*/
|
||||
int gpio_request_by_name_nodev(const void *blob, int node,
|
||||
const char *list_name,
|
||||
int index, struct gpio_desc *desc, int flags);
|
||||
int gpio_request_by_name_nodev(ofnode node, const char *list_name, int index,
|
||||
struct gpio_desc *desc, int flags);
|
||||
|
||||
/**
|
||||
* gpio_request_list_by_name_nodev() - request GPIOs without a device
|
||||
@ -498,8 +499,7 @@ int gpio_request_by_name_nodev(const void *blob, int node,
|
||||
* This is a version of gpio_request_list_by_name() that does not use a
|
||||
* device. Avoid it unless the caller is not yet using driver model
|
||||
*/
|
||||
int gpio_request_list_by_name_nodev(const void *blob, int node,
|
||||
const char *list_name,
|
||||
int gpio_request_list_by_name_nodev(ofnode node, const char *list_name,
|
||||
struct gpio_desc *desc_list, int max_count,
|
||||
int flags);
|
||||
|
||||
|
Reference in New Issue
Block a user