From patchwork Tue Jan 30 18:46:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 19681 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1426218dyb; Tue, 30 Jan 2024 10:47:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IEIGJG6VYrq1VqKGV1AYa79JtcxJGQglIEi40FGG0O+LJ8ydKkkml3rU6Q/Ghbju7TC9L/l X-Received: by 2002:a17:90a:9f0c:b0:290:cd3:a2d2 with SMTP id n12-20020a17090a9f0c00b002900cd3a2d2mr6264103pjp.3.1706640424582; Tue, 30 Jan 2024 10:47:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706640424; cv=pass; d=google.com; s=arc-20160816; b=dNVSeFb9q+25apRhXXX0NzfKkOGHuyXfhVnqlKk9pD5WshHOCB2usiZU3sRYE5xf+9 Fg4KOrrxUJUyB7Bpycnq4HmpKLcZYdxwl/Xpkx/I2ytfY40+NGywPziN8VAuKMVhODcs aengGhRHhFX+fXA/lSaruM7PjVPZzpjqQxnW6I01KoNsTKJBmWg2Qvi/ra2vBXq4w1XX jpeQocg71ZTjsvWl83YiwgjBsdXaPoQui4nrSJYg7IwPdWSq20Bt00mQFo+eEcAnE4CI ZcCrXc0JM6NIzI2OGdZHeaMEtBNDf7L+RDRINgYG93rAoqOsX9A0juK5njIOr/DJ5WKQ 8CPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:lines:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=ZUCphAcr8yOP5Gp+dyov18tx2mHoBTkQ6RHzpGEQDvY=; fh=ZUcPkiVf4gvMgVDOUhavBu3WqSDJFLN7Q4rE5Smm1Ig=; b=AO9sccYX+y98CzFOzKoLHakWKnmkGrm7xtbBaGvIvOlkYomaLX1/oEx/KhUvUn1ycJ +Mu5XehF6qdUtBKN6Jd/aJVU4Bl90ZhDE7joN8/CvSd/3N1ulEei1pJNWYXwuFyx/G2K D2CSTKmDVVWpavUsI+iWK2hL3u4YCWfromhuoerq16tFMMO1uwCwOZuynlvrKAoaRdLQ QWPXc0XoJplEZu6pt+GJKleYwga1ij/iQ9QzuJxIl/zmhr3GEWBSlUU4D193YC4Myk28 6Az0Rh8s0tIUfMHcQbRvBxlS1SZIqJalSmGTeWSVX+4IwLEz10NE4Dqc23AN5O4yCl5I Qu/g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S3nVabP8; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-45132-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45132-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id e12-20020a17090a77cc00b0028ff4fe69fasi7915022pjs.171.2024.01.30.10.47.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 10:47:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45132-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S3nVabP8; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-45132-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45132-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2A23AB2367D for ; Tue, 30 Jan 2024 18:46:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 02B1B6F08E; Tue, 30 Jan 2024 18:46:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="S3nVabP8" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3AE1F78B4D for ; Tue, 30 Jan 2024 18:46:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706640395; cv=none; b=U3vTXOL2Pt7p8cPV4Vm7GthpLrEOi9X6RBotXGvSelHJt/PSEqqujfdUx0cqrVJruNoyACT3BN5/mUFs/5dZsJFzvBUgj5mV/2mlInRMSmSrBZ9eysuU4hEgk9lfdoyfJM1s4/yEnXWeX5xPm5YC0YQRSjwkA9pyddguIaSNYWc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706640395; c=relaxed/simple; bh=TYryKQ6Sza7hEPkyS5IKoJzK2LP8DjvU7jvBfEjpBxk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=huimKqGlYp/p5VzFnonfcKg2rWVE4D+DbMtczq6y+GeD2LPl6kpY4m8LJ6sDDtKEzufIe315WTXkFz0fgL80xa7WPmFIduWY7GCn8MBi2CJ7/Igydu04/VdiV+i6Qcd9PHWdSyZSNN5iZcZZRbDbDcKzZsgx8s1KvcT2PeihGtk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=S3nVabP8; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96E49C433F1; Tue, 30 Jan 2024 18:46:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706640394; bh=TYryKQ6Sza7hEPkyS5IKoJzK2LP8DjvU7jvBfEjpBxk=; h=From:To:Cc:Subject:Date:From; b=S3nVabP8zfzQDZjSPHzhoj0sixm19miQTVDcAbtX+lLYusw9AhcgejzQD2PBapHGi DCzL8LhxVgvIuREgOyArY2CPnwx5AME4LHpR9AcHMdP2HY+GZkV5D8G2wx07870ASy R43HhU9CK0zCDSq5MoEdHIva7df69z6ZbdCLp3zs= From: Greg Kroah-Hartman To: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Dan Williams , Vinod Koul , Bard Liao , Pierre-Louis Bossart , Sanyog Kale Subject: [PATCH 0/7] Soundwire: clean up sysfs group creation Date: Tue, 30 Jan 2024 10:46:26 -0800 Message-ID: <2024013025-spoiling-exact-ad20@gregkh> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Lines: 48 X-Developer-Signature: v=1; a=openpgp-sha256; l=1960; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=TYryKQ6Sza7hEPkyS5IKoJzK2LP8DjvU7jvBfEjpBxk=; b=owGbwMvMwCRo6H6F97bub03G02pJDKk7XZgUpkw/8i1mjpf5vskd1XsEu3VXlSzQ2nfY7cxM1 Zn/N7x50xHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATEdBgmKdh8S49pX36Ec0z t1h3TZwk5Hhl2wOGuXLrk/Z/mxsiY7F+odgGlu8n/maoTgQA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789542190141055177 X-GMAIL-MSGID: 1789542190141055177 Note, this is a redone version of a very old series I wrote back in 2022: https://lore.kernel.org/r/20220824135951.3604059-1-gregkh@linuxfoundation.org but everyone has forgotten about it now, and I've reworked it, so I'm considering it a "new" version, and not v2. Here's a series that adds the functionality to the driver core to hide entire attribute groups, in a much saner way than we have attempted in the past (i.e. dynamically figuring it out.) Many thanks to Dan for this patch. I'll also be taking this into my driver-core branch and creating a stable tag for anyone else to pull from to get it into their trees, as I think it will want to be in many for this development cycle. After the driver core change, there's cleanups to the soundwire core for how the attribute groups are created, to remove the "manual" creation of them, and allow the driver core to create them correctly, as needed, when needed, which makes things much smaller for the soundwire code to manage. Comments appreciated! thanks, greg k-h Dan Williams (1): sysfs: Introduce a mechanism to hide static attribute_groups Greg Kroah-Hartman (5): soundwire: sysfs: move sdw_slave_dev_attr_group into the existing list of groups soundwire: sysfs: cleanup the logic for creating the dp0 sysfs attributes soundwire: sysfs: have the driver core handle the creation of the device groups soundwire: sysfs: remove sdw_slave_sysfs_init() soundwire: sysfs: remove unneeded ATTRIBUTE_GROUPS() comments drivers/soundwire/bus_type.c | 5 ++- drivers/soundwire/sysfs_local.h | 4 +- drivers/soundwire/sysfs_slave.c | 64 ++++++++++++++--------------- drivers/soundwire/sysfs_slave_dpn.c | 3 ++ fs/sysfs/group.c | 45 ++++++++++++++++---- include/linux/sysfs.h | 63 ++++++++++++++++++++++------ 6 files changed, 126 insertions(+), 58 deletions(-)