diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-03 16:55:21 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-13 16:51:09 -0700 |
commit | d1998a9fde0a917d6496299f6a97b6bccfdc6724 (patch) | |
tree | 1931d0c875e829620180bf383722c1a69bd1a951 /include | |
parent | c69cda25c9b59e53a6bc8969ada58942549f5b5d (diff) | |
download | u-boot-d1998a9fde0a917d6496299f6a97b6bccfdc6724.tar.gz |
dm: treewide: Rename ofdata_to_platdata() to of_to_plat()
This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/dm/device-internal.h | 4 | ||||
-rw-r--r-- | include/dm/device.h | 16 | ||||
-rw-r--r-- | include/dm/platform_data/spi_pl022.h | 2 | ||||
-rw-r--r-- | include/i2c.h | 10 | ||||
-rw-r--r-- | include/ns16550.h | 4 | ||||
-rw-r--r-- | include/spi.h | 6 |
6 files changed, 21 insertions, 21 deletions
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h index 2e9c1d5ef9c..af3b6b2b054 100644 --- a/include/dm/device-internal.h +++ b/include/dm/device-internal.h @@ -89,7 +89,7 @@ int device_bind_by_name(struct udevice *parent, bool pre_reloc_only, int device_reparent(struct udevice *dev, struct udevice *new_parent); /** - * device_ofdata_to_platdata() - Read platform data for a device + * device_of_to_plat() - Read platform data for a device * * Read platform data for a device (typically from the device tree) so that * the information needed to probe the device is present. @@ -102,7 +102,7 @@ int device_reparent(struct udevice *dev, struct udevice *new_parent); * @dev: Pointer to device to process * @return 0 if OK, -ve on error */ -int device_ofdata_to_platdata(struct udevice *dev); +int device_of_to_plat(struct udevice *dev); /** * device_probe() - Probe a device, activating it diff --git a/include/dm/device.h b/include/dm/device.h index 491542c5804..ed80ae44940 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -107,7 +107,7 @@ enum { * a U_BOOT_DEVICE() macro (in which case plat is non-NULL) or a node * in the device tree (in which case of_offset is >= 0). In the latter case * we translate the device tree information into plat in a function - * implemented by the driver ofdata_to_platdata method (called just before the + * implemented by the driver of_to_plat method (called just before the * probe method if the device has a device tree node. * * All three of plat, priv and uclass_priv can be allocated by the @@ -219,7 +219,7 @@ struct udevice_id { * @probe: Called to probe a device, i.e. activate it * @remove: Called to remove a device, i.e. de-activate it * @unbind: Called to unbind a device from its driver - * @ofdata_to_platdata: Called before probe to decode device tree data + * @of_to_plat: Called before probe to decode device tree data * @child_post_bind: Called after a new child has been bound * @child_pre_probe: Called before a child device is probed. The device has * memory allocated but it has not yet been probed. @@ -254,7 +254,7 @@ struct driver { int (*probe)(struct udevice *dev); int (*remove)(struct udevice *dev); int (*unbind)(struct udevice *dev); - int (*ofdata_to_platdata)(struct udevice *dev); + int (*of_to_plat)(struct udevice *dev); int (*child_post_bind)(struct udevice *dev); int (*child_pre_probe)(struct udevice *dev); int (*child_post_remove)(struct udevice *dev); @@ -624,7 +624,7 @@ int device_find_child_by_name(const struct udevice *parent, const char *name, /** * device_first_child_ofdata_err() - Find the first child and reads its plat * - * The ofdata_to_platdata() method is called on the child before it is returned, + * The of_to_plat() method is called on the child before it is returned, * but the child is not probed. * * @parent: Parent to check @@ -637,7 +637,7 @@ int device_first_child_ofdata_err(struct udevice *parent, /* * device_next_child_ofdata_err() - Find the next child and read its plat * - * The ofdata_to_platdata() method is called on the child before it is returned, + * The of_to_plat() method is called on the child before it is returned, * but the child is not probed. * * @devp: On entry, points to the previous child; on exit returns the child that @@ -798,19 +798,19 @@ static inline bool device_is_on_pci_bus(const struct udevice *dev) list_for_each_entry(pos, &parent->child_head, sibling_node) /** - * device_foreach_child_ofdata_to_platdata() - iterate through children + * device_foreach_child_of_to_plat() - iterate through children * * This stops when it gets an error, with @pos set to the device that failed to * read ofdata. * This creates a for() loop which works through the available children of * a device in order from start to end. Device ofdata is read by calling - * device_ofdata_to_platdata() on each one. The devices are not probed. + * device_of_to_plat() on each one. The devices are not probed. * * @pos: struct udevice * for the current device * @parent: parent device to scan */ -#define device_foreach_child_ofdata_to_platdata(pos, parent) \ +#define device_foreach_child_of_to_plat(pos, parent) \ for (int _ret = device_first_child_ofdata_err(parent, &dev); !_ret; \ _ret = device_next_child_ofdata_err(&dev)) diff --git a/include/dm/platform_data/spi_pl022.h b/include/dm/platform_data/spi_pl022.h index 63a58ee4535..c5aa3212915 100644 --- a/include/dm/platform_data/spi_pl022.h +++ b/include/dm/platform_data/spi_pl022.h @@ -4,7 +4,7 @@ * Quentin Schulz, Bootlin, quentin.schulz@bootlin.com * * Structure for use with U_BOOT_DEVICE for pl022 SPI devices or to use - * in ofdata_to_platdata. + * in of_to_plat. */ #ifndef __spi_pl022_h diff --git a/include/i2c.h b/include/i2c.h index d0a390141b8..e45e33f5037 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -521,17 +521,17 @@ int i2c_get_chip_for_busnum(int busnum, int chip_addr, uint offset_len, struct udevice **devp); /** - * i2c_chip_ofdata_to_platdata() - Decode standard I2C platform data + * i2c_chip_of_to_plat() - Decode standard I2C platform data * * This decodes the chip address from a device tree node and puts it into * its dm_i2c_chip structure. This should be called in your driver's - * ofdata_to_platdata() method. + * of_to_plat() method. * * @blob: Device tree blob * @node: Node offset to read from * @spi: Place to put the decoded information */ -int i2c_chip_ofdata_to_platdata(struct udevice *dev, struct dm_i2c_chip *chip); +int i2c_chip_of_to_plat(struct udevice *dev, struct dm_i2c_chip *chip); /** * i2c_dump_msgs() - Dump a list of I2C messages @@ -568,7 +568,7 @@ struct udevice *i2c_emul_get_device(struct udevice *emul); extern struct acpi_ops i2c_acpi_ops; /** - * acpi_i2c_ofdata_to_platdata() - Read properties intended for ACPI + * acpi_i2c_of_to_plat() - Read properties intended for ACPI * * This reads the generic I2C properties from the device tree, so that these * can be used to create ACPI information for the device. @@ -579,7 +579,7 @@ extern struct acpi_ops i2c_acpi_ops; * @dev: I2C device to process * @return 0 if OK, -EINVAL if acpi,hid is not present */ -int acpi_i2c_ofdata_to_platdata(struct udevice *dev); +int acpi_i2c_of_to_plat(struct udevice *dev); #ifndef CONFIG_DM_I2C diff --git a/include/ns16550.h b/include/ns16550.h index 18c9077755b..08e933ffe79 100644 --- a/include/ns16550.h +++ b/include/ns16550.h @@ -241,7 +241,7 @@ void NS16550_reinit(NS16550_t com_port, int baud_divisor); int ns16550_calc_divisor(NS16550_t port, int clock, int baudrate); /** - * ns16550_serial_ofdata_to_platdata() - convert DT to platform data + * ns16550_serial_of_to_plat() - convert DT to platform data * * Decode a device tree node for an ns16550 device. This includes the * register base address and register shift properties. The caller must set @@ -250,7 +250,7 @@ int ns16550_calc_divisor(NS16550_t port, int clock, int baudrate); * @dev: dev to decode platform data for * @return: 0 if OK, -EINVAL on error */ -int ns16550_serial_ofdata_to_platdata(struct udevice *dev); +int ns16550_serial_of_to_plat(struct udevice *dev); /** * ns16550_serial_probe() - probe a serial port diff --git a/include/spi.h b/include/spi.h index 176a42cb13a..85a785e8339 100644 --- a/include/spi.h +++ b/include/spi.h @@ -601,7 +601,7 @@ int spi_chip_select(struct udevice *slave); int spi_find_chip_select(struct udevice *bus, int cs, struct udevice **devp); /** - * spi_slave_ofdata_to_platdata() - decode standard SPI platform data + * spi_slave_of_to_plat() - decode standard SPI platform data * * This decodes the speed and mode for a slave from a device tree node * @@ -609,8 +609,8 @@ int spi_find_chip_select(struct udevice *bus, int cs, struct udevice **devp); * @node: Node offset to read from * @plat: Place to put the decoded information */ -int spi_slave_ofdata_to_platdata(struct udevice *dev, - struct dm_spi_slave_platdata *plat); +int spi_slave_of_to_plat(struct udevice *dev, + struct dm_spi_slave_platdata *plat); /** * spi_cs_info() - Check information on a chip select |