13 Oct, 2008
1 commit
-
The helper is factored out of of_get_gpio(). Will be used by the QE
pin multiplexing functions (they need to parse the gpios = <> too).Signed-off-by: Anton Vorontsov
Signed-off-by: Benjamin Herrenschmidt
26 Jul, 2008
1 commit
-
SPI has a similar problem as I2C in that it needs to determine an
appropriate modalias value for each device node. This patch adapts
the of_i2c of_find_i2c_driver() function to be usable by of_spi also.Signed-off-by: Grant Likely
07 Apr, 2008
1 commit
-
IEEE 1275 defined a standard "status" property to indicate the operational
status of a device. The property has four possible values: okay, disabled,
fail, fail-xxx. The absence of this property means the operational status
of the device is unknown or okay.This adds a function called of_device_is_available that checks the state
of the status property of a device. If the property is absent or set to
either "okay" or "ok", it returns 1. Otherwise it returns 0.Signed-off-by: Josh Boyer
Signed-off-by: Paul Mackerras
06 Feb, 2008
1 commit
-
Iterating through a device node's parents is simple enough, but dealing
with the refcounts properly is a little ugly, and replicating that logic
is asking for someone to get it wrong or forget it all together, eg:while (dn != NULL) {
/* loop body */
tmp = of_get_parent(dn);
of_node_put(dn);
dn = tmp;
}So add of_get_next_parent(), inspired by of_get_next_child(). The
contract is that it returns the parent and drops the reference on the
current node, this makes the loop look like:while (dn != NULL) {
/* loop body */
dn = of_get_next_parent(dn);
}Signed-off-by: Michael Ellerman
Acked-by: David S. Miller
Signed-off-by: Paul Mackerras
17 Jan, 2008
1 commit
-
Similar to of_find_compatible_node(), of_find_matching_node() and
for_each_matching_node() allow you to iterate over the device tree
looking for specific nodes, except that they take of_device_id
tables instead of strings.This also moves of_match_node() from driver/of/device.c to
driver/of/base.c to colocate it with the of_find_matching_node which
depends on it.Signed-off-by: Grant Likely
Signed-off-by: Paul Mackerras
11 Dec, 2007
1 commit
-
Add for_each_child_of_node() to encapsulate the common idiom of
iterating over the children of a device_node.Signed-off-by: Michael Ellerman
Acked-by: Stephen Rothwell
Signed-off-by: Paul Mackerras
20 Oct, 2007
1 commit
-
remove asm/bitops.h includes
including asm/bitops directly may cause compile errors. don't include it
and include linux/bitops instead. next patch will deny including asm header
directly.Cc: Adrian Bunk
Signed-off-by: Jiri Slaby
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Aug, 2007
1 commit
-
They were only needed for backwards compatibility and all in tree uses
have now been changed.Signed-off-by: Stephen Rothwell
Acked-by: David S. Miller
Signed-off-by: Paul Mackerras
20 Jul, 2007
1 commit
-
This creates linux/of.h and includes asm/prom.h from it.
We also include linux/of.h from asm/prom.h while we transition.
Signed-off-by: Stephen Rothwell
Acked-by: Paul Mackerras
Acked-by: David S. Miller