<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/core/device.c, branch v2015.04</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>dm: introduce dev_get_addr interface</title>
<updated>2015-02-12T22:17:29+00:00</updated>
<author>
<name>Peng Fan</name>
<email>Peng.Fan@freescale.com</email>
</author>
<published>2015-02-10T06:46:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c9cac3f8413c1f67d1e1b7a1770e584584107cd2'/>
<id>c9cac3f8413c1f67d1e1b7a1770e584584107cd2</id>
<content type='text'>
Abstracting dev_get_addr can improve drivers that want to
get device's address.

Signed-off-by: Peng Fan &lt;Peng.Fan@freescale.com&gt;
Acked-by: Igor Grinberg &lt;grinberg@compulab.co.il&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Abstracting dev_get_addr can improve drivers that want to
get device's address.

Signed-off-by: Peng Fan &lt;Peng.Fan@freescale.com&gt;
Acked-by: Igor Grinberg &lt;grinberg@compulab.co.il&gt;
Acked-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Allow uclass to set up a device's child before it is probed</title>
<updated>2015-01-30T00:09:56+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-01-25T15:27:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=83c7e434c9dd3ca81f8b763e23c1881b973bcf2f'/>
<id>83c7e434c9dd3ca81f8b763e23c1881b973bcf2f</id>
<content type='text'>
Some buses need to set up their devices before they can be used. This setup
may well be common to all buses in a particular uclass. Support a common
pre-probe method for the uclass, called before any bus devices are probed.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some buses need to set up their devices before they can be used. This setup
may well be common to all buses in a particular uclass. Support a common
pre-probe method for the uclass, called before any bus devices are probed.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Allow uclasses to specify private data for a device's children</title>
<updated>2015-01-30T00:09:55+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-01-25T15:27:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=dac8db2ce66944828e441cccf25703b262a256cd'/>
<id>dac8db2ce66944828e441cccf25703b262a256cd</id>
<content type='text'>
In many cases the per-child private data for a device's children is defined
by the uclass rather than the individual driver. For example, a SPI bus
needs to store information about each of its children, but all SPI drivers
store the same information. It makes sense to allow the uclass to define
this data.

If the driver provides a size value for its per-child private data, then use
it. Failng that, fall back to that provided by the uclass.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In many cases the per-child private data for a device's children is defined
by the uclass rather than the individual driver. For example, a SPI bus
needs to store information about each of its children, but all SPI drivers
store the same information. It makes sense to allow the uclass to define
this data.

If the driver provides a size value for its per-child private data, then use
it. Failng that, fall back to that provided by the uclass.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Add a flag to control sequence numbering</title>
<updated>2015-01-30T00:09:55+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-01-25T15:27:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9cc36a2b89ebe5148d69d521745c1e1d26365c3a'/>
<id>9cc36a2b89ebe5148d69d521745c1e1d26365c3a</id>
<content type='text'>
At present we try to use the 'reg' property and device tree aliases to give
devices a sequence number. The 'reg' property is often actually a memory
address, so the sequence numbers thus-obtained are not useful. It would be
better if the devices were just sequentially numbered in that case. In fact
neither I2C nor SPI use this feature, so drop it.

Some devices need us to look up an alias to number them within the uclass.
Add a flag to control this, so it is not done unless it is needed.

Adjust the tests to test this new behaviour.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At present we try to use the 'reg' property and device tree aliases to give
devices a sequence number. The 'reg' property is often actually a memory
address, so the sequence numbers thus-obtained are not useful. It would be
better if the devices were just sequentially numbered in that case. In fact
neither I2C nor SPI use this feature, so drop it.

Some devices need us to look up an alias to number them within the uclass.
Add a flag to control this, so it is not done unless it is needed.

Adjust the tests to test this new behaviour.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Add a function to get a device's uclass ID</title>
<updated>2015-01-30T00:09:55+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-01-25T15:27:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b367053102e597eb21b0a5e86c63e8d10f368cb0'/>
<id>b367053102e597eb21b0a5e86c63e8d10f368cb0</id>
<content type='text'>
This is useful to check which uclass a device is in.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is useful to check which uclass a device is in.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Add a post_bind method for parents</title>
<updated>2015-01-30T00:09:55+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-01-25T15:27:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0118ce79577f9b0881f99a6e4f8a79cd5014cb87'/>
<id>0118ce79577f9b0881f99a6e4f8a79cd5014cb87</id>
<content type='text'>
Allow parent drivers to be called when a new child is bound to them. This
allows a bus to set up information it needs for that child.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow parent drivers to be called when a new child is bound to them. This
allows a bus to set up information it needs for that child.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Allow uclasses to specify platdata for a device's children</title>
<updated>2015-01-30T00:09:55+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-01-25T15:27:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ba8da9dc43ac8ae3351345df12dc7f9d1cd07ae0'/>
<id>ba8da9dc43ac8ae3351345df12dc7f9d1cd07ae0</id>
<content type='text'>
In many cases the child platform data for a device's children is defined by
the uclass rather than the individual devices. For example, a SPI bus needs
to know the chip select and speed for each of its children. It makes sense
to allow this information to be defined the SPI uclass rather than each
individual driver.

If the device provides a size value for its child platdata, then use it.
Failng that, fall back to that provided by the uclass.

Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In many cases the child platform data for a device's children is defined by
the uclass rather than the individual devices. For example, a SPI bus needs
to know the chip select and speed for each of its children. It makes sense
to allow this information to be defined the SPI uclass rather than each
individual driver.

If the device provides a size value for its child platdata, then use it.
Failng that, fall back to that provided by the uclass.

Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Allow parents to have platform data for their children</title>
<updated>2015-01-30T00:09:54+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-01-25T15:27:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=cdc133bde9dd221319b9cf7fd99fcb4da8ba195c'/>
<id>cdc133bde9dd221319b9cf7fd99fcb4da8ba195c</id>
<content type='text'>
For buses it is common for parents to need to know the address of the child
on the bus, the bus speed to use for that child, and other information. This
can be provided in platform data attached to each child.

Add driver model support for this, including auto-allocation which can be
requested using a new property to specify the size of the data.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For buses it is common for parents to need to know the address of the child
on the bus, the bus speed to use for that child, and other information. This
can be provided in platform data attached to each child.

Add driver model support for this, including auto-allocation which can be
requested using a new property to specify the size of the data.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Allocate platform data when binding a device</title>
<updated>2015-01-30T00:09:54+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-01-25T15:27:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f8a85449ef3e0963add728815771ccc09aa99875'/>
<id>f8a85449ef3e0963add728815771ccc09aa99875</id>
<content type='text'>
When using allocated platform data, allocate it when we bind the device.
This makes it possible to fill in this information before the device is
probed.

This fits with the platform data model (when not using device tree),
since platform data exists at bind-time.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using allocated platform data, allocate it when we bind the device.
This makes it possible to fill in this information before the device is
probed.

This fits with the platform data model (when not using device tree),
since platform data exists at bind-time.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Tidy up error handling in device_bind()</title>
<updated>2015-01-30T00:09:54+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-01-25T15:26:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=72ebfe86fac2ca0a0e1af9fe1eaa3a634e3e17a1'/>
<id>72ebfe86fac2ca0a0e1af9fe1eaa3a634e3e17a1</id>
<content type='text'>
Make the error handling more standard to make it easier to build on top of
it. Also correct a bug in the error path where there is no parent.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the error handling more standard to make it easier to build on top of
it. Also correct a bug in the error path where there is no parent.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
