History log of /rk3399_rockchip-uboot/drivers/gpio/gpio-uclass.c (Results 1 – 25 of 55)
Revision Date Author Comments
# 5395ac06 12-Oct-2022 Michal Suchanek <msuchanek@suse.de>

UPSTREAM: dm: treewide: Do not use the return value of simple uclass iterator

uclass_first_device/uclass_next_device return value will be removed,
don't use it.

With the current implementation dev

UPSTREAM: dm: treewide: Do not use the return value of simple uclass iterator

uclass_first_device/uclass_next_device return value will be removed,
don't use it.

With the current implementation dev is equivalent to !ret. It is
redundant to check both, ret check can be replaced with dev check, and
ret check inside the iteration is dead code.

Change-Id: Ie500bbed46f8d08721b14b1db7a7be94ea601799
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit 4954937d922840c212b7eba297cc2d4779f087ad)
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>

show more ...


# 7e0ce50b 08-Mar-2023 Joseph Chen <chenjh@rock-chips.com>

dm: gpio: Support disable seq aliaes

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I89c5352a2cb777498e200d4f2d9dc556b1d606c1


# 25cd3b96 17-Jul-2019 Heiko Schocher <hs@denx.de>

BACKPORT: gpio: fixes for gpio-hog support

recently added gpio hog patch was "in discussion"
state with Simon Glass. This patch now adds most
of comments from Simon Glass.

Signed-off-by: Heiko Scho

BACKPORT: gpio: fixes for gpio-hog support

recently added gpio hog patch was "in discussion"
state with Simon Glass. This patch now adds most
of comments from Simon Glass.

Signed-off-by: Heiko Schocher <hs@denx.de>
(cherry picked from commit 49b10cb4926285b856b207c1f5bb40c75487f08b)
Change-Id: I622699122cdb28f3fdede9a3a13de7c25a54b702
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>

show more ...


# 7e044b9a 12-Jun-2019 Heiko Schocher <hs@denx.de>

BACKPORT: gpio: add gpio-hog support

add gpio-hog support. GPIO hogging is a mechanism
providing automatic GPIO request and configuration
as part of the gpio-controller's driver probe function.

for

BACKPORT: gpio: add gpio-hog support

add gpio-hog support. GPIO hogging is a mechanism
providing automatic GPIO request and configuration
as part of the gpio-controller's driver probe function.

for more infos see:
doc/device-tree-bindings/gpio/gpio.txt

Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Michal Simek <michal.simek@xilinx.com> (zcu102)
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
(cherry picked from commit 5fc7cf8c8e268590f3b0037eecea7f6798209f78)
Change-Id: I73dc38ff9f38085d9ed5ee39b28d795f4adc68a0
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>

show more ...


# fb07f97d 22-Jun-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

gpio: add static to get_function()

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 150c5afe 31-May-2017 Simon Glass <sjg@chromium.org>

dm: gpio: Add live tree support

Add support for requesting GPIOs with a live device tree.

This involves adjusting the function signature for the legacy function
gpio_request_by_name_nodev(), so fix

dm: gpio: Add live tree support

Add support for requesting GPIOs with a live device tree.

This involves adjusting the function signature for the legacy function
gpio_request_by_name_nodev(), so fix up all callers.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes to stm32f746-disco.c:
Signed-off-by: Tom Rini <trini@konsulko.com>

show more ...


# 3a57123e 19-May-2017 Simon Glass <sjg@chromium.org>

dm: gpio: Refactor to prepare for live tree support

Move the main part of the GPIO request function into a separate function
so that it can be used by the live tree function when added. Update the
x

dm: gpio: Refactor to prepare for live tree support

Move the main part of the GPIO request function into a separate function
so that it can be used by the live tree function when added. Update the
xlate method to use a node reference.

Update all GPIO drivers to handle the modified xlate() method.

Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...


# 75897910 10-May-2017 Tom Rini <trini@konsulko.com>

gpio-uclass.c: Fix comparison of unsigned expression warning

We declare that gpio_base (which is the base for counting gpios, not an
address) is unsigned. Therefore the comparison with >= 0 is alwa

gpio-uclass.c: Fix comparison of unsigned expression warning

We declare that gpio_base (which is the base for counting gpios, not an
address) is unsigned. Therefore the comparison with >= 0 is always
true. As the desire is to allow for this base number to be 0, we can
just drop this check. Reported by clang-3.8.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

show more ...


# 21342d4a 08-Feb-2017 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-dm


# e160f7d4 17-Jan-2017 Simon Glass <sjg@chromium.org>

dm: core: Replace of_offset with accessor

At present devices use a simple integer offset to record the device tree
node associated with the device. In preparation for supporting a live
device tree,

dm: core: Replace of_offset with accessor

At present devices use a simple integer offset to record the device tree
node associated with the device. In preparation for supporting a live
device tree, which uses a node pointer instead, refactor existing code to
access this field through an inline function.

Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...


# dc557e9a 18-Jun-2016 Stefano Babic <sbabic@denx.de>

Merge branch 'master' of git://git.denx.de/u-boot

Signed-off-by: Stefano Babic <sbabic@denx.de>


# cc749523 04-Jun-2016 Tom Rini <trini@konsulko.com>

Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx


# 53ecdfb9 25-May-2016 mario.six@gdsys.cc <mario.six@gdsys.cc>

dm: gpio: Add methods for open drain setting

Certain GPIO devices have the capability to switch their GPIOs into
open-drain mode, that is, instead of actively driving the output
(Push-pull output),

dm: gpio: Add methods for open drain setting

Certain GPIO devices have the capability to switch their GPIOs into
open-drain mode, that is, instead of actively driving the output
(Push-pull output), the pin is connected to the collector (for a NPN
transistor) or the drain (for a MOSFET) of a transistor, respectively.
The pin then either forms an open circuit or a connection to ground,
depending on the state of the transistor.

This patch adds functions to the GPIO uclass to switch GPIOs to
open-drain mode on devices that support it.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>

show more ...


# 08ca213a 24-May-2016 Stefano Babic <sbabic@denx.de>

Merge branch 'master' of git://git.denx.de/u-boot


# 4b6e1fda 17-May-2016 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-dm


# 6c880b77 24-Apr-2016 Eric Nelson <eric@nelint.com>

dm: gpio: add a default gpio xlate routine

Many drivers use a common form of offset + flags for device
tree nodes. e.g.:
<&gpio1 2 GPIO_ACTIVE_LOW>

This patch adds a common implementation of this

dm: gpio: add a default gpio xlate routine

Many drivers use a common form of offset + flags for device
tree nodes. e.g.:
<&gpio1 2 GPIO_ACTIVE_LOW>

This patch adds a common implementation of this type of parsing
and calls it when a gpio driver doesn't supply its' own xlate
routine.

This will allow removal of the driver-specific versions in a
handful of drivers and simplify the addition of new drivers.

Signed-off-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>

show more ...


# 17c43f1a 07-Mar-2016 Simon Glass <sjg@chromium.org>

gpio: Use const where possible

Some functions do not change the struct gpio_desc parameter. Update these to
use const so this is clear.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bi

gpio: Use const where possible

Some functions do not change the struct gpio_desc parameter. Update these to
use const so this is clear.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

show more ...


# bbf24780 07-Mar-2016 Simon Glass <sjg@chromium.org>

gpio: Add a function to obtain a GPIO vector value

We can use GPIOs as binary digits for reading 'strapping' values. Each GPIO
is assigned a single bit and can be set high or low on the circuit boar

gpio: Add a function to obtain a GPIO vector value

We can use GPIOs as binary digits for reading 'strapping' values. Each GPIO
is assigned a single bit and can be set high or low on the circuit board. We
already have a legacy function for reading these values. Add one that
supports driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

show more ...


# 84b8bf6d 24-Jan-2016 Masahiro Yamada <yamada.masahiro@socionext.com>

bug.h: move BUILD_BUG_* defines to include/linux/bug.h

BUILD_BUG_* macros have been defined in several headers. It would
be nice to collect them in include/linux/bug.h like Linux.

This commit is c

bug.h: move BUILD_BUG_* defines to include/linux/bug.h

BUILD_BUG_* macros have been defined in several headers. It would
be nice to collect them in include/linux/bug.h like Linux.

This commit is cherry-picking useful macros from include/linux/bug.h
of Linux 4.4.

I did not import BUILD_BUG_ON_MSG() because it would not work if it
is used with include/common.h in U-Boot. I'd like to postpone it
until the root cause (the "error()" macro in include/common.h causes
the name conflict with "__attribute__((error()))") is fixed.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Tom Rini <trini@konsulko.com>

show more ...


# 6905f4d3 21-Jan-2016 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-dm


# 4dc5259a 29-Dec-2015 Simon Glass <sjg@chromium.org>

dm: gpio: Allow the uclass to work without printf()

For SPL we don't really need sprintf() and with tiny-printf this is not
available. Allow this to be dropped in SPL when using tiny-printf.

Signed

dm: gpio: Allow the uclass to work without printf()

For SPL we don't really need sprintf() and with tiny-printf this is not
available. Allow this to be dropped in SPL when using tiny-printf.

Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...


# ae27120c 06-Aug-2015 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-dm


# eca48665 03-Jul-2015 Simon Glass <sjg@chromium.org>

dm: gpio: Check a GPIO is valid before using it

Since a gpio_desc is allowed to be invalid we should return an error
indicating that the operation cannot be completed. This can happen if the
GPIO is

dm: gpio: Check a GPIO is valid before using it

Since a gpio_desc is allowed to be invalid we should return an error
indicating that the operation cannot be completed. This can happen if the
GPIO is optional - e.g. some devices may have a reset line and some may
not.

Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...


# efa677fb 23-Jun-2015 Simon Glass <sjg@chromium.org>

dm: gpio: Add dm_gpio_request() to manually request a GPIO

This function can be used for testing to manually request a GPIO for use,
without resorting to the legacy GPIO API.

Signed-off-by: Simon G

dm: gpio: Add dm_gpio_request() to manually request a GPIO

This function can be used for testing to manually request a GPIO for use,
without resorting to the legacy GPIO API.

Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...


# 32ec1598 23-Jun-2015 Simon Glass <sjg@chromium.org>

dm: gpio: Add dm_gpio_lookup_name() to look up a GPIO name

Provide a driver-model function to look up a GPIO name. Make the standard
function use it.

Signed-off-by: Simon Glass <sjg@chromium.org>


123