<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/of_device.h, branch v3.18.22</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.22</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.22'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2014-02-05T16:04:37Z</updated>
<entry>
<title>of/device: Nullify match table in of_match_device() for CONFIG_OF=n</title>
<updated>2014-02-05T16:04:37Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@linux-m68k.org</email>
</author>
<published>2014-02-03T08:27:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1db73ae39a97797b7d929eca2af469f82fbb337a'/>
<id>urn:sha1:1db73ae39a97797b7d929eca2af469f82fbb337a</id>
<content type='text'>
If the of_device_id table inside a device driver is protected by #ifdef
CONFIG_OF, the driver still has to provide a dummy declaration of the
table, or wrap it inside of_match_ptr(), when calling of_match_device()
in the CONFIG_OF=n case, else the driver fails to compile with e.g.

drivers/spi/spi-rspi.c: In function 'rspi_probe':
drivers/spi/spi-rspi.c:1203:26: error: 'rspi_of_match' undeclared (first use in this function)
drivers/spi/spi-rspi.c:1203:26: note: each undeclared identifier is reported only once for each function it appears in

Make of_match_device() nullify the table pointer if CONFIG_OF=n to fix
this.

Reported-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@linux-m68k.org&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>platform: introduce OF style 'modalias' support for platform bus</title>
<updated>2014-01-17T00:59:15Z</updated>
<author>
<name>Zhang Rui</name>
<email>rui.zhang@intel.com</email>
</author>
<published>2014-01-14T08:46:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b9f73067f32531db608e469a9ad20ce631e34550'/>
<id>urn:sha1:b9f73067f32531db608e469a9ad20ce631e34550</id>
<content type='text'>
Fix a problem that, the platform bus supports the OF style modalias
in .uevent() call, but not in its device 'modalias' sysfs attribute.

Signed-off-by: Zhang Rui &lt;rui.zhang@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>of/device: add helper to get cpu device node from logical cpu index</title>
<updated>2013-08-21T09:29:51Z</updated>
<author>
<name>Sudeep KarkadaNagesha</name>
<email>sudeep.karkadanagesha@arm.com</email>
</author>
<published>2013-07-18T10:22:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bd00860e960e52658cebfd65eeb4748ed6ff039f'/>
<id>urn:sha1:bd00860e960e52658cebfd65eeb4748ed6ff039f</id>
<content type='text'>
Multiple drivers need to get the cpu device node from the cpu logical
index and then access the of_node.

This patch adds helper function to fetch the device node directly.

Acked-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Signed-off-by: Sudeep KarkadaNagesha &lt;sudeep.karkadanagesha@arm.com&gt;
</content>
</entry>
<entry>
<title>of: remove CONFIG_OF_DEVICE</title>
<updated>2013-06-12T11:37:40Z</updated>
<author>
<name>Rob Herring</name>
<email>rob.herring@calxeda.com</email>
</author>
<published>2013-04-19T22:32:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ba166e900b502b74b9425881caa94f94891b0a1f'/>
<id>urn:sha1:ba166e900b502b74b9425881caa94f94891b0a1f</id>
<content type='text'>
CONFIG_OF_DEVICE is always selected when CONFIG_OF is enabled, so remove
it and simplify of_platform.h and of_device.h headers. This also fixes
!OF compiles using of_platform_populate.

Signed-off-by: Rob Herring &lt;rob.herring@calxeda.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Tested-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'device-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux</title>
<updated>2012-03-24T17:41:37Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-03-24T17:41:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=250f6715a4112d6686670c5a62ceb9305da94616'/>
<id>urn:sha1:250f6715a4112d6686670c5a62ceb9305da94616</id>
<content type='text'>
Pull &lt;linux/device.h&gt; avoidance patches from Paul Gortmaker:
 "Nearly every subsystem has some kind of header with a proto like:

	void foo(struct device *dev);

  and yet there is no reason for most of these guys to care about the
  sub fields within the device struct.  This allows us to significantly
  reduce the scope of headers including headers.  For this instance, a
  reduction of about 40% is achieved by replacing the include with the
  simple fact that the device is some kind of a struct.

  Unlike the much larger module.h cleanup, this one is simply two
  commits.  One to fix the implicit &lt;linux/device.h&gt; users, and then one
  to delete the device.h includes from the linux/include/ dir wherever
  possible."

* tag 'device-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
  device.h: audit and cleanup users in main include dir
  device.h: cleanup users outside of linux/include (C files)
</content>
</entry>
<entry>
<title>device.h: audit and cleanup users in main include dir</title>
<updated>2012-03-16T14:38:24Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2012-01-30T16:46:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=313162d0b83836e2f57e51b9b8650fb4b9c396ea'/>
<id>urn:sha1:313162d0b83836e2f57e51b9b8650fb4b9c396ea</id>
<content type='text'>
The &lt;linux/device.h&gt; header includes a lot of stuff, and
it in turn gets a lot of use just for the basic "struct device"
which appears so often.

Clean up the users as follows:

1) For those headers only needing "struct device" as a pointer
in fcn args, replace the include with exactly that.

2) For headers not really using anything from device.h, simply
delete the include altogether.

3) For headers relying on getting device.h implicitly before
being included themselves, now explicitly include device.h

4) For files in which doing #1 or #2 uncovers an implicit
dependency on some other header, fix by explicitly adding
the required header(s).

Any C files that were implicitly relying on device.h to be
present have already been dealt with in advance.

Total removals from #1 and #2: 51.  Total additions coming
from #3: 9.  Total other implicit dependencies from #4: 7.

As of 3.3-rc1, there were 110, so a net removal of 42 gives
about a 38% reduction in device.h presence in include/*

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>drivercore: Output common devicetree information in uevent</title>
<updated>2012-02-01T21:26:30Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2012-02-01T18:22:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=07d57a32fb6eb2da017796e038682f817a4f685e'/>
<id>urn:sha1:07d57a32fb6eb2da017796e038682f817a4f685e</id>
<content type='text'>
When userspace needs to find a specific device, it currently isn't easy to
resolve a /sys/devices/ path from a specific device tree node.  Nor is it
easy to obtain the compatible list for devices.

This patch generalizes the code that inserts OF_* values into the uevent
device attribute so that any device that is attached to an OF node will
have that information exported to userspace.  Without this patch only
platform devices and some powerpc-specific busses have access to this
data.

The original function also creates a MODALIAS property for the compatible
list, but that code has not been generalized into the common case because
it has the potential to break module loading on a lot of bus types.  Bus
types are still responsible for their own MODALIAS properties.

Boot tested on ARM and compile tested on PowerPC and SPARC.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Cc: Frederic Lambert &lt;frdrc66@gmail.com&gt;
Cc: Rob Herring &lt;rob.herring@calxeda.com&gt;
Cc: Mark Brown &lt;broonie@sirena.org.uk&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>drivercore: revert addition of of_match to struct device</title>
<updated>2011-05-18T18:32:23Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-05-18T17:19:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b1608d69cb804e414d0887140ba08a9398e4e638'/>
<id>urn:sha1:b1608d69cb804e414d0887140ba08a9398e4e638</id>
<content type='text'>
Commit b826291c, "drivercore/dt: add a match table pointer to struct
device" added an of_match pointer to struct device to cache the
of_match_table entry discovered at driver match time.  This was unsafe
because matching is not an atomic operation with probing a driver.  If
two or more drivers are attempted to be matched to a driver at the
same time, then the cached matching entry pointer could get
overwritten.

This patch reverts the of_match cache pointer and reworks all users to
call of_match_device() directly instead.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of: fix race when matching drivers</title>
<updated>2011-05-18T16:19:36Z</updated>
<author>
<name>Milton Miller</name>
<email>miltonm@bga.com</email>
</author>
<published>2011-05-18T15:27:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=01294d82622d6d9d64bde8e4530c7e2c6dbb6ee6'/>
<id>urn:sha1:01294d82622d6d9d64bde8e4530c7e2c6dbb6ee6</id>
<content type='text'>
If two drivers are probing devices at the same time, both will write
their match table result to the dev-&gt;of_match cache at the same time.

Only write the result if the device matches.

In a thread titled "SBus devices sometimes detected, sometimes not",
Meelis reported his SBus hme was not detected about 50% of the time.
From the debug suggested by Grant it was obvious another driver matched
some devices between the call to match the hme and the hme discovery
failling.

Reported-by: Meelis Roos &lt;mroos@linux.ee&gt;
Signed-off-by: Milton Miller &lt;miltonm@bga.com&gt;
[grant.likely: modified to only call of_match_device() once]
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>drivercore/dt: add a match table pointer to struct device</title>
<updated>2011-02-28T08:36:38Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-02-17T09:37:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b826291c14c396e7aa5d84523aafac117f430902'/>
<id>urn:sha1:b826291c14c396e7aa5d84523aafac117f430902</id>
<content type='text'>
Add a new .of_match field to struct device which points at the
matching device driver .of_match_table entry when a device is probed
via the device tree

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
</feed>
