Home
last modified time | relevance | path

Searched refs:pin_num (Results 1 – 25 of 27) sorted by relevance

12

/openbmc/u-boot/drivers/pinctrl/rockchip/
H A Dpinctrl-rk3368.c18 int pin_num, struct regmap **regmap, in rk3368_calc_pull_reg_and_bit() argument
28 *reg += ((pin_num / ROCKCHIP_PULL_PINS_PER_REG) * 4); in rk3368_calc_pull_reg_and_bit()
29 *bit = pin_num % ROCKCHIP_PULL_PINS_PER_REG; in rk3368_calc_pull_reg_and_bit()
38 *reg += ((pin_num / ROCKCHIP_PULL_PINS_PER_REG) * 4); in rk3368_calc_pull_reg_and_bit()
40 *bit = (pin_num % ROCKCHIP_PULL_PINS_PER_REG); in rk3368_calc_pull_reg_and_bit()
49 int pin_num, struct regmap **regmap, in rk3368_calc_drv_reg_and_bit() argument
59 *reg += ((pin_num / ROCKCHIP_DRV_PINS_PER_REG) * 4); in rk3368_calc_drv_reg_and_bit()
60 *bit = pin_num % ROCKCHIP_DRV_PINS_PER_REG; in rk3368_calc_drv_reg_and_bit()
69 *reg += ((pin_num / ROCKCHIP_DRV_PINS_PER_REG) * 4); in rk3368_calc_drv_reg_and_bit()
71 *bit = (pin_num % ROCKCHIP_DRV_PINS_PER_REG); in rk3368_calc_drv_reg_and_bit()
H A Dpinctrl-rk3288.c36 int pin_num, struct regmap **regmap, in rk3288_calc_pull_reg_and_bit() argument
46 *reg += ((pin_num / ROCKCHIP_PULL_PINS_PER_REG) * 4); in rk3288_calc_pull_reg_and_bit()
47 *bit = pin_num % ROCKCHIP_PULL_PINS_PER_REG; in rk3288_calc_pull_reg_and_bit()
56 *reg += ((pin_num / ROCKCHIP_PULL_PINS_PER_REG) * 4); in rk3288_calc_pull_reg_and_bit()
58 *bit = (pin_num % ROCKCHIP_PULL_PINS_PER_REG); in rk3288_calc_pull_reg_and_bit()
67 int pin_num, struct regmap **regmap, in rk3288_calc_drv_reg_and_bit() argument
77 *reg += ((pin_num / ROCKCHIP_DRV_PINS_PER_REG) * 4); in rk3288_calc_drv_reg_and_bit()
78 *bit = pin_num % ROCKCHIP_DRV_PINS_PER_REG; in rk3288_calc_drv_reg_and_bit()
87 *reg += ((pin_num / ROCKCHIP_DRV_PINS_PER_REG) * 4); in rk3288_calc_drv_reg_and_bit()
89 *bit = (pin_num % ROCKCHIP_DRV_PINS_PER_REG); in rk3288_calc_drv_reg_and_bit()
H A Dpinctrl-rk3399.c57 int pin_num, struct regmap **regmap, in rk3399_calc_pull_reg_and_bit() argument
69 *reg += ((pin_num / ROCKCHIP_PULL_PINS_PER_REG) * 4); in rk3399_calc_pull_reg_and_bit()
70 *bit = pin_num % ROCKCHIP_PULL_PINS_PER_REG; in rk3399_calc_pull_reg_and_bit()
79 *reg += ((pin_num / ROCKCHIP_PULL_PINS_PER_REG) * 4); in rk3399_calc_pull_reg_and_bit()
81 *bit = (pin_num % ROCKCHIP_PULL_PINS_PER_REG); in rk3399_calc_pull_reg_and_bit()
87 int pin_num, struct regmap **regmap, in rk3399_calc_drv_reg_and_bit() argument
91 int drv_num = (pin_num / 8); in rk3399_calc_drv_reg_and_bit()
102 *bit = (pin_num % 8) * 3; in rk3399_calc_drv_reg_and_bit()
104 *bit = (pin_num % 8) * 2; in rk3399_calc_drv_reg_and_bit()
H A Dpinctrl-rv1108.c82 int pin_num, struct regmap **regmap, in rv1108_calc_pull_reg_and_bit() argument
99 *reg += ((pin_num / ROCKCHIP_PULL_PINS_PER_REG) * 4); in rv1108_calc_pull_reg_and_bit()
100 *bit = (pin_num % ROCKCHIP_PULL_PINS_PER_REG); in rv1108_calc_pull_reg_and_bit()
108 int pin_num, struct regmap **regmap, in rv1108_calc_drv_reg_and_bit() argument
126 *reg += ((pin_num / ROCKCHIP_DRV_PINS_PER_REG) * 4); in rv1108_calc_drv_reg_and_bit()
127 *bit = pin_num % ROCKCHIP_DRV_PINS_PER_REG; in rv1108_calc_drv_reg_and_bit()
138 int pin_num, in rv1108_calc_schmitt_reg_and_bit() argument
155 *reg += ((pin_num / pins_per_reg) * 4); in rv1108_calc_schmitt_reg_and_bit()
156 *bit = pin_num % pins_per_reg; in rv1108_calc_schmitt_reg_and_bit()
H A Dpinctrl-rk3328.c127 int pin_num, struct regmap **regmap, in rk3328_calc_pull_reg_and_bit() argument
135 *reg += ((pin_num / ROCKCHIP_PULL_PINS_PER_REG) * 4); in rk3328_calc_pull_reg_and_bit()
137 *bit = (pin_num % ROCKCHIP_PULL_PINS_PER_REG); in rk3328_calc_pull_reg_and_bit()
144 int pin_num, struct regmap **regmap, in rk3328_calc_drv_reg_and_bit() argument
152 *reg += ((pin_num / ROCKCHIP_DRV_PINS_PER_REG) * 4); in rk3328_calc_drv_reg_and_bit()
154 *bit = (pin_num % ROCKCHIP_DRV_PINS_PER_REG); in rk3328_calc_drv_reg_and_bit()
164 int pin_num, in rk3328_calc_schmitt_reg_and_bit() argument
174 *reg += ((pin_num / RK3328_SCHMITT_PINS_PER_REG) * 4); in rk3328_calc_schmitt_reg_and_bit()
175 *bit = pin_num % RK3328_SCHMITT_PINS_PER_REG; in rk3328_calc_schmitt_reg_and_bit()
H A Dpinctrl-rk3188.c18 int pin_num, struct regmap **regmap, in rk3188_calc_pull_reg_and_bit() argument
24 if (bank->bank_num == 0 && pin_num < 12) { in rk3188_calc_pull_reg_and_bit()
28 *reg += ((pin_num / ROCKCHIP_PULL_PINS_PER_REG) * 4); in rk3188_calc_pull_reg_and_bit()
29 *bit = pin_num % ROCKCHIP_PULL_PINS_PER_REG; in rk3188_calc_pull_reg_and_bit()
38 *reg += ((pin_num / ROCKCHIP_PULL_PINS_PER_REG) * 4); in rk3188_calc_pull_reg_and_bit()
45 *bit = 7 - (pin_num % ROCKCHIP_PULL_PINS_PER_REG); in rk3188_calc_pull_reg_and_bit()
H A Dpinctrl-rk322x.c147 int pin_num, struct regmap **regmap, in rk3228_calc_pull_reg_and_bit() argument
155 *reg += ((pin_num / ROCKCHIP_PULL_PINS_PER_REG) * 4); in rk3228_calc_pull_reg_and_bit()
157 *bit = (pin_num % ROCKCHIP_PULL_PINS_PER_REG); in rk3228_calc_pull_reg_and_bit()
164 int pin_num, struct regmap **regmap, in rk3228_calc_drv_reg_and_bit() argument
172 *reg += ((pin_num / ROCKCHIP_DRV_PINS_PER_REG) * 4); in rk3228_calc_drv_reg_and_bit()
174 *bit = (pin_num % ROCKCHIP_DRV_PINS_PER_REG); in rk3228_calc_drv_reg_and_bit()
H A Dpinctrl-rk3036.c19 int pin_num, struct regmap **regmap, in rk3036_calc_pull_reg_and_bit() argument
27 *reg += (pin_num / RK3036_PULL_PINS_PER_REG) * 4; in rk3036_calc_pull_reg_and_bit()
29 *bit = pin_num % RK3036_PULL_PINS_PER_REG; in rk3036_calc_pull_reg_and_bit()
H A Dpinctrl-rockchip-core.c253 int pin_num, int strength) in rockchip_set_drive_perpin() argument
262 int drv_type = bank->drv[pin_num / 8].drv_type & (~DRV_TYPE_IO_MASK); in rockchip_set_drive_perpin()
265 pin_num, strength); in rockchip_set_drive_perpin()
267 ctrl->drv_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_set_drive_perpin()
334 if (bank->drv[pin_num / 8].drv_type & DRV_TYPE_WRITABLE_32BIT) { in rockchip_set_drive_perpin()
363 int pin_num, int pull) in rockchip_set_pull() argument
373 pin_num, pull); in rockchip_set_pull()
375 ctrl->pull_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_set_pull()
394 pull_type = bank->pull_type[pin_num / 8] & (~PULL_TYPE_IO_MASK); in rockchip_set_pull()
409 if (bank->pull_type[pin_num / 8] & PULL_TYPE_WRITABLE_32BIT) { in rockchip_set_pull()
[all …]
H A Dpinctrl-rk3128.c106 int pin_num, struct regmap **regmap, in rk3128_calc_pull_reg_and_bit() argument
114 *reg += ((pin_num / RK3128_PULL_PINS_PER_REG) * 4); in rk3128_calc_pull_reg_and_bit()
116 *bit = pin_num % RK3128_PULL_PINS_PER_REG; in rk3128_calc_pull_reg_and_bit()
H A Dpinctrl-rockchip.h314 int pin_num, struct regmap **regmap,
317 int pin_num, struct regmap **regmap,
320 int pin_num, struct regmap **regmap,
/openbmc/linux/drivers/pinctrl/
H A Dpinctrl-rockchip.c1313 int pin_num, struct regmap **regmap, in px30_calc_pull_reg_and_bit() argument
1331 *reg += ((pin_num / PX30_PULL_PINS_PER_REG) * 4); in px30_calc_pull_reg_and_bit()
1332 *bit = (pin_num % PX30_PULL_PINS_PER_REG); in px30_calc_pull_reg_and_bit()
1345 int pin_num, struct regmap **regmap, in px30_calc_drv_reg_and_bit() argument
1363 *reg += ((pin_num / PX30_DRV_PINS_PER_REG) * 4); in px30_calc_drv_reg_and_bit()
1364 *bit = (pin_num % PX30_DRV_PINS_PER_REG); in px30_calc_drv_reg_and_bit()
1377 int pin_num, in px30_calc_schmitt_reg_and_bit() argument
1395 *reg += ((pin_num / pins_per_reg) * 4); in px30_calc_schmitt_reg_and_bit()
1396 *bit = pin_num % pins_per_reg; in px30_calc_schmitt_reg_and_bit()
1408 int pin_num, struct regmap **regmap, in rv1108_calc_pull_reg_and_bit() argument
[all …]
H A Dpinctrl-rockchip.h402 int pin_num, struct regmap **regmap,
405 int pin_num, struct regmap **regmap,
408 int pin_num, struct regmap **regmap,
H A Dpinctrl-digicolor.c115 static void dc_client_sel(int pin_num, int *reg, int *bit) in dc_client_sel() argument
117 *bit = (pin_num % PINS_PER_COLLECTION) * 2; in dc_client_sel()
118 *reg = GP_CLIENTSEL(pin_num/PINS_PER_COLLECTION); in dc_client_sel()
H A Dpinctrl-amd.c193 unsigned int bank, i, pin_num; in amd_gpio_dbg_show() local
221 pin_num = AMD_GPIO_PINS_BANK0; in amd_gpio_dbg_show()
225 pin_num = AMD_GPIO_PINS_BANK1 + i; in amd_gpio_dbg_show()
229 pin_num = AMD_GPIO_PINS_BANK2 + i; in amd_gpio_dbg_show()
233 pin_num = AMD_GPIO_PINS_BANK3 + i; in amd_gpio_dbg_show()
241 for (; i < pin_num; i++) { in amd_gpio_dbg_show()
/openbmc/u-boot/drivers/pinctrl/exynos/
H A Dpinctrl-exynos.c73 unsigned int count, idx, pin_num; in exynos_pinctrl_set_state() local
94 reg = pin_to_bank_base(dev, name, &pin_num); in exynos_pinctrl_set_state()
98 value &= ~(0xf << (pin_num << 2)); in exynos_pinctrl_set_state()
99 value |= (pinfunc << (pin_num << 2)); in exynos_pinctrl_set_state()
105 value &= ~(0x3 << (pin_num << 1)); in exynos_pinctrl_set_state()
106 value |= (pinpud << (pin_num << 1)); in exynos_pinctrl_set_state()
112 value &= ~(0x3 << (pin_num << 1)); in exynos_pinctrl_set_state()
113 value |= (pindrv << (pin_num << 1)); in exynos_pinctrl_set_state()
/openbmc/linux/drivers/media/common/siano/
H A Dsmscoreapi.c1888 static int get_gpio_pin_params(u32 pin_num, u32 *p_translatedpin_num, in get_gpio_pin_params() argument
1893 if (pin_num <= 1) { in get_gpio_pin_params()
1897 } else if (pin_num >= 2 && pin_num <= 6) { in get_gpio_pin_params()
1901 } else if (pin_num >= 7 && pin_num <= 11) { in get_gpio_pin_params()
1904 } else if (pin_num >= 12 && pin_num <= 15) { in get_gpio_pin_params()
1908 } else if (pin_num == 16) { in get_gpio_pin_params()
1911 } else if (pin_num >= 17 && pin_num <= 24) { in get_gpio_pin_params()
1914 } else if (pin_num == 25) { in get_gpio_pin_params()
1917 } else if (pin_num >= 26 && pin_num <= 28) { in get_gpio_pin_params()
1920 } else if (pin_num == 29) { in get_gpio_pin_params()
[all …]
H A Dsmscoreapi.h1153 extern int smscore_gpio_configure(struct smscore_device_t *coredev, u8 pin_num,
1155 extern int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 pin_num,
1157 extern int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 pin_num,
/openbmc/u-boot/drivers/gpio/
H A Dxilinx_gpio.c41 u32 pin_num = offset; in xilinx_gpio_get_bank_pin() local
45 if (pin_num < max_pins) { in xilinx_gpio_get_bank_pin()
47 bank, pin_num); in xilinx_gpio_get_bank_pin()
49 *bank_pin_num = pin_num; in xilinx_gpio_get_bank_pin()
52 pin_num -= max_pins; in xilinx_gpio_get_bank_pin()
H A Dzynq_gpio.c160 static inline void zynq_gpio_get_bank_pin(unsigned int pin_num, in zynq_gpio_get_bank_pin() argument
169 if (pin_num >= platdata->p_data->bank_min[bank] && in zynq_gpio_get_bank_pin()
170 pin_num <= platdata->p_data->bank_max[bank]) { in zynq_gpio_get_bank_pin()
172 *bank_pin_num = pin_num - in zynq_gpio_get_bank_pin()
/openbmc/linux/drivers/pinctrl/nomadik/
H A Dpinctrl-nomadik.h26 #define PRCM_GPIOCR_ALTCX(pin_num,\ argument
32 .pin = pin_num,\
/openbmc/linux/drivers/pinctrl/sunplus/
H A Dsppctl.c825 u8 pin_num, pin_type, pin_func; in sppctl_dt_node_to_map() local
854 pin_num = FIELD_GET(GENMASK(31, 24), dt_pin); in sppctl_dt_node_to_map()
856 if (pin_num >= sppctl_pins_all_sz) { in sppctl_dt_node_to_map()
873 pin_num = FIELD_GET(GENMASK(31, 24), dt_pin); in sppctl_dt_node_to_map()
882 (*map)[i].data.configs.group_or_pin = pin_get_name(pctldev, pin_num); in sppctl_dt_node_to_map()
897 (*map)[i].data.configs.group_or_pin = pin_get_name(pctldev, pin_num); in sppctl_dt_node_to_map()
910 (*map)[i].data.mux.group = pin_get_name(pctldev, pin_num); in sppctl_dt_node_to_map()
/openbmc/linux/drivers/gpio/
H A Dgpio-zynq.c191 static inline void zynq_gpio_get_bank_pin(unsigned int pin_num, in zynq_gpio_get_bank_pin() argument
199 if ((pin_num >= gpio->p_data->bank_min[bank]) && in zynq_gpio_get_bank_pin()
200 (pin_num <= gpio->p_data->bank_max[bank])) { in zynq_gpio_get_bank_pin()
202 *bank_pin_num = pin_num - in zynq_gpio_get_bank_pin()
211 WARN(true, "invalid GPIO pin number: %u", pin_num); in zynq_gpio_get_bank_pin()
/openbmc/linux/drivers/pinctrl/mediatek/
H A Dpinctrl-paris.c369 mtk_pctrl_find_function_by_pin(struct mtk_pinctrl *hw, u32 pin_num, u32 fnum) in mtk_pctrl_find_function_by_pin() argument
371 const struct mtk_pin_desc *pin = hw->soc->pins + pin_num; in mtk_pctrl_find_function_by_pin()
383 static bool mtk_pctrl_is_function_valid(struct mtk_pinctrl *hw, u32 pin_num, in mtk_pctrl_is_function_valid() argument
391 if (pin->number == pin_num) { in mtk_pctrl_is_function_valid()
H A Dpinctrl-mtk-common.c457 struct mtk_pinctrl *pctl, u32 pin_num, u32 fnum) in mtk_pctrl_find_function_by_pin() argument
459 const struct mtk_desc_pin *pin = pctl->devdata->pins + pin_num; in mtk_pctrl_find_function_by_pin()
472 u32 pin_num, u32 fnum) in mtk_pctrl_is_function_valid() argument
479 if (pin->pin.number == pin_num) { in mtk_pctrl_is_function_valid()

12