<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/of/base.c, branch v3.17-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Merge branch 'devicetree/next-overlay' into devicetree/next</title>
<updated>2014-08-11T13:06:23+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-08-11T13:06:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=663d3f7c2e5e1b018a4c53277ccfde40329d98ca'/>
<id>663d3f7c2e5e1b018a4c53277ccfde40329d98ca</id>
<content type='text'>
Conflicts:
	drivers/of/testcase-data/testcases.dts
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/of/testcase-data/testcases.dts
</pre>
</div>
</content>
</entry>
<entry>
<title>of: Reorder device tree changes and notifiers</title>
<updated>2014-07-23T23:08:13+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-07-16T18:48:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=259092a35c7e11f1d4616b0f5b3ba7b851fe4fa6'/>
<id>259092a35c7e11f1d4616b0f5b3ba7b851fe4fa6</id>
<content type='text'>
Currently, devicetree reconfig notifiers get emitted before the change
is applied to the tree, but that behaviour is problematic if the
receiver wants the determine the new state of the tree. The current
users don't care, but the changeset code to follow will be making
multiple changes at once. Reorder notifiers to get emitted after the
change has been applied to the tree so that callbacks see the new tree
state.

At the same time, fixup the existing callbacks to expect the new order.
There are a few callbacks that compare the old and new values of a
changed property. Put both property pointers into the of_prop_reconfig
structure.

The current notifiers also allow the notifier callback to fail and
cancel the change to the tree, but that feature isn't actually used.
It really isn't valid to ignore a tree modification provided by firmware
anyway, so remove the ability to cancel a change to the tree.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Nathan Fontenot &lt;nfont@austin.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, devicetree reconfig notifiers get emitted before the change
is applied to the tree, but that behaviour is problematic if the
receiver wants the determine the new state of the tree. The current
users don't care, but the changeset code to follow will be making
multiple changes at once. Reorder notifiers to get emitted after the
change has been applied to the tree so that callbacks see the new tree
state.

At the same time, fixup the existing callbacks to expect the new order.
There are a few callbacks that compare the old and new values of a
changed property. Put both property pointers into the of_prop_reconfig
structure.

The current notifiers also allow the notifier callback to fail and
cancel the change to the tree, but that feature isn't actually used.
It really isn't valid to ignore a tree modification provided by firmware
anyway, so remove the ability to cancel a change to the tree.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Nathan Fontenot &lt;nfont@austin.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of: Move dynamic node fixups out of powerpc and into common code</title>
<updated>2014-07-23T23:05:46+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-07-16T05:25:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a25095d451ece23b1fef34474f3230100db7aa05'/>
<id>a25095d451ece23b1fef34474f3230100db7aa05</id>
<content type='text'>
PowerPC does an odd thing with dynamic nodes. It uses a notifier to
catch new node additions and set some of the values like name and type.
This makes no sense since that same code can be put directly into
of_attach_node(). Besides, all dynamic node users need this, not just
powerpc. Fix this problem by moving the logic out of arch/powerpc and
into drivers/of/dynamic.c.

It is also important to remove this notifier because we want to move the
firing of notifiers from before the tree is modified to after so that
the receiver gets a consistent view of the tree, but that is
incompatible with notifiers that modify the node.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Nathan Fontenot &lt;nfont@austin.ibm.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PowerPC does an odd thing with dynamic nodes. It uses a notifier to
catch new node additions and set some of the values like name and type.
This makes no sense since that same code can be put directly into
of_attach_node(). Besides, all dynamic node users need this, not just
powerpc. Fix this problem by moving the logic out of arch/powerpc and
into drivers/of/dynamic.c.

It is also important to remove this notifier because we want to move the
firing of notifiers from before the tree is modified to after so that
the receiver gets a consistent view of the tree, but that is
incompatible with notifiers that modify the node.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Nathan Fontenot &lt;nfont@austin.ibm.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of: Make devicetree sysfs update functions consistent.</title>
<updated>2014-07-23T23:05:06+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-07-23T23:05:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8a2b22a2595bf89d4396530edf8388159fad9d83'/>
<id>8a2b22a2595bf89d4396530edf8388159fad9d83</id>
<content type='text'>
All of the DT modification functions are split into two parts, the first
part manipulates the DT data structure, and the second part updates
sysfs, but the code isn't very consistent about how the second half is
called. They don't all enforce the same rules about when it is valid to
update sysfs, and there isn't any clarity on locking.

The transactional DT modification feature that is coming also needs
access to these functions so that it can perform all the structure
changes together, and then all the sysfs updates as a second stage
instead of doing each one at a time.

Fix up the second have by creating a separate __of_*_sysfs() function
for each of the helpers. The new functions have consistent naming (ie.
of_node_add() becomes __of_attach_node_sysfs()) and all of them now
defer if of_init hasn't been called yet.

Callers of the new functions must hold the of_mutex to ensure there are
no race conditions with of_init(). The mutex ensures that there will
only ever be one writer to the tree at any given time. There can still
be any number of readers and the raw_spin_lock is still used to make
sure access to the data structure is still consistent.

Finally, put the function prototypes into of_private.h so they are
accessible to the transaction code.

Signed-off-by: Pantelis Antoniou &lt;pantelis.antoniou@konsulko.com&gt;
[grant.likely: Changed suffix from _post to _sysfs to match existing code]
[grant.likely: Reorganized to eliminate trivial wrappers]
Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All of the DT modification functions are split into two parts, the first
part manipulates the DT data structure, and the second part updates
sysfs, but the code isn't very consistent about how the second half is
called. They don't all enforce the same rules about when it is valid to
update sysfs, and there isn't any clarity on locking.

The transactional DT modification feature that is coming also needs
access to these functions so that it can perform all the structure
changes together, and then all the sysfs updates as a second stage
instead of doing each one at a time.

Fix up the second have by creating a separate __of_*_sysfs() function
for each of the helpers. The new functions have consistent naming (ie.
of_node_add() becomes __of_attach_node_sysfs()) and all of them now
defer if of_init hasn't been called yet.

Callers of the new functions must hold the of_mutex to ensure there are
no race conditions with of_init(). The mutex ensures that there will
only ever be one writer to the tree at any given time. There can still
be any number of readers and the raw_spin_lock is still used to make
sure access to the data structure is still consistent.

Finally, put the function prototypes into of_private.h so they are
accessible to the transaction code.

Signed-off-by: Pantelis Antoniou &lt;pantelis.antoniou@konsulko.com&gt;
[grant.likely: Changed suffix from _post to _sysfs to match existing code]
[grant.likely: Reorganized to eliminate trivial wrappers]
Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of: Create unlocked versions of node and property add/remove functions</title>
<updated>2014-07-16T14:16:52+00:00</updated>
<author>
<name>Pantelis Antoniou</name>
<email>pantelis.antoniou@konsulko.com</email>
</author>
<published>2014-07-04T16:58:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d8c50088417ebf61ad8b132caad20d10f7736034'/>
<id>d8c50088417ebf61ad8b132caad20d10f7736034</id>
<content type='text'>
The DT overlay code will need to manipulate nodes and properties while
already holding the devicetree lock, or on nodes that are not yet
attached to the tree, but the current helper functions don't allow that.
Extract the core behaviour from the accessors and create the following
unlocked variants.

The unlocked variants require either the lock to already be held or for
the nodes to be detached from the tree. Changes to live nodes will not
get updated in sysfs, so the caller must arrange for housekeeping to
take place after dropping the lock.

The new functions are: __of_add_property(), __of_remove_property(),
__of_update_property(), __of_attach_node() and __of_detach_node().

Signed-off-by: Pantelis Antoniou &lt;pantelis.antoniou@konsulko.com&gt;
[Remove unnecessary diff hunks and rewrite commit text]
Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The DT overlay code will need to manipulate nodes and properties while
already holding the devicetree lock, or on nodes that are not yet
attached to the tree, but the current helper functions don't allow that.
Extract the core behaviour from the accessors and create the following
unlocked variants.

The unlocked variants require either the lock to already be held or for
the nodes to be detached from the tree. Changes to live nodes will not
get updated in sysfs, so the caller must arrange for housekeeping to
take place after dropping the lock.

The new functions are: __of_add_property(), __of_remove_property(),
__of_update_property(), __of_attach_node() and __of_detach_node().

Signed-off-by: Pantelis Antoniou &lt;pantelis.antoniou@konsulko.com&gt;
[Remove unnecessary diff hunks and rewrite commit text]
Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of: Move CONFIG_OF_DYNAMIC code into a separate file</title>
<updated>2014-07-07T12:59:45+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-06-26T14:40:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6afc0dc381573559251de9a8259404f49e6aed14'/>
<id>6afc0dc381573559251de9a8259404f49e6aed14</id>
<content type='text'>
Split the dynamic device tree code into a separate file to make it
really clear what features CONFIF_OF_DYNAMIC add to the kernel. Without
CONFIG_OF_DYNAMIC only properties can be changed, and notifiers do not
get sent. Enabling it turns on reference counting, notifiers and the
ability to add and remove nodes.

v2: Moved of_node_release() into dynamic.c

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Signed-off-by: Pantelis Antoniou &lt;pantelis.antoniou@konsulko.com&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Split the dynamic device tree code into a separate file to make it
really clear what features CONFIF_OF_DYNAMIC add to the kernel. Without
CONFIG_OF_DYNAMIC only properties can be changed, and notifiers do not
get sent. Enabling it turns on reference counting, notifiers and the
ability to add and remove nodes.

v2: Moved of_node_release() into dynamic.c

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Signed-off-by: Pantelis Antoniou &lt;pantelis.antoniou@konsulko.com&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of: rename of_aliases_mutex to just of_mutex</title>
<updated>2014-07-07T12:42:52+00:00</updated>
<author>
<name>Pantelis Antoniou</name>
<email>pantelis.antoniou@konsulko.com</email>
</author>
<published>2014-07-04T16:58:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c05aba2bd5f9dd3f363611ff844513de1341ac60'/>
<id>c05aba2bd5f9dd3f363611ff844513de1341ac60</id>
<content type='text'>
We're overloading usage of of_aliases_mutex for sysfs changes,
so rename to something that is more generic.

Signed-off-by: Pantelis Antoniou &lt;pantelis.antoniou@konsulko.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We're overloading usage of of_aliases_mutex for sysfs changes,
so rename to something that is more generic.

Signed-off-by: Pantelis Antoniou &lt;pantelis.antoniou@konsulko.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tty: Update hypervisor tty drivers to use core stdout parsing code.</title>
<updated>2014-06-26T16:12:23+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-03-28T15:12:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a752ee56ad84bf9a35b8323af1ad22b03c1df2c4'/>
<id>a752ee56ad84bf9a35b8323af1ad22b03c1df2c4</id>
<content type='text'>
The evh_bytechan, hvc_opal and hvc_vio drivers all open code the parsing
of the stdout node in the device tree. This patch simplifies the driver
by removing the duplicated functionality.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The evh_bytechan, hvc_opal and hvc_vio drivers all open code the parsing
of the stdout node in the device tree. This patch simplifies the driver
by removing the duplicated functionality.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of: Create of_console_check() for selecting a console specified in /chosen</title>
<updated>2014-06-26T16:12:22+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-03-28T00:18:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3482f2c52b77bf6596e24aae82e204a0603eba66'/>
<id>3482f2c52b77bf6596e24aae82e204a0603eba66</id>
<content type='text'>
The devicetree has a binding for specifying the console device in the
/chosen node, but the kernel doesn't use it consistently. This change
adds an API for testing if a device node is a console, and adds a
preferred console entry if it is.

At the same time this patch removes the of_device_is_stdout_path() API
since it is unused.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Tested-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The devicetree has a binding for specifying the console device in the
/chosen node, but the kernel doesn't use it consistently. This change
adds an API for testing if a device node is a console, and adds a
preferred console entry if it is.

At the same time this patch removes the of_device_is_stdout_path() API
since it is unused.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Tested-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>OF: fix of_find_node_by_path() assumption that of_allnodes is root</title>
<updated>2014-06-16T18:31:44+00:00</updated>
<author>
<name>Frank Rowand</name>
<email>frank.rowand@sonymobile.com</email>
</author>
<published>2014-06-15T03:39:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=99de64984c3a7c9bf56a50e6dcc51006c9485620'/>
<id>99de64984c3a7c9bf56a50e6dcc51006c9485620</id>
<content type='text'>
of_find_node_by_path() is borked because of_allnodes is not guaranteed to
contain the root of the tree after using any of the dynamic update functions
because some other nodes ends up as of_allnodes.

Fixes: c22e650e66b8 of: Make of_find_node_by_path() handle /aliases
Reported-by: pantelis.antoniou@konsulko.com
Signed-off-by: Frank Rowand &lt;frank.rowand@sonymobile.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
of_find_node_by_path() is borked because of_allnodes is not guaranteed to
contain the root of the tree after using any of the dynamic update functions
because some other nodes ends up as of_allnodes.

Fixes: c22e650e66b8 of: Make of_find_node_by_path() handle /aliases
Reported-by: pantelis.antoniou@konsulko.com
Signed-off-by: Frank Rowand &lt;frank.rowand@sonymobile.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
