diff options
Diffstat (limited to 'drivers/w1')
-rw-r--r-- | drivers/w1/mxc_w1.c | 18 | ||||
-rw-r--r-- | drivers/w1/w1-gpio.c | 14 | ||||
-rw-r--r-- | drivers/w1/w1-uclass.c | 8 |
3 files changed, 20 insertions, 20 deletions
diff --git a/drivers/w1/mxc_w1.c b/drivers/w1/mxc_w1.c index 8e6372f0be..3637febc0c 100644 --- a/drivers/w1/mxc_w1.c +++ b/drivers/w1/mxc_w1.c @@ -79,7 +79,7 @@ static u8 mxc_w1_touch_bit(struct mxc_w1_pdata *pdata, u8 bit) static u8 mxc_w1_read_byte(struct udevice *dev) { - struct mxc_w1_pdata *pdata = dev_get_platdata(dev); + struct mxc_w1_pdata *pdata = dev_get_plat(dev); struct mxc_w1_regs *regs = pdata->regs; u16 status; @@ -106,7 +106,7 @@ static u8 mxc_w1_read_byte(struct udevice *dev) static void mxc_w1_write_byte(struct udevice *dev, u8 byte) { - struct mxc_w1_pdata *pdata = dev_get_platdata(dev); + struct mxc_w1_pdata *pdata = dev_get_plat(dev); struct mxc_w1_regs *regs = pdata->regs; u16 status; @@ -130,7 +130,7 @@ static void mxc_w1_write_byte(struct udevice *dev, u8 byte) static bool mxc_w1_reset(struct udevice *dev) { - struct mxc_w1_pdata *pdata = dev_get_platdata(dev); + struct mxc_w1_pdata *pdata = dev_get_plat(dev); u16 reg_val; writew(MXC_W1_CONTROL_RPP, &pdata->regs->control); @@ -144,7 +144,7 @@ static bool mxc_w1_reset(struct udevice *dev) static u8 mxc_w1_triplet(struct udevice *dev, bool bdir) { - struct mxc_w1_pdata *pdata = dev_get_platdata(dev); + struct mxc_w1_pdata *pdata = dev_get_plat(dev); u8 id_bit = mxc_w1_touch_bit(pdata, 1); u8 comp_bit = mxc_w1_touch_bit(pdata, 1); u8 retval; @@ -166,9 +166,9 @@ static u8 mxc_w1_triplet(struct udevice *dev, bool bdir) return retval; } -static int mxc_w1_ofdata_to_platdata(struct udevice *dev) +static int mxc_w1_of_to_plat(struct udevice *dev) { - struct mxc_w1_pdata *pdata = dev_get_platdata(dev); + struct mxc_w1_pdata *pdata = dev_get_plat(dev); fdt_addr_t addr; addr = dev_read_addr(dev); @@ -182,7 +182,7 @@ static int mxc_w1_ofdata_to_platdata(struct udevice *dev) static int mxc_w1_probe(struct udevice *dev) { - struct mxc_w1_pdata *pdata = dev_get_platdata(dev); + struct mxc_w1_pdata *pdata = dev_get_plat(dev); unsigned int clkrate = mxc_get_clock(MXC_IPG_PERCLK); unsigned int clkdiv; @@ -228,8 +228,8 @@ U_BOOT_DRIVER(mxc_w1_drv) = { .id = UCLASS_W1, .name = "mxc_w1_drv", .of_match = mxc_w1_id, - .ofdata_to_platdata = mxc_w1_ofdata_to_platdata, + .of_to_plat = mxc_w1_of_to_plat, .ops = &mxc_w1_ops, - .platdata_auto_alloc_size = sizeof(struct mxc_w1_pdata), + .plat_auto = sizeof(struct mxc_w1_pdata), .probe = mxc_w1_probe, }; diff --git a/drivers/w1/w1-gpio.c b/drivers/w1/w1-gpio.c index 45ad47a5d6..3b0ead6f6d 100644 --- a/drivers/w1/w1-gpio.c +++ b/drivers/w1/w1-gpio.c @@ -33,7 +33,7 @@ struct w1_gpio_pdata { static bool w1_gpio_read_bit(struct udevice *dev) { - struct w1_gpio_pdata *pdata = dev_get_platdata(dev); + struct w1_gpio_pdata *pdata = dev_get_plat(dev); int val; dm_gpio_set_dir_flags(&pdata->gpio, GPIOD_IS_OUT); @@ -63,7 +63,7 @@ static u8 w1_gpio_read_byte(struct udevice *dev) static void w1_gpio_write_bit(struct udevice *dev, bool bit) { - struct w1_gpio_pdata *pdata = dev_get_platdata(dev); + struct w1_gpio_pdata *pdata = dev_get_plat(dev); dm_gpio_set_dir_flags(&pdata->gpio, GPIOD_IS_OUT); @@ -84,7 +84,7 @@ static void w1_gpio_write_byte(struct udevice *dev, u8 byte) static bool w1_gpio_reset(struct udevice *dev) { - struct w1_gpio_pdata *pdata = dev_get_platdata(dev); + struct w1_gpio_pdata *pdata = dev_get_plat(dev); int val; /* initiate the reset pulse. first we must pull the bus to low */ @@ -151,9 +151,9 @@ static const struct w1_ops w1_gpio_ops = { .write_byte = w1_gpio_write_byte, }; -static int w1_gpio_ofdata_to_platdata(struct udevice *dev) +static int w1_gpio_of_to_plat(struct udevice *dev) { - struct w1_gpio_pdata *pdata = dev_get_platdata(dev); + struct w1_gpio_pdata *pdata = dev_get_plat(dev); int ret; ret = gpio_request_by_name(dev, "gpios", 0, &pdata->gpio, 0); @@ -172,7 +172,7 @@ U_BOOT_DRIVER(w1_gpio_drv) = { .id = UCLASS_W1, .name = "w1_gpio_drv", .of_match = w1_gpio_id, - .ofdata_to_platdata = w1_gpio_ofdata_to_platdata, + .of_to_plat = w1_gpio_of_to_plat, .ops = &w1_gpio_ops, - .platdata_auto_alloc_size = sizeof(struct w1_gpio_pdata), + .plat_auto = sizeof(struct w1_gpio_pdata), }; diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c index 9478c93e9b..8bc6cb13f4 100644 --- a/drivers/w1/w1-uclass.c +++ b/drivers/w1/w1-uclass.c @@ -130,14 +130,14 @@ int w1_get_bus(int busnum, struct udevice **busp) u8 w1_get_device_family(struct udevice *dev) { - struct w1_device *w1 = dev_get_parent_platdata(dev); + struct w1_device *w1 = dev_get_parent_plat(dev); return w1->id & 0xff; } int w1_reset_select(struct udevice *dev) { - struct w1_device *w1 = dev_get_parent_platdata(dev); + struct w1_device *w1 = dev_get_parent_plat(dev); struct udevice *bus = dev_get_parent(dev); const struct w1_ops *ops = device_get_ops(bus); int i; @@ -230,10 +230,10 @@ UCLASS_DRIVER(w1) = { .name = "w1", .id = UCLASS_W1, .flags = DM_UC_FLAG_SEQ_ALIAS, - .per_device_auto_alloc_size = sizeof(struct w1_bus), + .per_device_auto = sizeof(struct w1_bus), .post_probe = w1_post_probe, #if CONFIG_IS_ENABLED(OF_CONTROL) .post_bind = dm_scan_fdt_dev, #endif - .per_child_platdata_auto_alloc_size = sizeof(struct w1_device), + .per_child_plat_auto = sizeof(struct w1_device), }; |