From: Rob Herring <robh@kernel.org>
To: Robert Marko <robert.marko@sartura.hr>
Cc: lee.jones@linaro.org, linus.walleij@linaro.org,
bgolaszewski@baylibre.com, jdelvare@suse.com, linux@roeck-us.net,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-hwmon@vger.kernel.org,
luka.perkov@sartura.hr, jmp@epiphyte.org, pmenzel@molgen.mpg.de,
buczek@molgen.mpg.de
Subject: Re: [PATCH 2/6] dt-bindings: gpio: Add Delta TN48M CPLD GPIO bindings
Date: Thu, 6 May 2021 08:57:04 -0500 [thread overview]
Message-ID: <20210506135704.GA3340759@robh.at.kernel.org> (raw)
In-Reply-To: <20210430123511.116057-2-robert.marko@sartura.hr>
On Fri, Apr 30, 2021 at 02:35:07PM +0200, Robert Marko wrote:
> CPLD inside of the Delta TN48M does not number GPIOs
> at all, so in order to ensure numbering lets use bindigs.
Looking at the code, I'd make the gpio number something like '(offset <<
8) | bit' rather than just making up an index.
We don't normally have defines for GPIO numbers either.
>
> Signed-off-by: Robert Marko <robert.marko@sartura.hr>
> ---
> include/dt-bindings/gpio/tn48m-gpio.h | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
> create mode 100644 include/dt-bindings/gpio/tn48m-gpio.h
>
> diff --git a/include/dt-bindings/gpio/tn48m-gpio.h b/include/dt-bindings/gpio/tn48m-gpio.h
> new file mode 100644
> index 000000000000..4ece4826d746
> --- /dev/null
> +++ b/include/dt-bindings/gpio/tn48m-gpio.h
> @@ -0,0 +1,26 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * GPIO definitions for Delta TN48M CPLD GPIO driver
> + *
> + * Copyright 2020 Sartura Ltd
> + *
> + * Author: Robert Marko <robert.marko@sartura.hr>
> + */
> +
> +#ifndef _DT_BINDINGS_TN48M_GPIO_H
> +#define _DT_BINDINGS_TN48M_GPIO_H
> +
> +#define SFP_TX_DISABLE_52 0
> +#define SFP_TX_DISABLE_51 1
> +#define SFP_TX_DISABLE_50 2
> +#define SFP_TX_DISABLE_49 3
> +#define SFP_PRESENT_52 4
> +#define SFP_PRESENT_51 5
> +#define SFP_PRESENT_50 6
> +#define SFP_PRESENT_49 7
> +#define SFP_LOS_52 8
> +#define SFP_LOS_51 9
> +#define SFP_LOS_50 10
> +#define SFP_LOS_49 11
> +
> +#endif /* _DT_BINDINGS_TN48M_GPIO_H */
> --
> 2.31.1
>
next prev parent reply other threads:[~2021-05-06 13:57 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-30 12:35 [PATCH 1/6] mfd: Add Delta TN48M CPLD driver Robert Marko
2021-04-30 12:35 ` [PATCH 2/6] dt-bindings: gpio: Add Delta TN48M CPLD GPIO bindings Robert Marko
2021-05-06 13:57 ` Rob Herring [this message]
2021-04-30 12:35 ` [PATCH 3/6] gpio: Add Delta TN48M CPLD GPIO driver Robert Marko
2021-05-06 14:00 ` Rob Herring
2021-05-06 16:40 ` Michael Walle
2021-05-06 17:21 ` Luka Perkov
2021-05-21 13:22 ` Robert Marko
2021-05-06 16:38 ` Michael Walle
2021-05-21 13:21 ` Robert Marko
2021-04-30 12:35 ` [PATCH 4/6] hwmon: Add Delta TN48M CPLD HWMON driver Robert Marko
2021-04-30 13:12 ` Guenter Roeck
2021-05-19 12:01 ` Robert Marko
2021-05-19 13:40 ` Guenter Roeck
2021-04-30 12:35 ` [PATCH 5/6] dt-bindings: mfd: Add Delta TN48M CPLD drivers bindings Robert Marko
2021-05-06 14:01 ` Rob Herring
2021-04-30 12:35 ` [PATCH 6/6] MAINTAINERS: Add Delta Networks TN48M CPLD drivers Robert Marko
2021-05-06 16:34 ` [PATCH 1/6] mfd: Add Delta TN48M CPLD driver Michael Walle
2021-05-19 11:53 ` Robert Marko
2021-05-19 19:42 ` Michael Walle
2021-05-20 6:49 ` Lee Jones
2021-05-21 8:19 ` Robert Marko
2021-05-21 9:03 ` Lee Jones
2021-05-21 9:06 ` Robert Marko
2021-05-06 16:50 ` kernel test robot
2021-05-19 11:11 ` Lee Jones
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=20210506135704.GA3340759@robh.at.kernel.org \
--to=robh@kernel.org \
--cc=bgolaszewski@baylibre.com \
--cc=buczek@molgen.mpg.de \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=jmp@epiphyte.org \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=luka.perkov@sartura.hr \
--cc=pmenzel@molgen.mpg.de \
--cc=robert.marko@sartura.hr \
/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).