- 03 2月, 2014 1 次提交
-
-
由 Pantelis Antoniou 提交于
Helper functions for working with device node flags. Signed-off-by: NPantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
- 24 1月, 2014 1 次提交
-
-
由 David Howells 提交于
Make for_each_child_of_node() reference its args when CONFIG_OF=n to avoid warnings like: drivers/leds/leds-pwm.c:88:22: warning: unused variable 'node' [-Wunused-variable] struct device_node *node = pdev->dev.of_node; ^ Signed-off-by: NDavid Howells <dhowells@redhat.com> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <robh+dt@kernel.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 04 11月, 2013 1 次提交
-
-
由 Sylwester Nawrocki 提交于
Add this empty macro definition so users can be compiled without excluding this macro call with preprocessor directives when CONFIG_OF is disabled. Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
- 31 10月, 2013 1 次提交
-
-
由 Sudeep KarkadaNagesha 提交于
Since the definition of_find_next_cache_node is architecture independent, the existing definition in powerpc can be moved to driver/of/base.c Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com> Signed-off-by: NSudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 26 10月, 2013 1 次提交
-
-
由 Bryan Wu 提交于
Some drivers keep counting available child by themselves. So introduce a new simple API like of_get_child_count() but for available childs. Cc: Josh Wu <josh.wu@atmel.com> Signed-off-by: NBryan Wu <cooloney@gmail.com> Acked-by: NRob Herring <rob.herring@calxeda.com>
-
- 24 10月, 2013 1 次提交
-
-
由 Grant Likely 提交于
It is sometimes useful for debug to get the contents of an of_phandle_args structure out into the kernel log. Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
- 10 10月, 2013 2 次提交
-
-
由 Rob Herring 提交于
The dependency on prom.h by the core DT code is now removed and only sparc needs to include prom.h for the core code. Signed-off-by: NRob Herring <rob.herring@calxeda.com> Acked-by: NGrant Likely <grant.likely@linaro.org>
-
由 Rob Herring 提交于
Implement of_node_to_nid as weak function to remove the dependency on asm/prom.h. This is in preparation to make prom.h optional. Signed-off-by: NRob Herring <rob.herring@calxeda.com> Acked-by: NGrant Likely <grant.likely@linaro.org>
-
- 30 8月, 2013 1 次提交
-
-
由 Stephen Warren 提交于
This is identical to of_parse_phandle_with_args(), except that the number of argument cells is fixed, rather than being parsed out of the node referenced by each phandle. Signed-off-by: NStephen Warren <swarren@nvidia.com> Acked-by: NMark Rutland <mark.rutland@arm.com> Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
- 21 8月, 2013 1 次提交
-
-
由 Sudeep KarkadaNagesha 提交于
This patch moves the generalized implementation of of_get_cpu_node from PowerPC to DT core library, thereby adding support for retrieving cpu node for a given logical cpu index on any architecture. The CPU subsystem can now use this function to assign of_node in the cpu device while registering CPUs. It is recommended to use these helper function only in pre-SMP/early initialisation stages to retrieve CPU device node pointers in logical ordering. Once the cpu devices are registered, it can be retrieved easily from cpu device of_node which avoids unnecessary parsing and matching. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Grant Likely <grant.likely@linaro.org> Acked-by: NRob Herring <rob.herring@calxeda.com> Signed-off-by: NSudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
-
- 13 8月, 2013 1 次提交
-
-
由 Sascha Hauer 提交于
devicetrees may have a linux,stdout-path property in the chosen node describing the console device. This adds a helper function to match a device against this property so a driver can call add_preferred_console for a matching device. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Acked-by: NRob Herring <rob.herring@calxeda.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 24 7月, 2013 1 次提交
-
-
I am getting a few |warning: unused variable ‘p’ [-Wunused-variable] |warning: unused variable ‘prop’ [-Wunused-variable] in the case where CONFIG_OF is not defined and the parameters are only used in the loop macro. Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NGrant Likely <grant.likely@linaro.org>
-
- 02 5月, 2013 1 次提交
-
-
由 David Howells 提交于
Move some bits from linux/proc_fs.h to linux/of.h, signal.h and tty.h. Also move proc_tty_init() and proc_device_tree_init() to fs/proc/internal.h as they're internal to procfs. Signed-off-by: NDavid Howells <dhowells@redhat.com> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NGrant Likely <grant.likely@secretlab.ca> cc: devicetree-discuss@lists.ozlabs.org cc: linux-arch@vger.kernel.org cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> cc: Jri Slaby <jslaby@suse.cz> Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 12 4月, 2013 1 次提交
-
-
由 Rob Herring 提交于
Add an empty version of of_device_is_available. Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
- 10 4月, 2013 1 次提交
-
-
由 Alexander Shiyan 提交于
Fixes build error on x86_64 allmodconfig, introduced by commit 5ab3a89a ("mfd: syscon: Add non-DT support"). drivers/regulator/anatop-regulator.c: In function 'anatop_regulator_probe': drivers/regulator/anatop-regulator.c:134:2: error: implicit declaration of function 'of_get_parent' [-Werror=implicit-function-declaration] Signed-off-by: NAlexander Shiyan <shc_work@mail.ru> Acked-by: NRob Herring <rob.herring@calxeda.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
- 04 4月, 2013 1 次提交
-
-
由 Tony Prisk 提交于
This patch adds an of_property_read_u32_index() function to allow reading a single indexed u32 value from a property containing multiple u32 values. Signed-off-by: NTony Prisk <linux@prisktech.co.nz> Reviewed-by: NStephen Warren <swarren@nvidia.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NRob Herring <robherring2@gmail.com>
-
- 13 2月, 2013 1 次提交
-
-
由 Grant Likely 提交于
This patch creates of_count_phandle_with_args(), a new function for counting the number of phandle+argument tuples in a given property. This is better than the existing method of parsing each phandle individually until parsing fails which is a horribly slow way to do the count. Tested on ARM using the selftest code. v3: - Rebased on top of selftest code cleanup patch v2: - fix bug where of_parse_phandle_with_args() could behave like _count_. - made of_gpio_named_count() into a static inline regardless of CONFIG_OF_GPIO Tested-by: NAndreas Larsson <andreas@gaisler.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com>
-
- 09 2月, 2013 1 次提交
-
-
由 Thomas Gleixner 提交于
With the locking cleanup in place (from "OF: Fixup resursive locking code paths"), we can now do the conversion from the rw_lock to a raw spinlock as required for preempt-rt. The previous cleanup and this conversion were originally separate since they predated when mainline got raw spinlock (in commit c2f21ce2 "locking: Implement new raw_spinlock"). So, at that point in time, the cleanup was considered plausible for mainline, but not this conversion. In any case, we've kept them separate as it makes for easier review and better bisection. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> [PG: taken from preempt-rt, update subject & add a commit log] Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
- 06 2月, 2013 1 次提交
-
-
由 Steffen Trumtrar 提交于
As the function just returns the np->full_name or the string "<no-node>", the passed device_node pointer is not changed in any way. The passed parameter can therefore be a const pointer. Also, fix the following error from checkpatch.pl: ERROR: "foo* bar" should be "foo *bar" +static inline const char* of_node_full_name(const struct device_node *np) Signed-off-by: NSteffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 12 12月, 2012 1 次提交
-
-
由 Guennadi Liakhovetski 提交于
The "struct device_node *" argument of of_parse_phandle_with_args() can be const. Making this change makes it explicit that the function will not modify a node. Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de> [grant.likely: Resolved conflict with previous patch modifying of_parse_phandle()] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 30 11月, 2012 2 次提交
-
-
由 Randy Dunlap 提交于
ERROR: "allnodes" [drivers/w1/masters/w1-gpio.ko] undefined! Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> [grant.likely: allnodes is too generic; rename to of_allnodes] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Cc: Ville Syrjala <syrjala@sci.fi>
-
由 Steffen Trumtrar 提交于
The existing function does not change the passed device_node pointer. It is only handed to of_get_property which itself takes a const struct device_node. of_parse_phandle() can therefore take a const pointer as well. Signed-off-by: NSteffen Trumtrar <s.trumtrar@pengutronix.de> [grant.likely: drop extraneous whitespace change] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 21 11月, 2012 2 次提交
-
-
由 Stephen Warren 提交于
The following pattern of code is tempting: for_each_matching_node(np, table) { match = of_match_node(table, np); However, this results in iterating over table twice; the second time inside of_match_node(). The implementation of for_each_matching_node() already found the match, so this is redundant. Invent new function of_find_matching_node_and_match() and macro for_each_matching_node_and_match() to remove the double iteration, thus transforming the above code to: for_each_matching_node_and_match(np, table, &match) Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
由 Viresh Kumar 提交于
This adds following helper routines: - of_property_read_u8_array() - of_property_read_u16_array() - of_property_read_u8() - of_property_read_u16() This expects arrays from DT to be passed as: - u8 array: property = /bits/ 8 <0x50 0x60 0x70>; - u16 array: property = /bits/ 16 <0x5000 0x6000 0x7000>; Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Reviewed-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
- 17 11月, 2012 1 次提交
-
-
由 Grant Likely 提交于
Neither of these should ever be changed once set. Make them const and fix up the users that try to modify it in-place. In one case kmalloc+memcpy is replaced with kstrdup() to avoid modifying the string. Build tested with defconfigs on ARM, PowerPC, Sparc, MIPS, x86 among others. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NDavid S. Miller <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Julian Calaby <julian.calaby@gmail.com>
-
- 15 11月, 2012 2 次提交
-
-
由 Nathan Fontenot 提交于
Rename the prom_*_property routines of the generic OF code to of_*_property. This brings them in line with the naming used by the rest of the OF code. Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com> Acked-by: NGeoff Levand <geoff@infradead.org> Acked-by: NRob Herring <rob.herring@calxeda.com> Acked-by: NGrant Likely <grant.likely@secretlab.ca> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
由 Nathan Fontenot 提交于
This patch moves the notification chain for updates to the device tree from the powerpc/pseries code to the base OF code. This makes this functionality available to all architectures. Additionally the notification chain is updated to allow notifications for property add/remove/update. To make this work a pointer to a new struct (of_prop_reconfig) is passed to the routines in the notification chain. The of_prop_reconfig property contains a pointer to the node containing the property and a pointer to the property itself. In the case of property updates, the property pointer refers to the new property. Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com> Acked-by: NRob Herring <rob.herring@calxeda.com> Acked-by: NGrant Likely <grant.likely@secretlab.ca> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 18 10月, 2012 1 次提交
-
-
由 Olof Johansson 提交于
Fixes build error on s3c6400_defconfig, introduced by commit 06455bbc, "dt/s3c64xx/spi: Use of_get_child_by_name to get a named child". drivers/spi/spi-s3c64xx.c: In function 's3c64xx_get_slave_ctrldata': drivers/spi/spi-s3c64xx.c:838:2: error: implicit declaration of function 'of_get_child_by_name' [-Werror=implicit-function-declaration] Signed-off-by: NOlof Johansson <olof@lixom.net> Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
- 01 10月, 2012 1 次提交
-
-
由 Srinivas Kandagatla 提交于
This patch introduces of_get_child_by_name function to get a child node by its name in a given parent node. Without this patch each driver code has to iterate the parent and do a string compare, However having of_get_child_by_name libary function would avoid code duplication, errors and is more convenient. Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
- 22 9月, 2012 1 次提交
-
-
由 Peter Ujfalusi 提交于
This commit adds an empty of_find_node_by_name() function for !CONFIG_OF builds. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 18 9月, 2012 1 次提交
-
-
由 Peter Ujfalusi 提交于
This commit adds an empty of_find_node_by_name() function for !CONFIG_OF builds. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
- 20 8月, 2012 1 次提交
-
-
由 Timur Tabi 提交于
Macro for_each_child_of_node() makes it easy to iterate over all of the children for a given device tree node, including those nodes that are marked as unavailable (i.e. status = "disabled"). Introduce for_each_available_child_of_node(), which is like for_each_child_of_node(), but it automatically skips unavailable nodes. This also requires the introduction of helper function of_get_next_available_child(), which returns the next available child node. Signed-off-by: NTimur Tabi <timur@freescale.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 11 7月, 2012 1 次提交
-
-
由 Dong Aisheng 提交于
prom_update_property() currently fails if the property doesn't actually exist yet which isn't what we want. Change to add-or-update instead of update-only, then we can remove a lot duplicated lines. Suggested-by: NGrant Likely <grant.likely@secretlab.ca> Signed-off-by: NDong Aisheng <dong.aisheng@linaro.org> Acked-by: NRob Herring <rob.herring@calxeda.com> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 06 7月, 2012 1 次提交
-
-
由 Grant Likely 提交于
The pattern (np ? np->full_name : "<none>") is rather common in the kernel, but can also make for quite long lines. This patch adds a new inline function, of_node_full_name() so that the test for a valid node pointer doesn't need to be open coded at all call sites. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
- 16 6月, 2012 2 次提交
-
-
由 Paul Mundt 提交于
While common irqdesc allocation is node aware, the irqdomain code is not. Presently we observe a number of regressions/inconsistencies on NUMA-capable platforms: - Platforms using irqdomains with legacy mappings, where the irq_descs are allocated node-local and the irqdomain data structure is not. - Drivers implementing irqdomains will lose node locality regardless of the underlying struct device's node id. This plugs in NUMA node id proliferation across the various allocation callsites by way of_node_to_nid() node lookup. While of_node_to_nid() does the right thing for OF-capable platforms it doesn't presently handle the non-DT case. This is trivially dealt with by simply wraping in to numa_node_id() unconditionally. Signed-off-by: NPaul Mundt <lethal@linux-sh.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Rob Herring <rob.herring@calxeda.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Grant Likely 提交于
The pattern (np ? np->full_name : "<none>") is rather common in the kernel, but can also make for quite long lines. This patch adds a new inline function, of_node_full_name() so that the test for a valid node pointer doesn't need to be open coded at all call sites. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de>
-
- 15 6月, 2012 2 次提交
-
-
由 Thierry Reding 提交于
This commit adds an empty of_parse_phandle_with_args() function for !CONFIG_OF builds. Acked-by: NRob Herring <rob.herring@calxeda.com> Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
-
由 Thierry Reding 提交于
This commit adds an empty of_property_match_string() function for !CONFIG_OF builds. Acked-by: NRob Herring <rob.herring@calxeda.com> Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
-
- 02 5月, 2012 1 次提交
-
-
由 Dong Aisheng 提交于
Currently most code to get child count in kernel are almost same, add a helper to implement this function for dt to use. Cc: Grant Likely <grant.likely@secretlab.ca> Acked-by: NRob Herring <rob.herring@calxeda.com> Acked-by: NStephen Warren <swarren@wwwdotorg.org> Signed-off-by: NDong Aisheng <dong.aisheng@linaro.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 18 4月, 2012 1 次提交
-
-
由 Stephen Warren 提交于
This patch adds macros of_property_for_each_u32() and of_property_for_each_string(), which iterate over an array of values within a device-tree property. Usage is for example: struct property *prop; const __be32 *p; u32 u; of_property_for_each_u32(np, "propname", prop, p, u) printk("U32 value: %x\n", u); struct property *prop; const char *s; of_property_for_each_string(np, "propname", prop, s) printk("String value: %s\n", s); Based on work by Rob Herring <robherring2@gmail.com> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: NStephen Warren <swarren@nvidia.com> Acked-by: NRob Herring <rob.herring@calxeda.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-