|
iPXE
|
Synopsys DesignWare GPIO driver. More...
#include <stdlib.h>#include <string.h>#include <errno.h>#include <ipxe/devtree.h>#include <ipxe/fdt.h>#include <ipxe/gpio.h>#include "dwgpio.h"Go to the source code of this file.
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static int | dwgpio_group_probe (struct dt_device *dt, unsigned int offset) |
| Probe port group. More... | |
| static void | dwgpio_group_remove (struct dt_device *dt) |
| Remove port group. More... | |
| static void | dwgpio_dump (struct dwgpio *dwgpio) |
| Dump GPIO port status. More... | |
| static int | dwgpio_in (struct gpios *gpios, struct gpio *gpio) |
| Get current GPIO input value. More... | |
| static void | dwgpio_out (struct gpios *gpios, struct gpio *gpio, int active) |
| Set current GPIO output value. More... | |
| static int | dwgpio_config (struct gpios *gpios, struct gpio *gpio, unsigned int config) |
| Configure GPIO pin. More... | |
| static int | dwgpio_probe (struct dt_device *dt, unsigned int offset) |
| Probe port. More... | |
| static void | dwgpio_remove (struct dt_device *dt) |
| Remove port. More... | |
Variables | |
| static const char * | dwgpio_group_ids [] |
| DesignWare GPIO port group compatible model identifiers. More... | |
| struct dt_driver dwgpio_group_driver | __dt_driver |
| DesignWare GPIO port group devicetree driver. More... | |
| static struct gpio_operations | dwgpio_operations |
| GPIO operations. More... | |
| static const char * | dwgpio_ids [] |
| DesignWare GPIO port compatible model identifiers. More... | |
Synopsys DesignWare GPIO driver.
Definition in file dwgpio.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Probe port group.
| dt | Devicetree device |
| offset | Starting node offset |
| rc | Return status code |
Definition at line 54 of file dwgpio.c.
References dt_ioremap(), dt_probe_children(), dt_remove_children(), dt_set_drvdata(), ENODEV, ENOMEM, free, group, iounmap(), offset, rc, and zalloc().
|
static |
Remove port group.
| dt | Devicetree device |
Definition at line 93 of file dwgpio.c.
References dt_get_drvdata(), dt_remove_children(), free, group, and iounmap().
|
inlinestatic |
Dump GPIO port status.
| dwgpio | DesignWare GPIO port |
Definition at line 133 of file dwgpio.c.
References DBGC2, DWGPIO_SWPORT_CTL, DWGPIO_SWPORT_DDR, DWGPIO_SWPORT_DR, dwgpio::name, readl(), and dwgpio::swport.
Referenced by dwgpio_config(), dwgpio_out(), and dwgpio_probe().
Get current GPIO input value.
| gpios | GPIO controller |
| gpio | GPIO pin |
| active | Pin is in the active state |
Definition at line 148 of file dwgpio.c.
References gpio::config, ext, dwgpio::ext, gpio::index, gpios::priv, and readl().
Set current GPIO output value.
| gpios | GPIO controller |
| gpio | GPIO pin |
| active | Set pin to active state |
Definition at line 164 of file dwgpio.c.
References gpio::config, dr, dwgpio_dump(), DWGPIO_SWPORT_DR, gpio::index, gpios::priv, readl(), dwgpio::swport, and writel().
Configure GPIO pin.
| gpios | GPIO controller |
| gpio | GPIO pin |
| config | Configuration |
| rc | Return status code |
Definition at line 186 of file dwgpio.c.
References dwgpio::ctl, dwgpio::ddr, dwgpio_dump(), DWGPIO_SWPORT_CTL, DWGPIO_SWPORT_DDR, GPIO_CFG_OUTPUT, gpio::index, gpios::priv, readl(), dwgpio::swport, and writel().
|
static |
Probe port.
| dt | Devicetree device |
| offset | Starting node offset |
| rc | Return status code |
Definition at line 221 of file dwgpio.c.
References alloc_gpios(), assert(), gpios::count, count, dwgpio::ctl, DBGC, dwgpio::ddr, dt_device::dev, gpios::dev, dwgpio::dr, dt_device::driver, dt_get_drvdata(), dt_parent(), dt_set_drvdata(), dwgpio_dump(), DWGPIO_EXT_PORT, DWGPIO_MAX_COUNT, dwgpio_operations, DWGPIO_SWPORT, DWGPIO_SWPORT_CTL, DWGPIO_SWPORT_DDR, DWGPIO_SWPORT_DR, EINVAL, ENOMEM, dwgpio::ext, fdt_reg(), fdt_u32(), gpios_init(), gpios_nullify(), gpios_put(), gpios_register(), gpios_unregister(), group, dt_device::name, dwgpio::name, offset, port, dwgpio::port, gpios::priv, rc, readl(), strerror(), dwgpio::swport, and sysfdt.
|
static |
Remove port.
| dt | Devicetree device |
Definition at line 304 of file dwgpio.c.
References dwgpio::ctl, dwgpio::ddr, dwgpio::dr, dt_get_drvdata(), DWGPIO_SWPORT_CTL, DWGPIO_SWPORT_DDR, DWGPIO_SWPORT_DR, gpios_nullify(), gpios_put(), gpios_unregister(), gpios::priv, dwgpio::swport, and writel().
|
static |
| struct dt_driver dwgpio_driver __dt_driver |
DesignWare GPIO port group devicetree driver.
DesignWare GPIO port devicetree driver.
|
static |
GPIO operations.
Definition at line 208 of file dwgpio.c.
Referenced by dwgpio_probe().
1.8.15