mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Zhang Ning <zhangn1985@qq.com>
To: narmstrong@baylibre.com, linux-amlogic@lists.infradead.org
Cc: Zhang Ning <zhangn1985@qq.com>
Subject: [PATCH] Ask a question about why can't use GPIOAO: GPIO_TEST_N
Date: Thu, 14 Jul 2022 10:07:05 +0800	[thread overview]
Message-ID: <tencent_CE3C171C6300ED12361ED2B813BF0D5A0608@qq.com> (raw)

first this is not a code review, just ask a question.

I started to enable MagicBox M16S, and sent patches for review.

but leds are not enabled.

I have tried, and found gpioao: GPIO_TEST_N can control led on off.

thus I add it to dts:

        leds {
                compatible = "gpio-leds";

                led-white {
                        color = <LED_COLOR_ID_WHITE>;
                        function = LED_FUNCTION_POWER;
                        gpios = <&gpio_ao GPIO_TEST_N GPIO_ACTIVE_HIGH>;
                        default-state = "keep";
                };
        };

but failed with error -22.

and simply change GPIO_TEST_N to GPIOAO_2, no error.

thus find pinctrl driver doesn't allow to use this gpio.

why?

Signed-off-by: Zhang Ning <zhangn1985@qq.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxl.c b/drivers/pinctrl/meson/pinctrl-meson-gxl.c
index 51408996255b..fb5fa88b30c7 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxl.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxl.c
@@ -820,7 +820,7 @@ static struct meson_bank meson_gxl_periphs_banks[] = {
 
 static struct meson_bank meson_gxl_aobus_banks[] = {
 	/*   name    first      last      irq	pullen  pull    dir     out     in  */
-	BANK("AO",   GPIOAO_0,  GPIOAO_9, 0, 9, 0,  16, 0, 0,   0,  0,  0, 16,  1,  0),
+	BANK("AO",   GPIOAO_0,  GPIO_TEST_N, 0, 9, 0,  16, 0, 0,   0,  0,  0, 16,  1,  0),
 };
 
 static struct meson_pinctrl_data meson_gxl_periphs_pinctrl_data = {
-- 
2.35.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

             reply	other threads:[~2022-07-14  2:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14  2:07 Zhang Ning [this message]
2022-07-18  8:20 ` Neil Armstrong

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=tencent_CE3C171C6300ED12361ED2B813BF0D5A0608@qq.com \
    --to=zhangn1985@qq.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=narmstrong@baylibre.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

all inboxes | Powered by JetHome®