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=-0.7 required=3.0 tests=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 EF31AC433DF for ; Wed, 27 May 2020 16:51:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD6142071A for ; Wed, 27 May 2020 16:51:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728177AbgE0Qv1 (ORCPT ); Wed, 27 May 2020 12:51:27 -0400 Received: from muru.com ([72.249.23.125]:55894 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726529AbgE0Qv1 (ORCPT ); Wed, 27 May 2020 12:51:27 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 0D56D80DB; Wed, 27 May 2020 16:52:16 +0000 (UTC) Date: Wed, 27 May 2020 09:51:22 -0700 From: Tony Lindgren To: Drew Fustini Cc: Haojian Zhuang , Linus Walleij , linux-omap@vger.kernel.org Subject: Re: pinctrl-single: num_maps in generic pinconf support? Message-ID: <20200527165122.GL37466@atomide.com> References: <20200526122133.GA1454440@x1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200526122133.GA1454440@x1> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org * Drew Fustini [200526 12:22]: > Hello Haojian and Linus, > > For pcs_parse_one_pinctrl_entry() in drivers/pinctrl/pinctrl-single.c, > I see that num_maps is set to 2 if PCS_HAS_PINCONF is enabled: > > 1057 if (PCS_HAS_PINCONF && function) { > 1058 res = pcs_parse_pinconf(pcs, np, function, map); > 1059 if (res) > 1060 goto free_pingroups; > 1061 *num_maps = 2; > 1062 } else { > 1063 *num_maps = 1; > 1064 } > 1065 mutex_unlock(&pcs->mutex); > > git blame shows me that came from 9dddb4df90d13: > "pinctrl: single: support generic pinconf" > > Would you be able to provide any insight as to num_maps needs to be 2 > when pinconf is enabled? Only slightly related, but we should really eventually move omaps to use #pinctrl-cells = <2> (or 3) instead of 1, and pass the pinconf seprately from the mux mode. We already treat them separately with the new AM33XX_PADCONF macro, so we'd only have to change one SoC at a time to use updated #pinctrl-cells. But I think pinctrl-single might need some changes before we can do that. Regards, Tony