mirror of
git://nv-tegra.nvidia.com/device/hardware/nvidia/tegra-public-dts.git
synced 2025-12-22 09:11:55 +03:00
dt-binding: Add gpio.h header
Add gpio.h header for dt-bindings. Bug 4078385 Change-Id: Id478947d89f3fb327ee84dbf2dfd6403b0cde6bf Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/t23x-public-dts/+/2892546 Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/tegra-public-dts/+/3168927 GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
ee836343bf
commit
35d3f3f3e8
45
include/kernel/gpio/gpio.h
Normal file
45
include/kernel/gpio/gpio.h
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0 */
|
||||||
|
/*
|
||||||
|
* This header provides constants for most GPIO bindings.
|
||||||
|
*
|
||||||
|
* Most GPIO bindings include a flags cell as part of the GPIO specifier.
|
||||||
|
* In most cases, the format of the flags cell uses the standard values
|
||||||
|
* defined in this header.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _DT_BINDINGS_GPIO_GPIO_H
|
||||||
|
#define _DT_BINDINGS_GPIO_GPIO_H
|
||||||
|
|
||||||
|
/* Bit 0 express polarity */
|
||||||
|
#define GPIO_ACTIVE_HIGH 0
|
||||||
|
#define GPIO_ACTIVE_LOW 1
|
||||||
|
|
||||||
|
/* Bit 1 express single-endedness */
|
||||||
|
#define GPIO_PUSH_PULL 0
|
||||||
|
#define GPIO_SINGLE_ENDED 2
|
||||||
|
|
||||||
|
/* Bit 2 express Open drain or open source */
|
||||||
|
#define GPIO_LINE_OPEN_SOURCE 0
|
||||||
|
#define GPIO_LINE_OPEN_DRAIN 4
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Open Drain/Collector is the combination of single-ended open drain interface.
|
||||||
|
* Open Source/Emitter is the combination of single-ended open source interface.
|
||||||
|
*/
|
||||||
|
#define GPIO_OPEN_DRAIN (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_DRAIN)
|
||||||
|
#define GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_SOURCE)
|
||||||
|
|
||||||
|
/* Bit 3 express GPIO suspend/resume and reset persistence */
|
||||||
|
#define GPIO_PERSISTENT 0
|
||||||
|
#define GPIO_TRANSITORY 8
|
||||||
|
|
||||||
|
/* Bit 4 express pull up */
|
||||||
|
#define GPIO_PULL_UP 16
|
||||||
|
|
||||||
|
/* Bit 5 express pull down */
|
||||||
|
#define GPIO_PULL_DOWN 32
|
||||||
|
|
||||||
|
/* Bit 6 express pull disable */
|
||||||
|
#define GPIO_PULL_DISABLE 64
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user