From: Linus Torvalds Date: Wed, 28 Mar 2012 19:34:33 +0000 (-0700) Subject: Merge tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc X-Git-Tag: firefly_0821_release~3680^2~3232 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=09893ee84591b0417a9186a7e7cf1503ccf99ac2;hp=-c;p=firefly-linux-kernel-4.4.55.git Merge tag 'dt2' of git://git./linux/kernel/git/arm/arm-soc Pull "ARM: More device tree support updates" from Olof Johansson: "This branch contains a number of updates for device tree support on several ARM platforms, in particular: * AT91 continues the device tree conversion adding support for a number of on-chip drivers and other functionality * ux500 adds probing of some of the core SoC blocks through device tree * Initial device tree support for ST SPEAr600 platforms * kirkwood continues the conversion to device-tree probing" Manually merge arch/arm/mach-ux500/Kconfig due to MACH_U8500 rename, and drivers/usb/gadget/at91_udc.c due to header file include cleanups. Also do an "evil merge" for the MACH_U8500 config option rename that the affected RMI4 touchscreen driver in staging. It's called MACH_MOP500 now, and it was missed during previous merges. * tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (48 commits) ARM: SPEAr600: Add device-tree support to SPEAr600 boards ARM: ux500: Provide local timer support for Device Tree ARM: ux500: Enable PL022 SSP Controller in Device Tree ARM: ux500: Enable PL310 Level 2 Cache Controller in Device Tree ARM: ux500: Enable PL011 AMBA UART Controller for Device Tree ARM: ux500: Enable Cortex-A9 GIC (Generic Interrupt Controller) in Device Tree ARM: ux500: db8500: list most devices in the snowball device tree ARM: ux500: split dts file for snowball into generic part ARM: ux500: combine the board init functions for DT boot ARM: ux500: Initial Device Tree support for Snowball ARM: ux500: CONFIG: Enable Device Tree support for future endeavours ARM: kirkwood: use devicetree for rtc-mv ARM: kirkwood: rtc-mv devicetree bindings ARM: kirkwood: fdt: define uart[01] as disabled, enable uart0 ARM: kirkwood: fdt: facilitate new boards during fdt migration ARM: kirkwood: fdt: absorb kirkwood_init() ARM: kirkwood: fdt: use mrvl ticker symbol ARM: orion: wdt: use resource vice direct access ARM: Kirkwood: Remove tclk from kirkwood_asoc_platform_data. ARM: orion: spi: remove enable_clock_fix which is not used ... --- 09893ee84591b0417a9186a7e7cf1503ccf99ac2 diff --combined arch/arm/boot/dts/tegra20.dtsi index aff8a175aa40,f29978ecaebe..108e894a8926 --- a/arch/arm/boot/dts/tegra20.dtsi +++ b/arch/arm/boot/dts/tegra20.dtsi @@@ -107,8 -107,6 +107,8 @@@ 0 89 0x04 >; #gpio-cells = <2>; gpio-controller; + #interrupt-cells = <2>; + interrupt-controller; }; pinmux: pinmux@70000000 { @@@ -190,6 -188,7 +190,7 @@@ reg = <0xc5000000 0x4000>; interrupts = < 0 20 0x04 >; phy_type = "utmi"; + nvidia,has-legacy-mode; }; usb@c5004000 { diff --combined arch/arm/mach-ux500/Kconfig index 8904d18de01a,ea908c66aebd..880d02ec89d4 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig @@@ -8,56 -8,54 +8,62 @@@ config UX500_SOC_COMMO select PL310_ERRATA_753970 select ARM_ERRATA_754322 select ARM_ERRATA_764369 - -menu "Ux500 SoC" + select CACHE_L2X0 config UX500_SOC_DB5500 - bool "DB5500" + bool select MFD_DB5500_PRCMU config UX500_SOC_DB8500 - bool "DB8500" + bool select MFD_DB8500_PRCMU select REGULATOR_DB8500_PRCMU - -endmenu + select CPU_FREQ_TABLE if CPU_FREQ menu "Ux500 target platform (boards)" -config MACH_U8500 - bool "U8500 Development platform" - depends on UX500_SOC_DB8500 - select TPS6105X +config MACH_MOP500 + bool "U8500 Development platform, MOP500 versions" + select UX500_SOC_DB8500 + select I2C + select I2C_NOMADIK select SOC_BUS help - Include support for the mop500 development platform. + Include support for the MOP500 development platform. config MACH_HREFV60 - bool "U85000 Development platform, HREFv60 version" - depends on UX500_SOC_DB8500 - help - Include support for the HREFv60 new development platform. + bool "U8500 Development platform, HREFv60 version" + select MACH_MOP500 + help + Include support for the HREFv60 new development platform. + Includes HREFv70, v71 etc. config MACH_SNOWBALL bool "U8500 Snowball platform" - depends on UX500_SOC_DB8500 - select MACH_U8500 + select MACH_MOP500 help Include support for the snowball development platform. config MACH_U5500 bool "U5500 Development platform" - depends on UX500_SOC_DB5500 + select UX500_SOC_DB5500 help Include support for the U5500 development platform. +config UX500_AUTO_PLATFORM + def_bool y + depends on !MACH_U5500 + select MACH_MOP500 + help + At least one platform needs to be selected in order to build + a working kernel. If everything else is disabled, this + automatically enables MACH_MOP500. ++ + config MACH_UX500_DT + bool "Generic U8500 support using device tree" - depends on MACH_U8500 ++ depends on MACH_MOP500 + select USE_OF + endmenu config UX500_DEBUG_UART diff --combined arch/arm/mach-ux500/board-mop500.c index 29d330374994,d0799d592218..77d03c1fbd04 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@@ -30,6 -30,9 +30,9 @@@ #include #include + #include + #include + #include #include #include @@@ -72,7 -75,7 +75,7 @@@ static struct platform_device snowball_ }; static struct ab8500_gpio_platform_data ab8500_gpio_pdata = { - .gpio_base = MOP500_AB8500_GPIO(0), + .gpio_base = MOP500_AB8500_PIN_GPIO(1), .irq_base = MOP500_AB8500_VIR_GPIO_IRQ_BASE, /* config_reg is the initial configuration of ab8500 pins. * The pins can be configured as GPIO or alt functions based @@@ -440,7 -443,7 +443,7 @@@ static struct stedma40_chan_cfg ssp0_dm }; #endif - static struct pl022_ssp_controller ssp0_platform_data = { + static struct pl022_ssp_controller ssp0_plat = { .bus_id = 0, #ifdef CONFIG_STE_DMA40 .enable_dma = 1, @@@ -458,7 -461,7 +461,7 @@@ static void __init mop500_spi_init(struct device *parent) { - db8500_add_ssp0(parent, &ssp0_platform_data); + db8500_add_ssp0(parent, &ssp0_plat); } #ifdef CONFIG_STE_DMA40 @@@ -618,6 -621,7 +621,7 @@@ static void __init mop500_init_machine( mop500_pins_init(); + /* FIXME: parent of ab8500 should be prcmu */ for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) mop500_platform_devs[i]->dev.parent = parent; @@@ -738,3 -742,94 +742,94 @@@ MACHINE_START(SNOWBALL, "Calao Systems .handle_irq = gic_handle_irq, .init_machine = snowball_init_machine, MACHINE_END + + #ifdef CONFIG_MACH_UX500_DT + + struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { + OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat), + OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat), + OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", &uart2_plat), + OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0", &ssp0_plat), + {}, + }; + + static const struct of_device_id u8500_soc_node[] = { + /* only create devices below soc node */ + { .compatible = "stericsson,db8500", }, + { }, + }; + + static void __init u8500_init_machine(void) + { + struct device *parent = NULL; + int i2c0_devs; + int i; + + parent = u8500_init_devices(); + i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); + + for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) + mop500_platform_devs[i]->dev.parent = parent; + for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++) + snowball_platform_devs[i]->dev.parent = parent; + + /* automatically probe child nodes of db8500 device */ + of_platform_populate(NULL, u8500_soc_node, u8500_auxdata_lookup, parent); + + if (of_machine_is_compatible("st-ericsson,mop500")) { + mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; + mop500_pins_init(); + + platform_add_devices(mop500_platform_devs, + ARRAY_SIZE(mop500_platform_devs)); + + mop500_sdi_init(parent); + } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { + snowball_pins_init(); + platform_add_devices(snowball_platform_devs, + ARRAY_SIZE(snowball_platform_devs)); + + snowball_sdi_init(parent); + } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) { + /* + * The HREFv60 board removed a GPIO expander and routed + * all these GPIO pins to the internal GPIO controller + * instead. + */ + mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; + i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES; + hrefv60_pins_init(); + platform_add_devices(mop500_platform_devs, + ARRAY_SIZE(mop500_platform_devs)); + + hrefv60_sdi_init(parent); + } + mop500_i2c_init(parent); + + i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); + i2c_register_board_info(2, mop500_i2c2_devices, + ARRAY_SIZE(mop500_i2c2_devices)); + + /* This board has full regulator constraints */ + regulator_has_full_constraints(); + } + + static const char * u8500_dt_board_compat[] = { + "calaosystems,snowball-a9500", + "st-ericsson,hrefv60+", + "st-ericsson,u8500", + "st-ericsson,mop500", + NULL, + }; + + + DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)") + .map_io = u8500_map_io, + .init_irq = ux500_init_irq, + /* we re-use nomadik timer here */ + .timer = &ux500_timer, + .handle_irq = gic_handle_irq, + .init_machine = u8500_init_machine, + .dt_compat = u8500_dt_board_compat, + MACHINE_END + #endif diff --combined drivers/of/Kconfig index 6ea51dcbc728,fa666a93540c..8e84ce9765a9 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@@ -35,10 -35,9 +35,10 @@@ config OF_EARLY_FLATTRE config OF_PROMTREE bool +# Hardly any platforms need this. It is safe to select, but only do so if you +# need it. config OF_DYNAMIC - def_bool y - depends on PPC_OF + bool config OF_ADDRESS def_bool y @@@ -91,4 -90,8 +91,8 @@@ config OF_PCI_IR help OpenFirmware PCI IRQ routing helpers + config OF_MTD + depends on MTD + def_bool y + endmenu # OF diff --combined drivers/rtc/rtc-mv.c index 1300962486d1,0dd8421d41c3..b2185f4255aa --- a/drivers/rtc/rtc-mv.c +++ b/drivers/rtc/rtc-mv.c @@@ -12,6 -12,7 +12,7 @@@ #include #include #include + #include #include #include #include @@@ -273,7 -274,7 +274,7 @@@ static int __devinit mv_rtc_probe(struc if (pdata->irq >= 0) { writel(0, pdata->ioaddr + RTC_ALARM_INTERRUPT_MASK_REG_OFFS); if (devm_request_irq(&pdev->dev, pdata->irq, mv_rtc_interrupt, - IRQF_DISABLED | IRQF_SHARED, + IRQF_SHARED, pdev->name, pdata) < 0) { dev_warn(&pdev->dev, "interrupt not available.\n"); pdata->irq = -1; @@@ -294,11 -295,19 +295,19 @@@ static int __exit mv_rtc_remove(struct return 0; } + #ifdef CONFIG_OF + static struct of_device_id rtc_mv_of_match_table[] = { + { .compatible = "mrvl,orion-rtc", }, + {} + }; + #endif + static struct platform_driver mv_rtc_driver = { .remove = __exit_p(mv_rtc_remove), .driver = { .name = "rtc-mv", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(rtc_mv_of_match_table), }, }; diff --combined drivers/staging/ste_rmi4/Makefile index 176f46900571,176f46900571..e4c03351420f --- a/drivers/staging/ste_rmi4/Makefile +++ b/drivers/staging/ste_rmi4/Makefile @@@ -2,4 -2,4 +2,4 @@@ # Makefile for the RMI4 touchscreen driver. # obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4) += synaptics_i2c_rmi4.o --obj-$(CONFIG_MACH_U8500) += board-mop500-u8500uib-rmi4.o ++obj-$(CONFIG_MACH_MOP500) += board-mop500-u8500uib-rmi4.o diff --combined drivers/usb/Kconfig index 48ac6e781ba2,7fe4902d9e51..cbd8f5f80596 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@@ -10,13 -10,34 +10,13 @@@ menuconfig USB_SUPPOR This option adds core support for Universal Serial Bus (USB). You will also need drivers from the following menu to make use of it. -if USB_SUPPORT - -config USB_COMMON - tristate - default y - depends on USB || USB_GADGET - -# Host-side USB depends on having a host controller -# NOTE: dummy_hcd is always an option, but it's ignored here ... -# NOTE: SL-811 option should be board-specific ... -config USB_ARCH_HAS_HCD - boolean - default y if USB_ARCH_HAS_OHCI - default y if USB_ARCH_HAS_EHCI - default y if USB_ARCH_HAS_XHCI - default y if PCMCIA && !M32R # sl811_cs - default y if ARM # SL-811 - default y if BLACKFIN # SL-811 - default y if SUPERH # r8a66597-hcd - default PCI - # many non-PCI SOC chips embed OHCI config USB_ARCH_HAS_OHCI boolean # ARM: default y if SA1111 default y if ARCH_OMAP - default y if ARCH_S3C2410 + default y if ARCH_S3C24XX default y if PXA27x default y if PXA3xx default y if ARCH_EP93XX @@@ -44,7 -65,7 +44,7 @@@ config USB_ARCH_HAS_EHC default y if PPC_MPC512x default y if ARCH_IXP4XX default y if ARCH_W90X900 - default y if ARCH_AT91SAM9G45 + default y if ARCH_AT91 default y if ARCH_MXC default y if ARCH_OMAP3 default y if ARCH_CNS3XXX @@@ -55,7 -76,6 +55,7 @@@ default y if MICROBLAZE default y if SPARC_LEON default y if ARCH_MMP + default y if MACH_LOONGSON1 default PCI # some non-PCI HCDs implement xHCI @@@ -63,27 -83,6 +63,27 @@@ config USB_ARCH_HAS_XHC boolean default PCI +if USB_SUPPORT + +config USB_COMMON + tristate + default y + depends on USB || USB_GADGET + +# Host-side USB depends on having a host controller +# NOTE: dummy_hcd is always an option, but it's ignored here ... +# NOTE: SL-811 option should be board-specific ... +config USB_ARCH_HAS_HCD + boolean + default y if USB_ARCH_HAS_OHCI + default y if USB_ARCH_HAS_EHCI + default y if USB_ARCH_HAS_XHCI + default y if PCMCIA && !M32R # sl811_cs + default y if ARM # SL-811 + default y if BLACKFIN # SL-811 + default y if SUPERH # r8a66597-hcd + default PCI + # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface. config USB tristate "Support for Host-side USB" diff --combined drivers/usb/gadget/Kconfig index 26c0b75f152e,edf114412135..2633f7595116 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@@ -137,7 -137,7 +137,7 @@@ choic config USB_AT91 tristate "Atmel AT91 USB Device Port" - depends on ARCH_AT91 && !ARCH_AT91SAM9RL && !ARCH_AT91SAM9G45 + depends on ARCH_AT91 help Many Atmel AT91 processors (such as the AT91RM2000) have a full speed USB Device Port with support for five configurable @@@ -284,7 -284,7 +284,7 @@@ config USB_IM config USB_S3C2410 tristate "S3C2410 USB Device Controller" - depends on ARCH_S3C2410 + depends on ARCH_S3C24XX help Samsung's S3C2410 is an ARM-4 processor with an integrated full speed USB 1.1 device controller. It has 4 configurable @@@ -299,7 -299,7 +299,7 @@@ config USB_S3C2410_DEBU config USB_S3C_HSUDC tristate "S3C2416, S3C2443 and S3C2450 USB Device Controller" - depends on ARCH_S3C2410 + depends on ARCH_S3C24XX select USB_GADGET_DUALSPEED help Samsung's S3C2416, S3C2443 and S3C2450 is an ARM9 based SoC @@@ -599,29 -599,16 +599,29 @@@ config USB_AUDI depends on SND select SND_PCM help - Gadget Audio is compatible with USB Audio Class specification 1.0. - It will include at least one AudioControl interface, zero or more - AudioStream interface and zero or more MIDIStream interface. - - Gadget Audio will use on-board ALSA (CONFIG_SND) audio card to - playback or capture audio stream. + This Gadget Audio driver is compatible with USB Audio Class + specification 2.0. It implements 1 AudioControl interface, + 1 AudioStreaming Interface each for USB-OUT and USB-IN. + Number of channels, sample rate and sample size can be + specified as module parameters. + This driver doesn't expect any real Audio codec to be present + on the device - the audio streams are simply sinked to and + sourced from a virtual ALSA sound card created. The user-space + application may choose to do whatever it wants with the data + received from the USB Host and choose to provide whatever it + wants as audio data to the USB Host. Say "y" to link the driver statically, or "m" to build a dynamically linked module called "g_audio". +config GADGET_UAC1 + bool "UAC 1.0 (Legacy)" + depends on USB_AUDIO + help + If you instead want older UAC Spec-1.0 driver that also has audio + paths hardwired to the Audio codec chip on-board and doesn't work + without one. + config USB_ETH tristate "Ethernet Gadget (with CDC Ethernet support)" depends on NET @@@ -698,7 -685,7 +698,7 @@@ config USB_G_NC help This driver implements USB CDC NCM subclass standard. NCM is an advanced protocol for Ethernet encapsulation, allows grouping - of several ethernet frames into one USB transfer and diffferent + of several ethernet frames into one USB transfer and different alignment possibilities. Say "y" to link the driver statically, or "m" to build a diff --combined drivers/usb/gadget/at91_udc.c index 2db5f68f7960,4063209fe8da..36fd2b4b49a2 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@@ -29,6 -29,9 +29,8 @@@ #include #include #include -#include + #include + #include #include #include @@@ -558,7 -561,6 +560,7 @@@ static int at91_ep_disable (struct usb_ /* restore the endpoint's pristine config */ ep->desc = NULL; + ep->ep.desc = NULL; ep->ep.maxpacket = ep->maxpacket; /* reset fifos and endpoint */ @@@ -1707,7 -1709,27 +1709,27 @@@ static void at91udc_shutdown(struct pla spin_unlock_irqrestore(&udc->lock, flags); } - static int __init at91udc_probe(struct platform_device *pdev) + static void __devinit at91udc_of_init(struct at91_udc *udc, + struct device_node *np) + { + struct at91_udc_data *board = &udc->board; + u32 val; + enum of_gpio_flags flags; + + if (of_property_read_u32(np, "atmel,vbus-polled", &val) == 0) + board->vbus_polled = 1; + + board->vbus_pin = of_get_named_gpio_flags(np, "atmel,vbus-gpio", 0, + &flags); + board->vbus_active_low = (flags & OF_GPIO_ACTIVE_LOW) ? 1 : 0; + + board->pullup_pin = of_get_named_gpio_flags(np, "atmel,pullup-gpio", 0, + &flags); + + board->pullup_active_low = (flags & OF_GPIO_ACTIVE_LOW) ? 1 : 0; + } + + static int __devinit at91udc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct at91_udc *udc; @@@ -1742,7 -1764,11 +1764,11 @@@ /* init software state */ udc = &controller; udc->gadget.dev.parent = dev; - udc->board = *(struct at91_udc_data *) dev->platform_data; + if (pdev->dev.of_node) + at91udc_of_init(udc, pdev->dev.of_node); + else + memcpy(&udc->board, dev->platform_data, + sizeof(struct at91_udc_data)); udc->pdev = pdev; udc->enabled = 0; spin_lock_init(&udc->lock); @@@ -1971,6 -1997,15 +1997,15 @@@ static int at91udc_resume(struct platfo #define at91udc_resume NULL #endif + #if defined(CONFIG_OF) + static const struct of_device_id at91_udc_dt_ids[] = { + { .compatible = "atmel,at91rm9200-udc" }, + { /* sentinel */ } + }; + + MODULE_DEVICE_TABLE(of, at91_udc_dt_ids); + #endif + static struct platform_driver at91_udc_driver = { .remove = __exit_p(at91udc_remove), .shutdown = at91udc_shutdown, @@@ -1979,6 -2014,7 +2014,7 @@@ .driver = { .name = (char *) driver_name, .owner = THIS_MODULE, + .of_match_table = of_match_ptr(at91_udc_dt_ids), }, }; diff --combined include/linux/of.h index d46a18ffbebb,612f84b007c6..ba5d8494f2e1 --- a/include/linux/of.h +++ b/include/linux/of.h @@@ -58,9 -58,6 +58,9 @@@ struct device_node struct kref kref; unsigned long _flags; void *data; +#if defined(CONFIG_EEH) + struct eeh_dev *edev; +#endif #if defined(CONFIG_SPARC) char *path_component_name; unsigned int unique_id; @@@ -75,24 -72,19 +75,24 @@@ struct of_phandle_args uint32_t args[MAX_PHANDLE_ARGS]; }; -#if defined(CONFIG_SPARC) || !defined(CONFIG_OF) +#if defined(CONFIG_EEH) +static inline struct eeh_dev *of_node_to_eeh_dev(struct device_node *dn) +{ + return dn->edev; +} +#endif + +#ifdef CONFIG_OF_DYNAMIC +extern struct device_node *of_node_get(struct device_node *node); +extern void of_node_put(struct device_node *node); +#else /* CONFIG_OF_DYNAMIC */ /* Dummy ref counting routines - to be implemented later */ static inline struct device_node *of_node_get(struct device_node *node) { return node; } -static inline void of_node_put(struct device_node *node) -{ -} -#else -extern struct device_node *of_node_get(struct device_node *node); -extern void of_node_put(struct device_node *node); -#endif +static inline void of_node_put(struct device_node *node) { } +#endif /* !CONFIG_OF_DYNAMIC */ #ifdef CONFIG_OF @@@ -225,9 -217,6 +225,9 @@@ extern int of_property_read_string(stru extern int of_property_read_string_index(struct device_node *np, const char *propname, int index, const char **output); +extern int of_property_match_string(struct device_node *np, + const char *propname, + const char *string); extern int of_property_count_strings(struct device_node *np, const char *propname); extern int of_device_is_compatible(const struct device_node *device, @@@ -361,6 -350,22 +361,22 @@@ static inline int of_machine_is_compati #define of_match_node(_matches, _node) NULL #endif /* CONFIG_OF */ + /** + * of_property_read_bool - Findfrom a property + * @np: device node from which the property value is to be read. + * @propname: name of the property to be searched. + * + * Search for a property in a device node. + * Returns true if the property exist false otherwise. + */ + static inline bool of_property_read_bool(const struct device_node *np, + const char *propname) + { + struct property *prop = of_find_property(np, propname, NULL); + + return prop ? true : false; + } + static inline int of_property_read_u32(const struct device_node *np, const char *propname, u32 *out_value)