/drivers/power/reset/ |
D | gpio-poweroff.c | 27 static int gpio_num = -1; variable 32 BUG_ON(!gpio_is_valid(gpio_num)); in gpio_poweroff_do_poweroff() 35 gpio_direction_output(gpio_num, !gpio_active_low); in gpio_poweroff_do_poweroff() 38 gpio_set_value(gpio_num, gpio_active_low); in gpio_poweroff_do_poweroff() 42 gpio_set_value(gpio_num, !gpio_active_low); in gpio_poweroff_do_poweroff() 63 gpio_num = of_get_gpio_flags(pdev->dev.of_node, 0, &flags); in gpio_poweroff_probe() 64 if (!gpio_is_valid(gpio_num)) in gpio_poweroff_probe() 65 return gpio_num; in gpio_poweroff_probe() 71 ret = gpio_request(gpio_num, "poweroff-gpio"); in gpio_poweroff_probe() 73 pr_err("%s: Could not get GPIO %d", __func__, gpio_num); in gpio_poweroff_probe() [all …]
|
/drivers/gpio/ |
D | gpio-sch.c | 44 static int sch_gpio_core_direction_in(struct gpio_chip *gc, unsigned gpio_num) in sch_gpio_core_direction_in() argument 51 offset = CGIO + gpio_num / 8; in sch_gpio_core_direction_in() 52 bit = gpio_num % 8; in sch_gpio_core_direction_in() 63 static int sch_gpio_core_get(struct gpio_chip *gc, unsigned gpio_num) in sch_gpio_core_get() argument 68 offset = CGLV + gpio_num / 8; in sch_gpio_core_get() 69 bit = gpio_num % 8; in sch_gpio_core_get() 75 static void sch_gpio_core_set(struct gpio_chip *gc, unsigned gpio_num, int val) in sch_gpio_core_set() argument 82 offset = CGLV + gpio_num / 8; in sch_gpio_core_set() 83 bit = gpio_num % 8; in sch_gpio_core_set() 95 unsigned gpio_num, int val) in sch_gpio_core_direction_out() argument [all …]
|
D | gpio-it8761e.c | 78 static int it8761e_gpio_get(struct gpio_chip *gc, unsigned gpio_num) in it8761e_gpio_get() argument 83 bit = gpio_num % 8; in it8761e_gpio_get() 84 reg = (gpio_num >= 8) ? gpio_ba + 1 : gpio_ba; in it8761e_gpio_get() 89 static int it8761e_gpio_direction_in(struct gpio_chip *gc, unsigned gpio_num) in it8761e_gpio_direction_in() argument 94 bit = gpio_num % 8; in it8761e_gpio_direction_in() 95 io_reg = (gpio_num >= 8) ? GPIO2X_IO : GPIO1X_IO; in it8761e_gpio_direction_in() 114 unsigned gpio_num, int val) in it8761e_gpio_set() argument 119 bit = gpio_num % 8; in it8761e_gpio_set() 120 reg = (gpio_num >= 8) ? gpio_ba + 1 : gpio_ba; in it8761e_gpio_set() 134 unsigned gpio_num, int val) in it8761e_gpio_direction_out() argument [all …]
|
D | gpio-davinci.c | 149 ngpio = soc_info->gpio_num; in davinci_gpio_setup() 355 ngpio = soc_info->gpio_num; in davinci_gpio_irq_setup()
|
D | gpio-tnetv107x.c | 161 ngpio = soc_info->gpio_num; in tnetv107x_gpio_setup()
|
/drivers/spi/ |
D | spi-tle62x0.c | 141 int gpio_num = to_gpio_num(attr); in tle62x0_gpio_show() local 145 value = (st->gpio_state >> gpio_num) & 1; in tle62x0_gpio_show() 156 int gpio_num = to_gpio_num(attr); in tle62x0_gpio_store() local 164 dev_dbg(dev, "setting gpio %d to %ld\n", gpio_num, val); in tle62x0_gpio_store() 169 st->gpio_state |= 1 << gpio_num; in tle62x0_gpio_store() 171 st->gpio_state &= ~(1 << gpio_num); in tle62x0_gpio_store()
|
/drivers/mmc/host/ |
D | of_mmc_spi.c | 53 static int of_mmc_spi_read_gpio(struct device *dev, int gpio_num) in of_mmc_spi_read_gpio() argument 56 bool active_low = oms->alow_gpios[gpio_num]; in of_mmc_spi_read_gpio() 57 bool value = gpio_get_value(oms->gpios[gpio_num]); in of_mmc_spi_read_gpio()
|
/drivers/net/phy/ |
D | dp83640.c | 428 u16 evnt, event_num, gpio_num; in ptp_dp83640_enable() local 438 gpio_num = gpio_tab[EXTTS0_GPIO + index]; in ptp_dp83640_enable() 439 evnt |= (gpio_num & EVNT_GPIO_MASK) << EVNT_GPIO_SHIFT; in ptp_dp83640_enable()
|
/drivers/net/ethernet/broadcom/bnx2x/ |
D | bnx2x_link.c | 404 u8 gpio_num = (pin_cfg - PIN_CFG_GPIO0_P0) & 0x3; in bnx2x_set_cfg_pin() local 406 bnx2x_set_gpio(bp, gpio_num, (u8)val, gpio_port); in bnx2x_set_cfg_pin() 417 u8 gpio_num = (pin_cfg - PIN_CFG_GPIO0_P0) & 0x3; in bnx2x_get_cfg_pin() local 419 *val = bnx2x_get_gpio(bp, gpio_num, gpio_port); in bnx2x_get_cfg_pin() 4275 u8 *gpio_num, u8 *gpio_port) in bnx2x_get_mod_abs_int_cfg() argument 4278 *gpio_num = 0; in bnx2x_get_mod_abs_int_cfg() 4301 *gpio_num = (cfg_pin - PIN_CFG_GPIO0_P0) & 0x3; in bnx2x_get_mod_abs_int_cfg() 4304 *gpio_num = MISC_REGISTERS_GPIO_3; in bnx2x_get_mod_abs_int_cfg() 4315 u8 gpio_num, gpio_port; in bnx2x_is_sfp_module_plugged() local 4319 &gpio_num, &gpio_port) != 0) in bnx2x_is_sfp_module_plugged() [all …]
|
D | bnx2x_main.c | 1995 int bnx2x_get_gpio(struct bnx2x *bp, int gpio_num, u8 port) in bnx2x_get_gpio() argument 2000 int gpio_shift = gpio_num + in bnx2x_get_gpio() 2006 if (gpio_num > MISC_REGISTERS_GPIO_3) { in bnx2x_get_gpio() 2007 BNX2X_ERR("Invalid GPIO %d\n", gpio_num); in bnx2x_get_gpio() 2020 DP(NETIF_MSG_LINK, "pin %d value 0x%x\n", gpio_num, value); in bnx2x_get_gpio() 2025 int bnx2x_set_gpio(struct bnx2x *bp, int gpio_num, u32 mode, u8 port) in bnx2x_set_gpio() argument 2030 int gpio_shift = gpio_num + in bnx2x_set_gpio() 2035 if (gpio_num > MISC_REGISTERS_GPIO_3) { in bnx2x_set_gpio() 2036 BNX2X_ERR("Invalid GPIO %d\n", gpio_num); in bnx2x_set_gpio() 2048 gpio_num, gpio_shift); in bnx2x_set_gpio() [all …]
|
D | bnx2x.h | 1903 int bnx2x_get_gpio(struct bnx2x *bp, int gpio_num, u8 port); 1904 int bnx2x_set_gpio(struct bnx2x *bp, int gpio_num, u32 mode, u8 port); 1906 int bnx2x_set_gpio_int(struct bnx2x *bp, int gpio_num, u32 mode, u8 port);
|