/drivers/clk/ |
D | clk-gpio.c | 46 struct gpio_desc *gpiod; member 55 gpiod_set_value(clk->gpiod, 1); in clk_gpio_gate_enable() 64 gpiod_set_value(clk->gpiod, 0); in clk_gpio_gate_disable() 71 return gpiod_get_value(clk->gpiod); in clk_gpio_gate_is_enabled() 84 gpiod_set_value_cansleep(clk->gpiod, 1); in clk_sleeping_gpio_gate_prepare() 93 gpiod_set_value_cansleep(clk->gpiod, 0); in clk_sleeping_gpio_gate_unprepare() 100 return gpiod_get_value_cansleep(clk->gpiod); in clk_sleeping_gpio_gate_is_prepared() 121 return gpiod_get_value_cansleep(clk->gpiod); in clk_gpio_mux_get_parent() 128 gpiod_set_value_cansleep(clk->gpiod, index); in clk_gpio_mux_set_parent() 140 struct gpio_desc *gpiod, in clk_register_gpio() argument [all …]
|
/drivers/leds/ |
D | leds-gpio.c | 24 struct gpio_desc *gpiod; member 48 led_dat->platform_gpio_blink_set(led_dat->gpiod, level, in gpio_led_set() 53 gpiod_set_value_cansleep(led_dat->gpiod, level); in gpio_led_set() 55 gpiod_set_value(led_dat->gpiod, level); in gpio_led_set() 72 return led_dat->platform_gpio_blink_set(led_dat->gpiod, GPIO_LED_BLINK, in gpio_blink_set() 85 led_dat->can_sleep = gpiod_cansleep(led_dat->gpiod); in create_gpio_led() 96 state = gpiod_get_value_cansleep(led_dat->gpiod); in create_gpio_led() 111 ret = gpiod_direction_output(led_dat->gpiod, state); in create_gpio_led() 172 led.gpiod = devm_fwnode_gpiod_get(dev, child, NULL, GPIOD_ASIS, in gpio_leds_create() 174 if (IS_ERR(led.gpiod)) { in gpio_leds_create() [all …]
|
D | leds-lt3593.c | 18 struct gpio_desc *gpiod; member 38 gpiod_set_value_cansleep(led_dat->gpiod, 0); in lt3593_led_set() 45 gpiod_set_value_cansleep(led_dat->gpiod, 0); in lt3593_led_set() 47 gpiod_set_value_cansleep(led_dat->gpiod, 1); in lt3593_led_set() 51 gpiod_set_value_cansleep(led_dat->gpiod, 1); in lt3593_led_set() 54 gpiod_set_value_cansleep(led_dat->gpiod, 0); in lt3593_led_set() 56 gpiod_set_value_cansleep(led_dat->gpiod, 1); in lt3593_led_set() 81 led_data->gpiod = devm_gpiod_get(dev, "lltc,ctrl", 0); in lt3593_led_probe() 82 if (IS_ERR(led_data->gpiod)) in lt3593_led_probe() 83 return PTR_ERR(led_data->gpiod); in lt3593_led_probe()
|
D | leds-netxbig.c | 352 struct gpio_desc *gpiod; in netxbig_gpio_ext_get() local 375 gpiod = gpiod_get_index(gpio_ext_dev, "addr", i, in netxbig_gpio_ext_get() 377 if (IS_ERR(gpiod)) in netxbig_gpio_ext_get() 378 return PTR_ERR(gpiod); in netxbig_gpio_ext_get() 379 gpiod_set_consumer_name(gpiod, "GPIO extension addr"); in netxbig_gpio_ext_get() 380 addr[i] = gpiod; in netxbig_gpio_ext_get() 397 gpiod = gpiod_get_index(gpio_ext_dev, "data", i, in netxbig_gpio_ext_get() 399 if (IS_ERR(gpiod)) in netxbig_gpio_ext_get() 400 return PTR_ERR(gpiod); in netxbig_gpio_ext_get() 401 gpiod_set_consumer_name(gpiod, "GPIO extension data"); in netxbig_gpio_ext_get() [all …]
|
/drivers/leds/simple/ |
D | simatic-ipc-leds-gpio-core.c | 54 struct gpio_desc *gpiod; in simatic_ipc_leds_gpio_probe() local 83 gpiod = gpiod_get_index(dev, NULL, 6, GPIOD_OUT_LOW); in simatic_ipc_leds_gpio_probe() 84 if (IS_ERR(gpiod)) { in simatic_ipc_leds_gpio_probe() 85 err = PTR_ERR(gpiod); in simatic_ipc_leds_gpio_probe() 88 gpiod_put(gpiod); in simatic_ipc_leds_gpio_probe() 91 gpiod = gpiod_get_index(dev, NULL, 7, GPIOD_OUT_LOW); in simatic_ipc_leds_gpio_probe() 92 if (IS_ERR(gpiod)) { in simatic_ipc_leds_gpio_probe() 93 err = PTR_ERR(gpiod); in simatic_ipc_leds_gpio_probe() 96 gpiod_put(gpiod); in simatic_ipc_leds_gpio_probe()
|
/drivers/net/phy/ |
D | fixed_phy.c | 135 struct gpio_desc *gpiod) in fixed_phy_add_gpiod() argument 154 fp->link_gpiod = gpiod; in fixed_phy_add_gpiod() 193 struct gpio_desc *gpiod; in fixed_phy_get_gpiod() local 207 gpiod = fwnode_gpiod_get_index(of_fwnode_handle(fixed_link_node), in fixed_phy_get_gpiod() 209 if (IS_ERR(gpiod) && PTR_ERR(gpiod) != -EPROBE_DEFER) { in fixed_phy_get_gpiod() 210 if (PTR_ERR(gpiod) != -ENOENT) in fixed_phy_get_gpiod() 213 gpiod = NULL; in fixed_phy_get_gpiod() 217 return gpiod; in fixed_phy_get_gpiod() 229 struct gpio_desc *gpiod) in __fixed_phy_register() argument 240 if (!gpiod) { in __fixed_phy_register() [all …]
|
/drivers/extcon/ |
D | extcon-max3355.c | 57 struct gpio_desc *gpiod; in max3355_probe() local 65 gpiod = devm_gpiod_get(&pdev->dev, "id", GPIOD_IN); in max3355_probe() 66 if (IS_ERR(gpiod)) { in max3355_probe() 68 return PTR_ERR(gpiod); in max3355_probe() 70 data->id_gpiod = gpiod; in max3355_probe() 72 gpiod = devm_gpiod_get(&pdev->dev, "maxim,shdn", GPIOD_OUT_HIGH); in max3355_probe() 73 if (IS_ERR(gpiod)) { in max3355_probe() 75 return PTR_ERR(gpiod); in max3355_probe() 77 data->shdn_gpiod = gpiod; in max3355_probe()
|
D | extcon-gpio.c | 39 struct gpio_desc *gpiod; member 52 state = gpiod_get_value_cansleep(data->gpiod); in gpio_extcon_work() 87 data->gpiod = devm_gpiod_get(dev, "extcon", GPIOD_IN); in gpio_extcon_probe() 88 if (IS_ERR(data->gpiod)) in gpio_extcon_probe() 89 return PTR_ERR(data->gpiod); in gpio_extcon_probe() 90 irq = gpiod_to_irq(data->gpiod); in gpio_extcon_probe() 100 if (gpiod_is_active_low(data->gpiod)) in gpio_extcon_probe()
|
/drivers/video/backlight/ |
D | ktd253-backlight.c | 34 struct gpio_desc *gpiod; member 40 gpiod_set_value_cansleep(ktd253->gpiod, 1); in ktd253_backlight_set_max_ratio() 63 gpiod_set_value(ktd253->gpiod, 0); in ktd253_backlight_stepdown() 65 gpiod_set_value(ktd253->gpiod, 1); in ktd253_backlight_stepdown() 92 gpiod_set_value_cansleep(ktd253->gpiod, 0); in ktd253_backlight_update_status() 120 gpiod_set_value_cansleep(ktd253->gpiod, 0); in ktd253_backlight_update_status() 175 ktd253->gpiod = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW); in ktd253_backlight_probe() 176 if (IS_ERR(ktd253->gpiod)) in ktd253_backlight_probe() 177 return dev_err_probe(dev, PTR_ERR(ktd253->gpiod), in ktd253_backlight_probe() 179 gpiod_set_consumer_name(ktd253->gpiod, dev_name(dev)); in ktd253_backlight_probe()
|
D | gpio_backlight.c | 21 struct gpio_desc *gpiod; member 28 gpiod_set_value_cansleep(gbl->gpiod, backlight_get_brightness(bl)); in gpio_backlight_update_status() 66 gbl->gpiod = devm_gpiod_get(dev, NULL, GPIOD_ASIS); in gpio_backlight_probe() 67 if (IS_ERR(gbl->gpiod)) { in gpio_backlight_probe() 68 ret = PTR_ERR(gbl->gpiod); in gpio_backlight_probe() 90 else if (gpiod_get_value_cansleep(gbl->gpiod) == 0) in gpio_backlight_probe() 98 ret = gpiod_direction_output(gbl->gpiod, init_brightness); in gpio_backlight_probe()
|
D | lms283gf05.c | 93 static void lms283gf05_reset(struct gpio_desc *gpiod) in lms283gf05_reset() argument 95 gpiod_set_value(gpiod, 0); /* De-asserted */ in lms283gf05_reset() 97 gpiod_set_value(gpiod, 1); /* Asserted */ in lms283gf05_reset() 99 gpiod_set_value(gpiod, 0); /* De-asserted */ in lms283gf05_reset()
|
/drivers/watchdog/ |
D | gpio_wdt.c | 31 struct gpio_desc *gpiod; member 41 gpiod_set_value_cansleep(priv->gpiod, 1); in gpio_wdt_disable() 45 gpiod_direction_input(priv->gpiod); in gpio_wdt_disable() 56 gpiod_set_value_cansleep(priv->gpiod, priv->state); in gpio_wdt_ping() 60 gpiod_set_value_cansleep(priv->gpiod, 1); in gpio_wdt_ping() 62 gpiod_set_value_cansleep(priv->gpiod, 0); in gpio_wdt_ping() 73 gpiod_direction_output(priv->gpiod, priv->state); in gpio_wdt_start() 135 priv->gpiod = devm_gpiod_get(dev, NULL, gflags); in gpio_wdt_probe() 136 if (IS_ERR(priv->gpiod)) in gpio_wdt_probe() 137 return PTR_ERR(priv->gpiod); in gpio_wdt_probe()
|
D | mtx-1_wdt.c | 56 struct gpio_desc *gpiod; member 68 gpiod_set_value(mtx1_wdt_device.gpiod, mtx1_wdt_device.gstate); in mtx1_wdt_trigger() 91 gpiod_set_value(mtx1_wdt_device.gpiod, 1); in mtx1_wdt_start() 106 gpiod_set_value(mtx1_wdt_device.gpiod, 0); in mtx1_wdt_stop() 200 mtx1_wdt_device.gpiod = devm_gpiod_get(&pdev->dev, in mtx1_wdt_probe() 202 if (IS_ERR(mtx1_wdt_device.gpiod)) { in mtx1_wdt_probe() 204 return PTR_ERR(mtx1_wdt_device.gpiod); in mtx1_wdt_probe()
|
/drivers/net/wireless/broadcom/brcm80211/brcmsmac/ |
D | led.c | 25 if (!wl->radio_led.gpiod) in brcms_radio_led_ctrl() 29 gpiod_set_value(wl->radio_led.gpiod, 1); in brcms_radio_led_ctrl() 31 gpiod_set_value(wl->radio_led.gpiod, 0); in brcms_radio_led_ctrl() 48 if (wl->radio_led.gpiod) in brcms_led_unregister() 49 gpiochip_free_own_desc(wl->radio_led.gpiod); in brcms_led_unregister() 83 radio_led->gpiod = gpiochip_request_own_desc(bcma_gpio, hwnum, in brcms_led_register() 87 if (IS_ERR(radio_led->gpiod)) { in brcms_led_register() 88 err = PTR_ERR(radio_led->gpiod); in brcms_led_register()
|
/drivers/w1/masters/ |
D | w1-gpio.c | 33 gpiod_set_raw_value(pdata->gpiod, 1); in w1_gpio_set_pullup() 39 gpiod_set_value(pdata->gpiod, 1); in w1_gpio_set_pullup() 51 gpiod_set_value(pdata->gpiod, bit); in w1_gpio_write_bit() 58 return gpiod_get_value(pdata->gpiod) ? 1 : 0; in w1_gpio_read_bit() 107 pdata->gpiod = devm_gpiod_get_index(dev, NULL, 0, gflags); in w1_gpio_probe() 108 if (IS_ERR(pdata->gpiod)) { in w1_gpio_probe() 110 return PTR_ERR(pdata->gpiod); in w1_gpio_probe() 123 gpiod_direction_output(pdata->gpiod, 1); in w1_gpio_probe()
|
/drivers/usb/misc/ |
D | brcmstb-usb-pinmap.c | 21 struct gpio_desc *gpiod; member 28 struct gpio_desc *gpiod; member 64 val = gpiod_get_value(pin->gpiod); in sync_in_pin() 91 gpiod_set_value(pout->gpiod, bit ? 1 : 0); in brcmstb_usb_pinmap_ovr_isr() 141 pin->gpiod = devm_gpiod_get_index(dev, "in", x, GPIOD_IN); in parse_pins() 142 if (IS_ERR(pin->gpiod)) { in parse_pins() 144 return PTR_ERR(pin->gpiod); in parse_pins() 173 pout->gpiod = devm_gpiod_get_index(dev, "out", x, in parse_pins() 175 if (IS_ERR(pout->gpiod)) { in parse_pins() 177 return PTR_ERR(pout->gpiod); in parse_pins() [all …]
|
/drivers/platform/x86/x86-android-tablets/ |
D | core.c | 35 struct gpio_desc *gpiod; in x86_android_tablet_get_gpiod() local 44 gpiod = gpiochip_get_desc(chip, pin); in x86_android_tablet_get_gpiod() 45 if (IS_ERR(gpiod)) { in x86_android_tablet_get_gpiod() 46 pr_err("error %ld getting GPIO %s %d\n", PTR_ERR(gpiod), label, pin); in x86_android_tablet_get_gpiod() 47 return PTR_ERR(gpiod); in x86_android_tablet_get_gpiod() 50 *desc = gpiod; in x86_android_tablet_get_gpiod() 59 struct gpio_desc *gpiod; in x86_acpi_irq_helper_get() local 80 ret = x86_android_tablet_get_gpiod(data->chip, data->index, &gpiod); in x86_acpi_irq_helper_get() 84 irq = gpiod_to_irq(gpiod); in x86_acpi_irq_helper_get() 360 struct gpio_desc *gpiod; in x86_android_tablet_init() local [all …]
|
D | lenovo.c | 430 struct gpio_desc *gpiod; in lenovo_yoga_tab2_830_1050_init_touchscreen() local 434 ret = x86_android_tablet_get_gpiod("gpio_crystalcove", 10, &gpiod); in lenovo_yoga_tab2_830_1050_init_touchscreen() 438 ret = gpiod_get_value_cansleep(gpiod); in lenovo_yoga_tab2_830_1050_init_touchscreen() 658 struct gpio_desc *gpiod; in lenovo_yt3_init() local 674 ret = x86_android_tablet_get_gpiod("INT33FF:02", 22, &gpiod); in lenovo_yt3_init() 684 gpiod_set_value(gpiod, 0); in lenovo_yt3_init() 687 ret = x86_android_tablet_get_gpiod("INT33FF:03", 19, &gpiod); in lenovo_yt3_init() 691 gpiod_set_value(gpiod, 0); in lenovo_yt3_init()
|
/drivers/iio/humidity/ |
D | dht11.c | 73 struct gpio_desc *gpiod; member 179 gpiod_get_value(dht11->gpiod); in dht11_handle_irq() 217 ret = gpiod_direction_output(dht11->gpiod, 0); in dht11_read_raw() 222 ret = gpiod_direction_input(dht11->gpiod); in dht11_read_raw() 305 dht11->gpiod = devm_gpiod_get(dev, NULL, GPIOD_IN); in dht11_probe() 306 if (IS_ERR(dht11->gpiod)) in dht11_probe() 307 return PTR_ERR(dht11->gpiod); in dht11_probe() 309 dht11->irq = gpiod_to_irq(dht11->gpiod); in dht11_probe() 311 dev_err(dev, "GPIO %d has no interrupt\n", desc_to_gpio(dht11->gpiod)); in dht11_probe()
|
/drivers/ata/ |
D | pata_rb532_cf.c | 105 struct gpio_desc *gpiod; in rb532_pata_driver_probe() local 123 gpiod = devm_gpiod_get(&pdev->dev, NULL, GPIOD_IN); in rb532_pata_driver_probe() 124 if (IS_ERR(gpiod)) { in rb532_pata_driver_probe() 126 return PTR_ERR(gpiod); in rb532_pata_driver_probe() 128 gpiod_set_consumer_name(gpiod, DRV_NAME); in rb532_pata_driver_probe() 140 info->gpio_line = gpiod; in rb532_pata_driver_probe()
|
/drivers/regulator/ |
D | wm8994-regulator.c | 156 struct gpio_desc *gpiod; in wm8994_ldo_probe() local 178 gpiod = gpiod_get_optional(pdev->dev.parent, in wm8994_ldo_probe() 182 if (IS_ERR(gpiod)) in wm8994_ldo_probe() 183 return PTR_ERR(gpiod); in wm8994_ldo_probe() 184 config.ena_gpiod = gpiod; in wm8994_ldo_probe() 193 if (!gpiod) in wm8994_ldo_probe()
|
D | lm363x-regulator.c | 320 struct gpio_desc *gpiod; in lm363x_regulator_probe() local 330 gpiod = lm363x_regulator_of_get_enable_gpio(dev, id); in lm363x_regulator_probe() 331 if (IS_ERR(gpiod)) in lm363x_regulator_probe() 332 return PTR_ERR(gpiod); in lm363x_regulator_probe() 334 if (gpiod) { in lm363x_regulator_probe() 335 cfg.ena_gpiod = gpiod; in lm363x_regulator_probe() 338 gpiod_put(gpiod); in lm363x_regulator_probe()
|
/drivers/media/rc/ |
D | gpio-ir-recv.c | 23 struct gpio_desc *gpiod; member 48 val = gpiod_get_value(gpio_dev->gpiod); in gpio_ir_recv_irq() 76 gpio_dev->gpiod = devm_gpiod_get(dev, NULL, GPIOD_IN); in gpio_ir_recv_probe() 77 if (IS_ERR(gpio_dev->gpiod)) in gpio_ir_recv_probe() 78 return dev_err_probe(dev, PTR_ERR(gpio_dev->gpiod), in gpio_ir_recv_probe() 80 gpio_dev->irq = gpiod_to_irq(gpio_dev->gpiod); in gpio_ir_recv_probe()
|
/drivers/platform/surface/ |
D | surface_hotplug.c | 145 struct gpio_desc *gpiod; in shps_setup_irq() local 161 gpiod = devm_gpiod_get(&pdev->dev, shps_gpio_names[type], GPIOD_ASIS); in shps_setup_irq() 162 if (IS_ERR(gpiod)) in shps_setup_irq() 163 return PTR_ERR(gpiod); in shps_setup_irq() 165 irq = gpiod_to_irq(gpiod); in shps_setup_irq() 180 sdev->gpio[type] = gpiod; in shps_setup_irq()
|
/drivers/input/keyboard/ |
D | gpio_keys.c | 36 struct gpio_desc *gpiod; member 132 if (!bdata->gpiod) in gpio_keys_quiesce_key() 374 gpiod_get_value(bdata->gpiod) : in gpio_keys_gpio_report_event() 375 gpiod_get_value_cansleep(bdata->gpiod); in gpio_keys_gpio_report_event() 522 bdata->gpiod = devm_fwnode_gpiod_get(dev, child, in gpio_keys_setup_key() 524 if (IS_ERR(bdata->gpiod)) { in gpio_keys_setup_key() 525 error = PTR_ERR(bdata->gpiod); in gpio_keys_setup_key() 534 bdata->gpiod = NULL; in gpio_keys_setup_key() 553 bdata->gpiod = gpio_to_desc(button->gpio); in gpio_keys_setup_key() 554 if (!bdata->gpiod) in gpio_keys_setup_key() [all …]
|