diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-06 02:48:37 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-06 02:48:37 -0400 |
| commit | c5d1653783cae7b53e2dc1a41cdc497fce83e4db (patch) | |
| tree | e869cc3e47de580753efb0afcb0eef5a314ff53e /include/linux/device.h | |
| parent | 582ee9c5ad2661b359309f379f5c411fd33e511a (diff) | |
| parent | 23b6904442d08b7dbed7622ed33b236d41a3aa8b (diff) | |
Merge tag 'dev_groups_all_drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core into usb-next
dev_groups added to struct driver
Persistent tag for others to pull this branch from
This is the first patch in a longer series that adds the ability for the
driver core to create and remove a list of attribute groups
automatically when the device is bound/unbound from a specific driver.
See:
https://lore.kernel.org/r/20190731124349.4474-2-gregkh@linuxfoundation.org
for details on this patch, and examples of how to use it in other
drivers.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
| -rw-r--r-- | include/linux/device.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 6717adee33f0..47ccb2029bc3 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -262,6 +262,8 @@ enum probe_type { | |||
| 262 | * @resume: Called to bring a device from sleep mode. | 262 | * @resume: Called to bring a device from sleep mode. |
| 263 | * @groups: Default attributes that get created by the driver core | 263 | * @groups: Default attributes that get created by the driver core |
| 264 | * automatically. | 264 | * automatically. |
| 265 | * @dev_groups: Additional attributes attached to device instance once the | ||
| 266 | * it is bound to the driver. | ||
| 265 | * @pm: Power management operations of the device which matched | 267 | * @pm: Power management operations of the device which matched |
| 266 | * this driver. | 268 | * this driver. |
| 267 | * @coredump: Called when sysfs entry is written to. The device driver | 269 | * @coredump: Called when sysfs entry is written to. The device driver |
| @@ -296,6 +298,7 @@ struct device_driver { | |||
| 296 | int (*suspend) (struct device *dev, pm_message_t state); | 298 | int (*suspend) (struct device *dev, pm_message_t state); |
| 297 | int (*resume) (struct device *dev); | 299 | int (*resume) (struct device *dev); |
| 298 | const struct attribute_group **groups; | 300 | const struct attribute_group **groups; |
| 301 | const struct attribute_group **dev_groups; | ||
| 299 | 302 | ||
| 300 | const struct dev_pm_ops *pm; | 303 | const struct dev_pm_ops *pm; |
| 301 | void (*coredump) (struct device *dev); | 304 | void (*coredump) (struct device *dev); |
