Skip to content

Commit

Permalink
Merge tag 'driver-core-3.17-rc1' of git://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/kernel/git/gregkh/driver-core

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
  • Loading branch information
torvalds committed Aug 5, 2014
2 parents 2521129 + 4e3a25b commit 29b88e2
Show file tree
Hide file tree
Showing 83 changed files with 3,283 additions and 1,076 deletions.
20 changes: 20 additions & 0 deletions Documentation/ABI/testing/sysfs-bus-platform
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
What: /sys/bus/platform/devices/.../driver_override
Date: April 2014
Contact: Kim Phillips <[email protected]>
Description:
This file allows the driver for a device to be specified which
will override standard OF, ACPI, ID table, and name matching.
When specified, only a driver with a name matching the value
written to driver_override will have an opportunity to bind
to the device. The override is specified by writing a string
to the driver_override file (echo vfio-platform > \
driver_override) and may be cleared with an empty string
(echo > driver_override). This returns the device to standard
matching rules binding. Writing to driver_override does not
automatically unbind the device from its current driver or make
any attempt to automatically load the specified driver. If no
driver with a matching name is currently loaded in the kernel,
the device will not bind to any driver. This also allows
devices to opt-out of driver binding using a driver_override
name such as "none". Only a single driver may be specified in
the override, there is no support for parsing delimiters.
8 changes: 6 additions & 2 deletions Documentation/DocBook/device-drivers.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,12 @@ X!Edrivers/base/interface.c
!Edrivers/base/bus.c
</sect1>
<sect1><title>Device Drivers DMA Management</title>
!Edrivers/base/dma-buf.c
!Edrivers/base/reservation.c
!Edrivers/dma-buf/dma-buf.c
!Edrivers/dma-buf/fence.c
!Edrivers/dma-buf/seqno-fence.c
!Iinclude/linux/fence.h
!Iinclude/linux/seqno-fence.h
!Edrivers/dma-buf/reservation.c
!Iinclude/linux/reservation.h
!Edrivers/base/dma-coherent.c
!Edrivers/base/dma-mapping.c
Expand Down
112 changes: 57 additions & 55 deletions Documentation/driver-model/devres.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,66 +233,78 @@ certainly invest a bit more effort into libata core layer).
6. List of managed interfaces
-----------------------------

MEM
devm_kzalloc()
devm_kfree()
devm_kmemdup()
devm_get_free_pages()
devm_free_pages()
CLOCK
devm_clk_get()
devm_clk_put()

DMA
dmam_alloc_coherent()
dmam_alloc_noncoherent()
dmam_declare_coherent_memory()
dmam_free_coherent()
dmam_free_noncoherent()
dmam_pool_create()
dmam_pool_destroy()

GPIO
devm_gpiod_get()
devm_gpiod_get_index()
devm_gpiod_get_index_optional()
devm_gpiod_get_optional()
devm_gpiod_put()

IIO
devm_iio_device_alloc()
devm_iio_device_free()
devm_iio_trigger_alloc()
devm_iio_trigger_free()
devm_iio_device_register()
devm_iio_device_unregister()
devm_iio_trigger_alloc()
devm_iio_trigger_free()

IO region
devm_request_region()
devm_request_mem_region()
devm_release_region()
devm_release_mem_region()

IRQ
devm_request_irq()
devm_free_irq()

DMA
dmam_alloc_coherent()
dmam_free_coherent()
dmam_alloc_noncoherent()
dmam_free_noncoherent()
dmam_declare_coherent_memory()
dmam_pool_create()
dmam_pool_destroy()

PCI
pcim_enable_device() : after success, all PCI ops become managed
pcim_pin_device() : keep PCI device enabled after release
devm_release_region()
devm_request_mem_region()
devm_request_region()

IOMAP
devm_ioport_map()
devm_ioport_unmap()
devm_ioremap()
devm_ioremap_nocache()
devm_iounmap()
devm_ioremap_resource() : checks resource, requests memory region, ioremaps
devm_request_and_ioremap() : obsoleted by devm_ioremap_resource()
devm_iounmap()
pcim_iomap()
pcim_iounmap()
pcim_iomap_table() : array of mapped addresses indexed by BAR
pcim_iomap_regions() : do request_region() and iomap() on multiple BARs
pcim_iomap_table() : array of mapped addresses indexed by BAR
pcim_iounmap()

REGULATOR
devm_regulator_get()
devm_regulator_put()
devm_regulator_bulk_get()
devm_regulator_register()
IRQ
devm_free_irq()
devm_request_irq()

CLOCK
devm_clk_get()
devm_clk_put()
MDIO
devm_mdiobus_alloc()
devm_mdiobus_alloc_size()
devm_mdiobus_free()

MEM
devm_free_pages()
devm_get_free_pages()
devm_kcalloc()
devm_kfree()
devm_kmalloc()
devm_kmalloc_array()
devm_kmemdup()
devm_kzalloc()

PCI
pcim_enable_device() : after success, all PCI ops become managed
pcim_pin_device() : keep PCI device enabled after release

PHY
devm_usb_get_phy()
devm_usb_put_phy()

PINCTRL
devm_pinctrl_get()
Expand All @@ -302,24 +314,14 @@ PWM
devm_pwm_get()
devm_pwm_put()

PHY
devm_usb_get_phy()
devm_usb_put_phy()
REGULATOR
devm_regulator_bulk_get()
devm_regulator_get()
devm_regulator_put()
devm_regulator_register()

SLAVE DMA ENGINE
devm_acpi_dma_controller_register()

SPI
devm_spi_register_master()

GPIO
devm_gpiod_get()
devm_gpiod_get_index()
devm_gpiod_get_optional()
devm_gpiod_get_index_optional()
devm_gpiod_put()

MDIO
devm_mdiobus_alloc()
devm_mdiobus_alloc_size()
devm_mdiobus_free()
6 changes: 3 additions & 3 deletions Documentation/firmware_class/README
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

if(request_firmware(&fw_entry, $FIRMWARE, device) == 0)
copy_fw_to_device(fw_entry->data, fw_entry->size);
release(fw_entry);
release_firmware(fw_entry);

Sample/simple hotplug script:
============================
Expand All @@ -74,7 +74,7 @@
HOTPLUG_FW_DIR=/usr/lib/hotplug/firmware/

echo 1 > /sys/$DEVPATH/loading
cat $HOTPLUG_FW_DIR/$FIRMWARE > /sysfs/$DEVPATH/data
cat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data
echo 0 > /sys/$DEVPATH/loading

Random notes:
Expand Down Expand Up @@ -123,6 +123,6 @@
--------------------
After firmware cache mechanism is introduced during system sleep,
request_firmware can be called safely inside device's suspend and
resume callback, and callers need't cache the firmware by
resume callback, and callers needn't cache the firmware by
themselves any more for dealing with firmware loss during system
resume.
3 changes: 3 additions & 0 deletions Documentation/stable_kernel_rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ Rules on what kind of patches are accepted, and which ones are not, into the

Procedure for submitting patches to the -stable tree:

- If the patch covers files in net/ or drivers/net please follow netdev stable
submission guidelines as described in
Documentation/networking/netdev-FAQ.txt
- Send the patch, after verifying that it follows the above rules, to
[email protected]. You must note the upstream commit ID in the
changelog of your submission, as well as the kernel version you wish
Expand Down
4 changes: 2 additions & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2915,8 +2915,8 @@ S: Maintained
L: [email protected]
L: [email protected]
L: [email protected]
F: drivers/base/dma-buf*
F: include/linux/dma-buf*
F: drivers/dma-buf/
F: include/linux/dma-buf* include/linux/reservation.h include/linux/*fence.h
F: Documentation/dma-buf-sharing.txt
T: git git://git.linaro.org/people/sumitsemwal/linux-dma-buf.git

Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-bcm/board_bcm21664.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ static void bcm21664_restart(enum reboot_mode mode, const char *cmd)

static void __init bcm21664_init(void)
{
of_platform_populate(NULL, of_default_bus_match_table, NULL,
&platform_bus);
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
kona_l2_cache_init();
}

Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-bcm/board_bcm281xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ static void bcm281xx_restart(enum reboot_mode mode, const char *cmd)

static void __init bcm281xx_init(void)
{
of_platform_populate(NULL, of_default_bus_match_table, NULL,
&platform_bus);
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
kona_l2_cache_init();
}

Expand Down
6 changes: 3 additions & 3 deletions arch/arm/mach-clps711x/board-edb7211.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,16 @@ static void __init edb7211_init_late(void)
gpio_request_array(edb7211_gpios, ARRAY_SIZE(edb7211_gpios));

platform_device_register(&edb7211_flash_pdev);
platform_device_register_data(&platform_bus, "platform-lcd", 0,
platform_device_register_data(NULL, "platform-lcd", 0,
&edb7211_lcd_power_pdata,
sizeof(edb7211_lcd_power_pdata));
platform_device_register_data(&platform_bus, "generic-bl", 0,
platform_device_register_data(NULL, "generic-bl", 0,
&edb7211_lcd_backlight_pdata,
sizeof(edb7211_lcd_backlight_pdata));
platform_device_register_simple("video-clps711x", 0, NULL, 0);
platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource,
ARRAY_SIZE(edb7211_cs8900_resource));
platform_device_register_data(&platform_bus, "i2c-gpio", 0,
platform_device_register_data(NULL, "i2c-gpio", 0,
&edb7211_i2c_pdata,
sizeof(edb7211_i2c_pdata));
}
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/mach-clps711x/board-p720t.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,14 @@ static void __init p720t_init_late(void)
{
WARN_ON(gpio_request_array(p720t_gpios, ARRAY_SIZE(p720t_gpios)));

platform_device_register_data(&platform_bus, "platform-lcd", 0,
platform_device_register_data(NULL, "platform-lcd", 0,
&p720t_lcd_power_pdata,
sizeof(p720t_lcd_power_pdata));
platform_device_register_data(&platform_bus, "generic-bl", 0,
platform_device_register_data(NULL, "generic-bl", 0,
&p720t_lcd_backlight_pdata,
sizeof(p720t_lcd_backlight_pdata));
platform_device_register_simple("video-clps711x", 0, NULL, 0);
platform_device_register_data(&platform_bus, "leds-gpio", 0,
platform_device_register_data(NULL, "leds-gpio", 0,
&p720t_gpio_led_pdata,
sizeof(p720t_gpio_led_pdata));
}
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-imx/devices/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@

struct device mxc_aips_bus = {
.init_name = "mxc_aips",
.parent = &platform_bus,
};

struct device mxc_ahb_bus = {
.init_name = "mxc_ahb",
.parent = &platform_bus,
};

int __init mxc_device_init(void)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-imx/mach-mx27ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static void __init mx27ads_regulator_init(void)
vchip->set = vgpio_set;
gpiochip_add(vchip);

platform_device_register_data(&platform_bus, "reg-fixed-voltage",
platform_device_register_data(NULL, "reg-fixed-voltage",
PLATFORM_DEVID_AUTO,
&mx27ads_lcd_regulator_pdata,
sizeof(mx27ads_lcd_regulator_pdata));
Expand Down
14 changes: 7 additions & 7 deletions arch/arm/mach-shmobile/board-ape6evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,29 +248,29 @@ static void __init ape6evm_add_standard_devices(void)

regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));

platform_device_register_resndata(&platform_bus, "smsc911x", -1,
platform_device_register_resndata(NULL, "smsc911x", -1,
lan9220_res, ARRAY_SIZE(lan9220_res),
&lan9220_data, sizeof(lan9220_data));

regulator_register_always_on(1, "MMC0 Vcc", vcc_mmc0_consumers,
ARRAY_SIZE(vcc_mmc0_consumers), 2800000);
platform_device_register_resndata(&platform_bus, "sh_mmcif", 0,
platform_device_register_resndata(NULL, "sh_mmcif", 0,
mmcif0_resources, ARRAY_SIZE(mmcif0_resources),
&mmcif0_pdata, sizeof(mmcif0_pdata));
platform_device_register_data(&platform_bus, "reg-fixed-voltage", 2,
platform_device_register_data(NULL, "reg-fixed-voltage", 2,
&vcc_sdhi0_info, sizeof(vcc_sdhi0_info));
platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 0,
platform_device_register_resndata(NULL, "sh_mobile_sdhi", 0,
sdhi0_resources, ARRAY_SIZE(sdhi0_resources),
&sdhi0_pdata, sizeof(sdhi0_pdata));
regulator_register_always_on(3, "SDHI1 Vcc", vcc_sdhi1_consumers,
ARRAY_SIZE(vcc_sdhi1_consumers), 3300000);
platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 1,
platform_device_register_resndata(NULL, "sh_mobile_sdhi", 1,
sdhi1_resources, ARRAY_SIZE(sdhi1_resources),
&sdhi1_pdata, sizeof(sdhi1_pdata));
platform_device_register_data(&platform_bus, "gpio-keys", -1,
platform_device_register_data(NULL, "gpio-keys", -1,
&ape6evm_keys_pdata,
sizeof(ape6evm_keys_pdata));
platform_device_register_data(&platform_bus, "leds-gpio", -1,
platform_device_register_data(NULL, "leds-gpio", -1,
&ape6evm_leds_pdata,
sizeof(ape6evm_leds_pdata));
}
Expand Down
Loading

0 comments on commit 29b88e2

Please sign in to comment.