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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F01CC77B7A for ; Fri, 2 Jun 2023 01:31:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232523AbjFBBa7 (ORCPT ); Thu, 1 Jun 2023 21:30:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231320AbjFBBa6 (ORCPT ); Thu, 1 Jun 2023 21:30:58 -0400 Received: from fgw23-7.mail.saunalahti.fi (fgw23-7.mail.saunalahti.fi [62.142.5.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61CE9A3 for ; Thu, 1 Jun 2023 18:30:57 -0700 (PDT) Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw23.mail.saunalahti.fi (Halon) with ESMTP id 1e156516-00e5-11ee-b972-005056bdfda7; Fri, 02 Jun 2023 04:30:55 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Fri, 2 Jun 2023 04:30:54 +0300 To: Thierry Reding Cc: Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jon Hunter , Prathamesh Shete , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH v3 2/3] pinctrl: tegra: Add Tegra234 pinmux driver Message-ID: References: <20230530133654.1296480-1-thierry.reding@gmail.com> <20230530133654.1296480-3-thierry.reding@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230530133654.1296480-3-thierry.reding@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Tue, May 30, 2023 at 03:36:53PM +0200, Thierry Reding kirjoitti: > From: Prathamesh Shete > > This change adds support for the two pin controllers found on Tegra234. ... > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Pinctrl data for the NVIDIA Tegra234 pinmux > + * > + * Copyright (c) 2021-2023, NVIDIA CORPORATION. All rights reserved. > + * This program is free software; you can redistribute it and/or modify it > + * under the terms and conditions of the GNU General Public License, > + * version 2, as published by the Free Software Foundation. > + * > + * This program is distributed in the hope it will be useful, but WITHOUT > + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for > + * more details. The whole SPDX idea is to avoid including this duplication. Is this a requirement of your company lawers? > + */ > + > +#include Missing mod_devicetable.h > +#include > +#include Do you need both for just of_device_get_match_data() call? Note, you may replace it with device_get_match_data() and property.h and be completely OF independent. > +#include > +#include > +#include > +#include "pinctrl-tegra.h" ... > +#define PINGROUP(pg_name, f0, f1, f2, f3, r, bank, pupd, e_io_hv, e_lpbk, e_input, e_lpdr, e_pbias_buf, \ > + gpio_sfio_sel, schmitt_b) \ > + { \ > + .name = #pg_name, \ > + .pins = pg_name##_pins, \ > + .npins = ARRAY_SIZE(pg_name##_pins), \ Can we use struct pingroup, please? > + .funcs = { \ > + TEGRA_MUX_##f0, \ > + TEGRA_MUX_##f1, \ > + TEGRA_MUX_##f2, \ > + TEGRA_MUX_##f3, \ > + }, \ > + PIN_PINGROUP_ENTRY_Y(r, bank, pupd, e_io_hv, e_lpbk, \ > + e_input, e_lpdr, e_pbias_buf, \ > + gpio_sfio_sel, schmitt_b) \ > + drive_##pg_name, \ > + } > +static int tegra234_pinctrl_probe(struct platform_device *pdev) > +{ > + const struct tegra_pinctrl_soc_data *soc = of_device_get_match_data(&pdev->dev); > + > + return tegra_pinctrl_probe(pdev, soc); > +} > + > +static const struct of_device_id tegra234_pinctrl_of_match[] = { > + { .compatible = "nvidia,tegra234-pinmux", .data = &tegra234_pinctrl}, > + { .compatible = "nvidia,tegra234-pinmux-aon", .data = &tegra234_pinctrl_aon }, > + { }, No comma for the terminator entry. > +}; ... > +static struct platform_driver tegra234_pinctrl_driver = { > + .driver = { > + .name = "tegra234-pinctrl", > + .owner = THIS_MODULE, Approx. 15 years this is _not_ needed. > + .of_match_table = tegra234_pinctrl_of_match, > + }, > + .probe = tegra234_pinctrl_probe, > +}; -- With Best Regards, Andy Shevchenko