summaryrefslogtreecommitdiff
path: root/drivers/gpio/nx_gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/nx_gpio.c')
-rw-r--r--drivers/gpio/nx_gpio.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/gpio/nx_gpio.c b/drivers/gpio/nx_gpio.c
index 8c5fd67075..52851e58b6 100644
--- a/drivers/gpio/nx_gpio.c
+++ b/drivers/gpio/nx_gpio.c
@@ -36,7 +36,7 @@ struct nx_alive_gpio_regs {
u32 pad; /* Alive GPIO Input Value Register */
};
-struct nx_gpio_platdata {
+struct nx_gpio_plat {
void *regs;
int gpio_count;
const char *bank_name;
@@ -44,7 +44,7 @@ struct nx_gpio_platdata {
static int nx_alive_gpio_is_check(struct udevice *dev)
{
- struct nx_gpio_platdata *plat = dev_get_plat(dev);
+ struct nx_gpio_plat *plat = dev_get_plat(dev);
const char *bank_name = plat->bank_name;
if (!strcmp(bank_name, "gpio_alv"))
@@ -55,7 +55,7 @@ static int nx_alive_gpio_is_check(struct udevice *dev)
static int nx_alive_gpio_direction_input(struct udevice *dev, unsigned int pin)
{
- struct nx_gpio_platdata *plat = dev_get_plat(dev);
+ struct nx_gpio_plat *plat = dev_get_plat(dev);
struct nx_alive_gpio_regs *const regs = plat->regs;
setbits_le32(&regs->outputenb_reset, 1 << pin);
@@ -66,7 +66,7 @@ static int nx_alive_gpio_direction_input(struct udevice *dev, unsigned int pin)
static int nx_alive_gpio_direction_output(struct udevice *dev, unsigned int pin,
int val)
{
- struct nx_gpio_platdata *plat = dev_get_plat(dev);
+ struct nx_gpio_plat *plat = dev_get_plat(dev);
struct nx_alive_gpio_regs *const regs = plat->regs;
if (val)
@@ -81,7 +81,7 @@ static int nx_alive_gpio_direction_output(struct udevice *dev, unsigned int pin,
static int nx_alive_gpio_get_value(struct udevice *dev, unsigned int pin)
{
- struct nx_gpio_platdata *plat = dev_get_plat(dev);
+ struct nx_gpio_plat *plat = dev_get_plat(dev);
struct nx_alive_gpio_regs *const regs = plat->regs;
unsigned int mask = 1UL << pin;
unsigned int value;
@@ -94,7 +94,7 @@ static int nx_alive_gpio_get_value(struct udevice *dev, unsigned int pin)
static int nx_alive_gpio_set_value(struct udevice *dev, unsigned int pin,
int val)
{
- struct nx_gpio_platdata *plat = dev_get_plat(dev);
+ struct nx_gpio_plat *plat = dev_get_plat(dev);
struct nx_alive_gpio_regs *const regs = plat->regs;
if (val)
@@ -107,7 +107,7 @@ static int nx_alive_gpio_set_value(struct udevice *dev, unsigned int pin,
static int nx_alive_gpio_get_function(struct udevice *dev, unsigned int pin)
{
- struct nx_gpio_platdata *plat = dev_get_plat(dev);
+ struct nx_gpio_plat *plat = dev_get_plat(dev);
struct nx_alive_gpio_regs *const regs = plat->regs;
unsigned int mask = (1UL << pin);
unsigned int output;
@@ -122,7 +122,7 @@ static int nx_alive_gpio_get_function(struct udevice *dev, unsigned int pin)
static int nx_gpio_direction_input(struct udevice *dev, unsigned int pin)
{
- struct nx_gpio_platdata *plat = dev_get_plat(dev);
+ struct nx_gpio_plat *plat = dev_get_plat(dev);
struct nx_gpio_regs *const regs = plat->regs;
if (nx_alive_gpio_is_check(dev))
@@ -136,7 +136,7 @@ static int nx_gpio_direction_input(struct udevice *dev, unsigned int pin)
static int nx_gpio_direction_output(struct udevice *dev, unsigned int pin,
int val)
{
- struct nx_gpio_platdata *plat = dev_get_plat(dev);
+ struct nx_gpio_plat *plat = dev_get_plat(dev);
struct nx_gpio_regs *const regs = plat->regs;
if (nx_alive_gpio_is_check(dev))
@@ -154,7 +154,7 @@ static int nx_gpio_direction_output(struct udevice *dev, unsigned int pin,
static int nx_gpio_get_value(struct udevice *dev, unsigned int pin)
{
- struct nx_gpio_platdata *plat = dev_get_plat(dev);
+ struct nx_gpio_plat *plat = dev_get_plat(dev);
struct nx_gpio_regs *const regs = plat->regs;
unsigned int mask = 1UL << pin;
unsigned int value;
@@ -169,7 +169,7 @@ static int nx_gpio_get_value(struct udevice *dev, unsigned int pin)
static int nx_gpio_set_value(struct udevice *dev, unsigned int pin, int val)
{
- struct nx_gpio_platdata *plat = dev_get_plat(dev);
+ struct nx_gpio_plat *plat = dev_get_plat(dev);
struct nx_gpio_regs *const regs = plat->regs;
if (nx_alive_gpio_is_check(dev))
@@ -185,7 +185,7 @@ static int nx_gpio_set_value(struct udevice *dev, unsigned int pin, int val)
static int nx_gpio_get_function(struct udevice *dev, unsigned int pin)
{
- struct nx_gpio_platdata *plat = dev_get_plat(dev);
+ struct nx_gpio_plat *plat = dev_get_plat(dev);
struct nx_gpio_regs *const regs = plat->regs;
unsigned int mask = (1UL << pin);
unsigned int output;
@@ -204,7 +204,7 @@ static int nx_gpio_get_function(struct udevice *dev, unsigned int pin)
static int nx_gpio_probe(struct udevice *dev)
{
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
- struct nx_gpio_platdata *plat = dev_get_plat(dev);
+ struct nx_gpio_plat *plat = dev_get_plat(dev);
uc_priv->gpio_count = plat->gpio_count;
uc_priv->bank_name = plat->bank_name;
@@ -214,7 +214,7 @@ static int nx_gpio_probe(struct udevice *dev)
static int nx_gpio_of_to_plat(struct udevice *dev)
{
- struct nx_gpio_platdata *plat = dev_get_plat(dev);
+ struct nx_gpio_plat *plat = dev_get_plat(dev);
plat->regs = map_physmem(devfdt_get_addr(dev),
sizeof(struct nx_gpio_regs),
@@ -245,6 +245,6 @@ U_BOOT_DRIVER(nx_gpio) = {
.of_match = nx_gpio_ids,
.ops = &nx_gpio_ops,
.of_to_plat = nx_gpio_of_to_plat,
- .plat_auto = sizeof(struct nx_gpio_platdata),
+ .plat_auto = sizeof(struct nx_gpio_plat),
.probe = nx_gpio_probe,
};