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 X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5772BC433F5 for ; Sat, 18 Sep 2021 00:00:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 35E6E61164 for ; Sat, 18 Sep 2021 00:00:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241454AbhIRAB6 (ORCPT ); Fri, 17 Sep 2021 20:01:58 -0400 Received: from gloria.sntech.de ([185.11.138.130]:59322 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241321AbhIRAB6 (ORCPT ); Fri, 17 Sep 2021 20:01:58 -0400 Received: from ip5f5a6e92.dynamic.kabel-deutschland.de ([95.90.110.146] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRNmN-0000hh-VN; Sat, 18 Sep 2021 02:00:28 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Linus Walleij Cc: Bartosz Golaszewski , Jianqun Xu , "open list:GPIO SUBSYSTEM" , Linux ARM , "open list:ARM/Rockchip SoC..." , linux-kernel Subject: Re: [PATCH 4/4] gpio/rockchip: fetch deferred output settings on probe Date: Sat, 18 Sep 2021 02:00:27 +0200 Message-ID: <1992229.jx4eJSTThl@diego> In-Reply-To: References: <20210913224926.1260726-1-heiko@sntech.de> <20210913224926.1260726-5-heiko@sntech.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Hi Linus, Am Samstag, 18. September 2021, 01:38:08 CEST schrieb Linus Walleij: > On Tue, Sep 14, 2021 at 12:49 AM Heiko Stuebner wrote: > > > Fetch the output settings the pinctrl driver may have created > > for pinctrl hogs and set the relevant pins as requested. > > > > Fixes: 9ce9a02039de ("pinctrl/rockchip: drop the gpio related codes") > > Signed-off-by: Heiko Stuebner > > Since this patch depends on patch 4/4 I applied this to the pinctrl > tree as well. > > I still think this looks a bit kludgy but can't think of anything better > right now and we need a fix for the problem so this goes in. > > But we need to think of something better, I'm all ears :-) . And yes I do agree with you that this is not very elegant right now. The issue is that the pinconf part for PIN_CONFIG_OUTPUT is actually using the gpio controller to realize this setting. So when this ends up in a pinctrl-hog, stuff explodes while probing the first pinctrl part. I guess one way would be to somehow only do the pinctrl-hogs _after_ all parts have probed. Thinking about this, the component framework may be one option? And then adding a pinctr-register / init+enable variant where the pinctrl hogs can be aquired separately, not as part of pinctrl_enable? Or maybe I'm thinking way too complex and a way easier solution is around the corner ;-) . Heiko 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 X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50567C433FE for ; Sat, 18 Sep 2021 00:00:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A867E61164 for ; Sat, 18 Sep 2021 00:00:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A867E61164 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sntech.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Cbs9RCI7RhhF1KhKCjX0+INGEl/LEv42RVIA+zSaqy8=; b=mGgaF0yCogsAlw +xOozQRDrr71xYPdCI372jiIcF0eMZnsRctvgolQImi/R2RHnXYpd88nR1ocGhWuus+7ZurYcFQTT N+PP2Wh4aPlaCIrIeD+9Brduh6JFXkD4SLIF/usk0EA6agGmOs485H9XQw+tPcWq2p8TLv8n844i6 zjyls39pSAgNlZ3wtkGUghkhQ6XDAdOUgfV6QzCEXVBvRsuDZpLezlhD8u7VuqsLT/PMl2deVSgpW rPF2g8aKGKfCNNcuXtmZp3/eUf6MCKjv9oUZZ/ZsTcP8FcWBQKLqnPct69ZKr/fuRImS5Z2RO+9p2 rPEQSTSIsxZElYq1ArUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mRNmj-00FBNh-3N; Sat, 18 Sep 2021 00:00:49 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mRNmV-00FBEe-Hw; Sat, 18 Sep 2021 00:00:37 +0000 Received: from ip5f5a6e92.dynamic.kabel-deutschland.de ([95.90.110.146] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRNmN-0000hh-VN; Sat, 18 Sep 2021 02:00:28 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Linus Walleij Cc: Bartosz Golaszewski , Jianqun Xu , "open list:GPIO SUBSYSTEM" , Linux ARM , "open list:ARM/Rockchip SoC..." , linux-kernel Subject: Re: [PATCH 4/4] gpio/rockchip: fetch deferred output settings on probe Date: Sat, 18 Sep 2021 02:00:27 +0200 Message-ID: <1992229.jx4eJSTThl@diego> In-Reply-To: References: <20210913224926.1260726-1-heiko@sntech.de> <20210913224926.1260726-5-heiko@sntech.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210917_170035_628407_C2EC2191 X-CRM114-Status: GOOD ( 22.21 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Hi Linus, Am Samstag, 18. September 2021, 01:38:08 CEST schrieb Linus Walleij: > On Tue, Sep 14, 2021 at 12:49 AM Heiko Stuebner wrote: > > > Fetch the output settings the pinctrl driver may have created > > for pinctrl hogs and set the relevant pins as requested. > > > > Fixes: 9ce9a02039de ("pinctrl/rockchip: drop the gpio related codes") > > Signed-off-by: Heiko Stuebner > > Since this patch depends on patch 4/4 I applied this to the pinctrl > tree as well. > > I still think this looks a bit kludgy but can't think of anything better > right now and we need a fix for the problem so this goes in. > > But we need to think of something better, I'm all ears :-) . And yes I do agree with you that this is not very elegant right now. The issue is that the pinconf part for PIN_CONFIG_OUTPUT is actually using the gpio controller to realize this setting. So when this ends up in a pinctrl-hog, stuff explodes while probing the first pinctrl part. I guess one way would be to somehow only do the pinctrl-hogs _after_ all parts have probed. Thinking about this, the component framework may be one option? And then adding a pinctr-register / init+enable variant where the pinctrl hogs can be aquired separately, not as part of pinctrl_enable? Or maybe I'm thinking way too complex and a way easier solution is around the corner ;-) . Heiko _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip 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 X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C18BC433EF for ; Sat, 18 Sep 2021 00:02:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D18C160F51 for ; Sat, 18 Sep 2021 00:02:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D18C160F51 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sntech.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+pG/DzjFJmWB7mOo7tdAhuqTtUUBfJ140mI3FfBQCm4=; b=oVVSXZ89yMB7nE wZ8lgoxuKkLm7fG5WdDZYIruIA7RKmUrqTPTAiV6MwdCwFV9KbVgnmKVdmq+zj6zrJvfnxd2ML2Qf RJONz7ZPUG2hWypP3EgawOZPgruRMXIzYskLF01+JIQKp0UMQ7vM7LngvqA0O5R8pwfOZis5FibZj ncOVemaVbEBr0RnPilGHXaUWj1YRSEd9aOc6g2XoNpD57slQ4orEAwXpmT4MF1/bRHUoeQXCU3awR mEnj+9bK7mvzPdv9Fk1k0vqxNU3odqUHH2n3Y0ulWR5OAyd1aGw0vsMA1aav2s/cK72JcM9vWf616 3+q48jq+eKTedLwsZUng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mRNmZ-00FBHr-Dn; Sat, 18 Sep 2021 00:00:39 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mRNmV-00FBEe-Hw; Sat, 18 Sep 2021 00:00:37 +0000 Received: from ip5f5a6e92.dynamic.kabel-deutschland.de ([95.90.110.146] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRNmN-0000hh-VN; Sat, 18 Sep 2021 02:00:28 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Linus Walleij Cc: Bartosz Golaszewski , Jianqun Xu , "open list:GPIO SUBSYSTEM" , Linux ARM , "open list:ARM/Rockchip SoC..." , linux-kernel Subject: Re: [PATCH 4/4] gpio/rockchip: fetch deferred output settings on probe Date: Sat, 18 Sep 2021 02:00:27 +0200 Message-ID: <1992229.jx4eJSTThl@diego> In-Reply-To: References: <20210913224926.1260726-1-heiko@sntech.de> <20210913224926.1260726-5-heiko@sntech.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210917_170035_628407_C2EC2191 X-CRM114-Status: GOOD ( 22.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Linus, Am Samstag, 18. September 2021, 01:38:08 CEST schrieb Linus Walleij: > On Tue, Sep 14, 2021 at 12:49 AM Heiko Stuebner wrote: > > > Fetch the output settings the pinctrl driver may have created > > for pinctrl hogs and set the relevant pins as requested. > > > > Fixes: 9ce9a02039de ("pinctrl/rockchip: drop the gpio related codes") > > Signed-off-by: Heiko Stuebner > > Since this patch depends on patch 4/4 I applied this to the pinctrl > tree as well. > > I still think this looks a bit kludgy but can't think of anything better > right now and we need a fix for the problem so this goes in. > > But we need to think of something better, I'm all ears :-) . And yes I do agree with you that this is not very elegant right now. The issue is that the pinconf part for PIN_CONFIG_OUTPUT is actually using the gpio controller to realize this setting. So when this ends up in a pinctrl-hog, stuff explodes while probing the first pinctrl part. I guess one way would be to somehow only do the pinctrl-hogs _after_ all parts have probed. Thinking about this, the component framework may be one option? And then adding a pinctr-register / init+enable variant where the pinctrl hogs can be aquired separately, not as part of pinctrl_enable? Or maybe I'm thinking way too complex and a way easier solution is around the corner ;-) . Heiko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel