Skip to content

Commit cddaac0

Browse files
dtorarndb
authored andcommitted
ARM: pxa/gumstix: fix attaching properties to vbus gpio device
Commit f1d6588 tried to convert GPIO lookup tables to software properties for the vbus gpio device, bit forgot the most important step: actually attaching the new properties to the device. Also fix up the name of the property array to reflect the board name, and add missing gpio/property.h and devices.h includes absence of which causes compile failures on some configurations. Switch "#ifdef CONFIG_USB_PXA25X" to "#if IS_ENABLED(CONFIG_USB_PXA25X)" because it should not matter if the driver is buolt in or a module, it still need vbus controls. Reported-by: Arnd Bergmann <arnd@arndb.de> Fixes: f1d6588 ("ARM: pxa/gumstix: convert vbus gpio to use software nodes") Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent e1793fe commit cddaac0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

arch/arm/mach-pxa/gumstix.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <linux/mtd/mtd.h>
2222
#include <linux/mtd/partitions.h>
2323
#include <linux/gpio/machine.h>
24+
#include <linux/gpio/property.h>
2425
#include <linux/gpio.h>
2526
#include <linux/err.h>
2627
#include <linux/clk.h>
@@ -40,6 +41,7 @@
4041
#include <linux/platform_data/mmc-pxamci.h>
4142
#include "udc.h"
4243
#include "gumstix.h"
44+
#include "devices.h"
4345

4446
#include "generic.h"
4547

@@ -99,8 +101,8 @@ static void __init gumstix_mmc_init(void)
99101
}
100102
#endif
101103

102-
#ifdef CONFIG_USB_PXA25X
103-
static const struct property_entry spitz_mci_props[] __initconst = {
104+
#if IS_ENABLED(CONFIG_USB_PXA25X)
105+
static const struct property_entry gumstix_vbus_props[] __initconst = {
104106
PROPERTY_ENTRY_GPIO("vbus-gpios", &pxa2xx_gpiochip_node,
105107
GPIO_GUMSTIX_USB_GPIOn, GPIO_ACTIVE_HIGH),
106108
PROPERTY_ENTRY_GPIO("pullup-gpios", &pxa2xx_gpiochip_node,
@@ -109,8 +111,9 @@ static const struct property_entry spitz_mci_props[] __initconst = {
109111
};
110112

111113
static const struct platform_device_info gumstix_gpio_vbus_info __initconst = {
112-
.name = "gpio-vbus",
113-
.id = PLATFORM_DEVID_NONE,
114+
.name = "gpio-vbus",
115+
.id = PLATFORM_DEVID_NONE,
116+
.properties = gumstix_vbus_props,
114117
};
115118

116119
static void __init gumstix_udc_init(void)

0 commit comments

Comments
 (0)