From patchwork Tue Oct 15 08:00:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 835601 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E4B418B478 for ; Tue, 15 Oct 2024 08:00:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728979239; cv=none; b=Tw0Npm4Imw7ZIQWlk8MXnP4dmyy4dnhMGC92ztd7UCMRFs4+XM9ihrYgz3gpK0kqyd25b0BdD1bzR+fE4mvfK6dtf6ntfn7YJts562ISfyqr1VjNwgKa+28xn/Yk1AIXZKQ8RYIjWDA+dYICQshMkSOrSR/noqNF68AqhWO8nos= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728979239; c=relaxed/simple; bh=lShOssYYZ4xdaJbyNHqanMXvuVDf0req6t/NTfNf7nY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fvyeNfA6pbD1l4izTurd5EdG1HiWl6zUMPTi85Cv+bHIKWaRMl0vqNnYcVUcMLX25gbTgd0ZvQ27CBIhKTzMMn0PKn0LtFfjM1wtR/0DQZB6EgbH7ko3I81/jPloDaUPcZaB25kA3/BNQynS1CFlZ05S4IVG/HRn0bfpDD2C7u8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=C8uG4Guw; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="C8uG4Guw" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4305413aec9so48726845e9.2 for ; Tue, 15 Oct 2024 01:00:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1728979235; x=1729584035; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=DPmBnjRzQjanP1Mw6RBxSNqB3Ne/ZGQb73RhNFBuRkg=; b=C8uG4GuwTNHV9EqR/BtD39M2ZOVdJtXC3cEBIc3xSh2PgCa6eZNemYGcJU+JQxHISa UCbMvlaDDNeZjBOZ3uz4D+dREtyFMCDzF5scxcAmRXSNgDnlva72LtUOvh8vzalER6fo THMwEQQPTrGY/NsdGSXrG4K/SIhj8XPR6G+MNEJ7e5lPeyHTOLZ0uV3H4RfhGF32CM1a lST4YVtSUJY4EHBXlG+RfmXhgT8skX+y8pyjKtCSb/UZLuMgo3UEXsZHKKcghUrN8tut S77T4k2Uq8oXWG+xopSoHTq+wQttnBCdw5olKKnQ/9CHCTIIZ3dWBLDntpe8Wfmkf4U9 yKwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728979235; x=1729584035; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DPmBnjRzQjanP1Mw6RBxSNqB3Ne/ZGQb73RhNFBuRkg=; b=axGmIPxqpq480ddm/RUhioLpd6VwKm8V2Z1jTK4S2AiKYjrIdyB8rz2aOXa/s4Ga0H p3S+Xllw/L0iCSlQYepmbeBkCE0351mK2cU9UN4i59Ivi84Mlqyua8tspuPAObpo2r5m jkOunB0lt9PMNazURYTr2mMvSpyaqSQGzAZCaBSEsO024whatqyJgnDvhGhP/Q0YM//j KIDCWvW10DoxDRPysac8zR53Ydwon5k3lWemwPid2tisjcJxj5D+UyqDIjNQ/ynR3+LV LjCoA5r+PBoFNwkQJhSpyGc0cK2HpYv9+HJLq5+iOh0NM2Lx44xo5qwk0n+GBAvddBhF cNBQ== X-Forwarded-Encrypted: i=1; AJvYcCVUOX60xeF0G5lw8cqGzY1pa/aVDKmNVa1Vj2OVoaRSkxhQzX9u7xOL8PUYqQmCQeqpDyBY7kdy6mXO@vger.kernel.org X-Gm-Message-State: AOJu0YwwGQQUx3N49Ld6ruawCh8zVXN2PNX/mGm2XO1MR53BOGbPrMhb cJx4brco7XNGB6KaBiKX9HIpDe212xGKUtqmfTPFCgz//ZdMMA6GH5uumDrumI0= X-Google-Smtp-Source: AGHT+IEUywC+aHx8Z0+/e73fat6PMCBV3/OMS++EeHAQrljRwiBLDr/pa2onfeqqcFJG0JSYBp3U2A== X-Received: by 2002:a05:600c:6d48:b0:431:44aa:ee2e with SMTP id 5b1f17b1804b1-43144aaeed1mr4322285e9.4.1728979235307; Tue, 15 Oct 2024 01:00:35 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:d382:b11b:c441:d747]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4313f6c5531sm9962385e9.46.2024.10.15.01.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 01:00:34 -0700 (PDT) From: Bartosz Golaszewski Date: Tue, 15 Oct 2024 10:00:23 +0200 Subject: [PATCH v2 1/2] driver core: class: expose the class kobject Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241015-gpio-class-mountpoint-v2-1-7709301876ef@linaro.org> References: <20241015-gpio-class-mountpoint-v2-0-7709301876ef@linaro.org> In-Reply-To: <20241015-gpio-class-mountpoint-v2-0-7709301876ef@linaro.org> To: Greg Kroah-Hartman , "Rafael J. Wysocki" , Linus Walleij , Bartosz Golaszewski , Kent Gibson Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1570; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=xdeL0K0ax/Y+4XPXJs5CzHWIMj0+eRuCDAFQgt0geww=; b=kA0DAAoBEacuoBRx13IByyZiAGcOISGhKwaCS/er5T4wAxp/HjzMKJo3xyuU0cEhq74QKUqYU IkCMwQAAQoAHRYhBBad62wLw8RgE9LHnxGnLqAUcddyBQJnDiEhAAoJEBGnLqAUcddy+iQP+wRm Q9YBOVvXAgenreppoNEPkVmNCkgnPoZep6I+RbrXKPiE3VVycvOVsVBml3QfQSKVFWIbE7wVJXM P0OyasicWOluUUlEn5W3juVds1FIU1ZwlzT/wl5+HUjsmAy1dqjB8bpBLLaaCbQZALwwX4th8ZV pY/jI1lrx6GbOdk9tir2xx+gD6gGBGOs2vEFj7tP4OFDoSVEbYiv20TbayEHC1pv9ALtqz4zMlx YlS84X2PGxHjSsk18rMD2JXYieczaDk6Pgw4LrIYg+QTA15IY2riKDpm21kjKdFOdYyTGtQOHf/ nC9F0QKwgO86rw8nNkr78nG/+0c5+ZC+BW6hmzN5jDHmjsay7Ao512csecRfLrCK0l3XqUk82nU JHbHlL7eJzfRBRwvmztsDQ3CSykX6wkkztLcF7fWj82GVd0zh2CeB1wJT2MaheEr/xysylfiEWm 3fXzgp/fbZt4rHk9X5SBd167WoYjt+gMSh9TbrXeRmOn7JAF0QMsmV79tPnBdz2vFbrDYvfXJjm xSw4e9FRpODUGp/M1h0H6j2/5EDv2WphzyIRlzwlXa7eGkVS4CJ8t1kAQjuATfI/gMkOq8lNU00 tDWYdp9gzLkEmEU9nXo3VfbcrZjWEVQxMvb0jR7ztGy5FHe5zHQf2yED+JFG7wcmFxfWarpzhgb KJ+dE X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski Export the address of the /sys/class kobject to users that need to chain off of it by means other than calling register_class(). This will be used by the GPIO subsystem to provide a backward compatibility mount-point for the GPIO sysfs class once it's disabled. Signed-off-by: Bartosz Golaszewski --- drivers/base/class.c | 6 ++++++ include/linux/device/class.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/drivers/base/class.c b/drivers/base/class.c index cb5359235c70..68474aff53df 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c @@ -23,6 +23,9 @@ /* /sys/class */ static struct kset *class_kset; +struct kobject *class_kobj; +EXPORT_SYMBOL_GPL(class_kobj); + #define to_class_attr(_attr) container_of(_attr, struct class_attribute, attr) /** @@ -668,5 +671,8 @@ int __init classes_init(void) class_kset = kset_create_and_add("class", NULL, NULL); if (!class_kset) return -ENOMEM; + + class_kobj = &class_kset->kobj; + return 0; } diff --git a/include/linux/device/class.h b/include/linux/device/class.h index 518c9c83d64b..898f7948293d 100644 --- a/include/linux/device/class.h +++ b/include/linux/device/class.h @@ -69,6 +69,12 @@ struct class { const struct dev_pm_ops *pm; }; +/* + * Global /sys/class kobject for creating sub-groups by means other than + * class_register(). + */ +extern struct kobject *class_kobj; + struct class_dev_iter { struct klist_iter ki; const struct device_type *type; From patchwork Tue Oct 15 08:00:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 836402 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BC0D1AE006 for ; Tue, 15 Oct 2024 08:00:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728979241; cv=none; b=NuGi+p6zfe4eZ0iiRI0AWM5OBcICCLF5bi7FSDEVlJwqQ1IHagacbIW+VFFxnweFGDY5Ce/mR897YsOVxKdI18TzPvUOr5HSCCAdunWIdqFLRA2VEO8/ETfN6hiuL/elb0tBvtQg4vwNTv1z3OvYmvXxLVrdIDl45M3yhSJpSPo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728979241; c=relaxed/simple; bh=snrtP37fMOoZbMd/JPvlEsG9kH/finrRhUiyXYrY5SY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KUlqkg2qTSUkBZ0q6VwVvfoNrZ8ishbUzAveV8egPh9xeFQBjAztN+yCUHKU08jb3CTAozwRHKc29m0pL9xh2Me4iFm2hHcKp6/5D4GXYEuTU+gEUHZnsOXjVe7GSR8M6r/w5qtnOUHjISOWkRjBlZjR0Tm3J38lg09zQQR9mrc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=Y3+1v94v; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="Y3+1v94v" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-37d4fd00574so3046378f8f.0 for ; Tue, 15 Oct 2024 01:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1728979238; x=1729584038; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=2AVg3FIgTibrviHcCt5EkxLbtg53d4/ePooJwP0U7JQ=; b=Y3+1v94vJKHmKI6bvSnr+4VZ2bgwMRRkIj0BYlnbGuz/hg9S//e9u3aPXZinDTCl0T PUBBHo5x3QpvechuxluJlzK9QTeABbPIcbjLAxfZSq+yQ4d7rgAHSnkhKUEAkqNdKKI/ +F0t4yn29RdE90N9IJVwmmh5x1Ap9wyHTkCwptcw5DBHO1ac+DpEWKiQnyI3o7AErqpu 95G/PMOPlfzRdl1njMnYO/Hwkv0V22N95lfjs3+bBDfqrVaSMR7rWoA+E8ThmBcHCsko dS//rBe4r2GECkHgm6Vijq8q1nRO4sUQ2wNkIvERsfKa4Lwj4WvcddCNqp0zGyfWHsO9 jCxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728979238; x=1729584038; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2AVg3FIgTibrviHcCt5EkxLbtg53d4/ePooJwP0U7JQ=; b=j5OKWS4FBXg570iwdnkJjnffFkeai7GZTjRk3uJih6dM3bNPybcRvHHSOPmFzvNKoh YBkQQbAIrVtiuC+NNWu5lHyjLIDJM5vFO6d5bbeBljoHfQGcQaSGRjtb51D0VKZuvpZK hA6NUYoR/IzGs5w1o4JdiozEI60qni+CiSDzqUqIgcwlCdzujnBUM14Lte8ERX4NzOfR Y31LBeb69GPxrPqa31sw2Pjhag1zjVv4cWlAAxZ6fwvOCOcKxIdze5ot2IMMDq+zzS9q 2a3RxftENxUMT1eoqUgdo8rLu2VJdthLpCL5gquXaRZHMrjqEeXEzSK3TW4A3YtIAG8D gSOA== X-Forwarded-Encrypted: i=1; AJvYcCWt+L2vIaKxVF6HQA6ttZxRLN9uiX2zT7DSU0COMEDrj6yc7wpmVVgfSZ/DYxdRdpwC0sbMJ5D8v/nM@vger.kernel.org X-Gm-Message-State: AOJu0YwY9eAw8yEUGMtd1V12o212XRV9fr/PQe6jXpxFhGoK1xGsJQwn WPTBbetyep/ihUiOvQ/hU1mcMeq5uM+eDHJfTVd7g5kk9/J69oW4PTXa3CG+gfM= X-Google-Smtp-Source: AGHT+IGjVLkeDRfvNzDE113Q4ocR4NAUhan6qrz9rfRH9QgrdDElPxUKPO7rtbJa0cv3lltzcQZ4KA== X-Received: by 2002:adf:f00b:0:b0:374:c692:42e2 with SMTP id ffacd0b85a97d-37d4816552fmr15637511f8f.9.1728979237592; Tue, 15 Oct 2024 01:00:37 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb1d:dc:7e00:d382:b11b:c441:d747]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4313f6c5531sm9962385e9.46.2024.10.15.01.00.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 01:00:35 -0700 (PDT) From: Bartosz Golaszewski Date: Tue, 15 Oct 2024 10:00:24 +0200 Subject: [PATCH v2 2/2] gpio: create the /sys/class/gpio mount point with GPIO_SYSFS disabled Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241015-gpio-class-mountpoint-v2-2-7709301876ef@linaro.org> References: <20241015-gpio-class-mountpoint-v2-0-7709301876ef@linaro.org> In-Reply-To: <20241015-gpio-class-mountpoint-v2-0-7709301876ef@linaro.org> To: Greg Kroah-Hartman , "Rafael J. Wysocki" , Linus Walleij , Bartosz Golaszewski , Kent Gibson Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2478; i=bartosz.golaszewski@linaro.org; h=from:subject:message-id; bh=IXI8fc+BDTt6dXc2mOvzUU5JFVJWsj1fSNvXX0TFXLM=; b=owEBbQKS/ZANAwAKARGnLqAUcddyAcsmYgBnDiEh5aNPWbyBm1yyVv5fwe+71Vy7kKpSsdVtR gVh96Hn7ISJAjMEAAEKAB0WIQQWnetsC8PEYBPSx58Rpy6gFHHXcgUCZw4hIQAKCRARpy6gFHHX cpCtD/4oUNtfzUWGhirGZ4x++US0pfxpEH5QMOPfP0IxjxVRDIuZg68Es3A9Tk9/ZIdWpJbXX0z zcqpXca1REK0CHdUqzBJ2NKLJOiuAijNLdutzgU8VOXjuP+sYjuj1C/Gnuu3Ib2TDqzuWCEcyZ/ uJN9iPVhPovAoPG2+UQh+RlUhkCrJFdWg68L3IVIS9XPoy2JzGx8iTt75iXNZ9ZjKy+Rna/xMa6 3tU1Y4R/TkRNleiYrTjAYCb12AzJHO2zttfW2TvT4WIWhtMmXXSXJ9zot1Xy4i1jy3wqS4XzrrQ /uptNGwcKC2TQkOP64UuvVhnbKz8HZ70Pmf2hEmYuE4i0JOe1lu5N9CnlRQyBvNyGZLmYRf04kU HwcnHgucRg5A+h718QrPRQHpsGoHwnawi4/zoHrmuBMOdjxmYp74OIs34jeSJuXozkbhy+fq2Am q7g1SIrSB1ShuRfO6vzYu30sQBFpwzgn3WHT9IXzKTni8w1KUywjjuIvqq6skY6TyC/aIfqBgm+ NV7ybIAcTCAxaAumuIdztwVKnuBdSHJt2Z1j6kgoc9/6fy9Youp9OIyGEVA2T5HycAj524kvh1K 7JJOK8k6/1zW44PX8t9hTjscmYxX9OsPB23PIDe2KsIELOeriX35+JydtV//1a/q7b7aZDIw4/R +j0ST1Cv3QHC9bw== X-Developer-Key: i=bartosz.golaszewski@linaro.org; a=openpgp; fpr=169DEB6C0BC3C46013D2C79F11A72EA01471D772 From: Bartosz Golaszewski User-space may want to use some kind of a compatibility layer for the deprecated GPIO sysfs ABI. This would typically involve mounting a fuse-based filesystem using the GPIO character device to emulate the sysfs behavior and layout. With GPIO_SYSFS disabled, the /sys/class/gpio directory doesn't exist and user-space cannot create it. In order to facilitate moving away from the sysfs, add a new Kconfig option that indicates to GPIOLIB that is should create an always-empty directory where the GPIO class interface would exist and enable this option by default if GPIO_SYSFS is not selected. Signed-off-by: Bartosz Golaszewski --- drivers/gpio/Kconfig | 18 ++++++++++++++++++ drivers/gpio/gpiolib.c | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index efddc6455315..1a3535bda779 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -69,6 +69,24 @@ config GPIO_SYSFS use the character device /dev/gpiochipN with the appropriate ioctl() operations instead. +config GPIO_SYSFS_CLASS_MOUNT_POINT + bool "Create empty /sys/class/gpio directory" if EXPERT + depends on !GPIO_SYSFS + default y + help + Say Y here to create an empty /sys/class/gpio directory. + + User-space may want to use some kind of a compatibility layer for the + deprecated GPIO sysfs ABI. This would typically involve mounting + a fuse-based filesystem using the GPIO character device to emulate + the sysfs behavior and layout. + + This option makes GPIOLIB create an empty directory at /sys/class/gpio + where user-space can mount the sysfs replacement and avoid having to + change existing programs to adjust to different filesystem paths. + + If unsure, say Y. + config GPIO_CDEV bool prompt "Character device (/dev/gpiochipN) support" if EXPERT diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 97346b746ef5..1c8bd765d8e1 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -4899,6 +4899,12 @@ static int __init gpiolib_dev_init(void) return ret; } +#if IS_ENABLED(CONFIG_GPIO_SYSFS_CLASS_MOUNT_POINT) + ret = sysfs_create_mount_point(class_kobj, "gpio"); + if (ret) + pr_err("gpiolib: failed to create the GPIO class mountpoint\n"); +#endif /* CONFIG_GPIO_SYSFS_CLASS_MOUNT_POINT */ + gpiolib_initialized = true; gpiochip_setup_devs();