Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5AE1CC19F2D for ; Tue, 9 Aug 2022 11:36:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6264F84A26; Tue, 9 Aug 2022 13:36:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1660044967; bh=9bik9tlNy+a1bQXbjr/sVqE5a/MmSq2Zmy0l57CPllc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=f1Wkk4mwBhQSjJ2Xdpo5axEJdZpnCLvtkdVwdX6qu1+qi4m2hnRvcDasOxEYGLxN2 LIHKDY8dT5OUu9b7DvvGov/jCtWq6yZqi75WFIDbdaXg+kqDo2gcdgaFC/v4RZ55SN FrlPIL5uaHycgNtFpYpw6OXaPoHsOTaeZZpiJisSyJZnC1pXlywr9ig+UwDKcvd2YQ 059UEeP5IA3lxD0Em0/pKJsbuwomUFjwPgMeNP/ZqvX6bi2FNLREacidQQuiDkC1cj HW9uzsLPDjtLESkGmNBG8EEWKg2m0QcnMJ8KMk7U0q0DxekGiH5l8KBTqNfJk/Z7AJ ONC0xMjxQ4+HA== Received: by phobos.denx.de (Postfix, from userid 109) id E870884A2C; Tue, 9 Aug 2022 13:36:02 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [80.241.59.204]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B189884A24 for ; Tue, 9 Aug 2022 13:35:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4M29xT63K3z9sQg; Tue, 9 Aug 2022 13:35:57 +0200 (CEST) Message-ID: <4699fc70-b935-a438-9dde-22864c15fdae@denx.de> Date: Tue, 9 Aug 2022 13:35:56 +0200 MIME-Version: 1.0 Subject: Re: [PATCH u-boot-marvell 3/3] arm64: a37xx: pinctrl: Improve description for pinmux command Content-Language: en-US To: =?UTF-8?Q?Pali_Roh=c3=a1r?= Cc: =?UTF-8?Q?Marek_Beh=c3=ban?= , u-boot@lists.denx.de References: <20220804104156.22209-1-pali@kernel.org> <20220804104156.22209-3-pali@kernel.org> From: Stefan Roese In-Reply-To: <20220804104156.22209-3-pali@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 04.08.22 12:41, Pali Rohár wrote: > In more cases group name consist of function name followed by function > number. So if function name is just prefix of group name, show group name. > > So in 'pinmux status -a' command output would be visible also extended > function number, which is useful for debugging. > > Signed-off-by: Pali Rohár Applied to u-boot-marvell/master Thanks, Stefan > --- > drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c > index 32b49f167c66..25fbe39abd19 100644 > --- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c > +++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c > @@ -406,7 +406,17 @@ static int armada_37xx_pmx_get_pin_muxing(struct udevice *dev, unsigned int sele > > for (f = 0; f < NB_FUNCS && grp->funcs[f]; f++) { > if (grp->val[f] == val) { > - strlcpy(buf, grp->funcs[f], size); > + /* > + * In more cases group name consist of > + * function name followed by function > + * number. So if function name is just > + * prefix of group name, show group name. > + */ > + if (strncmp(grp->name, grp->funcs[f], > + strlen(grp->funcs[f])) == 0) > + strlcpy(buf, grp->name, size); > + else > + strlcpy(buf, grp->funcs[f], size); > return 0; > } > } Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de