Home
last modified time | relevance | path

Searched refs:devres (Results 1 – 25 of 48) sorted by relevance

12

/openbmc/linux/drivers/clk/
H A Dclk-devres.c109 struct clk_bulk_devres *devres = res; in devm_clk_bulk_release() local
111 clk_bulk_put(devres->num_clks, devres->clks); in devm_clk_bulk_release()
117 struct clk_bulk_devres *devres; in __devm_clk_bulk_get() local
120 devres = devres_alloc(devm_clk_bulk_release, in __devm_clk_bulk_get()
121 sizeof(*devres), GFP_KERNEL); in __devm_clk_bulk_get()
122 if (!devres) in __devm_clk_bulk_get()
130 devres->clks = clks; in __devm_clk_bulk_get()
131 devres->num_clks = num_clks; in __devm_clk_bulk_get()
132 devres_add(dev, devres); in __devm_clk_bulk_get()
134 devres_free(devres); in __devm_clk_bulk_get()
[all …]
/openbmc/linux/drivers/base/
H A Ddevres.c26 struct devres { struct
100 if (unlikely(check_add_overflow(sizeof(struct devres), in check_dr_size()
110 static __always_inline struct devres * alloc_dr(dr_release_t release, in alloc_dr()
114 struct devres *dr; in alloc_dr()
125 memset(dr, 0, offsetof(struct devres, data)); in alloc_dr()
165 struct devres *dr; in __devres_alloc_node()
205 struct devres *dr = container_of(node, struct devres, node); in devres_for_each_res()
226 struct devres *dr = container_of(res, struct devres, data); in devres_free()
245 struct devres *dr = container_of(res, struct devres, data); in devres_add()
254 static struct devres *find_dr(struct device *dev, dr_release_t release, in find_dr()
[all …]
H A Dtrace.h19 DECLARE_EVENT_CLASS(devres,
41 DEFINE_EVENT(devres, devres_log,
H A DKconfig145 This option enables kernel parameter devres.log. If set to
146 non-zero, devres debug messages are printed. Select this if
147 you are having a problem with devres or want to debug
148 resource management for a managed device. devres.log can be
H A Dcore.c2776 union device_attr_group_devres *devres = res; in devm_attr_group_remove() local
2777 const struct attribute_group *group = devres->group; in devm_attr_group_remove()
2785 union device_attr_group_devres *devres = res; in devm_attr_groups_remove() local
2786 const struct attribute_group **groups = devres->groups; in devm_attr_groups_remove()
2804 union device_attr_group_devres *devres; in devm_device_add_group() local
2807 devres = devres_alloc(devm_attr_group_remove, in devm_device_add_group()
2808 sizeof(*devres), GFP_KERNEL); in devm_device_add_group()
2809 if (!devres) in devm_device_add_group()
2814 devres_free(devres); in devm_device_add_group()
2818 devres->group = grp; in devm_device_add_group()
[all …]
H A DMakefile6 cpu.o firmware.o init.o map.o devres.o \
/openbmc/u-boot/drivers/core/
H A Ddevres.c28 struct devres { struct
40 static void set_node_dbginfo(struct devres *dr, const char *name, size_t size) in set_node_dbginfo() argument
46 static void devres_log(struct udevice *dev, struct devres *dr, in devres_log()
64 size_t tot_size = sizeof(struct devres) + size; in __devres_alloc()
65 struct devres *dr; in __devres_alloc()
81 struct devres *dr = container_of(res, struct devres, data); in devres_free()
90 struct devres *dr = container_of(res, struct devres, data); in devres_add()
101 struct devres *dr; in devres_find()
117 struct devres *new_dr = container_of(new_res, struct devres, data); in devres_get()
138 struct devres *dr = container_of(res, struct devres, data); in devres_remove()
[all …]
H A DMakefile6 obj-$(CONFIG_DEVRES) += devres.o
H A DKconfig164 Device resources managed by the devres framework are automatically
168 If this option is disabled, devres functions fall back to
176 If this option is enabled, devres debug messages are printed.
178 Select this if you are having a problem with devres or want to
/openbmc/linux/drivers/interconnect/
H A Dbulk.c126 struct icc_bulk_devres *devres = res; in devm_icc_bulk_release() local
128 icc_bulk_put(devres->num_paths, devres->paths); in devm_icc_bulk_release()
141 struct icc_bulk_devres *devres; in devm_of_icc_bulk_get() local
144 devres = devres_alloc(devm_icc_bulk_release, sizeof(*devres), GFP_KERNEL); in devm_of_icc_bulk_get()
145 if (!devres) in devm_of_icc_bulk_get()
150 devres->paths = paths; in devm_of_icc_bulk_get()
151 devres->num_paths = num_paths; in devm_of_icc_bulk_get()
152 devres_add(dev, devres); in devm_of_icc_bulk_get()
154 devres_free(devres); in devm_of_icc_bulk_get()
/openbmc/linux/drivers/regulator/
H A Ddevres.c184 struct regulator_bulk_devres *devres = res; in devm_regulator_bulk_release() local
186 regulator_bulk_free(devres->num_consumers, devres->consumers); in devm_regulator_bulk_release()
193 struct regulator_bulk_devres *devres; in _devm_regulator_bulk_get() local
196 devres = devres_alloc(devm_regulator_bulk_release, in _devm_regulator_bulk_get()
197 sizeof(*devres), GFP_KERNEL); in _devm_regulator_bulk_get()
198 if (!devres) in _devm_regulator_bulk_get()
203 devres->consumers = consumers; in _devm_regulator_bulk_get()
204 devres->num_consumers = num_consumers; in _devm_regulator_bulk_get()
205 devres_add(dev, devres); in _devm_regulator_bulk_get()
207 devres_free(devres); in _devm_regulator_bulk_get()
[all …]
/openbmc/linux/Documentation/driver-api/driver-model/
H A Ddevres.rst13 3. Devres Group : Group devres'es and release them together
22 devres came up while trying to convert libata to use iomap. Each
50 devres is basically linked list of arbitrarily sized memory areas
51 associated with a struct device. Each devres entry is associated with
52 a release function. A devres can be released in several ways. No
53 matter what, all devres entries are released on driver detach. On
55 devres entry is freed.
58 drivers using devres. For example, coherent DMA memory is acquired
133 devres. Complexity is shifted from less maintained low level drivers
148 Devres entries can be grouped using devres group. When a group is
[all …]
H A Dindex.rst12 devres
/openbmc/linux/drivers/hwtracing/intel_th/
H A Dcore.c635 struct resource *devres = th->resource; in intel_th_subdevice_alloc() local
649 res[r].end = resource_size(&devres[bar]) - 1; in intel_th_subdevice_alloc()
653 res[r].start += devres[bar].start; in intel_th_subdevice_alloc()
654 res[r].end += devres[bar].start; in intel_th_subdevice_alloc()
865 struct resource *devres, unsigned int ndevres) in intel_th_alloc() argument
891 switch (devres[r].flags & IORESOURCE_TYPE_BITS) { in intel_th_alloc()
893 th->resource[nr_mmios++] = devres[r]; in intel_th_alloc()
896 err = devm_request_irq(dev, devres[r].start, in intel_th_alloc()
903 th->irq = devres[r].start; in intel_th_alloc()
908 devres[r].flags); in intel_th_alloc()
/openbmc/linux/drivers/input/
H A Dinput.c2042 struct input_devres *devres = res; in devm_input_device_match() local
2044 return devres->input == data; in devm_input_device_match()
2049 struct input_devres *devres = res; in devm_input_device_release() local
2050 struct input_dev *input = devres->input; in devm_input_device_release()
2078 struct input_devres *devres; in devm_input_allocate_device() local
2080 devres = devres_alloc(devm_input_device_release, in devm_input_allocate_device()
2081 sizeof(*devres), GFP_KERNEL); in devm_input_allocate_device()
2082 if (!devres) in devm_input_allocate_device()
2087 devres_free(devres); in devm_input_allocate_device()
2094 devres->input = input; in devm_input_allocate_device()
[all …]
/openbmc/linux/Documentation/driver-api/firmware/
H A Dfirmware_cache.rst26 * The firmware cache is setup by adding a devres entry for each device that
36 criteria the firmware cache is setup by adding a devres entry for the
39 * The firmware devres entry is maintained throughout the lifetime of the
/openbmc/linux/Documentation/driver-api/phy/
H A Dphy.rst122 devm_phy_get associates the device with the PHY using devres on
124 the devres data and devres data is freed.
173 destroys the devres associated with this PHY.
184 Both these APIs destroy the PHY and devm_phy_destroy destroys the devres
/openbmc/linux/Documentation/translations/zh_CN/driver-api/gpio/
H A Dindex.rst62 drivers/gpio/gpiolib-devres.c
/openbmc/linux/Documentation/driver-api/gpio/
H A Dindex.rst43 .. kernel-doc:: drivers/gpio/gpiolib-devres.c
/openbmc/u-boot/cmd/
H A Ddm.c46 U_BOOT_CMD_MKENT(devres, 1, 1, do_dm_dump_devres, "", ""),
/openbmc/linux/kernel/irq/
H A DMakefile3 obj-y := irqdesc.o handle.o manage.o spurious.o resend.o chip.o dummychip.o devres.o
/openbmc/linux/drivers/hid/
H A Dwacom_sys.c1226 struct wacom_sysfs_group_devres *devres = res; in wacom_devm_sysfs_group_release() local
1227 struct kobject *kobj = devres->root; in wacom_devm_sysfs_group_release()
1230 __func__, devres->group->name); in wacom_devm_sysfs_group_release()
1231 sysfs_remove_group(kobj, devres->group); in wacom_devm_sysfs_group_release()
1238 struct wacom_sysfs_group_devres *devres; in __wacom_devm_sysfs_create_group() local
1241 devres = devres_alloc(wacom_devm_sysfs_group_release, in __wacom_devm_sysfs_create_group()
1244 if (!devres) in __wacom_devm_sysfs_create_group()
1247 devres->group = group; in __wacom_devm_sysfs_create_group()
1248 devres->root = root; in __wacom_devm_sysfs_create_group()
1250 error = sysfs_create_group(devres->root, group); in __wacom_devm_sysfs_create_group()
[all …]
/openbmc/linux/drivers/extcon/
H A DMakefile7 extcon-core-objs += extcon.o devres.o
/openbmc/linux/Documentation/hwmon/
H A Dsubmitting-patches.rst94 * Use devres functions whenever possible to allocate resources. For rationale
95 and supported functions, please see Documentation/driver-api/driver-model/devres.rst.
96 If a function is not supported by devres, consider using devm_add_action().
/openbmc/linux/net/
H A DMakefile9 obj-y := devres.o socket.o core/

12