From: Marek Vasut Date: Sat, 5 Jan 2019 11:59:28 +0100 Subject: [U-Boot] [PATCH 1/1] altera_pio: fix get_value In-Reply-To: <6c497b10-1337-c7dd-5628-5f2e124796de@gmail.com> References: <20190104164834.6249-1-julien.beraud@orolia.com> <2a0b5391-8f94-66f4-35f9-dd2c4f37c51b@denx.de> <6c497b10-1337-c7dd-5628-5f2e124796de@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de On 1/5/19 9:34 AM, Simon Goldschmidt wrote: > Am 04.01.2019 um 19:53 schrieb Marek Vasut: >> On 1/4/19 5:48 PM, Julien B=C3=A9raud wrote: >>> gpio_get_value should return 0 or 1, not 1 << pin >> >> Is this documented somewhere ? >=20 > I saw it's kind of documented on 'dm_gpio_get_value', but not on struct > dm_gpio_ops: >=20 > "@return GPIO value (0 for inactive, 1 for active) or -ve on error" Ah, and now that I think about it, it does make sense, since GPIO 31 would trigger an error on 32bit systems. --=20 Best regards, Marek Vasut