mirror of
https://xff.cz/git/u-boot/
synced 2025-10-22 10:31:56 +02: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:
@@ -228,7 +228,7 @@ static int pca953x_get_function(struct udevice *dev, unsigned offset)
|
||||
}
|
||||
|
||||
static int pca953x_xlate(struct udevice *dev, struct gpio_desc *desc,
|
||||
struct fdtdec_phandle_args *args)
|
||||
struct ofnode_phandle_args *args)
|
||||
{
|
||||
desc->offset = args->args[0];
|
||||
desc->flags = args->args[1] & GPIO_ACTIVE_LOW ? GPIOD_ACTIVE_LOW : 0;
|
||||
|
Reference in New Issue
Block a user