This patch originally started out just as a way for platform drivers to easily add a sysfs group in a race-free way, but thanks to Dmitry's patch, this series now is for all drivers in the kernel (hey, a unified driver model works!!!)
I've only converted a few platform drivers here in this series to show how it works, but other busses can be converted after the first patch goes into the tree.
Here's the original 00 message, for people to get an idea of what is going on here:
If a platform driver wants to add a sysfs group, it has to do so in a racy way, adding it after the driver is bound. To resolve this issue, have the platform driver core do this for the driver, making the individual drivers logic smaller and simpler, and solving the race at the same time.
All of these patches depend on the first patch. I'll take the first one through my driver-core tree, and any subsystem maintainer can either ack their individul patch and I will be glad to also merge it, or they can wait until after 5.4-rc1 when the core patch hits Linus's tree and then take it, it's up to them.
Thank to Richard Gong for the idea and the testing of the platform driver patch and to Dmitry Torokhov for rewriting the first patch to work well for all busses.
-----
V2 - work for all busses and not just platform drivers.
Dmitry Torokhov (1): driver core: add dev_groups to all drivers
Greg Kroah-Hartman (9): uio: uio_fsl_elbc_gpcm: convert platform driver to use dev_groups input: keyboard: gpio_keys: convert platform driver to use dev_groups input: axp20x-pek: convert platform driver to use dev_groups firmware: arm_scpi: convert platform driver to use dev_groups olpc: x01: convert platform driver to use dev_groups platform: x86: hp-wmi: convert platform driver to use dev_groups video: fbdev: wm8505fb: convert platform driver to use dev_groups video: fbdev: w100fb: convert platform driver to use dev_groups video: fbdev: sm501fb: convert platform driver to use dev_groups
arch/x86/platform/olpc/olpc-xo1-sci.c | 17 ++++------ drivers/base/dd.c | 14 ++++++++ drivers/firmware/arm_scpi.c | 5 +-- drivers/input/keyboard/gpio_keys.c | 13 ++------ drivers/input/misc/axp20x-pek.c | 15 ++------- drivers/platform/x86/hp-wmi.c | 47 +++++++-------------------- drivers/uio/uio_fsl_elbc_gpcm.c | 23 +++++-------- drivers/video/fbdev/sm501fb.c | 37 +++++---------------- drivers/video/fbdev/w100fb.c | 23 ++++++------- drivers/video/fbdev/wm8505fb.c | 13 ++++---- include/linux/device.h | 3 ++ 11 files changed, 76 insertions(+), 134 deletions(-)
Platform drivers now have the option to have the platform core create and remove any needed sysfs attribute files. So take advantage of that and do not register "by hand" a bunch of sysfs files.
Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org --- drivers/input/keyboard/gpio_keys.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 03f4d152f6b7..1373dc5b0765 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -351,10 +351,7 @@ static struct attribute *gpio_keys_attrs[] = { &dev_attr_disabled_switches.attr, NULL, }; - -static const struct attribute_group gpio_keys_attr_group = { - .attrs = gpio_keys_attrs, -}; +ATTRIBUTE_GROUPS(gpio_keys);
static void gpio_keys_gpio_report_event(struct gpio_button_data *bdata) { @@ -851,13 +848,6 @@ static int gpio_keys_probe(struct platform_device *pdev)
fwnode_handle_put(child);
- error = devm_device_add_group(dev, &gpio_keys_attr_group); - if (error) { - dev_err(dev, "Unable to export keys/switches, error: %d\n", - error); - return error; - } - error = input_register_device(input); if (error) { dev_err(dev, "Unable to register input device, error: %d\n", @@ -1026,6 +1016,7 @@ static struct platform_driver gpio_keys_device_driver = { .name = "gpio-keys", .pm = &gpio_keys_pm_ops, .of_match_table = gpio_keys_of_match, + .dev_groups = gpio_keys_groups, } };
On Wed, Jul 31, 2019 at 02:43:42PM +0200, Greg Kroah-Hartman wrote:
Platform drivers now have the option to have the platform core create and remove any needed sysfs attribute files. So take advantage of that and do not register "by hand" a bunch of sysfs files.
Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
Applied, thank you.
drivers/input/keyboard/gpio_keys.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 03f4d152f6b7..1373dc5b0765 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -351,10 +351,7 @@ static struct attribute *gpio_keys_attrs[] = { &dev_attr_disabled_switches.attr, NULL, };
-static const struct attribute_group gpio_keys_attr_group = {
- .attrs = gpio_keys_attrs,
-}; +ATTRIBUTE_GROUPS(gpio_keys);
static void gpio_keys_gpio_report_event(struct gpio_button_data *bdata) { @@ -851,13 +848,6 @@ static int gpio_keys_probe(struct platform_device *pdev)
fwnode_handle_put(child);
- error = devm_device_add_group(dev, &gpio_keys_attr_group);
- if (error) {
dev_err(dev, "Unable to export keys/switches, error: %d\n",
error);
return error;
- }
- error = input_register_device(input); if (error) { dev_err(dev, "Unable to register input device, error: %d\n",
@@ -1026,6 +1016,7 @@ static struct platform_driver gpio_keys_device_driver = { .name = "gpio-keys", .pm = &gpio_keys_pm_ops, .of_match_table = gpio_keys_of_match,
}.dev_groups = gpio_keys_groups,
};
-- 2.22.0
Platform drivers now have the option to have the platform core create and remove any needed sysfs attribute files. So take advantage of that and do not register "by hand" a sysfs file.
Cc: Tony Prisk linux@prisktech.co.nz Cc: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Cc: linux-arm-kernel@lists.infradead.org Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Acked-by: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org --- drivers/video/fbdev/wm8505fb.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/video/fbdev/wm8505fb.c b/drivers/video/fbdev/wm8505fb.c index ff752635a31c..17c780315ca5 100644 --- a/drivers/video/fbdev/wm8505fb.c +++ b/drivers/video/fbdev/wm8505fb.c @@ -176,6 +176,12 @@ static ssize_t contrast_store(struct device *dev,
static DEVICE_ATTR_RW(contrast);
+static struct attribute *wm8505fb_attrs[] = { + &dev_attr_contrast.attr, + NULL, +}; +ATTRIBUTE_GROUPS(wm8505fb); + static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf) { chan &= 0xffff; @@ -361,10 +367,6 @@ static int wm8505fb_probe(struct platform_device *pdev) return ret; }
- ret = device_create_file(&pdev->dev, &dev_attr_contrast); - if (ret < 0) - fb_warn(&fbi->fb, "failed to register attributes (%d)\n", ret); - fb_info(&fbi->fb, "%s frame buffer at 0x%lx-0x%lx\n", fbi->fb.fix.id, fbi->fb.fix.smem_start, fbi->fb.fix.smem_start + fbi->fb.fix.smem_len - 1); @@ -376,8 +378,6 @@ static int wm8505fb_remove(struct platform_device *pdev) { struct wm8505fb_info *fbi = platform_get_drvdata(pdev);
- device_remove_file(&pdev->dev, &dev_attr_contrast); - unregister_framebuffer(&fbi->fb);
writel(0, fbi->regbase); @@ -399,6 +399,7 @@ static struct platform_driver wm8505fb_driver = { .driver = { .name = DRIVER_NAME, .of_match_table = wmt_dt_ids, + .dev_groups = wm8505fb_groups, }, };
Platform drivers now have the option to have the platform core create and remove any needed sysfs attribute files. So take advantage of that and do not register "by hand" a bunch of sysfs files.
Cc: Tony Prisk linux@prisktech.co.nz Cc: linux-arm-kernel@lists.infradead.org Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Acked-by: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org --- drivers/video/fbdev/w100fb.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/drivers/video/fbdev/w100fb.c b/drivers/video/fbdev/w100fb.c index 597ffaa13cd2..3be07807edcd 100644 --- a/drivers/video/fbdev/w100fb.c +++ b/drivers/video/fbdev/w100fb.c @@ -164,6 +164,15 @@ static ssize_t fastpllclk_store(struct device *dev, struct device_attribute *att
static DEVICE_ATTR_RW(fastpllclk);
+static struct attribute *w100fb_attrs[] = { + &dev_attr_fastpllclk.attr, + &dev_attr_reg_read.attr, + &dev_attr_reg_write.attr, + &dev_attr_flip.attr, + NULL, +}; +ATTRIBUTE_GROUPS(w100fb); + /* * Some touchscreens need hsync information from the video driver to * function correctly. We export it here. @@ -752,14 +761,6 @@ int w100fb_probe(struct platform_device *pdev) goto out; }
- err = device_create_file(&pdev->dev, &dev_attr_fastpllclk); - err |= device_create_file(&pdev->dev, &dev_attr_reg_read); - err |= device_create_file(&pdev->dev, &dev_attr_reg_write); - err |= device_create_file(&pdev->dev, &dev_attr_flip); - - if (err != 0) - fb_warn(info, "failed to register attributes (%d)\n", err); - fb_info(info, "%s frame buffer device\n", info->fix.id); return 0; out: @@ -784,11 +785,6 @@ static int w100fb_remove(struct platform_device *pdev) struct fb_info *info = platform_get_drvdata(pdev); struct w100fb_par *par=info->par;
- device_remove_file(&pdev->dev, &dev_attr_fastpllclk); - device_remove_file(&pdev->dev, &dev_attr_reg_read); - device_remove_file(&pdev->dev, &dev_attr_reg_write); - device_remove_file(&pdev->dev, &dev_attr_flip); - unregister_framebuffer(info);
vfree(par->saved_intmem); @@ -1625,6 +1621,7 @@ static struct platform_driver w100fb_driver = { .resume = w100fb_resume, .driver = { .name = "w100fb", + .dev_groups = w100fb_groups, }, };
Platform drivers now have the option to have the platform core create and remove any needed sysfs attribute files. So take advantage of that and do not register "by hand" a bunch of sysfs files.
Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Acked-by: Bartlomiej Zolnierkiewicz b.zolnierkie@samsung.com Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org --- drivers/video/fbdev/sm501fb.c | 37 +++++++++-------------------------- 1 file changed, 9 insertions(+), 28 deletions(-)
diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c index 6edb4492e675..3dd1b1d76e98 100644 --- a/drivers/video/fbdev/sm501fb.c +++ b/drivers/video/fbdev/sm501fb.c @@ -1271,6 +1271,14 @@ static ssize_t sm501fb_debug_show_pnl(struct device *dev,
static DEVICE_ATTR(fbregs_pnl, 0444, sm501fb_debug_show_pnl, NULL);
+static struct attribute *sm501fb_attrs[] = { + &dev_attr_crt_src.attr, + &dev_attr_fbregs_pnl.attr, + &dev_attr_fbregs_crt.attr, + NULL, +}; +ATTRIBUTE_GROUPS(sm501fb); + /* acceleration operations */ static int sm501fb_sync(struct fb_info *info) { @@ -2011,33 +2019,9 @@ static int sm501fb_probe(struct platform_device *pdev) goto err_started_crt; }
- /* create device files */ - - ret = device_create_file(dev, &dev_attr_crt_src); - if (ret) - goto err_started_panel; - - ret = device_create_file(dev, &dev_attr_fbregs_pnl); - if (ret) - goto err_attached_crtsrc_file; - - ret = device_create_file(dev, &dev_attr_fbregs_crt); - if (ret) - goto err_attached_pnlregs_file; - /* we registered, return ok */ return 0;
-err_attached_pnlregs_file: - device_remove_file(dev, &dev_attr_fbregs_pnl); - -err_attached_crtsrc_file: - device_remove_file(dev, &dev_attr_crt_src); - -err_started_panel: - unregister_framebuffer(info->fb[HEAD_PANEL]); - sm501_free_init_fb(info, HEAD_PANEL); - err_started_crt: unregister_framebuffer(info->fb[HEAD_CRT]); sm501_free_init_fb(info, HEAD_CRT); @@ -2067,10 +2051,6 @@ static int sm501fb_remove(struct platform_device *pdev) struct fb_info *fbinfo_crt = info->fb[0]; struct fb_info *fbinfo_pnl = info->fb[1];
- device_remove_file(&pdev->dev, &dev_attr_fbregs_crt); - device_remove_file(&pdev->dev, &dev_attr_fbregs_pnl); - device_remove_file(&pdev->dev, &dev_attr_crt_src); - sm501_free_init_fb(info, HEAD_CRT); sm501_free_init_fb(info, HEAD_PANEL);
@@ -2234,6 +2214,7 @@ static struct platform_driver sm501fb_driver = { .resume = sm501fb_resume, .driver = { .name = "sm501-fb", + .dev_groups = sm501fb_groups, }, };
On Wed, Jul 31, 2019 at 02:43:39PM +0200, Greg Kroah-Hartman wrote:
This patch originally started out just as a way for platform drivers to easily add a sysfs group in a race-free way, but thanks to Dmitry's patch, this series now is for all drivers in the kernel (hey, a unified driver model works!!!)
I've only converted a few platform drivers here in this series to show how it works, but other busses can be converted after the first patch goes into the tree.
Here's the original 00 message, for people to get an idea of what is going on here:
If a platform driver wants to add a sysfs group, it has to do so in a racy way, adding it after the driver is bound. To resolve this issue, have the platform driver core do this for the driver, making the individual drivers logic smaller and simpler, and solving the race at the same time.
All of these patches depend on the first patch. I'll take the first one through my driver-core tree, and any subsystem maintainer can either ack their individul patch and I will be glad to also merge it, or they can wait until after 5.4-rc1 when the core patch hits Linus's tree and then take it, it's up to them.
Maybe make an immutable branch off 5.2 with just patch 1/10 so that subsystems (and the driver core tree itself) could pull it in at their leisure into their "*-next" branches and did not have to wait till 5.4 or risk merge clashes?
Thanks.
On Wed, Jul 31, 2019 at 06:10:45AM -0700, Dmitry Torokhov wrote:
On Wed, Jul 31, 2019 at 02:43:39PM +0200, Greg Kroah-Hartman wrote:
This patch originally started out just as a way for platform drivers to easily add a sysfs group in a race-free way, but thanks to Dmitry's patch, this series now is for all drivers in the kernel (hey, a unified driver model works!!!)
I've only converted a few platform drivers here in this series to show how it works, but other busses can be converted after the first patch goes into the tree.
Here's the original 00 message, for people to get an idea of what is going on here:
If a platform driver wants to add a sysfs group, it has to do so in a racy way, adding it after the driver is bound. To resolve this issue, have the platform driver core do this for the driver, making the individual drivers logic smaller and simpler, and solving the race at the same time.
All of these patches depend on the first patch. I'll take the first one through my driver-core tree, and any subsystem maintainer can either ack their individul patch and I will be glad to also merge it, or they can wait until after 5.4-rc1 when the core patch hits Linus's tree and then take it, it's up to them.
Maybe make an immutable branch off 5.2 with just patch 1/10 so that subsystems (and the driver core tree itself) could pull it in at their leisure into their "*-next" branches and did not have to wait till 5.4 or risk merge clashes?
Good idea, I will do that when I apply it after a few days to give people a chance to review it.
thanks,
greg k-h
On Wed, Jul 31, 2019 at 06:10:45AM -0700, Dmitry Torokhov wrote:
On Wed, Jul 31, 2019 at 02:43:39PM +0200, Greg Kroah-Hartman wrote:
This patch originally started out just as a way for platform drivers to easily add a sysfs group in a race-free way, but thanks to Dmitry's patch, this series now is for all drivers in the kernel (hey, a unified driver model works!!!)
I've only converted a few platform drivers here in this series to show how it works, but other busses can be converted after the first patch goes into the tree.
Here's the original 00 message, for people to get an idea of what is going on here:
If a platform driver wants to add a sysfs group, it has to do so in a racy way, adding it after the driver is bound. To resolve this issue, have the platform driver core do this for the driver, making the individual drivers logic smaller and simpler, and solving the race at the same time.
All of these patches depend on the first patch. I'll take the first one through my driver-core tree, and any subsystem maintainer can either ack their individul patch and I will be glad to also merge it, or they can wait until after 5.4-rc1 when the core patch hits Linus's tree and then take it, it's up to them.
Maybe make an immutable branch off 5.2 with just patch 1/10 so that subsystems (and the driver core tree itself) could pull it in at their leisure into their "*-next" branches and did not have to wait till 5.4 or risk merge clashes?
Isn't cherry-pick enough for one patch?
On Wed, Jul 31, 2019 at 04:38:40PM +0300, Andy Shevchenko wrote:
On Wed, Jul 31, 2019 at 06:10:45AM -0700, Dmitry Torokhov wrote:
On Wed, Jul 31, 2019 at 02:43:39PM +0200, Greg Kroah-Hartman wrote:
This patch originally started out just as a way for platform drivers to easily add a sysfs group in a race-free way, but thanks to Dmitry's patch, this series now is for all drivers in the kernel (hey, a unified driver model works!!!)
I've only converted a few platform drivers here in this series to show how it works, but other busses can be converted after the first patch goes into the tree.
Here's the original 00 message, for people to get an idea of what is going on here:
If a platform driver wants to add a sysfs group, it has to do so in a racy way, adding it after the driver is bound. To resolve this issue, have the platform driver core do this for the driver, making the individual drivers logic smaller and simpler, and solving the race at the same time.
All of these patches depend on the first patch. I'll take the first one through my driver-core tree, and any subsystem maintainer can either ack their individul patch and I will be glad to also merge it, or they can wait until after 5.4-rc1 when the core patch hits Linus's tree and then take it, it's up to them.
Maybe make an immutable branch off 5.2 with just patch 1/10 so that subsystems (and the driver core tree itself) could pull it in at their leisure into their "*-next" branches and did not have to wait till 5.4 or risk merge clashes?
Isn't cherry-pick enough for one patch?
With cherry-picking you run into potential merge conflicts if Greg changes more code in the same area. Plus, once everything is merged into Linus' tree, there will be N git commits adding the same thing.
With immutable branch there is a single git commit, so merges are guaranteed to be clean, with no conflicts.
Thanks.
On Wed, Jul 31, 2019 at 06:10:45AM -0700, Dmitry Torokhov wrote:
On Wed, Jul 31, 2019 at 02:43:39PM +0200, Greg Kroah-Hartman wrote:
This patch originally started out just as a way for platform drivers to easily add a sysfs group in a race-free way, but thanks to Dmitry's patch, this series now is for all drivers in the kernel (hey, a unified driver model works!!!)
I've only converted a few platform drivers here in this series to show how it works, but other busses can be converted after the first patch goes into the tree.
Here's the original 00 message, for people to get an idea of what is going on here:
If a platform driver wants to add a sysfs group, it has to do so in a racy way, adding it after the driver is bound. To resolve this issue, have the platform driver core do this for the driver, making the individual drivers logic smaller and simpler, and solving the race at the same time.
All of these patches depend on the first patch. I'll take the first one through my driver-core tree, and any subsystem maintainer can either ack their individul patch and I will be glad to also merge it, or they can wait until after 5.4-rc1 when the core patch hits Linus's tree and then take it, it's up to them.
Maybe make an immutable branch off 5.2 with just patch 1/10 so that subsystems (and the driver core tree itself) could pull it in at their leisure into their "*-next" branches and did not have to wait till 5.4 or risk merge clashes?
I have now done this with patch 1/10. Here's the pull info if any subsystem maintainer wants to suck this into their tree to provide the ability for drivers to add/remove attribute groups easily.
This is part of my driver-core tree now, and will go to Linus for 5.4-rc1, along with a few platform drivers that have been acked by their various subsystem maintainers that convert them to use this new functionality.
If anyone has any questions about this, please let me know.
thanks,
greg k-h
-------------------
The following changes since commit 5f9e832c137075045d15cd6899ab0505cfb2ca4b:
Linus 5.3-rc1 (2019-07-21 14:05:38 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git tags/dev_groups_all_drivers
for you to fetch changes up to 23b6904442d08b7dbed7622ed33b236d41a3aa8b:
driver core: add dev_groups to all drivers (2019-08-02 12:37:53 +0200)
---------------------------------------------------------------- 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
---------------------------------------------------------------- Dmitry Torokhov (1): driver core: add dev_groups to all drivers
drivers/base/dd.c | 14 ++++++++++++++ include/linux/device.h | 3 +++ 2 files changed, 17 insertions(+)
Hi Greg,
On Fri, 2 Aug 2019 at 11:46, Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
I have now done this with patch 1/10. Here's the pull info if any subsystem maintainer wants to suck this into their tree to provide the ability for drivers to add/remove attribute groups easily.
This is part of my driver-core tree now, and will go to Linus for 5.4-rc1, along with a few platform drivers that have been acked by their various subsystem maintainers that convert them to use this new functionality.
If anyone has any questions about this, please let me know.
thanks,
greg k-h
The following changes since commit 5f9e832c137075045d15cd6899ab0505cfb2ca4b:
Linus 5.3-rc1 (2019-07-21 14:05:38 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git tags/dev_groups_all_drivers
for you to fetch changes up to 23b6904442d08b7dbed7622ed33b236d41a3aa8b:
driver core: add dev_groups to all drivers (2019-08-02 12:37:53 +0200)
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
Dmitry Torokhov (1): driver core: add dev_groups to all drivers
drivers/base/dd.c | 14 ++++++++++++++ include/linux/device.h | 3 +++ 2 files changed, 17 insertions(+) _______________________________________________
Was planning to re-spin DRM a series which uses .dev_groups, although I cannot see the core patch. Did the it get reverted or simply fell though the cracks?
-Emil
On Wed, May 13, 2020 at 11:18:15PM +0100, Emil Velikov wrote:
Hi Greg,
On Fri, 2 Aug 2019 at 11:46, Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
I have now done this with patch 1/10. Here's the pull info if any subsystem maintainer wants to suck this into their tree to provide the ability for drivers to add/remove attribute groups easily.
This is part of my driver-core tree now, and will go to Linus for 5.4-rc1, along with a few platform drivers that have been acked by their various subsystem maintainers that convert them to use this new functionality.
If anyone has any questions about this, please let me know.
thanks,
greg k-h
The following changes since commit 5f9e832c137075045d15cd6899ab0505cfb2ca4b:
Linus 5.3-rc1 (2019-07-21 14:05:38 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git tags/dev_groups_all_drivers
for you to fetch changes up to 23b6904442d08b7dbed7622ed33b236d41a3aa8b:
driver core: add dev_groups to all drivers (2019-08-02 12:37:53 +0200)
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
Dmitry Torokhov (1): driver core: add dev_groups to all drivers
drivers/base/dd.c | 14 ++++++++++++++ include/linux/device.h | 3 +++ 2 files changed, 17 insertions(+) _______________________________________________
Was planning to re-spin DRM a series which uses .dev_groups, although I cannot see the core patch. Did the it get reverted or simply fell though the cracks?
Nope, it's in there: 23b6904442d0 ("driver core: add dev_groups to all drivers") which showed up in the 5.4 kernel release.
Lots of other subsystems have already been converted to use this, do you not see it in your tree?
thanks,
greg k-h
On Thu, 14 May 2020 at 08:16, Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
On Wed, May 13, 2020 at 11:18:15PM +0100, Emil Velikov wrote:
Hi Greg,
On Fri, 2 Aug 2019 at 11:46, Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
I have now done this with patch 1/10. Here's the pull info if any subsystem maintainer wants to suck this into their tree to provide the ability for drivers to add/remove attribute groups easily.
This is part of my driver-core tree now, and will go to Linus for 5.4-rc1, along with a few platform drivers that have been acked by their various subsystem maintainers that convert them to use this new functionality.
If anyone has any questions about this, please let me know.
thanks,
greg k-h
The following changes since commit 5f9e832c137075045d15cd6899ab0505cfb2ca4b:
Linus 5.3-rc1 (2019-07-21 14:05:38 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git tags/dev_groups_all_drivers
for you to fetch changes up to 23b6904442d08b7dbed7622ed33b236d41a3aa8b:
driver core: add dev_groups to all drivers (2019-08-02 12:37:53 +0200)
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
Dmitry Torokhov (1): driver core: add dev_groups to all drivers
drivers/base/dd.c | 14 ++++++++++++++ include/linux/device.h | 3 +++ 2 files changed, 17 insertions(+) _______________________________________________
Was planning to re-spin DRM a series which uses .dev_groups, although I cannot see the core patch. Did the it get reverted or simply fell though the cracks?
Nope, it's in there: 23b6904442d0 ("driver core: add dev_groups to all drivers") which showed up in the 5.4 kernel release.
Lots of other subsystems have already been converted to use this, do you not see it in your tree?
A case of PEBKAC it seems - I was looking at a 5.3 checkout somehow.
Thanks for the core work. Will check/merge the fbdev patches over the next few days and polish drm land.
-Emil
dri-devel@lists.freedesktop.org