Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1895300pxf; Sat, 13 Mar 2021 00:50:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJzojHNlDewrhi5M2B095j3LBWYLFoqH0f0ygEsFnXxO0jhtltXpA76EHl6N4Tp9drIv34l3 X-Received: by 2002:a17:906:b752:: with SMTP id fx18mr13388210ejb.128.1615625421299; Sat, 13 Mar 2021 00:50:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615625421; cv=none; d=google.com; s=arc-20160816; b=whvCWZlddbsY+lkZ+bo8d0nO6zEUGZu+BoABKn3BdZCOqIDxv+WI5a9pr22ecazXEu c5kF/zkWYJbDUscyVLhotdXFn/GN8r+ASAo4PByjLyCHsgNRbVULg2f33lzwb06YioCo DU6kGUzAcpkAj4InHl9zzzPWkpUv+Y6q8YRrXpYwDDDc5vEgDmKAFgUSHC0HOFj/MFEW onIgPGrgqQwcD9Yb0P5YClxD1+E5iqsWJYvdawRE55iYC3jOqvVwF6hZ4NTwaX3kl5JV D36I9yu8fPqVHnoPg1ms9qhmRgtrVq4a8OGUVpNlrZ4XMnVRnUW9la/jz30i2JMIs2tz pcPw== 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=pVXzAavbWQCIuyim7qVlCD+k9KLwZXY4SN3cSaFtD94=; b=e0OzJ7b9NfpG80CvzpUZrxj83xSSLSuu7MjeL6fmgRLfTqMJM5PiB13qmxNzduMGaQ EHd+2inzEcaEcHNAqcoqo9hsT86C+Yk+sySWABqz8shunwyDmbz1wux6DXupzqmH48nN vdfRG2JOEAaWztIfTmJQB12z8xCd7b0+0q4i+pCUGiyUQeB15Drvt+JExKsfb2GfgA6a zpqZTQdZ3kBg4TrBScK6n4Haim68yKDPQmL1+K0pBmgtwb8HJ6YgqhDk19VkTJVpXjX9 G53FW50ZplSKDKrjaoKPattT9vuM+gWk4rmxOJwnhLGxKIsPpwD/NgvcXyfaoBJ4ijd0 jWbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=sfbmW7mE; 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 s13si6899471edc.150.2021.03.13.00.49.58; Sat, 13 Mar 2021 00:50:21 -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=sfbmW7mE; 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 S232462AbhCMInP (ORCPT + 99 others); Sat, 13 Mar 2021 03:43:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233156AbhCMImn (ORCPT ); Sat, 13 Mar 2021 03:42:43 -0500 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2661EC061761 for ; Sat, 13 Mar 2021 00:42:43 -0800 (PST) Received: by mail-pg1-x52e.google.com with SMTP id t37so6593415pga.11 for ; Sat, 13 Mar 2021 00:42:43 -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=pVXzAavbWQCIuyim7qVlCD+k9KLwZXY4SN3cSaFtD94=; b=sfbmW7mEOQ/RXDel1aRVFFwUIRa7HH9D1Wbsazud96yTVFornNkX3AWSXhpMW5KqPk uG/HMVGvbQlAKET251HGuLZeWYK7XGbrOgTrpeBhiiUo9qJ6p+Z24NMQAKwLlXaRlyc5 cmceVTE6Xila1p6ZIDv+9DDmLZk5sV2gRPVqyfew6CjpfnCsMMdFLHIxMVwdFL2xlRTo HuAy4FlSocHDH24ieAJoQqLkvdNO42anbX7hD06lII9aK3MCAa5Co3nOp87LYXiV9eOh JyeX22DIgw8nMbkR4NPJDJrjzKMHYWwg3tD9KNWc9W+GBg5HBVPISgCgKoGL7fwFsu57 Othw== 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=pVXzAavbWQCIuyim7qVlCD+k9KLwZXY4SN3cSaFtD94=; b=uILwTs7ZkgMS++VmH6Le49foLPOL8Z/mDFJ+a9aORpxE2mLPpU9omWb2iP9Zr7APEc jhZ3zaHqo0hiwYDoOG+1Hq65DtxlNAoqUKhx9gcf5XUJr2NVdti7+u8Z38Z9YEHYKjIT HUSLWO4dol+oAa/yM3N2GZOaC/LNJFbzk4I6RM+f84yCIWYn/QI7ev6O3tqscrm+yiAu hIpEPXzKd4qiZVBMAjSkYRlqkjZP/xZ9oPZ63YV2ZPUcyNTfYFBTuE+kx/rbtltywhs7 rnyW7g9qrpKayc8kpu/EU72Dy2VakAUgFlm7UmXdNA0auowjGnCwpSIicJzZ/88ZftFx gjTg== X-Gm-Message-State: AOAM531uuyXx25ijb03xUVoph3FfAXa1Q6Rh55rXTowT+inE1CDwsG5N hf7T7CBKF4DzTSJ2rD+1c6onag== X-Received: by 2002:a63:6982:: with SMTP id e124mr15526357pgc.46.1615624962566; Sat, 13 Mar 2021 00:42:42 -0800 (PST) Received: from x1 ([2601:1c0:4701:ae70:70ad:d592:e701:79d3]) by smtp.gmail.com with ESMTPSA id q5sm7412514pfk.219.2021.03.13.00.42.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Mar 2021 00:42:41 -0800 (PST) Date: Sat, 13 Mar 2021 00:42:39 -0800 From: Drew Fustini To: "Enrico Weigelt, metux IT consult" Cc: Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Tony Lindgren , Andy Shevchenko , Alexandre Belloni , Geert Uytterhoeven , Pantelis Antoniou , Jason Kridner , Robert Nelson , Joe Perches , Dan Carpenter , Jonathan Corbet , linux-doc@vger.kernel.org, Geert Uytterhoeven Subject: Re: [PATCH v9 2/4] pinctrl: pinmux: Add pinmux-select debugfs file Message-ID: <20210313084239.GB1172642@x1> References: <20210302053059.1049035-1-drew@beagleboard.org> <20210302053059.1049035-3-drew@beagleboard.org> <349b09f8-fe99-d0d4-dd11-c288bf66cb4d@metux.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <349b09f8-fe99-d0d4-dd11-c288bf66cb4d@metux.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 12, 2021 at 02:57:54PM +0100, Enrico Weigelt, metux IT consult wrote: > On 02.03.21 06:30, Drew Fustini wrote: > > Hi folks, > > > Add "pinmux-select" to debugfs which will activate a pin function for a > > given pin group: > > > > echo "" > pinmux-select > > > > The write operation pinmux_select() handles this by checking that the > > names map to valid selectors and then calling ops->set_mux(). > > I've already been playing with similar idea, but for external muxes. > For example, some boards have multiple SIM slots that can be switched > via some gpio pin. > > Not sure whether traditional pinmux would be a good match for that. > > > --mtx > Thank you for your comment. I am interested in understanding other use cases. Linus can hopefully correct me, but I think this is covered by section "Drivers needing both pin control and GPIOs" in pinctl.rst [1]. The driver could be both a GPIO consumer and pinctrl consumer and then be able to call pinctrl_select_state() and devm_gpio_request(). Thank you, Drew [1] https://www.kernel.org/doc/html/latest/driver-api/pinctl.html