From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PULL_REQUEST, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 382DCC433FF for ; Fri, 2 Aug 2019 10:46:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10C9720B7C for ; Fri, 2 Aug 2019 10:46:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564742800; bh=/Xo8pj+jLNFZr+k58OkpgJ6361PxmCXwjaJe76ZgvQ4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=Ufspxg145AiSxq5ekLy8cyLo37quNvicaMYdw2DU/XXXMs2TePKhHHKOebjEwGM0j hrUl1GWv0ZVSS0LKwczbP6keRuv4KXL7mYvfg0KSHe4MqN0CK0JocMSL6HGWXwA7S4 hm3F8C3S7aWceojgqrxOMjJwaPjWTFwMuWQvxDXg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405674AbfHBKqi (ORCPT ); Fri, 2 Aug 2019 06:46:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:34086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730841AbfHBKqg (ORCPT ); Fri, 2 Aug 2019 06:46:36 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 412262087E; Fri, 2 Aug 2019 10:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564742795; bh=/Xo8pj+jLNFZr+k58OkpgJ6361PxmCXwjaJe76ZgvQ4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bguPlqmbZheY1d41/TUOJypiEzni5SdqGWSfXCyvcy+41ffeFMZs7DlxzidPFbVDg lNEM1JV5n0kaBfZ8Zk5BlH+xkYzf5X28x7CKgTqlP93I0FsxJiuqB/EPEYyxOrWnFb eaYAOGHAUm+aLPpqIKkhug+DzWGzJ2ImmL2AUZyc= Date: Fri, 2 Aug 2019 12:46:33 +0200 From: Greg Kroah-Hartman To: Dmitry Torokhov Cc: linux-kernel@vger.kernel.org, Richard Gong , "H. Peter Anvin" , Andy Shevchenko , Andy Shevchenko , Bartlomiej Zolnierkiewicz , Borislav Petkov , Darren Hart , Florian Fainelli , Ingo Molnar , Sudeep Holla , Thomas Gleixner , Tony Prisk , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-input@vger.kernel.org, platform-driver-x86@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v2 00/10] drivers, provide a way to add sysfs groups easily Message-ID: <20190802104633.GA14823@kroah.com> References: <20190731124349.4474-1-gregkh@linuxfoundation.org> <20190731131045.GB147138@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190731131045.GB147138@dtor-ws> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ---------------------------------------------------------------- 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(+) From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [PATCH v2 00/10] drivers, provide a way to add sysfs groups easily Date: Fri, 2 Aug 2019 12:46:33 +0200 Message-ID: <20190802104633.GA14823@kroah.com> References: <20190731124349.4474-1-gregkh@linuxfoundation.org> <20190731131045.GB147138@dtor-ws> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Content-Disposition: inline In-Reply-To: <20190731131045.GB147138@dtor-ws> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Dmitry Torokhov Cc: x86@kernel.org, linux-input@vger.kernel.org, linux-fbdev@vger.kernel.org, Andy Shevchenko , Bartlomiej Zolnierkiewicz , Sudeep Holla , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, platform-driver-x86@vger.kernel.org, Tony Prisk , Andy Shevchenko , Florian Fainelli , Borislav Petkov , "H. Peter Anvin" , Darren Hart , Thomas Gleixner , Richard Gong , Ingo Molnar , linux-arm-kernel@lists.infradead.org List-Id: platform-driver-x86.vger.kernel.org T24gV2VkLCBKdWwgMzEsIDIwMTkgYXQgMDY6MTA6NDVBTSAtMDcwMCwgRG1pdHJ5IFRvcm9raG92 IHdyb3RlOgo+IE9uIFdlZCwgSnVsIDMxLCAyMDE5IGF0IDAyOjQzOjM5UE0gKzAyMDAsIEdyZWcg S3JvYWgtSGFydG1hbiB3cm90ZToKPiA+IFRoaXMgcGF0Y2ggb3JpZ2luYWxseSBzdGFydGVkIG91 dCBqdXN0IGFzIGEgd2F5IGZvciBwbGF0Zm9ybSBkcml2ZXJzIHRvCj4gPiBlYXNpbHkgYWRkIGEg c3lzZnMgZ3JvdXAgaW4g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MuZnJlZWRlc2t0b3Aub3Jn Cmh0dHBzOi8vbGlzdHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Date: Fri, 02 Aug 2019 10:46:33 +0000 Subject: Re: [PATCH v2 00/10] drivers, provide a way to add sysfs groups easily Message-Id: <20190802104633.GA14823@kroah.com> List-Id: References: <20190731124349.4474-1-gregkh@linuxfoundation.org> <20190731131045.GB147138@dtor-ws> In-Reply-To: <20190731131045.GB147138@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dmitry Torokhov Cc: x86@kernel.org, linux-input@vger.kernel.org, linux-fbdev@vger.kernel.org, Andy Shevchenko , Bartlomiej Zolnierkiewicz , Sudeep Holla , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, platform-driver-x86@vger.kernel.org, Tony Prisk , Andy Shevchenko , Florian Fainelli , Borislav Petkov , "H. Peter Anvin" , Darren Hart , Thomas Gleixner , Richard Gong , Ingo Molnar , linux-arm-kernel@lists.infradead.org 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 ---------------------------------------------------------------- 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(+) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PULL_REQUEST, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0F81C32750 for ; Fri, 2 Aug 2019 10:46:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BA62E20B7C for ; Fri, 2 Aug 2019 10:46:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PV7eYQsk"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="bguPlqmb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA62E20B7C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=p/MeOdfY12668Z39gHT1Lv2JwOpT/IglVCFBIKgjCug=; b=PV7eYQskA4ez9D 93VdvdOr5rGk50llWvs1Lk7pVH4PtLoR9stMyyAd+1aAEyQdnOh5p30IGYq2OEV286HFU8NJ6rJJ/ M04+mU7650VdaGu49U5hr1Tx10IoE/pC3gYDrVmKjHyRAvQmsQXQR5vAwsCXjG/5tFFwTs8yZbGfK 7z7Ptg2yXbg9hzO2AbZmuO53rQ1JizU4EMhFFuoqI6wJKsKG9QLVIX1ceus31ltNKtDtf4AaS7bsF 2CylvhqiDjCu8rWRXH5UPOXDo2AA88bxn3GpEOQp2cqhz9j00PnJycOO3NaWVTDdDAKS7oGRT2AOH FIdyNw4dOhv2RaY/ymHA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1htV55-0007zJ-Mh; Fri, 02 Aug 2019 10:46:39 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1htV52-0007yV-FY for linux-arm-kernel@lists.infradead.org; Fri, 02 Aug 2019 10:46:38 +0000 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 412262087E; Fri, 2 Aug 2019 10:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564742795; bh=/Xo8pj+jLNFZr+k58OkpgJ6361PxmCXwjaJe76ZgvQ4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bguPlqmbZheY1d41/TUOJypiEzni5SdqGWSfXCyvcy+41ffeFMZs7DlxzidPFbVDg lNEM1JV5n0kaBfZ8Zk5BlH+xkYzf5X28x7CKgTqlP93I0FsxJiuqB/EPEYyxOrWnFb eaYAOGHAUm+aLPpqIKkhug+DzWGzJ2ImmL2AUZyc= Date: Fri, 2 Aug 2019 12:46:33 +0200 From: Greg Kroah-Hartman To: Dmitry Torokhov Subject: Re: [PATCH v2 00/10] drivers, provide a way to add sysfs groups easily Message-ID: <20190802104633.GA14823@kroah.com> References: <20190731124349.4474-1-gregkh@linuxfoundation.org> <20190731131045.GB147138@dtor-ws> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190731131045.GB147138@dtor-ws> User-Agent: Mutt/1.12.1 (2019-06-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190802_034636_564473_5434A9A1 X-CRM114-Status: GOOD ( 28.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: x86@kernel.org, linux-input@vger.kernel.org, linux-fbdev@vger.kernel.org, Andy Shevchenko , Bartlomiej Zolnierkiewicz , Sudeep Holla , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, platform-driver-x86@vger.kernel.org, Tony Prisk , Andy Shevchenko , Florian Fainelli , Borislav Petkov , "H. Peter Anvin" , Darren Hart , Thomas Gleixner , Richard Gong , Ingo Molnar , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 ---------------------------------------------------------------- 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(+) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel