Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3600225rwb; Tue, 8 Nov 2022 06:26:14 -0800 (PST) X-Google-Smtp-Source: AMsMyM6+9u0mE5yEPGPHOnMaGWmiP64aojJUpVWZNk/hVLOsNEHiO0EMgION/Q/bGfzeNP19fMFd X-Received: by 2002:a05:6402:5299:b0:461:d052:be34 with SMTP id en25-20020a056402529900b00461d052be34mr55988223edb.42.1667917574290; Tue, 08 Nov 2022 06:26:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667917574; cv=none; d=google.com; s=arc-20160816; b=jbioSCejNtA7DHztRclIDCyg4DDNZslX8j0mFlK4Q+EkChrhBw02rwOneD9ij1MqGb wo72LVpUY0SWH+BV119SQbLvj494I4/wKBw1+DaSv+/08ic4S+XLkaFxP2LfxLKW9hm3 3gbuK1+c9VCBk/FQZO8/OmYiMMwOf5NI6JclTe/LlHyXeqHpjGZMKlTnmrLEYtd95ksa ljwznkwMfwTl4y1PopST9OLwUp7miL9a4Cg8a4C5frSi8l9hXSsr542YTi+sWle6Fq5q 3UkQAB6WjXei4yBnnDf5YIqsXC+r5PDw7CPYBdmohv5FiYgL/Z+xgymgD7IxgTnoIOoC FI0g== 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=lUte8uNFM/Ko5EYA94xDS4OarmRppybS52Yd06EmKs0=; b=k8Oz9Au+Hc8SBhnZ+borJ+dbykanENSHfcyplOhDTD2hOWTRf8oY7w8CYYQ2ORQpgW xP7qH9HhHUQCbz1hQvD+LP2YLbwIxOCGIQ0sIwDZpVDUwX78ixHCMnZxo1GGvsC9UsLb Kzylk7DZaqJRF/mQkQ+V6uhUsLq8wbmVY7Ind1+04O4qiM49BDRykSospSnBTFQO9t7W 3qwiXS0IJ/td8sic1EgT1ClUsFQUYL5/wN/Q0U5+sUVx+nFf+bbA5b+Q2l+p0F/2+k2W ybqueS9UeDXKmW0pKNXkR552/cZsFQda9ua/Dwuesfsr7XiMz25izVWKubo5ULfXyDgh osiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="exue/41m"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b20-20020aa7c6d4000000b0044f2fb68fe6si10910380eds.495.2022.11.08.06.25.52; Tue, 08 Nov 2022 06:26:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="exue/41m"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234034AbiKHMgT (ORCPT + 89 others); Tue, 8 Nov 2022 07:36:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234049AbiKHMgR (ORCPT ); Tue, 8 Nov 2022 07:36:17 -0500 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD8904B9B6 for ; Tue, 8 Nov 2022 04:36:14 -0800 (PST) Received: by mail-ed1-x531.google.com with SMTP id x2so22256596edd.2 for ; Tue, 08 Nov 2022 04:36:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=lUte8uNFM/Ko5EYA94xDS4OarmRppybS52Yd06EmKs0=; b=exue/41mpesJS2YHEz7v0h7Ysi3Mac6gew2UFoCbLeSfddgbKISLJDgotDgMFVYkqV 9buWnp6zQNtN4O6AT4aswNa1CgAq2FNtGMgCfMy4m9mpKJRgu1fYulX/Xu6c2NRdsrZR +1UMYXNI35yEqCowzKJyC9duOFwQ4Cnb1qzmCMTBdbPsQvk/ovnmKvU5XaMVOLDX9YCC zm/3t5mRGmoSf7cYJxhv+m6jHMhM/vsh6iB2JP+he/UnWDMxUsNMbXr+xYv+oOK+Kcmh uUVENFfQvlvi1WxCN6Xhp29t2LjaXSIuDLSg2jHWW+/BIljG+y/Z/FVMf5D6HDZQTmd4 wDxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lUte8uNFM/Ko5EYA94xDS4OarmRppybS52Yd06EmKs0=; b=v3C7Z86kb2bWG1LtFGDbcSFkdE3Xn6kklJkpwF2iBzvIDSQnP52QEfEl7mVLEBEbqY u37aLbQYsKfAAqJPDAftj/tcfJyLpWaTaK2CsDn/4IkT0wzZWerK77AT3l+NdAKx+AOS j8PRLBLLoFuM5YY9/g74d/1WW9Ey98lOY1ix8hzPK62aJdk3/7GblqPSycWoNfiYCUom Pyt4RvkLXg/4ZQsCb1kvzaqZCn7fCd+uz0PId3FUqo25z/g4vYNmkqOG/VNDF98DrInk O8sNx8E1vi8ZvmakjrCn8oqLXkhQgMR+wyTLD0H1jiQSM6xaupq4ukVXlpm8vYcRJ8mC vmIg== X-Gm-Message-State: ACrzQf0+8687NpZKjgVoBhu9zzT5UPH8uXxsU0oUmv7pV/hPN2e8JGd8 1yBTBAkyZXI/n7j/HOupbp4iIgjO9lkiW1/KMQryFA== X-Received: by 2002:a05:6402:d0b:b0:458:a244:4e99 with SMTP id eb11-20020a0564020d0b00b00458a2444e99mr55652244edb.46.1667910973339; Tue, 08 Nov 2022 04:36:13 -0800 (PST) MIME-Version: 1.0 References: <20221031100843.14579-1-clin@suse.com> <20221031100843.14579-3-clin@suse.com> In-Reply-To: <20221031100843.14579-3-clin@suse.com> From: Linus Walleij Date: Tue, 8 Nov 2022 13:35:59 +0100 Message-ID: Subject: Re: [PATCH 2/2] pinctrl: add NXP S32 SoC family support To: Chester Lin Cc: Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , s32@nxp.com, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Larisa Grigore , Ghennadi Procopciuc , Andrei Stefanescu , Radu Pirea , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Matthias Brugger , Matthew Nunez , Phu Luu An , Stefan-Gabriel Mirea Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chester, thanks for your patch! On Mon, Oct 31, 2022 at 11:10 AM Chester Lin wrote: > Add the pinctrl driver for NXP S32 SoC family. This driver is mainly based > on NXP's downstream implementation on CodeAurora[1]. > > [1] https://source.codeaurora.org/external/autobsps32/linux/tree/drivers/pinctrl/freescale?h=bsp34.0-5.10.120-rt > > Signed-off-by: Matthew Nunez > Signed-off-by: Phu Luu An > Signed-off-by: Stefan-Gabriel Mirea > Signed-off-by: Larisa Grigore > Signed-off-by: Ghennadi Procopciuc > Signed-off-by: Andrei Stefanescu > Signed-off-by: Radu Pirea > Signed-off-by: Chester Lin Overall this looks very good, special thanks for using as much generic code as possible. Only main thing I want you to look into are those magic nxp,pins ranges encoded into the device tree. > +static struct s32_pinctrl_soc_info s32_pinctrl_info = { > + .pins = s32_pinctrl_pads_siul2, > + .npins = ARRAY_SIZE(s32_pinctrl_pads_siul2), > +}; > + > +static const struct of_device_id s32_pinctrl_of_match[] = { > + { > + > + .compatible = "nxp,s32g-siul2-pinctrl", > + .data = (void *) &s32_pinctrl_info, > + }, > + { /* sentinel */ } > +}; > +MODULE_DEVICE_TABLE(of, s32_pinctrl_of_match); Since you are already using .data so nicely for the variants surely the nxp,pins info can go in there too? Yours, Linus Walleij