mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
dm: gpio: Refactor to prepare for live tree support
Move the main part of the GPIO request function into a separate function so that it can be used by the live tree function when added. Update the xlate method to use a node reference. Update all GPIO drivers to handle the modified xlate() method. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
6fb2f57916
commit
3a57123e59
8 changed files with 41 additions and 29 deletions
|
@ -7,6 +7,8 @@
|
|||
#ifndef _ASM_GENERIC_GPIO_H_
|
||||
#define _ASM_GENERIC_GPIO_H_
|
||||
|
||||
struct ofnode_phandle_args;
|
||||
|
||||
/*
|
||||
* Generic GPIO API for U-Boot
|
||||
*
|
||||
|
@ -214,7 +216,7 @@ struct fdtdec_phandle_args;
|
|||
*
|
||||
*/
|
||||
int gpio_xlate_offs_flags(struct udevice *dev, struct gpio_desc *desc,
|
||||
struct fdtdec_phandle_args *args);
|
||||
struct ofnode_phandle_args *args);
|
||||
|
||||
/**
|
||||
* struct struct dm_gpio_ops - Driver model GPIO operations
|
||||
|
@ -286,7 +288,7 @@ struct dm_gpio_ops {
|
|||
* @return 0 if OK, -ve on error
|
||||
*/
|
||||
int (*xlate)(struct udevice *dev, struct gpio_desc *desc,
|
||||
struct fdtdec_phandle_args *args);
|
||||
struct ofnode_phandle_args *args);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue