lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1277378021-16802-3-git-send-email-l.fu@pengutronix.de>
Date:	Thu, 24 Jun 2010 13:13:37 +0200
From:	Luotao Fu <l.fu@...gutronix.de>
To:	Rabin VINCENT <rabin.vincent@...ricsson.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	Linus WALLEIJ <linus.walleij@...ricsson.com>,
	linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
	STEricsson_nomadik_linux <STEricsson_nomadik_linux@...t.st.com>,
	Luotao Fu <l.fu@...gutronix.de>
Subject: [PATCH 2/6] gpio/stmpe-gpio: fix set direction input

to set an GPIO pin to input, the corresponding bit in GPDR needs to be cleared
instead of set. fixed with this patch.

Signed-off-by: Luotao Fu <l.fu@...gutronix.de>
---
 drivers/gpio/stmpe-gpio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpio/stmpe-gpio.c b/drivers/gpio/stmpe-gpio.c
index a4de271..4e1f1b9 100644
--- a/drivers/gpio/stmpe-gpio.c
+++ b/drivers/gpio/stmpe-gpio.c
@@ -88,7 +88,7 @@ static int stmpe_gpio_direction_input(struct gpio_chip *chip,
 	u8 reg = stmpe->regs[STMPE_IDX_GPDR_LSB] - (offset / 8);
 	u8 mask = 1 << (offset % 8);
 
-	return stmpe_set_bits(stmpe, reg, mask, mask);
+	return stmpe_set_bits(stmpe, reg, mask, 0);
 }
 
 static int stmpe_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ