<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/base/property.c, branch linux-4.13.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.13.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.13.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-10-18T07:38:29Z</updated>
<entry>
<title>device property: Track owner device of device property</title>
<updated>2017-10-18T07:38:29Z</updated>
<author>
<name>Jarkko Nikula</name>
</author>
<published>2017-10-09T13:28:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b721d706eafa336d4904e50de5df3e10bf158c31'/>
<id>urn:sha1:b721d706eafa336d4904e50de5df3e10bf158c31</id>
<content type='text'>
commit 5ab894aee0f171a682bcd90dd5d1930cb53c55dc upstream.

Deletion of subdevice will remove device properties associated to parent
when they share the same firmware node after commit 478573c93abd (driver
core: Don't leak secondary fwnode on device removal).  This was observed
with a driver adding subdevice that driver wasn't able to read device
properties after rmmod/modprobe cycle.

Consider the lifecycle of it:

parent device registration
	ACPI_COMPANION_SET()
	device_add_properties()
		pset_copy_set()
		set_secondary_fwnode(dev, &amp;p-&gt;fwnode)
	device_add()

parent probe
	read device properties
	ACPI_COMPANION_SET(subdevice, ACPI_COMPANION(parent))
	device_add(subdevice)

parent remove
	device_del(subdevice)
		device_remove_properties()
			set_secondary_fwnode(dev, NULL);
			pset_free()

Parent device will have its primary firmware node pointing to an ACPI
node and secondary firmware node point to device properties.

ACPI_COMPANION_SET() call in parent probe will set the subdevice's
firmware node to point to the same 'struct fwnode_handle' and the
associated secondary firmware node, i.e. the device properties as the
parent.

When subdevice is deleted in parent remove that will remove those
device properties and attempt to read device properties in next
parent probe call will fail.

Fix this by tracking the owner device of device properties and delete
them only when owner device is being deleted.

Fixes: 478573c93abd (driver core: Don't leak secondary fwnode on device removal)
Signed-off-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>device property: Introduce fwnode_call_bool_op() for ops that return bool</title>
<updated>2017-07-12T11:32:46Z</updated>
<author>
<name>Sakari Ailus</name>
</author>
<published>2017-07-11T15:20:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e8158b486d5f3f55cf372c5a32b42f263bf7f123'/>
<id>urn:sha1:e8158b486d5f3f55cf372c5a32b42f263bf7f123</id>
<content type='text'>
fwnode_call_int_op() isn't suitable for calling ops that return bool
since it effectively causes the result returned to the user to be
true when an op hasn't been defined or the fwnode is NULL.

Address this by introducing fwnode_call_bool_op() for calling ops
that return bool.

Fixes: 3708184afc77 "device property: Move FW type specific functionality to FW specific files"
Fixes: 2294b3af05e9 "device property: Introduce fwnode_device_is_available()"
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>device property: Add fwnode_graph_get_port_parent</title>
<updated>2017-06-22T00:55:34Z</updated>
<author>
<name>Kieran Bingham</name>
</author>
<published>2017-06-06T09:37:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6a71d8d77795e0f7d887baa95bfc0d1d2bc74899'/>
<id>urn:sha1:6a71d8d77795e0f7d887baa95bfc0d1d2bc74899</id>
<content type='text'>
Provide a helper to obtain the parent device fwnode without first
parsing the remote-endpoint as per fwnode_graph_get_remote_port_parent.

Signed-off-by: Kieran Bingham &lt;kieran.bingham+renesas@ideasonboard.com&gt;
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>device property: Add FW type agnostic fwnode_graph_get_remote_node</title>
<updated>2017-06-22T00:55:34Z</updated>
<author>
<name>Sakari Ailus</name>
</author>
<published>2017-06-06T09:37:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=125ee6b3b0fa920c730b0991e6f083a9f5b1e4c3'/>
<id>urn:sha1:125ee6b3b0fa920c730b0991e6f083a9f5b1e4c3</id>
<content type='text'>
Add fwnode_graph_get_remote_node() function which is equivalent to
of_graph_get_remote_node() on OF.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>device property: Introduce fwnode_device_is_available()</title>
<updated>2017-06-22T00:55:34Z</updated>
<author>
<name>Sakari Ailus</name>
</author>
<published>2017-06-06T09:37:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2294b3af05e9b3fe0b84a78971e709037bd7593c'/>
<id>urn:sha1:2294b3af05e9b3fe0b84a78971e709037bd7593c</id>
<content type='text'>
Add fwnode_device_is_available() to tell whether the device corresponding
to a certain fwnode_handle is available for use.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>device property: Move fwnode graph ops to firmware specific locations</title>
<updated>2017-06-22T00:55:34Z</updated>
<author>
<name>Sakari Ailus</name>
</author>
<published>2017-06-06T09:37:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3b27d00e7b6d7c889d87fd00df600c495b968e30'/>
<id>urn:sha1:3b27d00e7b6d7c889d87fd00df600c495b968e30</id>
<content type='text'>
Move firmware specific implementations of the fwnode graph operations to
firmware specific locations.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>device property: Move FW type specific functionality to FW specific files</title>
<updated>2017-06-22T00:55:34Z</updated>
<author>
<name>Sakari Ailus</name>
</author>
<published>2017-06-06T09:37:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3708184afc77bb67709a67a35d9f367ebd32cbc4'/>
<id>urn:sha1:3708184afc77bb67709a67a35d9f367ebd32cbc4</id>
<content type='text'>
The device and fwnode property API supports Devicetree, ACPI and pset
properties. The implementation of this functionality for each firmware
type was embedded in the fwnode property core. Move it out to firmware
type specific locations, making it easier to maintain.

Depends-on: ("of: Move OF property and graph API from base.c to property.c")
Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>device property: Read strings using string array reading functions</title>
<updated>2017-03-29T20:59:40Z</updated>
<author>
<name>Sakari Ailus</name>
</author>
<published>2017-03-28T12:26:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e48174779440c79ff5dd75f0e6b169d4e184262d'/>
<id>urn:sha1:e48174779440c79ff5dd75f0e6b169d4e184262d</id>
<content type='text'>
Always read strings using of_property_read_string_array() instead of
of_property_read_string(). This allows using a single operation struct
callback for accessing strings.

Same for pset_prop_read_string_array() and pset_prop_read_string().

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>device property: fwnode_property_read_string_array() returns nr of strings</title>
<updated>2017-03-28T22:00:30Z</updated>
<author>
<name>Sakari Ailus</name>
</author>
<published>2017-03-28T12:22:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b0b027cee090a1e3278960e1c8257213fda40f10'/>
<id>urn:sha1:b0b027cee090a1e3278960e1c8257213fda40f10</id>
<content type='text'>
Functionally fwnode_property_read_string_array() should match
of_property_read_string_array() and work as a drop-in substitute for the
latter. of_property_read_string_array() returns the number of strings read
if the target string pointer array is non-NULL. Make
fwnode_property_read_string_array() do the same.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>device property: Fix reading pset strings using array access functions</title>
<updated>2017-03-28T22:00:30Z</updated>
<author>
<name>Sakari Ailus</name>
</author>
<published>2017-03-28T12:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0f194992c85f972ee99f176eb78a5860cef78573'/>
<id>urn:sha1:0f194992c85f972ee99f176eb78a5860cef78573</id>
<content type='text'>
The length field value of non-array string properties is the length of the
string itself. Non-array string properties thus require specific handling.
Fix this.

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
