aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/pca953x_gpio.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-03 16:55:20 -0700
committerSimon Glass <sjg@chromium.org>2020-12-13 16:51:09 -0700
commitc69cda25c9b59e53a6bc8969ada58942549f5b5d (patch)
tree8c84d1773465eb8e06cbbaeb710daa6217f5618d /drivers/gpio/pca953x_gpio.c
parent4f50086ad6d69c355a07389fb436c64c92ec614a (diff)
downloadu-boot-c69cda25c9b59e53a6bc8969ada58942549f5b5d.zip
u-boot-c69cda25c9b59e53a6bc8969ada58942549f5b5d.tar.gz
u-boot-c69cda25c9b59e53a6bc8969ada58942549f5b5d.tar.bz2
dm: treewide: Rename dev_get_platdata() to dev_get_plat()
Rename this to be consistent with the change from 'platdata'. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/gpio/pca953x_gpio.c')
-rw-r--r--drivers/gpio/pca953x_gpio.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpio/pca953x_gpio.c b/drivers/gpio/pca953x_gpio.c
index 239c0f7..dc8911a 100644
--- a/drivers/gpio/pca953x_gpio.c
+++ b/drivers/gpio/pca953x_gpio.c
@@ -76,7 +76,7 @@ struct pca953x_info {
static int pca953x_write_single(struct udevice *dev, int reg, u8 val,
int offset)
{
- struct pca953x_info *info = dev_get_platdata(dev);
+ struct pca953x_info *info = dev_get_plat(dev);
int bank_shift = fls((info->gpio_count - 1) / BANK_SZ);
int off = offset / BANK_SZ;
int ret = 0;
@@ -93,7 +93,7 @@ static int pca953x_write_single(struct udevice *dev, int reg, u8 val,
static int pca953x_read_single(struct udevice *dev, int reg, u8 *val,
int offset)
{
- struct pca953x_info *info = dev_get_platdata(dev);
+ struct pca953x_info *info = dev_get_plat(dev);
int bank_shift = fls((info->gpio_count - 1) / BANK_SZ);
int off = offset / BANK_SZ;
int ret;
@@ -112,7 +112,7 @@ static int pca953x_read_single(struct udevice *dev, int reg, u8 *val,
static int pca953x_read_regs(struct udevice *dev, int reg, u8 *val)
{
- struct pca953x_info *info = dev_get_platdata(dev);
+ struct pca953x_info *info = dev_get_plat(dev);
int ret = 0;
if (info->gpio_count <= 8) {
@@ -137,7 +137,7 @@ static int pca953x_read_regs(struct udevice *dev, int reg, u8 *val)
static int pca953x_write_regs(struct udevice *dev, int reg, u8 *val)
{
- struct pca953x_info *info = dev_get_platdata(dev);
+ struct pca953x_info *info = dev_get_plat(dev);
int ret = 0;
if (info->gpio_count <= 8) {
@@ -160,7 +160,7 @@ static int pca953x_write_regs(struct udevice *dev, int reg, u8 *val)
static int pca953x_is_output(struct udevice *dev, int offset)
{
- struct pca953x_info *info = dev_get_platdata(dev);
+ struct pca953x_info *info = dev_get_plat(dev);
int bank = offset / BANK_SZ;
int off = offset % BANK_SZ;
@@ -185,7 +185,7 @@ static int pca953x_get_value(struct udevice *dev, uint offset)
static int pca953x_set_value(struct udevice *dev, uint offset, int value)
{
- struct pca953x_info *info = dev_get_platdata(dev);
+ struct pca953x_info *info = dev_get_plat(dev);
int bank = offset / BANK_SZ;
int off = offset % BANK_SZ;
u8 val;
@@ -207,7 +207,7 @@ static int pca953x_set_value(struct udevice *dev, uint offset, int value)
static int pca953x_set_direction(struct udevice *dev, uint offset, int dir)
{
- struct pca953x_info *info = dev_get_platdata(dev);
+ struct pca953x_info *info = dev_get_plat(dev);
int bank = offset / BANK_SZ;
int off = offset % BANK_SZ;
u8 val;
@@ -271,7 +271,7 @@ static const struct dm_gpio_ops pca953x_ops = {
static int pca953x_probe(struct udevice *dev)
{
- struct pca953x_info *info = dev_get_platdata(dev);
+ struct pca953x_info *info = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
char name[32], label[8], *str;
int addr;