Lines Matching +full:resource +full:- +full:id

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * platform_device.h - generic, centralized driver model
5 * Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org>
7 * See Documentation/driver-api/driver-model/ for more information.
15 #define PLATFORM_DEVID_NONE (-1)
16 #define PLATFORM_DEVID_AUTO (-2)
25 int id; member
31 struct resource *resource; member
47 #define platform_get_device_id(pdev) ((pdev)->id_entry)
49 #define dev_is_platform(dev) ((dev)->bus == &platform_bus_type)
58 extern struct resource *platform_get_resource(struct platform_device *,
60 extern struct resource *platform_get_mem_or_io(struct platform_device *,
70 unsigned int index, struct resource **res);
81 unsigned int index, struct resource **res) in devm_platform_get_and_ioremap_resource()
83 return ERR_PTR(-EINVAL); in devm_platform_get_and_ioremap_resource()
91 return ERR_PTR(-EINVAL); in devm_platform_ioremap_resource()
98 return ERR_PTR(-EINVAL); in devm_platform_ioremap_resource_byname()
111 extern struct resource *platform_get_resource_byname(struct platform_device *,
125 int id; member
127 const struct resource *res;
140 * platform_device_register_resndata - add a platform-level device with
141 * resources and platform-specific data
145 * @id: instance id
154 struct device *parent, const char *name, int id, in platform_device_register_resndata() argument
155 const struct resource *res, unsigned int num, in platform_device_register_resndata()
161 .id = id, in platform_device_register_resndata()
173 * platform_device_register_simple - add a platform-level device and its resources
175 * @id: instance id
180 * resource and memory management. Canned release function freeing memory
195 const char *name, int id, in platform_device_register_simple() argument
196 const struct resource *res, unsigned int num) in platform_device_register_simple()
198 return platform_device_register_resndata(NULL, name, id, in platform_device_register_simple()
203 * platform_device_register_data - add a platform-level device with platform-specific data
206 * @id: instance id
211 * resource and memory management. Canned release function freeing memory
219 struct device *parent, const char *name, int id, in platform_device_register_data() argument
222 return platform_device_register_resndata(parent, name, id, in platform_device_register_data()
226 extern struct platform_device *platform_device_alloc(const char *name, int id);
228 const struct resource *res,
277 /* non-hotpluggable platform devices may use this so that probe() and
287 return dev_get_drvdata(&pdev->dev); in platform_get_drvdata()
293 dev_set_drvdata(&pdev->dev, data); in platform_set_drvdata()
296 /* module_platform_driver() - Helper macro for drivers that don't do
305 /* builtin_platform_driver() - Helper macro for builtin drivers that
314 /* module_platform_driver_probe() - Helper macro for drivers that don't do
332 /* builtin_platform_driver_probe() - Helper macro for drivers that don't do
350 struct resource *res, unsigned int n_res,
395 * REVISIT: This stub is needed for all non-SuperH users of early platform
396 * drivers. It should go away once we introduce the new platform_device-based