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=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 31BD7C433DB for ; Thu, 21 Jan 2021 05:57:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D0DBE2389B for ; Thu, 21 Jan 2021 05:57:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725969AbhAUF5p (ORCPT ); Thu, 21 Jan 2021 00:57:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727012AbhAUDUf (ORCPT ); Wed, 20 Jan 2021 22:20:35 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FE2FC061757 for ; Wed, 20 Jan 2021 19:19:14 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id b5so725098pjl.0 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=G99CGEoL2FkbU0iuA9nkYNbdc08okfhfjCuM/ZA09zNQpT5MqnDGkGFBoX3cIOaP/B Biw/xoRJ7CsLKFfJxtji639CuurzfeuuA5Kw+0xa6/cUBU7MFmX9Yr578l5Fq4/0ZXrt tD2+N2Exu38hJqv3VWMlAa6PtX2dlZLcyUDQx2J+yJ64LAKXO0Fo+s46fhQ0+GVM9o0w u7K2+cYFTxaEeq5saT7myJG2LLgqNepXsaTAKuJRDxcJTHyOMvN2A6iLjazkMDwkXnZD HoFPB27ag7MabMT4SUtlxdjiEnYEJyIIatXYKBMYUToigeLL0F6hIy7McaDWREuKe2xR dkcw== X-Gm-Message-State: AOAM53243+gKLBR9m6OekIHNcWIZo0Jn6Ma/9+kt1mDSIQWGFC45V986 d8s4q+YEctY54Z5X81b9KrNJIA== X-Google-Smtp-Source: ABdhPJx2sHHMfN5ZADdBI6iJaxaoVTtR18nr1yhDctYo0c+exErrZ2AbajkyA2sgazoZuo8xJzmyJg== 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-gpio@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