uboot-d1: add bootloader for upcoming d1 target
[openwrt/staging/mans0n.git] / package / boot / uboot-d1 / patches / 0047-gpio-axp-Consistently-use-the-axp_gpio-order.patch
1 From 7e85c2d6516e47b537b27132d1946d1eab3b8923 Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Fri, 27 Aug 2021 17:39:36 -0500
4 Subject: [PATCH 47/90] gpio: axp: Consistently use the "axp_gpio" order
5
6 This is less confusing than half of the driver using "axp_gpio" and the
7 other half using "gpio_axp".
8
9 Signed-off-by: Samuel Holland <samuel@sholland.org>
10 ---
11 drivers/gpio/axp_gpio.c | 16 ++++++++--------
12 1 file changed, 8 insertions(+), 8 deletions(-)
13
14 --- a/drivers/gpio/axp_gpio.c
15 +++ b/drivers/gpio/axp_gpio.c
16 @@ -89,14 +89,14 @@ static int axp_gpio_set_value(struct ude
17 AXP_GPIO_CTRL_OUTPUT_LOW);
18 }
19
20 -static const struct dm_gpio_ops gpio_axp_ops = {
21 +static const struct dm_gpio_ops axp_gpio_ops = {
22 .direction_input = axp_gpio_direction_input,
23 .direction_output = axp_gpio_direction_output,
24 .get_value = axp_gpio_get_value,
25 .set_value = axp_gpio_set_value,
26 };
27
28 -static int gpio_axp_probe(struct udevice *dev)
29 +static int axp_gpio_probe(struct udevice *dev)
30 {
31 struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
32
33 @@ -107,11 +107,11 @@ static int gpio_axp_probe(struct udevice
34 return 0;
35 }
36
37 -U_BOOT_DRIVER(gpio_axp) = {
38 - .name = "gpio_axp",
39 - .id = UCLASS_GPIO,
40 - .ops = &gpio_axp_ops,
41 - .probe = gpio_axp_probe,
42 +U_BOOT_DRIVER(axp_gpio) = {
43 + .name = "axp_gpio",
44 + .id = UCLASS_GPIO,
45 + .probe = axp_gpio_probe,
46 + .ops = &axp_gpio_ops,
47 };
48
49 int axp_gpio_init(void)
50 @@ -124,7 +124,7 @@ int axp_gpio_init(void)
51 return ret;
52
53 /* There is no devicetree support for the axp yet, so bind directly */
54 - ret = device_bind_driver(dm_root(), "gpio_axp", "AXP-gpio", &dev);
55 + ret = device_bind_driver(dm_root(), "axp_gpio", "AXP-gpio", &dev);
56 if (ret)
57 return ret;
58