mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ye Zhang <ye.zhang@rock-chips.com>
To: linus.walleij@linaro.org, brgl@bgdev.pl, heiko@sntech.de,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	tao.huang@rock-chips.com, finley.xiao@rock-chips.com,
	tim.chen@rock-chips.com, elaine.zhang@rock-chips.com,
	Ye Zhang <ye.zhang@rock-chips.com>
Subject: [PATCH v1 3/5] gpio: rockchip: Set input direction in irq_request_resources
Date: Thu, 15 Aug 2024 15:16:49 +0800	[thread overview]
Message-ID: <20240815071651.3645949-4-ye.zhang@rock-chips.com> (raw)
In-Reply-To: <20240815071651.3645949-1-ye.zhang@rock-chips.com>

Set input direction to avoid FLAG_IS_OUT in gpiochip_lock_as_irq

Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
---
 drivers/gpio/gpio-rockchip.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
index b2f26a16b1f6..8949324ed816 100644
--- a/drivers/gpio/gpio-rockchip.c
+++ b/drivers/gpio/gpio-rockchip.c
@@ -475,6 +475,8 @@ static int rockchip_irq_reqres(struct irq_data *d)
 	struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
 	struct rockchip_pin_bank *bank = gc->private;
 
+	rockchip_gpio_direction_input(&bank->gpio_chip, d->hwirq);
+
 	return gpiochip_reqres_irq(&bank->gpio_chip, d->hwirq);
 }
 
-- 
2.34.1


  parent reply	other threads:[~2024-08-15  7:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-15  7:16 [PATCH v1 0/5] gpio: rockchip: Update the GPIO driver Ye Zhang
2024-08-15  7:16 ` [PATCH v1 1/5] gpio: rockchip: support acpi Ye Zhang
2024-08-16  9:48   ` Bartosz Golaszewski
2024-08-26  6:21   ` Dan Carpenter
2024-08-15  7:16 ` [PATCH v1 2/5] gpio: rockchip: support GPIO_TYPE_V2_2 Ye Zhang
2024-08-16  9:49   ` Bartosz Golaszewski
2024-08-15  7:16 ` Ye Zhang [this message]
2024-08-16  9:49   ` [PATCH v1 3/5] gpio: rockchip: Set input direction in irq_request_resources Bartosz Golaszewski
2024-08-15  7:16 ` [PATCH v1 4/5] gpio: rockchip: avoid division by zero Ye Zhang
2024-08-16  9:51   ` Bartosz Golaszewski
2024-08-15  7:16 ` [PATCH v1 5/5] rockchip: gpio: fix debounce config error Ye Zhang
2024-08-16 10:11   ` Bartosz Golaszewski
2024-08-16  9:46 ` [PATCH v1 0/5] gpio: rockchip: Update the GPIO driver 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=20240815071651.3645949-4-ye.zhang@rock-chips.com \
    --to=ye.zhang@rock-chips.com \
    --cc=brgl@bgdev.pl \
    --cc=elaine.zhang@rock-chips.com \
    --cc=finley.xiao@rock-chips.com \
    --cc=heiko@sntech.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=tao.huang@rock-chips.com \
    --cc=tim.chen@rock-chips.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®