From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 405D92DCC08 for ; Wed, 11 Mar 2026 19:38:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773257888; cv=none; b=SWwkk6PKzsZGWsaLY9vCZ3grANJf9ucCUJRWA9WhR4E1lOsxl8PNWFYDaPCCniWyHo5Gn8gltKPHGT42iqffGe7vPX3PNhOqXg/JxydCD/PUiCj5UpVfKQfjznhMGjbiXGGMVF3h4wSdWdV7jNcHHjIdE8Lavh/+BDctbWyaCMw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773257888; c=relaxed/simple; bh=uk+w+sTtMCxK5SSLAnjnJ8LuG+64ZZOSctjkGQ2I/K0=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=Yjp9n+bjiLDV0H4Ka9FJb8L4jAQPp64dueUTWXeFxjlW2ztzreE5quRJT6eg3d+/SZ3qGwadtTZUIySV5ZxuWyMiKUoSy/MEadCKi/Bh2SPh2suDMrIDp0j+2f1QS2UmlcMXi3BGSJa8lYNfZ7j6M05rV211Ho+Oz5oaQ+4U5G4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=E5ATBm9g; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="E5ATBm9g" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-439b7a87fb5so175667f8f.3 for ; Wed, 11 Mar 2026 12:38:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1773257883; x=1773862683; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=E+AkwVqaWf8hy65M6kQXD8z5ogodn290MdxFGjaBkgY=; b=E5ATBm9gH+pn7du6rh6hllyL+wj/XBoB9c86m2W94wTGwRnsHBTD4Y3oFFGzqux1v4 H0+18KNUOU7DiOj30VbkZObJCaBfjlEiSgLX4GgaPQAxFy/gKK5QCIWxe7GltJZfjrxu 8U0Gn2J+1/8jWzA6LFULWxkNraKUZM3quO398k4+s5xpUlvvwbHGMQJ/UcmrEFtdcOTw I9TkkJ/KuPpDBUWxHoF/g6HUUv+ZQKR7dRmCpJ50OrtEdIxC5ZTJv2DYZ0Ui77DENU5Y 7vIp6vodT28GANPPvkBoJ0KkH+4/WBBCOLlMtPngxkX8cGv33GRb77B+qpsp10b2aTdj OOYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773257883; x=1773862683; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=E+AkwVqaWf8hy65M6kQXD8z5ogodn290MdxFGjaBkgY=; b=p5IPCfoPF3BG1glj0/gwXvECNhAp91F6jQEFovbe8gvMcJLnWR4E8FfLrQHuEYWp0r eNfcebZypCK3Cv7gDpAdPl71rJXlThiq1xdllNC+SslGQuj8ryNS68DnxGPbhBHFE1QQ RiqejTgoPI7ibYCiQEf1ilzJ7kD2tspl2jLcGciwZ3z2G9uqPrQLdJMandIZHEYnn/AT UTTRv4Wwx77n23ZQ7CxifCNTeIzkZdCXXH8kqDppC16nfDo64By7EjaAu/jCvgLVoUBN h9gy0N78Cdonx1A24GyZgeiInemM4DQhKcXuXWSQaZfpwwjDV9tbKsN7EzQMF92GmAxG ImMQ== X-Gm-Message-State: AOJu0Yxq0L704cssOd3Mjk/tFwNYae+O7tk/e+agzkLlTlG4P1HxijoQ nu3RnZ9q/GrSUgpS61xe192RJmwAEknYZcNTlmukJ2kdamqJrcv4d0fXJ2X2bWHe6Io= X-Gm-Gg: ATEYQzzAk8pm5o71fJRRC8hSNbQBOdEIiCF93SpoOGlno97J7eKBakCESF3xpr89vSM HkgMLNL450FgdJ71AddOBLDNnvM64fk0knBTTnUk/sWzGpYLAlyaTeuBO+NFPpZeoWmTDQtmbCo dXsPzkQvNOLuOlZSB4kSzORiHlgplGKVdn1HHX+K8H1la+6zCKYQNIyd9qS4pC+mdIwTbD3LAIK +WjiyVCcMUOKHQVLPk/bMIlVQoiGnITH/EpLVG6sd/g/HCM0SVBfeiuCqkEU6CPmIlKLbCfeXh1 bowVdqnGwqeNgcQcJZ1TvLS4TyFpViqQ+9hc9kZ/PySKY0HT+Y+OYY1yMYFcDShI/xeBdFuSnwi vSOPHzfM6ysPH1FmXPs+aLwh18fS9Qjn5iD18w8isEHJhuP/qXXse8BS6Hg1XTG3lGGASBNNdK5 Lqey48Kho0e/hd0UTtQFFmc/VcogHJ X-Received: by 2002:a05:6000:1a8f:b0:439:bdd7:425d with SMTP id ffacd0b85a97d-439f8200089mr7617923f8f.23.1773257883423; Wed, 11 Mar 2026 12:38:03 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439fe1a76e5sm1426159f8f.12.2026.03.11.12.38.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2026 12:38:02 -0700 (PDT) Date: Wed, 11 Mar 2026 22:37:59 +0300 From: Dan Carpenter To: Linus Walleij , AKASHI Takahiro Cc: arm-scmi@vger.kernel.org, Bartosz Golaszewski , Conor Dooley , Cristian Marussi , Dan Carpenter , devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , Sudeep Holla , Andy Shevchenko , Linus Walleij , Bartosz Golaszewski , Michal Simek Subject: [PATCH v3 0/7] gpio: introduce a gpio driver for SCMI Message-ID: Precedence: bulk X-Mailing-List: arm-scmi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline This basically abandons my earlier attempts and goes back to Takahiro Akashi's driver. Here is the link to Takahiro's patchset: https://lore.kernel.org/all/20231005025843.508689-1-takahiro.akashi@linaro.org/ In the review comments, to that patchset we had discussed putting the gpio section inside the pinctrl section. The ordering problems are a bit tricky because you want the pinctrl driver to finish probing before you start probing the gpio driver. To me it seems nicer to put the pinctrl things such as pinmuxing in the pinctrl block and the gpio things in the gpio block. I updated Takahiro's patch to work on current kernels. I've had added a few other patches to make things work on current kernels. The most noteworthy change is that instead of calculating the ngpios, I changed it so you have to specify the ngpios in the device tree. I updated the device tree spec file to address review comments. I changed the compatible to scmi-pinctrl-gpio. I also updated the examples to show how pinmuxing works. I didn't know how to include all the potential GPIO configuration options so I set "additionalProperties: true". Hopefully, that's okay. AKASHI Takahiro (3): pinctrl: introduce pinctrl_gpio_get_config() dt-bindings: gpio: Add bindings for pinctrl based generic gpio driver gpio: add pinctrl based generic gpio driver Dan Carpenter (4): pinctrl: scmi: Add SCMI_PIN_INPUT_VALUE pinctrl: Delete PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS support pinctrl-scmi: ignore PIN_CONFIG_PERSIST_STATE arm_scmi: pinctrl: allow PINCTRL_REQUEST to return EOPNOTSUPP .../bindings/gpio/pin-control-gpio.yaml | 70 ++++++++++ drivers/firmware/arm_scmi/pinctrl.c | 2 + drivers/gpio/Kconfig | 7 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-by-pinctrl.c | 124 ++++++++++++++++++ drivers/pinctrl/core.c | 30 +++++ drivers/pinctrl/pinctrl-scmi.c | 46 +++++-- include/linux/pinctrl/consumer.h | 9 ++ 8 files changed, 276 insertions(+), 13 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/pin-control-gpio.yaml create mode 100644 drivers/gpio/gpio-by-pinctrl.c -- 2.51.0