/linux-4.1.27/kernel/irq/ |
H A D | Makefile | 2 obj-y := irqdesc.o handle.o manage.o spurious.o resend.o chip.o dummychip.o devres.o
|
/linux-4.1.27/drivers/base/ |
H A D | devres.c | 2 * drivers/base/devres.c - device resource management 25 struct devres { struct 62 * Release functions for devres group. These callbacks are used only 84 static __always_inline struct devres * alloc_dr(dr_release_t release, alloc_dr() 87 size_t tot_size = sizeof(struct devres) + size; alloc_dr() 88 struct devres *dr; alloc_dr() 94 memset(dr, 0, offsetof(struct devres, data)); alloc_dr() 112 struct devres *dr; __devres_alloc() 124 * @release: Release function devres will be associated with 128 * Allocate devres of @size bytes. The allocated area is zeroed, then 133 * Pointer to allocated devres on success, NULL on failure. 137 struct devres *dr; devres_alloc() 156 * Call @fn for each devres of @dev which is associated with @release 177 struct devres *dr = container_of(node, struct devres, node); devres_for_each_res() 191 * @res: Pointer to devres data to free 193 * Free devres created with devres_alloc(). 198 struct devres *dr = container_of(res, struct devres, data); devres_free() 211 * Register devres @res to @dev. @res should have been allocated 213 * function will be invoked and devres will be freed automatically. 217 struct devres *dr = container_of(res, struct devres, data); devres_add() 226 static struct devres *find_dr(struct device *dev, dr_release_t release, find_dr() 232 struct devres *dr = container_of(node, struct devres, node); find_dr() 251 * Find the latest devres of @dev which is associated with @release 256 * Pointer to found devres, NULL if not found. 261 struct devres *dr; devres_find() 275 * devres_get - Find devres, if non-existent, add one atomically 276 * @dev: Device to lookup or add devres for 277 * @new_res: Pointer to new initialized devres to add if not found 281 * Find the latest devres of @dev which has the same release function 286 * Pointer to found or added devres. 291 struct devres *new_dr = container_of(new_res, struct devres, data); devres_get() 292 struct devres *dr; devres_get() 316 * Find the latest devres of @dev associated with @release and for 322 * Pointer to removed devres on success, NULL if not found. 327 struct devres *dr; devres_remove() 351 * Find the latest devres of @dev associated with @release and for 356 * only the devres-allocated data will be freed. The caller becomes 360 * 0 if devres is found and freed, -ENOENT if not found. 384 * Find the latest devres of @dev associated with @release and for 390 * 0 if devres is found and freed, -ENOENT if not found. 414 /* First pass - move normal devres entries to @todo and clear remove_nodes() 431 /* regular devres entry */ remove_nodes() 482 struct devres *dr, *tmp; 488 /* Release. Note that both devres and devres_group are 489 * handled as devres in the following loop. This is safe. 520 * devres_open_group - Open a new devres group 521 * @dev: Device to open devres group for 525 * Open a new devres group for @dev with @id. For @id, using a 558 /* Find devres group with ID @id. If @id is NULL, look for the latest. */ find_group() 582 * devres_close_group - Close a devres group 583 * @dev: Device to close devres group for 607 * devres_remove_group - Remove a devres group 637 * devres_release_group - Release resources in a devres group 675 * Custom devres actions allow inserting a simple function call 686 struct action_devres *devres = res; devm_action_match() local 689 return devres->action == target->action && devm_action_match() 690 devres->data == target->data; devm_action_match() 695 struct action_devres *devres = res; devm_action_release() local 697 devres->action(devres->data); devm_action_release() 711 struct action_devres *devres; devm_add_action() local 713 devres = devres_alloc(devm_action_release, devm_add_action() 715 if (!devres) devm_add_action() 718 devres->data = data; devm_add_action() 719 devres->action = action; devm_add_action() 721 devres_add(dev, devres); devm_add_action() 737 struct action_devres devres = { devm_remove_action() local 743 &devres)); devm_remove_action() 768 * automatically freed on driver detach. Like all other devres 776 struct devres *dr; devm_kmalloc() 919 struct pages_devres *devres = res; devm_pages_match() local 922 return devres->addr == target->addr; devm_pages_match() 927 struct pages_devres *devres = res; devm_pages_release() local 929 free_pages(devres->addr, devres->order); devm_pages_release() 948 struct pages_devres *devres; devm_get_free_pages() local 956 devres = devres_alloc(devm_pages_release, devm_get_free_pages() 958 if (unlikely(!devres)) { devm_get_free_pages() 963 devres->addr = addr; devm_get_free_pages() 964 devres->order = order; devm_get_free_pages() 966 devres_add(dev, devres); devm_get_free_pages() 981 struct pages_devres devres = { .addr = addr }; devm_free_pages() local 984 &devres)); devm_free_pages()
|
H A D | Makefile | 5 cpu.o firmware.o init.o map.o devres.o \
|
H A D | component.c | 387 * Each component initialises inside its own devres group. component_bind()
|
H A D | firmware_class.c | 416 /* add firmware name into devres list */ fw_add_devm_name() 1072 * add firmware name into devres list so that we can auto cache assign_firmware_buf() 1076 * should be fixed in devres or driver core. assign_firmware_buf() 1538 * device's devres link list, so device_cache_fw_images can call
|
H A D | platform.c | 1319 /* clean up the devres list used to chain devices */ early_platform_cleanup()
|
H A D | core.c | 237 * is deleted but alive, so release devres here to avoid device_release()
|
/linux-4.1.27/drivers/input/ |
H A D | input-polldev.c | 185 struct input_polled_devres *devres = res; devm_input_polldev_match() local 187 return devres->polldev == data; devm_input_polldev_match() 192 struct input_polled_devres *devres = res; devm_input_polldev_release() local 193 struct input_polled_dev *polldev = devres->polldev; devm_input_polldev_release() 204 struct input_polled_devres *devres = res; devm_input_polldev_unregister() local 205 struct input_polled_dev *polldev = devres->polldev; devm_input_polldev_unregister() 241 struct input_polled_devres *devres; devm_input_allocate_polled_device() local 243 devres = devres_alloc(devm_input_polldev_release, sizeof(*devres), devm_input_allocate_polled_device() 245 if (!devres) devm_input_allocate_polled_device() 250 devres_free(devres); devm_input_allocate_polled_device() 257 devres->polldev = polldev; devm_input_allocate_polled_device() 258 devres_add(dev, devres); devm_input_allocate_polled_device() 297 struct input_polled_devres *devres = NULL; input_register_polled_device() local 302 devres = devres_alloc(devm_input_polldev_unregister, input_register_polled_device() 303 sizeof(*devres), GFP_KERNEL); input_register_polled_device() 304 if (!devres) input_register_polled_device() 307 devres->polldev = dev; input_register_polled_device() 325 devres_free(devres); input_register_polled_device() 339 dev_dbg(input->dev.parent, "%s: registering %s with devres.\n", input_register_polled_device() 341 devres_add(input->dev.parent, devres); input_register_polled_device()
|
H A D | input.c | 1814 struct input_devres *devres = res; devm_input_device_match() local 1816 return devres->input == data; devm_input_device_match() 1821 struct input_devres *devres = res; devm_input_device_release() local 1822 struct input_dev *input = devres->input; devm_input_device_release() 1850 struct input_devres *devres; devm_input_allocate_device() local 1852 devres = devres_alloc(devm_input_device_release, devm_input_allocate_device() 1854 if (!devres) devm_input_allocate_device() 1859 devres_free(devres); devm_input_allocate_device() 1866 devres->input = input; devm_input_allocate_device() 1867 devres_add(dev, devres); devm_input_allocate_device() 2049 struct input_devres *devres = res; devm_input_device_unregister() local 2050 struct input_dev *input = devres->input; devm_input_device_unregister() 2072 * is controlled by the devres infrastructure. It is also worth noting 2077 * happen later, when devres stack is unwound to the point where device 2082 struct input_devres *devres = NULL; input_register_device() local 2089 devres = devres_alloc(devm_input_device_unregister, input_register_device() 2091 if (!devres) input_register_device() 2094 devres->input = dev; input_register_device() 2158 dev_dbg(dev->dev.parent, "%s: registering %s with devres.\n", input_register_device() 2160 devres_add(dev->dev.parent, devres); input_register_device() 2170 devres_free(devres); input_register_device() 2192 * when 2nd devres fires up. input_unregister_device()
|
/linux-4.1.27/sound/soc/ |
H A D | Makefile | 2 snd-soc-core-objs += soc-pcm.o soc-compress.o soc-io.o soc-devres.o soc-ops.o
|
H A D | soc-devres.c | 2 * soc-devres.c -- ALSA SoC Audio Layer devres functions
|
/linux-4.1.27/drivers/usb/phy/ |
H A D | phy.c | 95 * devres. On driver detach, release function is invoked on the devres data, 96 * then, devres data is freed. 165 * the phy using devres. On driver detach, release function is invoked 166 * on the devres data, then, devres data is freed. 191 dev_dbg(dev, "failed to allocate memory for devres\n"); devm_usb_get_phy_by_phandle() 266 * devres. On driver detach, release function is invoked on the devres data, 267 * then, devres data is freed. 295 * destroys the devres associated with this phy and invokes usb_put_phy
|
/linux-4.1.27/drivers/phy/ |
H A D | phy-core.c | 436 * destroys the devres associated with this phy and invokes phy_put 549 * devres. On driver detach, release function is invoked on the devres data, 550 * then, devres data is freed. 579 * devres. On driver detach, release function is invoked on the devres 580 * data, then, devres data is freed. This differs to devm_phy_get() in 603 * devres. On driver detach, release function is invoked on the devres data, 604 * then, devres data is freed. 710 * While at that, it also associates the device with the phy using devres. 711 * On driver detach, release function is invoked on the devres data, 712 * then, devres data is freed. 753 * destroys the devres associated with this phy and invokes phy_destroy 807 * phy provider using devres. On driver detach, release function is invoked 808 * on the devres data, then, devres data is freed. 854 * destroys the devres associated with this phy provider and invokes
|
/linux-4.1.27/lib/ |
H A D | Makefile | 50 obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o
|
H A D | devres.c | 173 * Generic iomap devres 234 * PCI iomap devres
|
/linux-4.1.27/drivers/gpio/ |
H A D | devres.c | 2 * drivers/gpio/devres.c - managed gpio resources 12 * This file is based on kernel/irq/devres.c
|
/linux-4.1.27/drivers/regulator/ |
H A D | devres.c | 2 * devres.c -- Voltage/Current Regulator framework devres implementation.
|
/linux-4.1.27/drivers/pci/ |
H A D | quirks.c | 455 u32 devres; piix4_io_quirk() local 458 pci_read_config_dword(dev, port, &devres); piix4_io_quirk() 459 if ((devres & enable) != enable) piix4_io_quirk() 461 mask = (devres >> 16) & 15; piix4_io_quirk() 462 base = devres & 0xffff; piix4_io_quirk() 482 u32 devres; piix4_mem_quirk() local 485 pci_read_config_dword(dev, port, &devres); piix4_mem_quirk() 486 if ((devres & enable) != enable) piix4_mem_quirk() 488 base = devres & 0xffff0000; piix4_mem_quirk() 489 mask = (devres & 0x3f) << 16; piix4_mem_quirk() 522 piix4_io_quirk(dev, "PIIX4 devres B", 0x60, 3 << 21); quirk_piix4_acpi() 523 piix4_io_quirk(dev, "PIIX4 devres C", 0x64, 3 << 21); quirk_piix4_acpi() 529 piix4_io_quirk(dev, "PIIX4 devres E", 0x68, 1 << 20); quirk_piix4_acpi() 530 piix4_mem_quirk(dev, "PIIX4 devres F", 0x6c, 1 << 7); quirk_piix4_acpi() 534 piix4_io_quirk(dev, "PIIX4 devres G", 0x70, 1 << 20); quirk_piix4_acpi() 535 piix4_mem_quirk(dev, "PIIX4 devres H", 0x74, 1 << 7); quirk_piix4_acpi() 537 piix4_io_quirk(dev, "PIIX4 devres I", 0x78, 1 << 20); quirk_piix4_acpi() 538 piix4_io_quirk(dev, "PIIX4 devres J", 0x7c, 1 << 20); quirk_piix4_acpi()
|
/linux-4.1.27/drivers/char/tpm/ |
H A D | tpm-chip.c | 85 * devres calls tpmm_chip_remove() to do the job.
|
/linux-4.1.27/drivers/mfd/ |
H A D | arizona-core.c | 717 * Don't use devres here because the only device we have to get arizona_dev_init() 720 * destroyed by the time devres calls regulator put. arizona_dev_init()
|
/linux-4.1.27/drivers/ata/ |
H A D | pata_icside.c | 587 * don't NULL out the drvdata - devres/libata wants it pata_icside_remove()
|
H A D | libata-core.c | 6332 * release is handled via devres. 6440 * release is handled via devres.
|
/linux-4.1.27/include/linux/ |
H A D | input.h | 118 * @devres_managed: indicates that devices is managed with devres framework
|
H A D | device.h | 601 /* devres group */ 641 /* allows to add/remove a custom action to devres stack */
|
/linux-4.1.27/drivers/base/regmap/ |
H A D | regmap.c | 439 /* Add a devres resource for dev_get_regmap() */ regmap_attach_dev()
|