Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp1548381lkv; Wed, 19 May 2021 12:30:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPG9osxNbXE8KHhMBlCF6ZDcskceGWB5tjrBvOSc4wvnU/nGeA1oAkZebXhlnoqfzDbL1G X-Received: by 2002:a92:c205:: with SMTP id j5mr669798ilo.1.1621452627871; Wed, 19 May 2021 12:30:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621452627; cv=none; d=google.com; s=arc-20160816; b=zNi+S7NY7FrgEh5/kvcqXW9MOb2QPBIqbGIYqWkMvfVEaQxdDVxuEWTf7MrrvIB5lM 1m4jd1N2MOPfT5i4curh4Rla8+XLt0Oz35w+kyFvL5rFabU5WObemLqu2heUc4xmi5so momrC67ROXZ1ravuGMTOp+Frtr2SJTwjq51RkwpKEVWaYoio0AhFm2Isv/GVe/EhdL6F yNispnbl67CvqWYP+nQUp3YVp4lpsXAPum48GF7BshTBSVIstQ9YHgHDBRuRhGnGQ10l ZL0t3rqi5PIOS6Fd9AHyZEiU1h85biTfma14xnY/OlkHT2hGqFlBxK4X3dNHLLEwHh4l YnYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FSH6O+80A3wo/ivtXXwOmyWUlPQ03Zp0wKm42ionk8s=; b=r5PYNRqyMWYVnvVfSSOVEWiD5c2sb8mqnI7alu+kOOL6rA3byf8yhmSU2BJKA+bLup 113KIM/7hJ/SJcPS6nCasmIZ3vVkjAFdZnTzq4kVtZoNV22aHtZTbQ9pXQZSox6hdEzB wfZgkJ/szddkJY3S1u2HxYhuhBWPTyss2Tat09TiRx8aDpC46hGsoDNWr3fyhOeaO1C2 QG5tTHtYSZXoX3ZVC7ya+TWeqJ+iOmqriBbOaRQzJZJsYioM7oTJPCkADr6ViVGL5eRG 2MmG0AjkjUr9lvSftx8BZSCp90Qn+jKUsFLOqqWYCXA55jyaQNsYdtersBQwP+U9qJgi j+ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CqUSodm9; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z22si201887iof.57.2021.05.19.12.30.14; Wed, 19 May 2021 12:30:27 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=CqUSodm9; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346261AbhESL3X (ORCPT + 99 others); Wed, 19 May 2021 07:29:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350640AbhESL3O (ORCPT ); Wed, 19 May 2021 07:29:14 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17C9EC06175F; Wed, 19 May 2021 04:27:55 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id q6so7172215pjj.2; Wed, 19 May 2021 04:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FSH6O+80A3wo/ivtXXwOmyWUlPQ03Zp0wKm42ionk8s=; b=CqUSodm9Z8jO18w0IjUEIZkYHPe19OzUDy5rXTjhBiQDHftdcPdsdHeXmQHvHfGZCz 4JK8jBkvZyqlfJBKHLdsR3knXqD5qS/EZtJuHYQIxyT+6/hpa3skDagG1zmhoLJlu6bf j8M3ks+bRRwqbHdqrlc5kcnAhTqqzkv9WNylSHIEXv+qdo+Yj2Vw2XzL/Jv8uoYNOiUu Jc3V79eFgL1r173MAQJlUYm/R2t2QVO75GqQRrcaxmHuskoj+OVQnJHppIj/CSyavXdD mWvIZtGZfpKcBncmWG6mGSltkb/w4eb3PhppdnAzosXm9cNvRJk7IzcFCDJo+IGJkSJQ psrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FSH6O+80A3wo/ivtXXwOmyWUlPQ03Zp0wKm42ionk8s=; b=EsFsSjGKmsJMrwPynEqCCs8EiHsdLPByaviuEc6XsVhQs3E0jmpgsrFtQN6Kxuxilh pBVJH0XvsmQMpZVjhlpgdS9bEKr3AZUl2unrRIQkyuyWNE4DwwGHbbAoIpkV0LSlOL00 riwRoNyPjL0suRdkmhnlcuFV+0QNp0Faiy9ndTpAAVjX5OQYfRZWpIPC0j/yU+Mpqumi dALGuEJx1BZZxTICrsKQXgxJmcYqMIgqms2o+P95CahKWituQMPnrAX7Ua6EjpgVmsO2 47PaTNClqzV4lSCzE8JQpo30ox3IMKVNjJQX/mZVAakJ9jEB8nhly1wt72ieO8fetVb3 C4qg== X-Gm-Message-State: AOAM533Kuo75GUO/HoZkzUaN5m3dIkpI8Y4RKFDeVxnH3I+p1Tz0IR5o RxOjAqdLts4qrpSNuWN3/Bv1xWPQIUW0rSolcdQ= X-Received: by 2002:a17:90a:af8b:: with SMTP id w11mr7040718pjq.228.1621423674579; Wed, 19 May 2021 04:27:54 -0700 (PDT) MIME-Version: 1.0 References: <20210516135531.2203-1-dariobin@libero.it> <20210516135531.2203-2-dariobin@libero.it> <1735504854.166374.1621346262270@mail1.libero.it> <20210519100235.GA3063522@x1> In-Reply-To: <20210519100235.GA3063522@x1> From: Andy Shevchenko Date: Wed, 19 May 2021 14:27:38 +0300 Message-ID: Subject: Re: [PATCH 1/2] pinctrl: core: configure pinmux from pins debug file To: Drew Fustini Cc: Dario Binacchi , Linux Kernel Mailing List , Linus Walleij , "open list:GPIO SUBSYSTEM" , Vladimir Zapolskiy Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 19, 2021 at 1:02 PM Drew Fustini wrote: > On Tue, May 18, 2021 at 05:01:30PM +0300, Andy Shevchenko wrote: ... > Vladimir Zapolskiy wrote in e73339037f6b ("pinctrl: remove unused > 'pinconf-config' debugfs interface"): > > Of course it might be possible to increase MAX_NAME_LEN, and then add > .pin_config_dbg_parse_modify callbacks to the drivers, but the whole > idea of such a limited debug option looks inviable. A more flexible > way to functionally substitute the original approach is to implicitly > or explicitly use pinctrl_select_state() function whenever needed. > > This makes me think it is not a good idea to bring back pinconf-config. > The pinmux-select debugfs file that I add added in commit 6199f6becc86 > ("pinctrl: pinmux: Add pinmux-select debugfs file") provides a method to > activate a pin function and pin group which I think provides the same > capability as long as the possible pin functions are described in dts. The problem is that the pinctrl_select_state() is very limited and has no clear meanings of the states. Only few are defined and still unclear. What does `sleep` or `standby` or whatever mean? It may be quite different to the device in question. Basically what we need is to say we want this device ('function') to appear on this group of pins ('group'). And pinctrl_select_state() can't fulfill this simple task :-( If we look at the ACPI case it makes that API completely out of useful context (it can be used due to above and some kind of layering violations, like PM vs. pin control). Since above is the debugfs interface we may return it for the certain task, i.e. printing current function / group choice(s) (if it's not done by other means) and allow to switch it desired function/group (that's what Dario tries to achieve AFAIU). -- With Best Regards, Andy Shevchenko