[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200717160727.e6y5htg4sjd7bezi@gilmour.lan>
Date: Fri, 17 Jul 2020 18:07:27 +0200
From: Maxime Ripard <maxime@...no.tech>
To: Frank Lee <frank@...winnertech.com>
Cc: robh+dt@...nel.org, wens@...e.org, tiny.windzz@...il.com,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 1/3] dt-bindings: gpio: sunxi:create a DT header for Allwinner pin controller
Hi!
On Wed, Jul 15, 2020 at 07:54:12PM +0800, Frank Lee wrote:
> From: Yangtao Li <frank@...winnertech.com>
>
> The sunxi gpio binding defines a few custom cells for its gpio specifier.
> Provide bank name for those.
>
> Signed-off-by: Yangtao Li <frank@...winnertech.com>
Thanks for working on this, I wanted to do it at some point but it kept
getting pushed further into my todo list.
> ---
> include/dt-bindings/gpio/sunxi-gpio.h | 29 +++++++++++++++++++++++++++
> 1 file changed, 29 insertions(+)
> create mode 100644 include/dt-bindings/gpio/sunxi-gpio.h
>
> diff --git a/include/dt-bindings/gpio/sunxi-gpio.h b/include/dt-bindings/gpio/sunxi-gpio.h
> new file mode 100644
> index 000000000000..c692b4360da6
> --- /dev/null
> +++ b/include/dt-bindings/gpio/sunxi-gpio.h
So generally we've been using the compatible name as the file name. You
should follow that convention too, and since it was added with the A10,
using the A10 compatible.
> @@ -0,0 +1,29 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * GPIO definitions for Allwinner SoCs
> + *
> + * Copyright (C) 2020 Yangtao Li <frank@...winnertech.com>
> + */
> +
> +#ifndef _DT_BINDINGS_SUNXI_GPIO_H
> +#define _DT_BINDINGS_SUNXI_GPIO_H
> +
> +#include <dt-bindings/gpio/gpio.h>
> +
> +/* pio */
> +#define PA 0
> +#define PB 1
> +#define PC 2
> +#define PD 3
> +#define PE 4
> +#define PF 5
> +#define PG 6
> +#define PH 7
> +#define PI 8
> +
> +/* r-pio */
> +#define PL 0
> +#define PM 1
> +#define PN 2
> +
> +#endif /* _DT_BINDINGS_SUNXI_GPIO_H */
Maybe we can go one step further and use a macro to have something like
PIN(A, 12) ?
Maxime
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists