From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 17 Apr 2020 17:06:58 -0400 Subject: [PATCH v3 13/21] gpio: add support of new GPIO direction flag In-Reply-To: <20200113103515.20879-14-patrick.delaunay@st.com> References: <20200113103515.20879-1-patrick.delaunay@st.com> <20200113103515.20879-14-patrick.delaunay@st.com> Message-ID: <20200417210658.GT4555@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Jan 13, 2020 at 11:35:07AM +0100, Patrick Delaunay wrote: > This commit manages the new dir flags that can be used in gpio > specifiers to indicate the pull-up or pull-down resistor > configuration for output gpio (GPIO_PULL_UP, GPIO_PULL_DOWN) > or the Open Drain/Open Source configuration for input gpio > (GPIO_OPEN_DRAIN, GPIO_OPEN_SOURCE). > > These flags are already supported in Linux kernel in gpio lib. > > This patch only parse and save the direction flags in GPIO > descriptor (desc->flags), it prepares the introduction of new ops > to manage them. > The GPIO uclass supports new GPIO flags from device-tree > (GPIO_XXX define in include/dt-bindings/gpio/gpio.h) > and translate them in the dir flags (GPIOD_XXX): > - GPIO_PULL_UP => GPIOD_PULL_UP > - GPIO_PULL_DOWN => GPIOD_PULL_DOWN > - GPIO_OPEN_DRAIN => GPIOD_OPEN_DRAIN > - GPIO_OPEN_SOURCE => GPIOD_OPEN_SOURCE > > This patch also adds protection in the check_dir_flags function for > new invalid configuration of the dir flags. > > Signed-off-by: Patrick Delaunay > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: