[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c868c9b0-0f4c-4cc0-af6b-7f97aa822bfe@kernel.org>
Date: Mon, 4 Aug 2025 09:37:34 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Prathamesh Shete <pshete@...dia.com>, linus.walleij@...aro.org,
brgl@...ev.pl, thierry.reding@...il.com, jonathanh@...dia.com,
robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
devicetree@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: gpio: Add Tegra256 support
On 04/08/2025 06:16, Prathamesh Shete wrote:
> then:
> properties:
> interrupts:
> diff --git a/include/dt-bindings/gpio/tegra256-gpio.h b/include/dt-bindings/gpio/tegra256-gpio.h
> new file mode 100644
> index 000000000000..36485b4bf47d
> --- /dev/null
> +++ b/include/dt-bindings/gpio/tegra256-gpio.h
> @@ -0,0 +1,28 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved. */
> +
> +/*
> + ** This header provides constants for binding nvidia,tegra256-gpio*.
Use Linux style comments. See Coding style.
> + **
> + ** The first cell in Tegra's GPIO specifier is the GPIO ID. The macros below
> + ** provide names for this.
> + **
> + ** The second cell contains standard flag values specified in gpio.h.
> + **/
> +
> +#ifndef _DT_BINDINGS_GPIO_TEGRA256_GPIO_H
> +#define _DT_BINDINGS_GPIO_TEGRA256_GPIO_H
> +
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/* GPIOs implemented by main GPIO controller */
> +#define TEGRA256_MAIN_GPIO_PORT_A 0
> +#define TEGRA256_MAIN_GPIO_PORT_B 1
> +#define TEGRA256_MAIN_GPIO_PORT_C 2
> +#define TEGRA256_MAIN_GPIO_PORT_D 3
> +
> +#define TEGRA256_MAIN_GPIO(port, offset) \
> + ((TEGRA256_MAIN_GPIO_PORT_##port * 8) + (offset))
I don't see this macro being used in the drivers. I guess you need it
for embedding hardware constant (so not really bindings)? You have
entire commit msg to explain that...
Best regards,
Krzysztof
Powered by blists - more mailing lists