1PLATFORM_DEVICE_REGI(9)  Device drivers infrastructure PLATFORM_DEVICE_REGI(9)
2
3
4

NAME

6       platform_device_register_simple - add a platform-level device and its
7       resources
8

SYNOPSIS

10       struct platform_device *
11                                                                platform_device_register_simple(const char * name,
12                                                                int id,
13                                                                const struct resource * res,
14                                                                unsigned int num);
15

ARGUMENTS

17       name
18           base name of the device we're adding
19
20       id
21           instance id
22
23       res
24           set of resources that needs to be allocated for the device
25
26       num
27           number of resources
28

DESCRIPTION

30       This function creates a simple platform device that requires minimal
31       resource and memory management. Canned release function freeing memory
32       allocated for the device allows drivers using such devices to be
33       unloaded without waiting for the last reference to the device to be
34       dropped.
35
36       This interface is primarily intended for use with legacy drivers which
37       probe hardware directly. Because such drivers create sysfs device nodes
38       themselves, rather than letting system infrastructure handle such
39       device enumeration tasks, they don't fully conform to the Linux driver
40       model. In particular, when such drivers are built as modules, they
41       can't be “hotplugged”.
42
43       Returns struct platform_device pointer on success, or ERR_PTR on error.
44
46Kernel Hackers Manual 3.10         June 2019           PLATFORM_DEVICE_REGI(9)
Impressum