diff options
author | Svyatoslav Ryhel | 2023-07-21 10:50:15 +0300 |
---|---|---|
committer | Svyatoslav Ryhel | 2023-12-19 20:53:53 +0200 |
commit | 52b6bbf162cb88b2c26fe5567eb32e027081407a (patch) | |
tree | 18bc4dbaed71cd2dad21774be36e60433b9fa0cd /include | |
parent | 6b24c372c1e59e461e2f00e09dd1f8da29263450 (diff) |
drivers: gpio: implement PALMAS GPIO cell
Add gpio driver for TI Palmas series PMIC. This has 8 gpio which can
work as input/output.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/power/palmas.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/power/palmas.h b/include/power/palmas.h index 0a612052f01..94c99dd4113 100644 --- a/include/power/palmas.h +++ b/include/power/palmas.h @@ -15,6 +15,7 @@ struct palmas_priv { #define PALMAS_LDO_DRIVER "palmas_ldo" #define PALMAS_SMPS_DRIVER "palmas_smps" #define PALMAS_RST_DRIVER "palmas_rst" +#define PALMAS_GPIO_DRIVER "palmas_gpio" #define PALMAS_SMPS_VOLT_MASK 0x7F #define PALMAS_SMPS_RANGE_MASK 0x80 @@ -35,3 +36,14 @@ struct palmas_priv { #define DEV_OFF 0x00 #define PALMAS_INT3_MASK 0x1B #define MASK_VBUS BIT(7) + +/* second chip */ +#define PALMAS_GPIO_DATA_IN 0x80 +#define PALMAS_GPIO_DATA_DIR 0x81 +#define PALMAS_GPIO_DATA_OUT 0x82 +#define PALMAS_GPIO_DEBOUNCE_EN 0x83 +#define PALMAS_GPIO_CLEAR_DATA_OUT 0x84 +#define PALMAS_GPIO_SET_DATA_OUT 0x85 +#define PALMAS_PU_PD_GPIO_CTRL1 0x86 +#define PALMAS_PU_PD_GPIO_CTRL2 0x87 +#define PALMAS_OD_OUTPUT_GPIO_CTRL 0x88 |