36 #ifndef __MHAL_GPIO_H__ 
   37 #define __MHAL_GPIO_H__ 
   38 #include "mhal_osai.h" 
  241     MHAL_GPIO_MODE_1 = 1,
 
  242     MHAL_GPIO_MODE_2 = 2,
 
  243     MHAL_GPIO_MODE_3 = 3,
 
  244     MHAL_GPIO_MODE_4 = 4,
 
  245     MHAL_GPIO_MODE_5 = 5,
 
  246     MHAL_GPIO_MODE_6 = 6,
 
  247     MHAL_GPIO_MODE_7 = 7,
 
  401     u32 pin, u32 out_val);
 
  531     u32 pin, u32 *pvalue);
 
unsigned char port_shf
The shift between two registers. 
Definition: mhal_gpio.h:342
int mtk_mhal_gpio_set_pullen_pullsel(struct mtk_pinctrl_controller *pctl, u32 pin, bool enable, bool isup)
This function is used to set the target GPIO to pull-up/pull-down state. 
Define GPIO cm4 isu2 i2c base register. 
Definition: mhal_gpio.h:291
Define GPIO cm4 gpio pwm group2 base register. 
Definition: mhal_gpio.h:279
Define GPIO cm4 isu1 i2c base register. 
Definition: mhal_gpio.h:289
mhal_gpio_mode
Definition: mhal_gpio.h:238
Define GPIO data of low. 
Definition: mhal_gpio.h:266
Define GPIO input direction. 
Definition: mhal_gpio.h:256
GPIO pin number is 0. 
Definition: mhal_gpio.h:140
Define GPIO i2s0 base register. 
Definition: mhal_gpio.h:301
int mtk_mhal_gpio_set_direction(struct mtk_pinctrl_controller *pctl, u32 pin, u32 dir)
This function is used to set the direction of the target GPIO. 
Define GPIO output direction. 
Definition: mhal_gpio.h:258
GPIO register maximum number(invalid) 
Definition: mhal_gpio.h:307
bool pinctrl_free
GPIO can be requested or freed. 
Definition: mhal_gpio.h:329
Define GPIO cm4 gpio pwm group4 base register. 
Definition: mhal_gpio.h:283
mhal_gpio_data
This enum defines input or output data of GPIO. 
Definition: mhal_gpio.h:264
Define GPIO pinmux base register. 
Definition: mhal_gpio.h:305
int mtk_mhal_gpio_pmx_set_mode(struct mtk_pinctrl_controller *pctl, u32 pin, u32 mode)
This function is used to configure pinmux of the target GPIO. 
Define GPIO adc base register. 
Definition: mhal_gpio.h:297
Define GPIO cm4 isu3 i2c base register. 
Definition: mhal_gpio.h:293
Define GPIO cm4 gpio pwm group5 base register. 
Definition: mhal_gpio.h:285
int mtk_mhal_gpio_pmx_get_mode(struct mtk_pinctrl_controller *pctl, u32 pin, u32 *pvalue)
This function is used to get the configuration pinmux of the target GPIO. 
void __iomem * base[MHAL_GPIO_REG_BASE_MAX]
GPIO controller base address. 
Definition: mhal_gpio.h:336
This structure defines the GPIO interface controller. 
Definition: mhal_gpio.h:334
int mtk_mhal_gpio_get_input(struct mtk_pinctrl_controller *pctl, u32 pin, mhal_gpio_data *pvalue)
This function is used to get input data of the target GPIO. 
mhal_gpio_reg_base
This enum defines GPIO register base number. 
Definition: mhal_gpio.h:273
GPIO mode number is from 0 to 7. 
Definition: mhal_gpio.h:240
int mtk_mhal_gpio_get_output(struct mtk_pinctrl_controller *pctl, u32 pin, mhal_gpio_data *pvalue)
This function is used to get output data of the target GPIO. 
Define GPIO i2s1 base register. 
Definition: mhal_gpio.h:303
unsigned char port_mask
The mask of register. 
Definition: mhal_gpio.h:344
mhal_gpio_pin
This enum defines the GPIO port. 
Definition: mhal_gpio.h:138
GPIO pin maximum number(invalid) 
Definition: mhal_gpio.h:235
Define GPIO data of high. 
Definition: mhal_gpio.h:268
This structure defines GPIO pin related property. 
Definition: mhal_gpio.h:324
unsigned int gpio_mode_bits
The number of gpio mode in per reg. 
Definition: mhal_gpio.h:338
Define GPIO cm4 isu4 i2c base register. 
Definition: mhal_gpio.h:295
Define GPIO cm4 gpio pwm group0 base register. 
Definition: mhal_gpio.h:275
Define GPIO cm4 isu0 i2c base register. 
Definition: mhal_gpio.h:287
Define GPIO ca7 base register. 
Definition: mhal_gpio.h:299
mhal_gpio_direction
This enum defines GPIO direction. 
Definition: mhal_gpio.h:254
unsigned int max_gpio_mode_per_reg
The max gpio mode in per reg. 
Definition: mhal_gpio.h:340
int mtk_mhal_gpio_set_output(struct mtk_pinctrl_controller *pctl, u32 pin, u32 out_val)
This function is used to set output data of the target GPIO. 
unsigned int pinmux_offset
The pinmux register offset. 
Definition: mhal_gpio.h:346
GPIO mode maximum number(invalid) 
Definition: mhal_gpio.h:249
int mtk_mhal_gpio_get_direction(struct mtk_pinctrl_controller *pctl, u32 pin, mhal_gpio_direction *pvalue)
This function is used to get the direction of the target GPIO. 
Define GPIO cm4 gpio pwm group1 base register. 
Definition: mhal_gpio.h:277
Define GPIO cm4 gpio pwm group3 base register. 
Definition: mhal_gpio.h:281