Lines Matching refs:device
5 struct device {
12 struct device * parent;
32 void (*release)(struct device * dev);
37 g_list: Node in the global device list.
39 node: Node in device's parent's children list.
41 bus_list: Node in device's bus's devices list.
43 driver_list: Node in device's driver's devices list.
46 each interface that the device supports.
52 name: ASCII description of device.
55 bus_id: ASCII representation of device's bus position. This
57 bus type the device belongs to.
63 lock: Spinlock for the device.
65 refcount: Reference count on the device.
67 bus: Pointer to struct bus_type that device belongs to.
71 class_num: Class-enumerated value of the device.
73 driver: Pointer to struct device_driver that controls the device.
77 platform_data: Platform data specific to the device.
87 current_state: Current power state of the device.
89 saved_state: Pointer to saved state of the device. This is usable by
90 the device driver controlling the device.
92 release: Callback to free the device after all references have
94 device (i.e. the bus driver that discovered the device).
99 The bus driver that discovers the device uses this to register the
100 device with the core:
102 int device_register(struct device * dev);
111 A device is removed from the core when its reference count goes to
114 struct device * get_device(struct device * dev);
115 void put_device(struct device * dev);
117 get_device() will return a pointer to the struct device passed to it
121 A driver can access the lock in the device structure using:
123 void lock_device(struct device * dev);
124 void unlock_device(struct device * dev);
131 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
133 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
152 'dev_attr_power'. This can then be added and removed to the device's
155 int device_create_file(struct device *device, struct device_attribute * entry);
156 void device_remove_file(struct device * dev, struct device_attribute * attr);