<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/platform_device.h, branch T20_LinuxImageV2.0Beta1_20121218</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>drivercore: Generalize module_platform_driver</title>
<updated>2012-04-16T10:49:10+00:00</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2011-11-16T09:13:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e05aca5fe7209a88c6af141cac4dd93365d1abf9'/>
<id>e05aca5fe7209a88c6af141cac4dd93365d1abf9</id>
<content type='text'>
This patch generalizes the module_platform_driver macro and introduces a new
module_driver macro. The module_driver macro takes a driver name, a register
and a unregister function for this driver type. Using these it construct the
module init and exit sections which register and unregister the driver. Since
such init/exit sections are commonly found in drivers this macro can be used
to eliminate a lot of boilerplate code.

The macro is not intended to be used by driver modules directly, instead it
should be used to generate bus specific macros for registering drivers like
the module_platform_driver macro.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Acked-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Acked-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

Cherry-picked from mainline commit
	907d0ed1c84114d4e8dafd66af982515d3739c90

Change-Id: Ib83ecc2ca10c53c84ab8ffbc94ee8212d72c2993
Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Reviewed-on: http://git-master/r/95640
Reviewed-by: Automatic_Commit_Validation_User
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch generalizes the module_platform_driver macro and introduces a new
module_driver macro. The module_driver macro takes a driver name, a register
and a unregister function for this driver type. Using these it construct the
module init and exit sections which register and unregister the driver. Since
such init/exit sections are commonly found in drivers this macro can be used
to eliminate a lot of boilerplate code.

The macro is not intended to be used by driver modules directly, instead it
should be used to generate bus specific macros for registering drivers like
the module_platform_driver macro.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Acked-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Acked-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

Cherry-picked from mainline commit
	907d0ed1c84114d4e8dafd66af982515d3739c90

Change-Id: Ib83ecc2ca10c53c84ab8ffbc94ee8212d72c2993
Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Reviewed-on: http://git-master/r/95640
Reviewed-by: Automatic_Commit_Validation_User
</pre>
</div>
</content>
</entry>
<entry>
<title>driver core: Add ability for arch code to setup pdev_archdata</title>
<updated>2011-07-08T05:21:35+00:00</updated>
<author>
<name>Kumar Gala</name>
<email>galak@kernel.crashing.org</email>
</author>
<published>2011-06-10T06:52:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a77ce8167cc1d0370fcb1d79b367d62e050cb2b0'/>
<id>a77ce8167cc1d0370fcb1d79b367d62e050cb2b0</id>
<content type='text'>
On some architectures we need to setup pdev_archdata before we add the
device.  Waiting til a bus_notifier is too late since we might need the
pdev_archdata in the bus notifier.  One example is setting up of dma_mask
pointers such that it can be used in a bus_notifier.

We add weak noop version of arch_setup_pdev_archdata() and allow the arch
code to override with access the full definitions of struct device,
struct platform_device, and struct pdev_archdata.

Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On some architectures we need to setup pdev_archdata before we add the
device.  Waiting til a bus_notifier is too late since we might need the
pdev_archdata in the bus notifier.  One example is setting up of dma_mask
pointers such that it can be used in a bus_notifier.

We add weak noop version of arch_setup_pdev_archdata() and allow the arch
code to override with access the full definitions of struct device,
struct platform_device, and struct pdev_archdata.

Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Kumar Gala &lt;galak@kernel.crashing.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PM: Revert "driver core: platform_bus: allow runtime override of dev_pm_ops"</title>
<updated>2011-05-16T18:17:47+00:00</updated>
<author>
<name>Kevin Hilman</name>
<email>khilman@ti.com</email>
</author>
<published>2011-04-28T22:37:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2064af917b3ba7589070064ca4ed12cecd99a63c'/>
<id>2064af917b3ba7589070064ca4ed12cecd99a63c</id>
<content type='text'>
The platform_bus_set_pm_ops() operation is deprecated in favor of the
new device power domain infrastructre implemented in commit
7538e3db6e015e890825fbd9f8659952896ddd5b (PM: add support for device
power domains)

Signed-off-by: Kevin Hilman &lt;khilman@ti.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The platform_bus_set_pm_ops() operation is deprecated in favor of the
new device power domain infrastructre implemented in commit
7538e3db6e015e890825fbd9f8659952896ddd5b (PM: add support for device
power domains)

Signed-off-by: Kevin Hilman &lt;khilman@ti.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PM: Export platform bus type's default PM callbacks</title>
<updated>2011-04-28T22:36:05+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2011-04-28T22:36:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=69c9dd1ecf446ad8a830e4afc539a2a1adc85b78'/>
<id>69c9dd1ecf446ad8a830e4afc539a2a1adc85b78</id>
<content type='text'>
Export the default PM callbacks defined for the platform bus type so
that they can be used by power domains for suspending and resuming
platform devices in the future.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Export the default PM callbacks defined for the platform bus type so
that they can be used by power domains for suspending and resuming
platform devices in the future.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: Fetch cell pointer from platform_device-&gt;mfd_cell</title>
<updated>2011-04-12T09:13:00+00:00</updated>
<author>
<name>Samuel Ortiz</name>
<email>sameo@linux.intel.com</email>
</author>
<published>2011-04-07T22:43:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e710d7d5a9cab1041b7a3cf9e655b75d92786857'/>
<id>e710d7d5a9cab1041b7a3cf9e655b75d92786857</id>
<content type='text'>
In order for MFD drivers to fetch their cell pointer but also their
platform data one, an mfd cell pointer is added to the platform_device
structure.
That allows all MFD sub devices drivers to be MFD agnostic, unless
they really need to access their MFD cell data. Most of them don't,
especially the ones for IPs used by both MFD and non MFD SoCs.

Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Greg KH &lt;gregkh@suse.de&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order for MFD drivers to fetch their cell pointer but also their
platform data one, an mfd cell pointer is added to the platform_device
structure.
That allows all MFD sub devices drivers to be MFD agnostic, unless
they really need to access their MFD cell data. Most of them don't,
especially the ones for IPs used by both MFD and non MFD SoCs.

Cc: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Greg KH &lt;gregkh@suse.de&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Driver core: convert platform_{get,set}_drvdata to static inline functions</title>
<updated>2011-02-18T16:15:51+00:00</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2011-02-16T22:23:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=71d642908d4e8e7a2a4a6e0490432e719ff466d5'/>
<id>71d642908d4e8e7a2a4a6e0490432e719ff466d5</id>
<content type='text'>
This patch converts the macros for platform_{get,set}_drvdata to
static inline functions to add typechecking.

Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch converts the macros for platform_{get,set}_drvdata to
static inline functions to add typechecking.

Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>driver core: platform_bus: allow runtime override of dev_pm_ops</title>
<updated>2010-10-22T17:16:42+00:00</updated>
<author>
<name>Kevin Hilman</name>
<email>khilman@ti.com</email>
</author>
<published>2010-08-25T19:50:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c64a0926710153b9d44c979d2942f4a8648fd74e'/>
<id>c64a0926710153b9d44c979d2942f4a8648fd74e</id>
<content type='text'>
Currently, the platform_bus allows customization of several of the
busses dev_pm_ops methods by using weak symbols so that platform code
can override them.  The weak-symbol approach is not scalable when
wanting to support multiple platforms in a single kernel binary.

Instead, provide __init methods for platform code to customize the
dev_pm_ops methods at runtime.

NOTE: after these dynamic methods are merged, the weak symbols should
      be removed from drivers/base/platform.c.  AFAIK, this will only
      affect SH and sh-mobile which should be converted to use this
      runtime approach instead of the weak symbols.  After SH &amp;
      sh-mobile are converted, the weak symobols could be removed.

Tested on OMAP3.

Cc: Magnus Damm &lt;magnus.damm@gmail.com&gt;
Acked-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Kevin Hilman &lt;khilman@deeprootsystems.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, the platform_bus allows customization of several of the
busses dev_pm_ops methods by using weak symbols so that platform code
can override them.  The weak-symbol approach is not scalable when
wanting to support multiple platforms in a single kernel binary.

Instead, provide __init methods for platform code to customize the
dev_pm_ops methods at runtime.

NOTE: after these dynamic methods are merged, the weak symbols should
      be removed from drivers/base/platform.c.  AFAIK, this will only
      affect SH and sh-mobile which should be converted to use this
      runtime approach instead of the weak symbols.  After SH &amp;
      sh-mobile are converted, the weak symobols could be removed.

Tested on OMAP3.

Cc: Magnus Damm &lt;magnus.damm@gmail.com&gt;
Acked-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Kevin Hilman &lt;khilman@deeprootsystems.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Driver core: reduce duplicated code for platform_device creation</title>
<updated>2010-08-05T20:53:34+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2010-06-21T14:11:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=44f28bdea09415d40b4d73a7668db5961362ec53'/>
<id>44f28bdea09415d40b4d73a7668db5961362ec53</id>
<content type='text'>
This makes the two similar functions platform_device_register_simple
and platform_device_register_data one line inline functions using a new
generic function platform_device_register_resndata.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes the two similar functions platform_device_register_simple
and platform_device_register_data one line inline functions using a new
generic function platform_device_register_resndata.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>platform: Make platform resource input parameters const</title>
<updated>2010-05-17T19:37:40+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2009-01-28T20:01:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0b7f1a7efb38b551f5948a13d0b36e876ba536db'/>
<id>0b7f1a7efb38b551f5948a13d0b36e876ba536db</id>
<content type='text'>
Make the platform resource input parameters of platform_device_add_resources()
and platform_device_register_simple() const, as the resources are copied and
never modified.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the platform resource input parameters of platform_device_add_resources()
and platform_device_register_simple() const, as the resources are copied and
never modified.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Driver core: make struct platform_driver.id_table const</title>
<updated>2010-03-08T01:04:49+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2010-01-26T08:35:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=831fad2f75f0d7bfc339de81173e7068a3c72276'/>
<id>831fad2f75f0d7bfc339de81173e7068a3c72276</id>
<content type='text'>
This fixes a warning on several pxa based machines:

	arch/arm/mach-pxa/ssp.c:475: warning: initialization discards qualifiers from pointer target type

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Acked-by: Eric Miao &lt;eric.y.miao@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a warning on several pxa based machines:

	arch/arm/mach-pxa/ssp.c:475: warning: initialization discards qualifiers from pointer target type

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Vikram Dhillon &lt;dhillonv10@gmail.com&gt;
Acked-by: Eric Miao &lt;eric.y.miao@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
</feed>
