linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Prathamesh Shete <pshete@nvidia.com>,
	linus.walleij@linaro.org, brgl@bgdev.pl,
	thierry.reding@gmail.com, jonathanh@nvidia.com, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: gpio: Add Tegra256 support
Date: Mon, 4 Aug 2025 09:37:34 +0200	[thread overview]
Message-ID: <c868c9b0-0f4c-4cc0-af6b-7f97aa822bfe@kernel.org> (raw)
In-Reply-To: <20250804041657.27688-1-pshete@nvidia.com>

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

  parent reply	other threads:[~2025-08-04  7:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-04  4:16 [PATCH 1/2] dt-bindings: gpio: Add Tegra256 support Prathamesh Shete
2025-08-04  4:16 ` [PATCH 2/2] gpio: tegra186: Add support for Tegra256 Prathamesh Shete
2025-08-04  7:37 ` Krzysztof Kozlowski [this message]
2025-08-05  6:46 ` [PATCH 1/2] dt-bindings: gpio: Add Tegra256 support Krzysztof Kozlowski
  -- strict thread matches above, loose matches on Subject: below --
2025-08-23  5:54 Prathamesh Shete
2025-08-23 13:52 ` Conor Dooley
2025-09-01  8:20 ` Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c868c9b0-0f4c-4cc0-af6b-7f97aa822bfe@kernel.org \
    --to=krzk@kernel.org \
    --cc=brgl@bgdev.pl \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=pshete@nvidia.com \
    --cc=robh@kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).