/openbmc/linux/drivers/clk/ |
H A 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() 140 struct gpio_desc *gpiod, in clk_register_gpio() argument 162 clk_gpio->gpiod = gpiod; in clk_register_gpio() 175 struct gpio_desc *gpiod) in clk_hw_register_gpio_gate() argument 179 if (gpiod_cansleep(gpiod)) in clk_hw_register_gpio_gate() 199 struct gpio_desc *gpiod; in gpio_clk_driver_probe() local 214 if (IS_ERR(gpiod)) { in gpio_clk_driver_probe() [all …]
|
/openbmc/linux/drivers/leds/ |
H A D | leds-gpio.c | 24 struct gpio_desc *gpiod; member 179 led_dat->gpiod = led.gpiod; in gpio_leds_create() 214 struct gpio_desc *gpiod; in gpio_led_get_gpiod() local 225 if (!IS_ERR(gpiod)) { in gpio_led_get_gpiod() 227 return gpiod; in gpio_led_get_gpiod() 230 return gpiod; in gpio_led_get_gpiod() 251 if (!gpiod) in gpio_led_get_gpiod() 254 return gpiod; in gpio_led_get_gpiod() 274 if (template->gpiod) in gpio_led_probe() 275 led_dat->gpiod = template->gpiod; in gpio_led_probe() [all …]
|
H A 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()
|
H A 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() 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 …]
|
/openbmc/linux/drivers/leds/simple/ |
H A 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()
|
/openbmc/linux/drivers/extcon/ |
H A 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()
|
H A 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()
|
/openbmc/linux/drivers/net/phy/ |
H A 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 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() 240 if (!gpiod) { in __fixed_phy_register() 242 if (IS_ERR(gpiod)) in __fixed_phy_register() 243 return ERR_CAST(gpiod); in __fixed_phy_register() [all …]
|
/openbmc/linux/drivers/watchdog/ |
H A 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()
|
H A 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()
|
/openbmc/linux/drivers/video/backlight/ |
H A 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()
|
H A 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()
|
/openbmc/linux/drivers/net/wireless/broadcom/brcm80211/brcmsmac/ |
H A 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()
|
/openbmc/openbmc/meta-openembedded/meta-python/recipes-devtools/python/ |
H A D | python3-gpiod_2.1.3.bb | 37 install -d ${D}${PTEST_PATH}/gpiod-test/gpiosim 38 install -d ${D}${PTEST_PATH}/gpiod-test/procname 39 install -m 0644 ${S}/tests/*.py ${D}${PTEST_PATH}/gpiod-test/ 40 install -m 0644 ${B}/tests/gpiosim/_ext* ${D}${PTEST_PATH}/gpiod-test/gpiosim 41 install -m 0644 ${S}/tests/gpiosim/*.py ${D}${PTEST_PATH}/gpiod-test/gpiosim 42 install -m 0644 ${B}/tests/procname/_ext* ${D}${PTEST_PATH}/gpiod-test/procname 43 install -m 0644 ${S}/tests/procname/*.py ${D}${PTEST_PATH}/gpiod-test/procname
|
/openbmc/phosphor-state-manager/host_condition_gpio/ |
H A D | host_condition.cpp | 21 if (gpiod::find_line(lineName + "-ready")) in scanGpioPin() 26 else if (gpiod::find_line(lineName + "-ready-n")) in scanGpioPin() 46 auto line = gpiod::find_line(lineName); in currentFirmwareCondition() 52 line.request({lineName, gpiod::line_request::DIRECTION_INPUT, in currentFirmwareCondition() 55 : gpiod::line_request::FLAG_ACTIVE_LOW}); in currentFirmwareCondition()
|
/openbmc/linux/drivers/w1/masters/ |
H A 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()
|
/openbmc/linux/arch/arm/mach-omap1/ |
H A D | ams-delta-fiq.c | 87 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()
|
/openbmc/u-boot/board/alliedtelesis/common/ |
H A D | gpio_hog.c | 12 int gpio_hog_list(struct gpio_desc *gpiod, int max_count, in gpio_hog_list() argument 23 if (!dm_gpio_is_valid(gpiod)) { in gpio_hog_list() 26 gpio_name, gpiod, max_count, in gpio_hog_list() 32 dm_gpio_set_value(&gpiod[i], value); in gpio_hog_list()
|
/openbmc/linux/sound/soc/tegra/ |
H A D | tegra_asoc_machine.c | 448 if (IS_ERR(gpiod)) in tegra_asoc_machine_probe() 449 return PTR_ERR(gpiod); in tegra_asoc_machine_probe() 453 if (IS_ERR(gpiod)) in tegra_asoc_machine_probe() 454 return PTR_ERR(gpiod); in tegra_asoc_machine_probe() 458 if (IS_ERR(gpiod)) in tegra_asoc_machine_probe() 459 return PTR_ERR(gpiod); in tegra_asoc_machine_probe() 463 if (IS_ERR(gpiod)) in tegra_asoc_machine_probe() 464 return PTR_ERR(gpiod); in tegra_asoc_machine_probe() 468 if (IS_ERR(gpiod)) in tegra_asoc_machine_probe() 469 return PTR_ERR(gpiod); in tegra_asoc_machine_probe() [all …]
|
/openbmc/linux/drivers/usb/misc/ |
H A 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() 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 …]
|
/openbmc/dbus-sensors/src/ |
H A D | ADCSensor.hpp | 23 line = gpiod::find_line(name); in BridgeGpio() 33 gpiod::line_request::DIRECTION_OUTPUT, in BridgeGpio() 34 polarity == gpiod::line::ACTIVE_HIGH in BridgeGpio() 36 : gpiod::line_request::FLAG_ACTIVE_LOW}); in BridgeGpio() 63 gpiod::line line;
|
/openbmc/linux/drivers/platform/x86/x86-android-tablets/ |
H A 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 84 irq = gpiod_to_irq(gpiod); in x86_acpi_irq_helper_get() 360 struct gpio_desc *gpiod; in x86_android_tablet_init() local 370 dev_info->gpio_button[i].pin, &gpiod); in x86_android_tablet_init() [all …]
|
/openbmc/linux/arch/powerpc/platforms/44x/ |
H A D | warp.c | 95 .gpiod = NULL, /* to be filled by pika_setup_leds() */ 100 .gpiod = NULL, /* to be filled by pika_setup_leds() */ 123 gpiod_set_value(warp_gpio_led_pins[WARP_GREEN_LED].gpiod, 0); in temp_isr() 133 gpiod_set_value(warp_gpio_led_pins[WARP_RED_LED].gpiod, value); in temp_isr() 171 if (led->gpiod) { in pika_setup_leds() 188 led->gpiod = gpio; in pika_setup_leds() 210 gpiod_put(led->gpiod); in pika_setup_leds() 211 led->gpiod = NULL; in pika_setup_leds()
|
/openbmc/linux/drivers/ata/ |
H A 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()
|
/openbmc/phosphor-power/phosphor-power-supply/ |
H A D | util.cpp | 18 line = gpiod::find_line(namedGpio); in GPIOInterface() 56 line.request({__FUNCTION__, gpiod::line_request::DIRECTION_INPUT, in read() 57 gpiod::line_request::FLAG_ACTIVE_LOW}); in read() 96 {__FUNCTION__, gpiod::line_request::DIRECTION_OUTPUT, flags}, in write() 111 auto flags = gpiod::line_request::FLAG_OPEN_DRAIN; in toggleLowHigh()
|