31 lines
1.1 KiB
C
31 lines
1.1 KiB
C
|
/*
|
||
|
* drivers/power/axp/axp22x/axp22x-gpio.h
|
||
|
* (C) Copyright 2010-2016
|
||
|
* Allwinner Technology Co., Ltd. <www.allwinnertech.com>
|
||
|
* Pannan <pannan@allwinnertech.com>
|
||
|
*
|
||
|
* This program is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU General Public License as
|
||
|
* published by the Free Software Foundation; either version 2 of
|
||
|
* the License, or (at your option) any later version.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#ifndef AXP22X_GPIO_H
|
||
|
#define AXP22X_GPIO_H
|
||
|
#include "axp22x.h"
|
||
|
|
||
|
#define AXP_GPIO_IRQ_EDGE_RISING (0x1<<7)
|
||
|
#define AXP_GPIO_IRQ_EDGE_FALLING (0x1<<6)
|
||
|
#define AXP_GPIO_INPUT_TRIG_MASK (0x7<<0)
|
||
|
#define AXP_GPIO_EDGE_TRIG_MASK (AXP_GPIO_IRQ_EDGE_RISING | \
|
||
|
AXP_GPIO_IRQ_EDGE_FALLING)
|
||
|
|
||
|
#define AXP_GPIO0_CFG (AXP22X_GPIO0_CTL) /* 0x90 */
|
||
|
#define AXP_GPIO1_CFG (AXP22X_GPIO1_CTL) /* 0x92 */
|
||
|
#define AXP_GPIO01_STATE (AXP22X_GPIO01_SIGNAL) /* 0x94 */
|
||
|
#define AXP_GPIO01_INTEN (AXP22X_INTEN5) /* 0x44 */
|
||
|
#define AXP_GPIO01_INTSTA (AXP22X_INTSTS5) /* 0x4C */
|
||
|
|
||
|
#endif /* AXP22X_GPIO_H */
|