<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/platform.c, branch v3.17</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-08-05T01:34:04Z</updated>
<entry>
<title>Merge tag 'driver-core-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core</title>
<updated>2014-08-05T01:34:04Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-08-05T01:34:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=29b88e23a9212136d39b0161a39afe587d0170a5'/>
<id>urn:sha1:29b88e23a9212136d39b0161a39afe587d0170a5</id>
<content type='text'>
Pull driver core updates from Greg KH:
 "Here's the big driver-core pull request for 3.17-rc1.

  Largest thing in here is the dma-buf rework and fence code, that
  touched many different subsystems so it was agreed it should go
  through this tree to handle merge issues.  There's also some firmware
  loading updates, as well as tests added, and a few other tiny changes,
  the changelog has the details.

  All have been in linux-next for a long time"

* tag 'driver-core-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (32 commits)
  ARM: imx: Remove references to platform_bus in mxc code
  firmware loader: Fix _request_firmware_load() return val for fw load abort
  platform: Remove most references to platform_bus device
  test: add firmware_class loader test
  doc: fix minor typos in firmware_class README
  staging: android: Cleanup style issues
  Documentation: devres: Sort managed interfaces
  Documentation: devres: Add devm_kmalloc() et al
  fs: debugfs: remove trailing whitespace
  kernfs: kernel-doc warning fix
  debugfs: Fix corrupted loop in debugfs_remove_recursive
  stable_kernel_rules: Add pointer to netdev-FAQ for network patches
  driver core: platform: add device binding path 'driver_override'
  driver core/platform: remove unused implicit padding in platform_object
  firmware loader: inform direct failure when udev loader is disabled
  firmware: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN
  firmware: read firmware size using i_size_read()
  firmware loader: allow disabling of udev as firmware loader
  reservation: add suppport for read-only access using rcu
  reservation: update api and add some helpers
  ...

Conflicts:
	drivers/base/platform.c
</content>
</entry>
<entry>
<title>Merge tag 'clk-for-linus-3.17' of git://git.linaro.org/people/mike.turquette/linux</title>
<updated>2014-08-04T18:44:20Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-08-04T18:44:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e4ca4308c055c7bfb82f6756297346760d697953'/>
<id>urn:sha1:e4ca4308c055c7bfb82f6756297346760d697953</id>
<content type='text'>
Pull clock framework updates from Mike Turquette:
 "The clock framework changes for 3.17 are mostly additions of new clock
  drivers and fixes/enhancements to existing clock drivers.  There are
  also some non-critical fixes and improvements to the framework core.

  Changes to the clock framework core include:
   - improvements to printks on errors
   - flattening the previously hierarchal structure of per-clock entries
     in debugfs
   - allow per-clock debugfs entries that are specific to a particular
     clock driver
   - configure initial clock parent and/or initial clock rate from
     Device Tree
   - several feature enhancements to the composite clock type
   - misc fixes

  New clock drivers added include:
   - TI Palmas PMIC
   - Allwinner A23 SoC
   - Qualcomm APQ8084 and IPQ8064 SoCs
   - Rockchip rk3188, rk3066 and rk3288 SoCs
   - STMicroelectronics STiH407 SoC
   - Cirrus Logic CLPS711X SoC

  Many fixes, feature enhancements and further clock tree support for
  existing clock drivers also were merged, such as Samsung's "ARMCLK
  down" power saving feature for their Exynos4 &amp; Exynos5 SoCs"

* tag 'clk-for-linus-3.17' of git://git.linaro.org/people/mike.turquette/linux: (86 commits)
  clk: Add missing of_clk_set_defaults export
  clk: checking wrong variable in __set_clk_parents()
  clk: Propagate any error return from debug_init()
  clk: clps711x: Add DT bindings documentation
  clk: Add CLPS711X clk driver
  clk: st: Use round to closest divider flag
  clk: st: Update frequency tables for fs660c32 and fs432c65
  clk: st: STiH407: Support for clockgenA9
  clk: st: STiH407: Support for clockgenD0/D2/D3
  clk: st: STiH407: Support for clockgenC0
  clk: st: Add quadfs reset handling
  clk: st: Add polarity bit indication
  clk: st: STiH407: Support for clockgenA0
  clk: st: STiH407: Support for A9 MUX Clocks
  clk: st: STiH407: Support for Flexgen Clocks
  clk: st: Adds Flexgen clock binding
  clk: st: Remove uncessary (void *) cast
  clk: st: use static const for clkgen_pll_data tables
  clk: st: use static const for stm_fs tables
  clk: st: Update ST clock binding documentation
  ...
</content>
</entry>
<entry>
<title>clk: Support for clock parents and rates assigned from device tree</title>
<updated>2014-07-25T22:16:27Z</updated>
<author>
<name>Sylwester Nawrocki</name>
<email>s.nawrocki@samsung.com</email>
</author>
<published>2014-06-18T15:29:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=86be408bfbd846fab3c4ac21d6f9298bd2e4b790'/>
<id>urn:sha1:86be408bfbd846fab3c4ac21d6f9298bd2e4b790</id>
<content type='text'>
This patch adds helper functions to configure clock parents and rates
as specified through 'assigned-clock-parents', 'assigned-clock-rates'
DT properties for a clock provider or clock consumer device.
The helpers are now being called by the bus code for the platform, I2C
and SPI busses, before the driver probing and also in the clock core
after registration of a clock provider.

Signed-off-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Mike Turquette &lt;mturquette@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge 3.16-rc6 into driver-core-next</title>
<updated>2014-07-21T17:07:25Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2014-07-21T17:07:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=90125edbc49ec58b9101c4271bb1d87b04a4620f'/>
<id>urn:sha1:90125edbc49ec58b9101c4271bb1d87b04a4620f</id>
<content type='text'>
We want the platform changes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>platform_get_irq: Revert to platform_get_resource if of_irq_get fails</title>
<updated>2014-07-12T01:06:36Z</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2014-06-17T22:51:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aff008ad813c7cf3cfe7b532e7ba2c526c136f22'/>
<id>urn:sha1:aff008ad813c7cf3cfe7b532e7ba2c526c136f22</id>
<content type='text'>
Commits 9ec36ca (of/irq: do irq resolution in platform_get_irq)
and ad69674 (of/irq: do irq resolution in platform_get_irq_byname)
change the semantics of platform_get_irq and platform_get_irq_byname
to always rely on devicetree information if devicetree is enabled
and if a devicetree node is attached to the device. The functions
now return an error if the devicetree data does not include interrupt
information, even if the information is available as platform resource
data.

This causes mfd client drivers to fail if the interrupt number is
passed via platform resources. Therefore, if of_irq_get fails, try
platform_get_resource as method of last resort. This restores the
original functionality for drivers depending on platform resources
to get irq information.

Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: Rob Herring &lt;robh@kernel.org&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: platform: add device binding path 'driver_override'</title>
<updated>2014-07-08T22:31:26Z</updated>
<author>
<name>Kim Phillips</name>
<email>kim.phillips@freescale.com</email>
</author>
<published>2014-06-03T00:42:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d713e0e382e6fcfb4bba1501645b66c129ad60b'/>
<id>urn:sha1:3d713e0e382e6fcfb4bba1501645b66c129ad60b</id>
<content type='text'>
Needed by platform device drivers, such as the upcoming
vfio-platform driver, in order to bypass the existing OF, ACPI,
id_table and name string matches, and successfully be able to be
bound to any device, like so:

echo vfio-platform &gt; /sys/bus/platform/devices/fff51000.ethernet/driver_override
echo fff51000.ethernet &gt; /sys/bus/platform/devices/fff51000.ethernet/driver/unbind
echo fff51000.ethernet &gt; /sys/bus/platform/drivers_probe

This mimics "PCI: Introduce new device binding path using
pci_dev.driver_override", which is an interface enhancement
for more deterministic PCI device binding, e.g., when in the
presence of hotplug.

Reviewed-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Reviewed-by: Alexander Graf &lt;agraf@suse.de&gt;
Reviewed-by: Stuart Yoder &lt;stuart.yoder@freescale.com&gt;
Signed-off-by: Kim Phillips &lt;kim.phillips@freescale.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>driver core/platform: remove unused implicit padding in platform_object</title>
<updated>2014-07-08T22:30:39Z</updated>
<author>
<name>Yann Droneaud</name>
<email>ydroneaud@opteya.com</email>
</author>
<published>2014-05-30T20:02:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1cec24c59b4a133fc9c83912996168f511075485'/>
<id>urn:sha1:1cec24c59b4a133fc9c83912996168f511075485</id>
<content type='text'>
Up to 7 bytes are wasted at the end of struct platform_object
in the form of padding after name field: unfortunately this
padding is not used when allocating the memory to hold the
name.

This patch converts name array from name[1] to C99 flexible
array name[] (equivalent to name[0]) so that no padding is
required by the presence of this field. Memory allocation
is updated to take care of allocating an additional byte for
the NUL terminating character.

Built on Fedora 20, using GCC 4.8, for ARM, i386, SPARC64 and
x86_64 architectures, the data structure layout can be reported
with following command:

  $ pahole drivers/base/platform.o \
           --recursive             \
           --class_name device,pdev_archdata,platform_device,platform_object

Please find below some comparisons of structure layout for arm,
i386, sparc64 and x86_64 architecture before and after the patch.

  --- obj-arm/drivers/base/platform.o.pahole.v3.15-rc7-79-gfe45736f4134	2014-05-30 10:32:06.290960701 +0200
  +++ obj-arm/drivers/base/platform.o.pahole.v3.15-rc7-80-g2cdb06858d71	2014-05-30 11:26:20.851988347 +0200
  @@ -81,10 +81,9 @@
     /* XXX last struct has 4 bytes of padding */

  	/* --- cacheline 6 boundary (384 bytes) was 8 bytes ago --- */
  -	char                       name[1];              /*   392     1 */
  +	char                       name[0];              /*   392     0 */

  -	/* size: 400, cachelines: 7, members: 2 */
  -	/* padding: 7 */
  +	/* size: 392, cachelines: 7, members: 2 */
   	/* paddings: 1, sum paddings: 4 */
  -	/* last cacheline: 16 bytes */
  +	/* last cacheline: 8 bytes */
   };

  --- obj-i386/drivers/base/platform.o.pahole.v3.15-rc7-79-gfe45736f4134 2014-05-30 10:32:06.305960691 +0200
  +++ obj-i386/drivers/base/platform.o.pahole.v3.15-rc7-80-g2cdb06858d71 2014-05-30 11:26:20.875988332 +0200
  @@ -73,9 +73,8 @@
   struct platform_object {
   	struct platform_device     pdev;                 /*     0   396 */
   	/* --- cacheline 6 boundary (384 bytes) was 12 bytes ago --- */
  -	char                       name[1];              /*   396     1 */
  +	char                       name[0];              /*   396     0 */

  -	/* size: 400, cachelines: 7, members: 2 */
  -	/* padding: 3 */
  -	/* last cacheline: 16 bytes */
  +	/* size: 396, cachelines: 7, members: 2 */
  +	/* last cacheline: 12 bytes */
   };

  --- obj-sparc64/drivers/base/platform.o.pahole.v3.15-rc7-79-gfe45736f4134 2014-05-30 10:32:06.406960625 +0200
  +++ obj-sparc64/drivers/base/platform.o.pahole.v3.15-rc7-80-g2cdb06858d71 2014-05-30 11:26:20.971988269 +0200
  @@ -94,9 +94,8 @@
   struct platform_object {
   	struct platform_device     pdev;                 /*     0  2208 */
   	/* --- cacheline 34 boundary (2176 bytes) was 32 bytes ago --- */
  -	char                       name[1];              /*  2208     1 */
  +	char                       name[0];              /*  2208     0 */

  -	/* size: 2216, cachelines: 35, members: 2 */
  -	/* padding: 7 */
  -	/* last cacheline: 40 bytes */
  +	/* size: 2208, cachelines: 35, members: 2 */
  +	/* last cacheline: 32 bytes */
   };

  --- obj-x86_64/drivers/base/platform.o.pahole.v3.15-rc7-79-gfe45736f4134 2014-05-30 10:32:06.432960608 +0200
  +++ obj-x86_64/drivers/base/platform.o.pahole.v3.15-rc7-80-g2cdb06858d71 2014-05-30 11:26:21.000988250 +0200
  @@ -84,9 +84,8 @@
   struct platform_object {
   	struct platform_device     pdev;                 /*     0   720 */
   	/* --- cacheline 11 boundary (704 bytes) was 16 bytes ago --- */
  -	char                       name[1];              /*   720     1 */
  +	char                       name[0];              /*   720     0 */

  -	/* size: 728, cachelines: 12, members: 2 */
  -	/* padding: 7 */
  -	/* last cacheline: 24 bytes */
  +	/* size: 720, cachelines: 12, members: 2 */
  +	/* last cacheline: 16 bytes */
   };

Changes from v5 [1]:
- dropped dma_mask allocation changes and only kept padding
  removal changes (name array length set to 0).

Changes from v4 [2]:
[by Emil Goode &lt;emilgoode@gmail.com&gt;:]
- Split v4 of the patch into two separate patches.
- Generated new object file size and data structure layout info.
- Updated the changelog message.

Changes from v3 [3]:
- fixed commit message so that git am doesn't fail.

Changes from v2 [4]:
- move 'dma_mask' to platform_object so that it's always
  allocated and won't leak on release; remove all previously
  added support functions.
- use C99 flexible array member for 'name' to remove padding
  at the end of platform_object.

Changes from v1 [5]:
- remove unneeded kfree() from error path
- add reference to author/commit adding allocation of dmamask

Changes from v0 [6]:
- small rewrite to squeeze the patch to a bare minimal

[1] http://lkml.kernel.org/r/1401122483-31603-2-git-send-email-emilgoode@gmail.com
    http://lkml.kernel.org/r/1401122483-31603-1-git-send-email-emilgoode@gmail.com
    http://lkml.kernel.org/r/1401122483-31603-3-git-send-email-emilgoode@gmail.com

[2] http://lkml.kernel.org/r/1390817152-30898-1-git-send-email-ydroneaud@opteya.com
    https://patchwork.kernel.org/patch/3541871/

[3] http://lkml.kernel.org/r/1390771138-28348-1-git-send-email-ydroneaud@opteya.com
    https://patchwork.kernel.org/patch/3540081/

[4] http://lkml.kernel.org/r/1389683909-17495-1-git-send-email-ydroneaud@opteya.com
    https://patchwork.kernel.org/patch/3484411/

[5] http://lkml.kernel.org/r/1389649085-7365-1-git-send-email-ydroneaud@opteya.com
    https://patchwork.kernel.org/patch/3480961/

[6] http://lkml.kernel.org/r/1386886207-2735-1-git-send-email-ydroneaud@opteya.com

Cc: Emil Goode &lt;emilgoode@gmail.com&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: Shawn Guo &lt;shawn.guo@freescale.com&gt;
Cc: Sascha Hauer &lt;kernel@pengutronix.de&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
Cc: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Cc: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Yann Droneaud &lt;ydroneaud@opteya.com&gt;
Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>of/irq: do irq resolution in platform_get_irq_byname()</title>
<updated>2014-05-23T02:40:25Z</updated>
<author>
<name>Grygorii Strashko</name>
<email>grygorii.strashko@ti.com</email>
</author>
<published>2014-05-20T10:42:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ad69674e73a18dc3a8da557f4059ccf9389531a5'/>
<id>urn:sha1:ad69674e73a18dc3a8da557f4059ccf9389531a5</id>
<content type='text'>
The commit 9ec36cafe43bf835f8f29273597a5b0cbc8267ef
"of/irq: do irq resolution in platform_get_irq" from Rob Herring -
moves resolving of the interrupt resources in platform_get_irq().
But this solution isn't complete because platform_get_irq_byname()
need to be modified the same way.

Hence, fix it by adding interrupt resolution code at the
platform_get_irq_byname() function too.

Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;

Signed-off-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
</entry>
<entry>
<title>of/irq: do irq resolution in platform_get_irq</title>
<updated>2014-04-24T20:40:22Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2014-04-23T22:57:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9ec36cafe43bf835f8f29273597a5b0cbc8267ef'/>
<id>urn:sha1:9ec36cafe43bf835f8f29273597a5b0cbc8267ef</id>
<content type='text'>
Currently we get the following kind of errors if we try to use interrupt
phandles to irqchips that have not yet initialized:

irq: no irq domain found for /ocp/pinmux@48002030 !
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at drivers/of/platform.c:171 of_device_alloc+0x144/0x184()
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.12.0-00038-g42a9708 #1012
(show_stack+0x14/0x1c)
(dump_stack+0x6c/0xa0)
(warn_slowpath_common+0x64/0x84)
(warn_slowpath_null+0x1c/0x24)
(of_device_alloc+0x144/0x184)
(of_platform_device_create_pdata+0x44/0x9c)
(of_platform_bus_create+0xd0/0x170)
(of_platform_bus_create+0x12c/0x170)
(of_platform_populate+0x60/0x98)

This is because we're wrongly trying to populate resources that are not
yet available. It's perfectly valid to create irqchips dynamically, so
let's fix up the issue by resolving the interrupt resources when
platform_get_irq is called.

And then we also need to accept the fact that some irqdomains do not
exist that early on, and only get initialized later on. So we can
make the current WARN_ON into just into a pr_debug().

We still attempt to populate irq resources when we create the devices.
This allows current drivers which don't use platform_get_irq to continue
to function. Once all drivers are fixed, this code can be removed.

Suggested-by: Russell King &lt;linux@arm.linux.org.uk&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
</entry>
<entry>
<title>ACPI / platform: drop redundant ACPI_HANDLE check</title>
<updated>2014-02-14T22:06:16Z</updated>
<author>
<name>Josh Cartwright</name>
<email>joshc@codeaurora.org</email>
</author>
<published>2014-02-14T04:00:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9383f4c6b66256c039c65ddc141f0caeeae51847'/>
<id>urn:sha1:9383f4c6b66256c039c65ddc141f0caeeae51847</id>
<content type='text'>
The acpi_dev_pm_attach/_detach functions perform their own checks to
ensure the device has an ACPI companion.  It is not necessary for the
caller to do so.

This mirrors what other busses with ACPI dev PM support do (i2c, spi,
sdio).

Cc: Len Brown &lt;lenb@kernel.org&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Josh Cartwright &lt;joshc@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
