Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp769350pxb; Wed, 20 Jan 2021 21:59:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFzLx+pBM8xqcqaSg9T8rJdYxgcnQ7L/OyBrMfGdCEHVUvxUgS9ecQIlYiYM+XI+COda58 X-Received: by 2002:a17:906:298b:: with SMTP id x11mr6245751eje.158.1611208757302; Wed, 20 Jan 2021 21:59:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611208757; cv=none; d=google.com; s=arc-20160816; b=cPr42BQghg7ziHlWYvP59iiA4PFc+j7Z33D8VthXufVbA3IY3nOe5U5ZX19ya2G1eN UP2hDGQ8P9zKd8Zrzn7lgLDXe1L5yNNR/yh1D7Xkk20Euzkj3GNwWf1Bky6iYeLnEjII xudLEyouUhf7bCYsWKXe5QVUBwi+JlZmPuETLgO2J1CSda313PYetG2RdhS8i4c5G8pL WQBLUc5x+ZT8U57n2SEqp0EpKF11WKQF6fiTwR1mhrnc+dvKRZwgebKErf+qsPVP+SE6 2f503ajgiaV6dOgTNX7iV4S67hw2MLxo27M3UYBO6zWNQjMJ0/cTJuTRh1mIol/774ZD ZnWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TfFXs9mHknQ0FYX15Kzdj3tfAorhNNw9oOMWrG9kjOg=; b=Z3H1LcoaTWeMoi/orAZbb8cbjt/0o9vv45MrysYsNBNKVxMdmsvK7hAVMBWP9uKo7d jRytgkKAOHR9PzEokVkV+SwfriIOl8hZ8uMonMY/QgZGHH8/RC7WwSOVcWNg+UiM51wj AWMiS8P+a9Y1miD1ENcmonLbE/A5cJpPxdL6h6jcu/+BugYsDdCuyEPviZSsjqLYZt4T N1BTmq2ouBTYynBkThDpUJkQrg3kpgmPjMrF7XM5j0u7PB/fqO6/Bm/4FRvn9qHpjEw7 jHMzxXh3mHKorbTMSPCzxAJl+VNUENb6Gkl4ZHA1HWE0/uTPIq7R+ryMYlDgTVBp63d3 F+/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=G6cX1b7F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f2si1405232ejb.553.2021.01.20.21.58.54; Wed, 20 Jan 2021 21:59:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=G6cX1b7F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726264AbhAUF6V (ORCPT + 99 others); Thu, 21 Jan 2021 00:58:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726634AbhAUDUf (ORCPT ); Wed, 20 Jan 2021 22:20:35 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79A91C061575 for ; Wed, 20 Jan 2021 19:19:14 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id 31so477152plb.10 for ; Wed, 20 Jan 2021 19:19:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TfFXs9mHknQ0FYX15Kzdj3tfAorhNNw9oOMWrG9kjOg=; b=G6cX1b7FU4HY4wZI+2MjTESh6qWFl1UVhBIep94K4oZaALWIOSY6dnRj21zF4/BoXu HOY0R8JbcFjkGE4k+Zh9urkWuo+9FIWLh8d+OZvt1CUgoJGttfPhd3dVdtggdeaOK/+r Xo3Hus9G9ODpuWvdUGVpPK65/zpfP8epxZUohIm68dixOAdh1/MytY7fXYPEMotvojky vAZoPZS7CAKj6fUqdOFIa+yUGrwNf/7aHc4bATbv69u7mYLdp6MWf/MZYCX48dKRxNRA vhHoutAXbknZqpMjhsHP5PrEEGToTb+slTC6XSa73gn+HsGSyqA6fAiaQPYao6zAJ6zI 7y5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=TfFXs9mHknQ0FYX15Kzdj3tfAorhNNw9oOMWrG9kjOg=; b=P4BlOHgGJDNayxit9sxJ3TyRoHmJhoLdbgDJRrvo/hxrJC7PucNQ7IMX6UbGU1fIgb +Fph+NCmeZzoc1XseEbq2LnCexKOgKqODpP9+tJuFyTZFMQvsTdPYSn3jx5Sn69ovSBX uftBKlVCZY0I4rofM0kB3oXVfG2PbVEYMRnCmVh9GRTfry1a+TPmq+ltTBoA04H0daUH A7SBGxVmJpRvTSSrPHOdZw/WsU6crq0dmQBrOBMaTwzkkIr22JRcp3HqtO7nH4EtmbiL h4TH7vQxuo2sVfdCzt7u36i4o3dGKDkEB15Zasw0B2VDWf+QRn3ogTGSPVkUODK9FOUS YG2Q== X-Gm-Message-State: AOAM532Jy3zAlHlCNh4gbeSzskXR1oDyGFBby7iSHQUmNTlGnkLRct41 B5RdJ0iE0JdXUN50fI3+fXGTKQ== X-Received: by 2002:a17:902:ed8e:b029:de:8c17:f7e8 with SMTP id e14-20020a170902ed8eb02900de8c17f7e8mr12957440plj.19.1611199153742; Wed, 20 Jan 2021 19:19:13 -0800 (PST) Received: from x1 ([2601:1c0:4701:ae70:d139:25ba:c4c6:2929]) by smtp.gmail.com with ESMTPSA id e5sm3603667pfc.76.2021.01.20.19.19.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 19:19:12 -0800 (PST) Date: Wed, 20 Jan 2021 19:19:10 -0800 From: Drew Fustini To: Tony Lindgren Cc: Linus Walleij , Andy Shevchenko , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Pantelis Antoniou , Pantelis Antoniou , Pantelis Antoniou , Jason Kridner , Robert Nelson Subject: Re: [RFC PATCH v2] pinctrl: add helper to expose pinctrl state in debugfs Message-ID: <20210121031910.GA252950@x1> References: <20201218045134.4158709-1-drew@beagleboard.org> <20201224203603.GA59600@x1> <20210109025527.GA2918377@x1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2021 at 12:03:18PM +0200, Tony Lindgren wrote: > Hi, > > * Linus Walleij [210109 21:14]: > > On Sat, Jan 9, 2021 at 3:55 AM Drew Fustini wrote: > > > > > I discussed my use case and this patch on #armlinux earlier this week > > > and Alexandre Belloni suggested looking at the pinmux-pins debugfs file. > > > > This sounds reasonable. > > > > > This made me think that a possible solution could be to define a store > > > function for pinmux-pins to handle something like " ". > > > I believe the ability to activate a pin function (or pin group) from > > > userspace would satisfy our beagleboard.org use-case. > > > > > > Does that seem like a reasonable approach? > > > > This sounds like a good approach. > > Makes sense to me too. > > We may want to make it into a proper sysfs interface eventually to not > require debugfs be enabled in .config. But that's another set of patches, > certainly makes sense to first enable it for debugfs. > > Regards, > > Tony I have added a debugfs file "pinmux-set" to pinmux.c. This allows " " to be written into that file. The function pinmux_set_write() calls ops->set_mux() with fsel and gsel. I'll post an RFC with the code, but I am wondering if it would better to take the function as a name and then lookup the function number (fsel)? thanks, drew