From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 40D443043DC for ; Wed, 11 Mar 2026 19:38:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773257886; cv=none; b=JBMZAZ3UXFIaQWxcWMGF7FNbXb5LXjEeSuHP9hxQW32Eq8RiUABtBhBN/LDun49UBH2bKvZAwQ7mIa9IgY72LQ8x3o0o/cRbgwvsBMlgdzpHT5sGwf6lHuTA6Q0cpEaKnaAgOjUPkhn+GL6HRX6aoGdUjoUzZt+U9DEnlwyOLIw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773257886; c=relaxed/simple; bh=uk+w+sTtMCxK5SSLAnjnJ8LuG+64ZZOSctjkGQ2I/K0=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=rWdmPUFcJyodjW5zidwgraO8tT5dOKBPY79vqnc/Dav/81dov4Ykt2EtbUsinyNyt6F1/Jx9H3xe6bVtyAAUn4Xo+fHk1vxrMxU+GmTgOk/kGcp0G+UKHFOzzEmeJu5EvCcpfvPVJIjZHinkG1njD9OKnueQSZpkV8l8iyrR4Vw= 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.44 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-f44.google.com with SMTP id ffacd0b85a97d-439c6fc2910so189457f8f.0 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=mKoWKmJv3AwLlXcS8CukQnPhfKZZjWzKEUCmWS9QYZXB0iB0v7UqJUrazrW1AiYGl+ 1RZD+UdVO2xzp++k3MZQ2tPI0UeaMfbaA5RBE65mR4FiDKhDDmgD9bJROQkuUfFmti21 AzMo7q10rcJpIFpG4nl38Ai/3/nItTNXFB+Cz4FIyVBEZHa8DCWW+V9xhxZzWDyZ7sMt bJXkwPj5IcVEY8SGGRtnB/m08IFaxbEwn3HqtZwO9jsGJWtFinnNRnV/sm1eQEJR6e80 +w5e/WsVZzcXTYawqWxofIu/SbECUKKb4LB32JPIFDBukO9s954hjzAlD2pWF/2dyTQp 28mA== X-Forwarded-Encrypted: i=1; AJvYcCWAc9DQf2WMqEhGJAnuVTUEKO6LOxyBxWGQIw9WTHmpemFfYnzrRIBa+5BKY1fue5Z/77+EBWMkgYwRj0I=@vger.kernel.org X-Gm-Message-State: AOJu0Yxd/GA4pK3FWxIKyP9oBWk+h2uSAukmEkplLXWgz7NZx3HEm48H RdutnB/iv59YOP8JJFyEXP7yMincnwRU90b1fpKBJpYCLsNpv8F9licIlEaxjQxa3jQ= X-Gm-Gg: ATEYQzx4eia7Yb2Lb0yyZf9WJq3otYIzhbE9xERgkh3gdxUyTUXhkNr5KO8CwvE9QiS PKPbewL1w33re8P6MRLlSvW7jsBFHc6VX0DfSY6+xPbK3XSUSfLWFtDusRBHBXK2nZ5FlTD8AT/ DR0SJkOvrlTZ9FLT87wPwqUX3ujGqxTg4BQh18Le+jx9gR1eJQwo9R1h/oiCdQe7ybv2szxodlm iTLFHD9eF5rLEveC4/tQw0+AuYMMjlusMy/mcG/iqZtVo6qFvByWBWegCW5lGc+JNhnrL2Pks01 fBKGhlJdPIr0qc/ZFVXMHgMzhiXRX+hBgVV9jEKe3Zm2Vueq3DoyvrtiNe4xpdked99olbhSVlG Vf7BfnoDkruSccydkComENQY+/NNxPqoadl50MDLAkkuZGyvDz8BZ0w31y553Si564MhDllk/uC WLni/i//5y0xuB5JUaOVp+m0OmnEHW 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: linux-kernel@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