diff options
author | Jin Park <jinyoungp@nvidia.com> | 2011-09-26 14:51:20 +0900 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2011-09-27 15:16:14 -0700 |
commit | 3c5148a04fbc50c3200efe8793b8850ca07e05c2 (patch) | |
tree | db22d6e6ef53cb85f17dad4797110cdf8e9830e0 /include | |
parent | 6c06d12f10bc221cde89f5a1738b9f003796dd45 (diff) |
mfd: max77663: Add GPIO attributes into platform data
For board specific configuration, adding GPIO attributes such as push-pull,
pull-up, pull-down, direction, output level and alternate into platform data.
Bug 849360
Change-Id: I85c8e6ad397adf317cbc7f6d4bace8629091bad5
Signed-off-by: Jin Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/54429
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mfd/max77663-core.h | 53 |
1 files changed, 48 insertions, 5 deletions
diff --git a/include/linux/mfd/max77663-core.h b/include/linux/mfd/max77663-core.h index 59f8dbecd502..919f1b305a09 100644 --- a/include/linux/mfd/max77663-core.h +++ b/include/linux/mfd/max77663-core.h @@ -68,21 +68,64 @@ enum { MAX77663_GPIO_NR, }; -enum max77663_gpio_alternate { - GPIO_ALT_DISABLE, +/* Direction */ +enum max77663_gpio_dir { + GPIO_DIR_DEF, + GPIO_DIR_IN, + GPIO_DIR_OUT, +}; + +/* Data output */ +enum max77663_gpio_data_out { + GPIO_DOUT_DEF, + GPIO_DOUT_HIGH, + GPIO_DOUT_LOW, +}; + +/* Output drive */ +enum max77663_gpio_out_drv { + GPIO_OUT_DRV_DEF, + GPIO_OUT_DRV_PUSH_PULL, + GPIO_OUT_DRV_OPEN_DRAIN, +}; + +/* Pull-up */ +enum max77663_gpio_pull_up { + GPIO_PU_DEF, + GPIO_PU_ENABLE, + GPIO_PU_DISABLE, +}; + +/* Pull-down */ +enum max77663_gpio_pull_down { + GPIO_PD_DEF, + GPIO_PD_ENABLE, + GPIO_PD_DISABLE, +}; + +/* Alternate */ +enum max77663_gpio_alt { + GPIO_ALT_DEF, GPIO_ALT_ENABLE, + GPIO_ALT_DISABLE, }; struct max77663_gpio_config { int gpio; /* gpio number */ - bool alternate; /* alternate mode */ + enum max77663_gpio_dir dir; + enum max77663_gpio_data_out dout; + enum max77663_gpio_out_drv out_drv; + enum max77663_gpio_pull_up pull_up; + enum max77663_gpio_pull_down pull_down; + enum max77663_gpio_alt alternate; }; struct max77663_platform_data { int irq_base; int gpio_base; - int num_gpio_cfg; - struct max77663_gpio_config *gpio_cfg; + + int num_gpio_cfgs; + struct max77663_gpio_config *gpio_cfgs; int num_subdevs; struct mfd_cell *sub_devices; |