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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7BC8C6FA82 for ; Fri, 23 Sep 2022 18:15:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232607AbiIWSPD (ORCPT ); Fri, 23 Sep 2022 14:15:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232606AbiIWSPC (ORCPT ); Fri, 23 Sep 2022 14:15:02 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 042C32B24C; Fri, 23 Sep 2022 11:14:57 -0700 (PDT) Received: from p508fdd76.dip0.t-ipconnect.de ([80.143.221.118] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1obnCL-0000GC-Bj; Fri, 23 Sep 2022 20:14:49 +0200 From: Heiko Stuebner To: Quentin Schulz Cc: linus.walleij@linaro.org, brgl@bgdev.pl, jay.xu@rock-chips.com, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, foss+kernel@0leil.net, Quentin Schulz , stable@vger.kernel.org Subject: Re: [PATCH 1/2] pinctrl: rockchip: add pinmux_ops.gpio_set_direction callback Date: Fri, 23 Sep 2022 20:14:48 +0200 Message-ID: <2890748.BddDVKsqQX@phil> In-Reply-To: <20220923145141.3463754-2-foss+kernel@0leil.net> References: <20220923145141.3463754-1-foss+kernel@0leil.net> <20220923145141.3463754-2-foss+kernel@0leil.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Am Freitag, 23. September 2022, 16:51:40 CEST schrieb Quentin Schulz: > From: Quentin Schulz > > Before the split of gpio and pinctrl sections in their own driver, > rockchip_set_mux was called in pinmux_ops.gpio_set_direction for > configuring a pin in its GPIO function. > > This is essential for cases where pinctrl is "bypassed" by gpio > consumers otherwise the GPIO function is not configured for the pin and > it does not work. Such was the case for the sysfs/libgpiod userspace > GPIO handling. > > Let's re-implement the pinmux_ops.gpio_set_direction callback so that > the gpio subsystem can request from the pinctrl driver to put the pin in > its GPIO function. > > Fixes: 9ce9a02039de ("pinctrl/rockchip: drop the gpio related codes") > Cc: stable@vger.kernel.org > Signed-off-by: Quentin Schulz Reviewed-by: Heiko Stuebner