Home
last modified time | relevance | path

Searched refs:gpiod (Results 1 – 25 of 76) sorted by relevance

1234

/drivers/leds/
A Dleds-gpio.c26 struct gpio_desc *gpiod; member
179 led_dat->gpiod = led.gpiod; in gpio_leds_create()
224 if (IS_ERR(gpiod)) in gpio_led_get_gpiod()
225 return gpiod; in gpio_led_get_gpiod()
226 if (gpiod) { in gpio_led_get_gpiod()
228 return gpiod; in gpio_led_get_gpiod()
247 if (!gpiod) in gpio_led_get_gpiod()
253 return gpiod; in gpio_led_get_gpiod()
273 if (template->gpiod) in gpio_led_probe()
274 led_dat->gpiod = template->gpiod; in gpio_led_probe()
[all …]
A Dleds-lt3593.c18 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()
A Dleds-netxbig.c352 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()
380 addr[i] = gpiod; 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()
402 data[i] = gpiod; in netxbig_gpio_ext_get()
408 if (IS_ERR(gpiod)) { in netxbig_gpio_ext_get()
411 return PTR_ERR(gpiod); in netxbig_gpio_ext_get()
[all …]
/drivers/clk/
A Dclk-gpio.c48 struct gpio_desc *gpiod; member
57 gpiod_set_value(clk->gpiod, 1); in clk_gpio_gate_enable()
66 gpiod_set_value(clk->gpiod, 0); in clk_gpio_gate_disable()
73 return gpiod_get_value(clk->gpiod); in clk_gpio_gate_is_enabled()
142 struct gpio_desc *gpiod, in clk_register_gpio() argument
164 clk_gpio->gpiod = gpiod; in clk_register_gpio()
177 struct gpio_desc *gpiod) in clk_hw_register_gpio_gate() argument
181 if (gpiod_cansleep(gpiod)) in clk_hw_register_gpio_gate()
201 struct gpio_desc *gpiod; in gpio_clk_driver_probe() local
215 if (IS_ERR(gpiod)) in gpio_clk_driver_probe()
[all …]
/drivers/leds/trigger/
A Dledtrig-gpio.c21 struct gpio_desc *gpiod; /* gpio that triggers the led */ member
30 tmp = gpiod_get_value_cansleep(gpio_data->gpiod); in gpio_trig_irq()
89 gpio_data->gpiod = gpiod_get_optional(dev, "trigger-sources", GPIOD_IN); in gpio_trig_activate()
90 if (IS_ERR(gpio_data->gpiod)) { in gpio_trig_activate()
91 ret = PTR_ERR(gpio_data->gpiod); in gpio_trig_activate()
95 if (!gpio_data->gpiod) { in gpio_trig_activate()
101 gpiod_set_consumer_name(gpio_data->gpiod, "led-trigger"); in gpio_trig_activate()
106 ret = request_threaded_irq(gpiod_to_irq(gpio_data->gpiod), NULL, gpio_trig_irq, in gpio_trig_activate()
111 gpiod_put(gpio_data->gpiod); in gpio_trig_activate()
126 free_irq(gpiod_to_irq(gpio_data->gpiod), led); in gpio_trig_deactivate()
[all …]
/drivers/leds/simatic/
A Dsimatic-ipc-leds-gpio-core.c52 struct gpio_desc *gpiod; in simatic_ipc_leds_gpio_probe() local
82 gpiod = gpiod_get_index(dev, NULL, 6, GPIOD_OUT_LOW); in simatic_ipc_leds_gpio_probe()
83 if (IS_ERR(gpiod)) { in simatic_ipc_leds_gpio_probe()
84 err = PTR_ERR(gpiod); in simatic_ipc_leds_gpio_probe()
87 gpiod_put(gpiod); in simatic_ipc_leds_gpio_probe()
90 gpiod = gpiod_get_index(dev, NULL, 7, GPIOD_OUT_LOW); in simatic_ipc_leds_gpio_probe()
91 if (IS_ERR(gpiod)) { in simatic_ipc_leds_gpio_probe()
92 err = PTR_ERR(gpiod); in simatic_ipc_leds_gpio_probe()
95 gpiod_put(gpiod); in simatic_ipc_leds_gpio_probe()
/drivers/extcon/
A Dextcon-max3355.c57 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()
A Dextcon-gpio.c39 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/w1/masters/
A Dw1-gpio.c21 struct gpio_desc *gpiod; member
38 gpiod_set_raw_value(ddata->gpiod, 1); in w1_gpio_set_pullup()
44 gpiod_set_value(ddata->gpiod, 1); in w1_gpio_set_pullup()
56 gpiod_set_value(ddata->gpiod, bit); in w1_gpio_write_bit()
63 return gpiod_get_value(ddata->gpiod) ? 1 : 0; in w1_gpio_read_bit()
92 ddata->gpiod = devm_gpiod_get_index(dev, NULL, 0, gflags); in w1_gpio_probe()
93 if (IS_ERR(ddata->gpiod)) in w1_gpio_probe()
94 return dev_err_probe(dev, PTR_ERR(ddata->gpiod), "gpio_request (pin) failed\n"); in w1_gpio_probe()
104 gpiod_direction_output(ddata->gpiod, 1); in w1_gpio_probe()
/drivers/video/backlight/
A Dktd253-backlight.c33 struct gpio_desc *gpiod; member
39 gpiod_set_value_cansleep(ktd253->gpiod, 1); in ktd253_backlight_set_max_ratio()
62 gpiod_set_value(ktd253->gpiod, 0); in ktd253_backlight_stepdown()
64 gpiod_set_value(ktd253->gpiod, 1); in ktd253_backlight_stepdown()
91 gpiod_set_value_cansleep(ktd253->gpiod, 0); in ktd253_backlight_update_status()
119 gpiod_set_value_cansleep(ktd253->gpiod, 0); in ktd253_backlight_update_status()
174 ktd253->gpiod = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW); in ktd253_backlight_probe()
175 if (IS_ERR(ktd253->gpiod)) in ktd253_backlight_probe()
176 return dev_err_probe(dev, PTR_ERR(ktd253->gpiod), in ktd253_backlight_probe()
178 gpiod_set_consumer_name(ktd253->gpiod, dev_name(dev)); in ktd253_backlight_probe()
A Dgpio_backlight.c20 struct gpio_desc *gpiod; member
27 gpiod_set_value_cansleep(gbl->gpiod, backlight_get_brightness(bl)); in gpio_backlight_update_status()
65 gbl->gpiod = devm_gpiod_get(dev, NULL, GPIOD_ASIS); in gpio_backlight_probe()
66 if (IS_ERR(gbl->gpiod)) in gpio_backlight_probe()
67 return dev_err_probe(dev, PTR_ERR(gbl->gpiod), in gpio_backlight_probe()
85 else if (gpiod_get_value_cansleep(gbl->gpiod) == 0) in gpio_backlight_probe()
93 ret = gpiod_direction_output(gbl->gpiod, init_brightness); in gpio_backlight_probe()
/drivers/watchdog/
A Dgpio_wdt.c32 struct gpio_desc *gpiod; member
42 gpiod_set_value_cansleep(priv->gpiod, 1); in gpio_wdt_disable()
46 gpiod_direction_input(priv->gpiod); in gpio_wdt_disable()
57 gpiod_set_value_cansleep(priv->gpiod, priv->state); in gpio_wdt_ping()
61 gpiod_set_value_cansleep(priv->gpiod, 1); in gpio_wdt_ping()
63 gpiod_set_value_cansleep(priv->gpiod, 0); in gpio_wdt_ping()
74 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()
A Dmtx-1_wdt.c56 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()
199 mtx1_wdt_device.gpiod = devm_gpiod_get(&pdev->dev, in mtx1_wdt_probe()
201 if (IS_ERR(mtx1_wdt_device.gpiod)) { in mtx1_wdt_probe()
203 return PTR_ERR(mtx1_wdt_device.gpiod); in mtx1_wdt_probe()
/drivers/net/wireless/broadcom/brcm80211/brcmsmac/
A Dled.c24 if (!wl->radio_led.gpiod) in brcms_radio_led_ctrl()
28 gpiod_set_value(wl->radio_led.gpiod, 1); in brcms_radio_led_ctrl()
30 gpiod_set_value(wl->radio_led.gpiod, 0); in brcms_radio_led_ctrl()
47 if (wl->radio_led.gpiod) in brcms_led_unregister()
48 gpiochip_free_own_desc(wl->radio_led.gpiod); in brcms_led_unregister()
82 radio_led->gpiod = gpiochip_request_own_desc(bcma_gpio, hwnum, in brcms_led_register()
86 if (IS_ERR(radio_led->gpiod)) { in brcms_led_register()
87 err = PTR_ERR(radio_led->gpiod); in brcms_led_register()
/drivers/net/phy/
A Dfixed_phy.c135 struct gpio_desc *gpiod) in fixed_phy_add_gpiod() argument
154 fp->link_gpiod = gpiod; in fixed_phy_add_gpiod()
192 struct gpio_desc *gpiod; in fixed_phy_get_gpiod() local
208 if (IS_ERR(gpiod) && PTR_ERR(gpiod) != -EPROBE_DEFER) { in fixed_phy_get_gpiod()
209 if (PTR_ERR(gpiod) != -ENOENT) in fixed_phy_get_gpiod()
212 gpiod = NULL; in fixed_phy_get_gpiod()
216 return gpiod; in fixed_phy_get_gpiod()
229 struct gpio_desc *gpiod; in fixed_phy_register() local
238 gpiod = fixed_phy_get_gpiod(np); in fixed_phy_register()
239 if (IS_ERR(gpiod)) in fixed_phy_register()
[all …]
/drivers/i2c/
A Di2c-core-of-prober.c253 struct gpio_desc *gpiod; in i2c_of_probe_simple_get_gpiod() local
266 gpiod = fwnode_gpiod_get_index(fwnode, con_id, 0, GPIOD_ASIS, "i2c-of-prober"); in i2c_of_probe_simple_get_gpiod()
267 if (IS_ERR(gpiod)) in i2c_of_probe_simple_get_gpiod()
268 return PTR_ERR(gpiod); in i2c_of_probe_simple_get_gpiod()
270 ctx->gpiod = gpiod; in i2c_of_probe_simple_get_gpiod()
277 gpiod_put(ctx->gpiod); in i2c_of_probe_simple_put_gpiod()
278 ctx->gpiod = NULL; in i2c_of_probe_simple_put_gpiod()
285 if (!ctx->gpiod) in i2c_of_probe_simple_set_gpio()
290 ret = gpiod_direction_output(ctx->gpiod, ctx->opts->gpio_assert_to_enable); in i2c_of_probe_simple_set_gpio()
302 gpiod_set_value(ctx->gpiod, !ctx->opts->gpio_assert_to_enable); in i2c_of_probe_simple_disable_gpio()
/drivers/usb/misc/
A Dbrcmstb-usb-pinmap.c21 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()
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()
236 gpiod_set_value(pout->gpiod, val ? 1 : 0); in sync_all_pins()
[all …]
/drivers/platform/x86/x86-android-tablets/
A Dcore.c50 struct gpio_desc *gpiod; in x86_android_tablet_get_gpiod() local
65 if (IS_ERR(gpiod)) { in x86_android_tablet_get_gpiod()
67 return PTR_ERR(gpiod); in x86_android_tablet_get_gpiod()
71 *desc = gpiod; in x86_android_tablet_get_gpiod()
81 struct gpio_desc *gpiod; in x86_acpi_irq_helper_get() local
103 false, GPIOD_ASIS, &gpiod); in x86_acpi_irq_helper_get()
107 irq = gpiod_to_irq(gpiod); in x86_acpi_irq_helper_get()
118 devm_gpiod_put(&x86_android_tablet_device->dev, gpiod); in x86_acpi_irq_helper_get()
475 struct gpio_desc *gpiod; in x86_android_tablet_probe() local
487 false, GPIOD_IN, &gpiod); in x86_android_tablet_probe()
[all …]
/drivers/iio/humidity/
A Ddht11.c72 struct gpio_desc *gpiod; member
178 gpiod_get_value(dht11->gpiod); in dht11_handle_irq()
216 ret = gpiod_direction_output(dht11->gpiod, 0); in dht11_read_raw()
221 ret = gpiod_direction_input(dht11->gpiod); in dht11_read_raw()
304 dht11->gpiod = devm_gpiod_get(dev, NULL, GPIOD_IN); in dht11_probe()
305 if (IS_ERR(dht11->gpiod)) in dht11_probe()
306 return PTR_ERR(dht11->gpiod); in dht11_probe()
308 dht11->irq = gpiod_to_irq(dht11->gpiod); in dht11_probe()
310 dev_err(dev, "GPIO %d has no interrupt\n", desc_to_gpio(dht11->gpiod)); in dht11_probe()
/drivers/ata/
A Dpata_rb532_cf.c105 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/input/keyboard/
A Dgpio_keys.c36 struct gpio_desc *gpiod; member
134 if (!bdata->gpiod) in gpio_keys_quiesce_key()
368 gpiod_get_value(bdata->gpiod) : in gpio_keys_gpio_report_event()
519 if (IS_ERR(bdata->gpiod)) { in gpio_keys_setup_key()
520 error = PTR_ERR(bdata->gpiod); in gpio_keys_setup_key()
529 bdata->gpiod = NULL; in gpio_keys_setup_key()
544 if (!bdata->gpiod) in gpio_keys_setup_key()
551 if (bdata->gpiod) { in gpio_keys_setup_key()
568 !gpiod_cansleep(bdata->gpiod); in gpio_keys_setup_key()
582 irq = gpiod_to_irq(bdata->gpiod); in gpio_keys_setup_key()
[all …]
A Dgpio_keys_polled.c29 struct gpio_desc *gpiod; member
73 state = gpiod_get_value_cansleep(bdata->gpiod); in gpio_keys_polled_check_state()
296 bdata->gpiod = devm_fwnode_gpiod_get(dev, child, in gpio_keys_polled_probe()
299 if (IS_ERR(bdata->gpiod)) { in gpio_keys_polled_probe()
301 return dev_err_probe(dev, PTR_ERR(bdata->gpiod), in gpio_keys_polled_probe()
316 bdata->gpiod = gpio_to_desc(button->gpio); in gpio_keys_polled_probe()
317 if (!bdata->gpiod) { in gpio_keys_polled_probe()
324 if (button->active_low ^ gpiod_is_active_low(bdata->gpiod)) in gpio_keys_polled_probe()
325 gpiod_toggle_active_low(bdata->gpiod); in gpio_keys_polled_probe()
/drivers/media/rc/
A Dgpio-ir-recv.c22 struct gpio_desc *gpiod; member
47 val = gpiod_get_value(gpio_dev->gpiod); in gpio_ir_recv_irq()
75 gpio_dev->gpiod = devm_gpiod_get(dev, NULL, GPIOD_IN); in gpio_ir_recv_probe()
76 if (IS_ERR(gpio_dev->gpiod)) in gpio_ir_recv_probe()
77 return dev_err_probe(dev, PTR_ERR(gpio_dev->gpiod), in gpio_ir_recv_probe()
79 gpio_dev->irq = gpiod_to_irq(gpio_dev->gpiod); in gpio_ir_recv_probe()
/drivers/regulator/
A Dwm8994-regulator.c156 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()
A Dlm363x-regulator.c320 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()

Completed in 48 milliseconds

1234