Home
last modified time | relevance | path

Searched full:gpiod (Results 1 – 25 of 161) sorted by relevance

1234567

/linux-6.12.1/drivers/leds/
Dleds-gpio.c28 struct gpio_desc *gpiod; member
52 led_dat->platform_gpio_blink_set(led_dat->gpiod, level, in gpio_led_set()
57 gpiod_set_value_cansleep(led_dat->gpiod, level); in gpio_led_set()
59 gpiod_set_value(led_dat->gpiod, level); in gpio_led_set()
76 return led_dat->platform_gpio_blink_set(led_dat->gpiod, GPIO_LED_BLINK, in gpio_blink_set()
89 led_dat->can_sleep = gpiod_cansleep(led_dat->gpiod); in create_gpio_led()
100 state = gpiod_get_value_cansleep(led_dat->gpiod); in create_gpio_led()
115 ret = gpiod_direction_output(led_dat->gpiod, state); in create_gpio_led()
170 * Acquire gpiod from DT with uninitialized label, which in gpio_leds_create()
174 led.gpiod = devm_fwnode_gpiod_get(dev, child, NULL, GPIOD_ASIS, in gpio_leds_create()
[all …]
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()
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()
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 …]
/linux-6.12.1/drivers/clk/
Dclk-gpio.c35 * @gpiod: gpio descriptor
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()
[all …]
/linux-6.12.1/drivers/leds/trigger/
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 …]
/linux-6.12.1/drivers/leds/simple/
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()
/linux-6.12.1/drivers/net/phy/
Dfixed_phy.c135 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 …]
/linux-6.12.1/drivers/watchdog/
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()
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()
/linux-6.12.1/drivers/extcon/
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()
Dextcon-gpio.c29 * @gpiod: GPIO descriptor for this external connector.
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()
/linux-6.12.1/drivers/w1/masters/
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()
/linux-6.12.1/drivers/net/wireless/broadcom/brcm80211/brcmsmac/
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()
/linux-6.12.1/drivers/video/backlight/
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()
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()
/linux-6.12.1/Documentation/admin-guide/gpio/
Dgpio-virtuser.rst128 **Group:** ``/sys/kernel/debug/gpio-virtuser/$dev_name/gpiod:foo/``
132 **Attribute:** ``/sys/kernel/debug/gpio-virtuser/$dev_name/gpiod:foo/values``
134 **Attribute:** ``/sys/kernel/debug/gpio-virtuser/$dev_name/gpiod:foo/values_atomic``
144 **Group:** ``/sys/kernel/debug/gpio-virtuser/$dev_name/gpiod:foo:$index/``
149 **Attribute:** ``/sys/kernel/debug/gpio-virtuser/$dev_name/gpiod:foo:$index/consumer``
153 **Attribute:** ``/sys/kernel/debug/gpio-virtuser/$dev_name/gpiod:foo:$index/debounce``
157 **Attribute:** ``/sys/kernel/debug/gpio-virtuser/$dev_name/gpiod:foo:$index/direction``
159 **Attribute:** ``/sys/kernel/debug/gpio-virtuser/$dev_name/gpiod:foo:$index/direction_atomic``
165 **Attribute:** ``/sys/kernel/debug/gpio-virtuser/$dev_name/gpiod:foo:$index/interrupts``
172 **Attribute:** ``/sys/kernel/debug/gpio-virtuser/$dev_name/gpiod:foo:$index/value``
[all …]
/linux-6.12.1/sound/soc/tegra/
Dtegra_asoc_machine.c433 struct gpio_desc *gpiod; in tegra_asoc_machine_probe() local
449 gpiod = devm_gpiod_get_optional(dev, "nvidia,hp-mute", GPIOD_OUT_HIGH); in tegra_asoc_machine_probe()
450 machine->gpiod_hp_mute = gpiod; in tegra_asoc_machine_probe()
451 if (IS_ERR(gpiod)) in tegra_asoc_machine_probe()
452 return PTR_ERR(gpiod); in tegra_asoc_machine_probe()
454 gpiod = devm_gpiod_get_optional(dev, "nvidia,hp-det", GPIOD_IN); in tegra_asoc_machine_probe()
455 machine->gpiod_hp_det = gpiod; in tegra_asoc_machine_probe()
456 if (IS_ERR(gpiod)) in tegra_asoc_machine_probe()
457 return PTR_ERR(gpiod); in tegra_asoc_machine_probe()
459 gpiod = devm_gpiod_get_optional(dev, "nvidia,mic-det", GPIOD_IN); in tegra_asoc_machine_probe()
[all …]
/linux-6.12.1/drivers/usb/misc/
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()
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 …]
/linux-6.12.1/sound/soc/intel/avs/boards/
Des8336.c28 struct gpio_desc *gpiod; member
49 gpiod_set_value_cansleep(data->gpiod, speaker_en); in avs_es8336_speaker_power_event()
106 struct gpio_desc *gpiod; in avs_es8336_codec_init() local
125 gpiod = gpiod_get_optional(codec_dai->dev, "speaker-enable", GPIOD_OUT_LOW); in avs_es8336_codec_init()
126 if (IS_ERR(gpiod)) in avs_es8336_codec_init()
127 return dev_err_probe(codec_dai->dev, PTR_ERR(gpiod), "Get gpiod failed: %ld\n", in avs_es8336_codec_init()
128 PTR_ERR(gpiod)); in avs_es8336_codec_init()
130 data->gpiod = gpiod; in avs_es8336_codec_init()
145 gpiod_put(data->gpiod); in avs_es8336_codec_exit()
/linux-6.12.1/drivers/platform/x86/x86-android-tablets/
Dcore.c48 struct gpio_desc *gpiod; in x86_android_tablet_get_gpiod() local
59 gpiod = devm_gpiod_get(&x86_android_tablet_device->dev, con_id, dflags); in x86_android_tablet_get_gpiod()
63 if (IS_ERR(gpiod)) { in x86_android_tablet_get_gpiod()
64 pr_err("error %ld getting GPIO %s %d\n", PTR_ERR(gpiod), chip, pin); in x86_android_tablet_get_gpiod()
65 return PTR_ERR(gpiod); in x86_android_tablet_get_gpiod()
69 *desc = gpiod; in x86_android_tablet_get_gpiod()
79 struct gpio_desc *gpiod; in x86_acpi_irq_helper_get() local
101 false, GPIOD_ASIS, &gpiod); in x86_acpi_irq_helper_get()
105 irq = gpiod_to_irq(gpiod); in x86_acpi_irq_helper_get()
116 devm_gpiod_put(&x86_android_tablet_device->dev, gpiod); in x86_acpi_irq_helper_get()
[all …]
/linux-6.12.1/arch/arm/mach-omap1/
Dams-delta-fiq.c87 struct gpio_desc *gpiod, *data = NULL, *clk = NULL; in ams_delta_init_fiq() local
103 gpiod = gpiochip_request_own_desc(chip, i, pin_name[i], in ams_delta_init_fiq()
105 if (IS_ERR(gpiod)) { in ams_delta_init_fiq()
107 __func__, i, PTR_ERR(gpiod)); in ams_delta_init_fiq()
111 irq_data[i] = irq_get_irq_data(gpiod_to_irq(gpiod)); in ams_delta_init_fiq()
120 data = gpiod; in ams_delta_init_fiq()
124 clk = gpiod; in ams_delta_init_fiq()
128 gpiochip_free_own_desc(gpiod); in ams_delta_init_fiq()
/linux-6.12.1/arch/powerpc/platforms/44x/
Dwarp.c96 .gpiod = NULL, /* to be filled by pika_setup_leds() */
101 .gpiod = NULL, /* to be filled by pika_setup_leds() */
124 gpiod_set_value(warp_gpio_led_pins[WARP_GREEN_LED].gpiod, 0); in temp_isr()
134 gpiod_set_value(warp_gpio_led_pins[WARP_RED_LED].gpiod, value); in temp_isr()
172 if (led->gpiod) { in pika_setup_leds()
189 led->gpiod = gpio; in pika_setup_leds()
211 gpiod_put(led->gpiod); in pika_setup_leds()
212 led->gpiod = NULL; in pika_setup_leds()
/linux-6.12.1/drivers/media/rc/
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()
/linux-6.12.1/drivers/iio/humidity/
Ddht11.c73 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()
/linux-6.12.1/drivers/ata/
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()

1234567