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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 60C09E7717D for ; Wed, 11 Dec 2024 08:45:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:Content-Type:Message-ID:References:In-Reply-To: Subject:To:From:Date:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WUoipqwINErtScImQT/pK8ikFLW9WxsFyv2aWgrTKQU=; b=zOe4XVAgQTXDrm BKXm36O3OiW8sPxxl+LhYZws2HNxr/YlQo6hU2e3hpWkvHIVAgqJQcljAKxNP89efd+MHrAoAZDvs 1HIo9uG7nEvcBA5EqjSceaKqigXgQL77pCgMbbostBklosFpLhRfCKMycX5lDx2fviVED3LPGQiPR UxTyRRFh64t52ecn774V5ak21h7V6250PkeD2TMQQC4ROndeFfG2VFyid0b9vGJgs3SfqSrw/evN2 3TrpC8C+255V94W3Gdic9x9EAJGE4EIxCLv6qaiqU6lyM6DhKAZ+RKRKHMPrb+wUwjY28Q1ceoTF1 CLbEBaOjQyvgnm/e+Bew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tLILG-0000000EGTc-29RE; Wed, 11 Dec 2024 08:45:10 +0000 Received: from mxout1.routing.net ([2a03:2900:1:a::a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tLIKB-0000000EGBX-1Qp3; Wed, 11 Dec 2024 08:44:04 +0000 Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout1.routing.net (Postfix) with ESMTP id 13DE340349; Wed, 11 Dec 2024 08:43:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1733906639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WUoipqwINErtScImQT/pK8ikFLW9WxsFyv2aWgrTKQU=; b=fET0avlRfjFvv6n1c4Q7Byb5prAb2b6BY2o49YLKT3+i/tNGTqN5LxuMYxmsigTLJ5WuZf TduRVyFFyJpATin75Ah4YgvM0WSqzgGn1JPEQJEAfgVGQdO/sSNxB9HZ4U1CYfVH+ihB2k LOvt0BkmZZ0UPpSCW1ka4m2JJZ+PhY8= Received: from webmail.hosting.de (unknown [134.0.26.148]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 46180360076; Wed, 11 Dec 2024 08:43:58 +0000 (UTC) MIME-Version: 1.0 Date: Wed, 11 Dec 2024 09:43:58 +0100 From: "Frank Wunderlich (linux)" To: Christophe JAILLET Subject: Re: [PATCH v5 2/5] pinctrl: mediatek: add MT7988 pinctrl driver In-Reply-To: <32201aec-f3d2-49a7-b0ca-2ede10fec103@wanadoo.fr> References: <20241202110045.22084-1-linux@fw-web.de> <20241202110045.22084-3-linux@fw-web.de> <32201aec-f3d2-49a7-b0ca-2ede10fec103@wanadoo.fr> Message-ID: <598f595589d061bf314d942095cd5dc6@fw-web.de> X-Sender: linux@fw-web.de Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Mail-ID: f7caaa60-9ba2-4071-927a-9434349a1399 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241211_004403_550972_20D1F40E X-CRM114-Status: GOOD ( 11.25 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Conor Dooley , Sam Shih , Linus Walleij , Sean Wang , linux-kernel@vger.kernel.org, Daniel Golle , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, =?UTF-8?Q?Ar=C4=B1n=C3=A7_=C3=9CNAL?= , linux-mediatek@lists.infradead.org, Matthias Brugger , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Am 2024-12-10 19:45, schrieb Christophe JAILLET: > Le 02/12/2024 à 12:00, Frank Wunderlich a écrit : >> From: Daniel Golle >> >> Add pinctrl driver for the MediaTek MT7988 SoC. >> >> Signed-off-by: Sam Shih >> Signed-off-by: Daniel Golle >> [correctly initialise for the function_desc structure] >> Signed-off-by: Arınç ÜNAL >> Signed-off-by: Frank Wunderlich >> >> --- > > ... > >> +/* flash */ >> +static int mt7988_snfi_pins[] = { 22, 23, 24, 25, 26, 27 }; >> +static int mt7988_snfi_funcs[] = { 2, 2, 2, 2, 2, 2 }; >> + >> +static int mt7988_emmc_45_pins[] = { >> + 21, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37 >> +}; >> +static int mt7988_emmc_45_funcs[] = { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 >> }; >> + >> +static int mt7988_sdcard_pins[] = { 32, 33, 34, 35, 36, 37 }; >> +static int mt7988_sdcard_funcs[] = { 5, 5, 5, 5, 5, 5 }; >> + >> +static int mt7988_emmc_51_pins[] = { 38, 39, 40, 41, 42, 43, >> + 44, 45, 46, 47, 48, 49 }; >> +static int mt7988_emmc_51_funcs[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, >> 1, 1 }; > > At least all the _pins arrays could be const. > Maybe we could also make it possible to have _funcs const as well. > > ... > >> +static struct mtk_pin_soc mt7988_data = { > > const? can do, but for funcs i see no clear way angelo, can i keep the RB, when changing pins/mtk_pin_soc to const (without changing macro in drivers/pinctrl/mediatek/pinctrl-moore.h)? >> + .reg_cal = mt7988_reg_cals, >> + .pins = mt7988_pins, >> + .npins = ARRAY_SIZE(mt7988_pins), >> + .grps = mt7988_groups, >> + .ngrps = ARRAY_SIZE(mt7988_groups), >> + .funcs = mt7988_functions, >> + .nfuncs = ARRAY_SIZE(mt7988_functions), >> + .eint_hw = &mt7988_eint_hw, >> + .gpio_m = 0, >> + .ies_present = false, >> + .base_names = mt7988_pinctrl_register_base_names, >> + .nbase_names = ARRAY_SIZE(mt7988_pinctrl_register_base_names), >> + .bias_disable_set = mtk_pinconf_bias_disable_set, >> + .bias_disable_get = mtk_pinconf_bias_disable_get, >> + .bias_set = mtk_pinconf_bias_set, >> + .bias_get = mtk_pinconf_bias_get, >> + .pull_type = mt7988_pull_type, >> + .bias_set_combo = mtk_pinconf_bias_set_combo, >> + .bias_get_combo = mtk_pinconf_bias_get_combo, >> + .drive_set = mtk_pinconf_drive_set_rev1, >> + .drive_get = mtk_pinconf_drive_get_rev1, >> + .adv_pull_get = mtk_pinconf_adv_pull_get, >> + .adv_pull_set = mtk_pinconf_adv_pull_set, >> +}; > > ... > > CJ