/openbmc/u-boot/include/asm-generic/ |
H A D | gpio.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 15 * Generic GPIO API for U-Boot 17 * -- 20 * - gpio_request_by_name() 21 * - dm_gpio_get_value() etc. 24 * -- 26 * GPIOs are numbered from 0 to GPIO_COUNT-1 which value is defined 38 * an error value of -1. 43 * Request a GPIO. This should be called before any of the other functions 51 * @return 0 if ok, -1 on error [all …]
|
/openbmc/linux/drivers/tty/serial/ |
H A D | serial_mctrl_gpio.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 29 * Opaque descriptor for modem lines controlled by GPIOs 36 * Set state of the modem control output lines via GPIOs. 38 void mctrl_gpio_set(struct mctrl_gpios *gpios, unsigned int mctrl); 41 * Get state of the modem control input lines from GPIOs. 44 unsigned int mctrl_gpio_get(struct mctrl_gpios *gpios, unsigned int *mctrl); 47 * Get state of the modem control output lines from GPIOs. 51 mctrl_gpio_get_outputs(struct mctrl_gpios *gpios, unsigned int *mctrl); 56 struct gpio_desc *mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios, 60 * Request and set direction of modem control line GPIOs and set up irq [all …]
|
H A D | serial_mctrl_gpio.c | 1 // SPDX-License-Identifier: GPL-2.0+ 46 * mctrl_gpio_set - set gpios according to mctrl state 47 * @gpios: gpios to set 50 * Set the gpios according to the mctrl state. 52 void mctrl_gpio_set(struct mctrl_gpios *gpios, unsigned int mctrl) in mctrl_gpio_set() argument 59 if (gpios == NULL) in mctrl_gpio_set() 63 if (gpios->gpio[i] && mctrl_gpio_flags_is_dir_out(i)) { in mctrl_gpio_set() 64 desc_array[count] = gpios->gpio[i]; in mctrl_gpio_set() 74 * mctrl_gpio_to_gpiod - obtain gpio_desc of modem line index 75 * @gpios: gpios to look into [all …]
|
/openbmc/linux/sound/soc/ |
H A D | soc-jack.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // soc-jack.c -- ALSA SoC jack handling 21 * snd_soc_jack_report - Report the current status for a jack 40 if (!jack || !jack->jack) in snd_soc_jack_report() 44 dapm = &jack->card->dapm; in snd_soc_jack_report() 46 mutex_lock(&jack->mutex); in snd_soc_jack_report() 48 jack->status &= ~mask; in snd_soc_jack_report() 49 jack->status |= status & mask; in snd_soc_jack_report() 53 list_for_each_entry(pin, &jack->pins, list) { in snd_soc_jack_report() 54 int enable = pin->mask & jack->status; in snd_soc_jack_report() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/serial/ |
H A D | fsl-mxs-auart.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/serial/fsl-mxs-auart.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Fabio Estevam <festevam@gmail.com> 13 - $ref: serial.yaml# 18 - fsl,imx23-auart 19 - fsl,imx28-auart 20 - alphascale,asm9260-auart 30 - description: DMA controller phandle and request line for RX [all …]
|
H A D | ingenic,uart.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Paul Cercueil <paul@crapouillou.net> 13 - $ref: serial.yaml# 17 pattern: "^serial@[0-9a-f]+$" 21 - enum: 22 - ingenic,jz4740-uart 23 - ingenic,jz4750-uart 24 - ingenic,jz4760-uart [all …]
|
H A D | serial.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Rob Herring <robh@kernel.org> 11 - Greg Kroah-Hartman <gregkh@linuxfoundation.org> 19 where N is the port number (non-negative decimal integer) as printed on the 28 cts-gpios: 34 dcd-gpios: 40 dsr-gpios: 46 dtr-gpios: [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/soc/tegra/ |
H A D | nvidia,nvec.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Thierry Reding <thierry.reding@gmail.com> 11 - Jon Hunter <jonathanh@nvidia.com> 26 - description: divider clock 27 - description: fast clock 29 clock-names: 32 - const: div-clk 33 - const: fast-clk [all …]
|
/openbmc/linux/drivers/gpio/ |
H A D | gpiolib-legacy.c | 1 // SPDX-License-Identifier: GPL-2.0 16 * gpio_request_one - request a single GPIO with initial configuration 28 /* Compatibility: assume unavailable "valid" GPIOs will appear later */ in gpio_request_one() 30 return -EPROBE_DEFER; in gpio_request_one() 37 set_bit(FLAG_ACTIVE_LOW, &desc->flags); in gpio_request_one() 60 /* Compatibility: assume unavailable "valid" GPIOs will appear later */ in gpio_request() 62 return -EPROBE_DEFER; in gpio_request() 69 * gpio_request_array - request multiple GPIOs in a single call 71 * @num: how many GPIOs in the array 78 err = gpio_request_one(array->gpio, array->flags, array->label); in gpio_request_array() [all …]
|
H A D | gpiolib-devres.c | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * devres.c - managed gpio resources 41 struct gpio_descs **this = res, **gpios = data; in devm_gpiod_match_array() local 43 return *this == *gpios; in devm_gpiod_match_array() 47 * devm_gpiod_get - Resource-managed gpiod_get() 65 * devm_gpiod_get_optional - Resource-managed gpiod_get_optional() 83 * devm_gpiod_get_index - Resource-managed gpiod_get_index() 106 * For non-exclusive GPIO descriptors, check if this descriptor is in devm_gpiod_get_index() 122 return ERR_PTR(-ENOMEM); in devm_gpiod_get_index() 133 * devm_fwnode_gpiod_get_index - get a GPIO descriptor from a given node [all …]
|
H A D | gpio-ich.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Intel ICH6-10, Series 5 and 6, Atom C2000 (Avoton/Rangeley) GPIO driver 19 * Each chunk of 32 GPIOs is manipulated via its own USE_SELx, IO_SELx, and 34 {0x00, 0x30, 0x40}, /* USE_SEL[1-3] offsets */ 35 {0x04, 0x34, 0x44}, /* IO_SEL[1-3] offsets */ 36 {0x0c, 0x38, 0x48}, /* LVL[1-3] offsets */ 54 #define ICHX_WRITE(val, reg, base_res) outl(val, (reg) + (base_res)->start) 55 #define ICHX_READ(reg, base_res) inl((reg) + (base_res)->start) 74 /* Some chipsets have quirks, let these use their own request/get */ 75 int (*request)(struct gpio_chip *chip, unsigned int offset); member [all …]
|
/openbmc/linux/Documentation/driver-api/gpio/ |
H A D | board.rst | 5 This document explains how GPIOs can be assigned to given devices and functions. 7 Note that it only applies to the new descriptor-based interface. For a 8 description of the deprecated integer-based GPIO interface please refer to 10 interface; you just fetch an integer from somewhere and request the 15 Kconfig. Then, how GPIOs are mapped depends on what the platform uses to 20 ----------- 21 GPIOs can easily be mapped to devices and functions in the device tree. The 22 exact way to do it depends on the GPIO controller providing the GPIOs, see the 25 GPIOs mappings are defined in the consumer device's node, in a property named 26 <function>-gpios, where <function> is the function the driver will request [all …]
|
H A D | legacy.rst | 13 A "General Purpose Input/Output" (GPIO) is a flexible software-controlled 18 which GPIOs. Drivers can be written generically, so that board setup code 21 System-on-Chip (SOC) processors heavily rely on GPIOs. In some cases, every 22 non-dedicated pin can be configured as a GPIO; and most chips have at least 24 provide GPIOs; multifunction chips like power managers, and audio codecs 27 Most PC southbridges have a few dozen GPIO-capable pins (with only the BIOS 30 The exact capabilities of GPIOs vary between systems. Common options: 32 - Output values are writable (high=1, low=0). Some chips also have 34 value might be driven ... supporting "wire-OR" and similar schemes 37 - Input values are likewise readable (1, 0). Some chips support readback [all …]
|
/openbmc/u-boot/board/qualcomm/dragonboard410c/ |
H A D | dragonboard410c.c | 1 // SPDX-License-Identifier: GPL-2.0+ 34 gd->ram_size = PHYS_SDRAM_1_SIZE; in dram_init() 41 gd->bd->bi_dram[0].start = PHYS_SDRAM_1; in dram_init_banksize() 42 gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; in dram_init_banksize() 63 /* Try to request gpios needed to start usb host on dragonboard */ in board_usb_init() 65 node = fdt_subnode_offset(gd->fdt_blob, in board_usb_init() 73 "gpios", 0, &hub_reset, 0); in board_usb_init() 75 printf("Failed to request usb_hub_reset_pm gpio.\n"); in board_usb_init() 81 node = fdt_subnode_offset(gd->fdt_blob, in board_usb_init() 89 "gpios", 0, &usb_sel, 0); in board_usb_init() [all …]
|
/openbmc/linux/drivers/staging/olpc_dcon/ |
H A D | olpc_dcon_xo_1.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright © 2006-2007 Red Hat, Inc. 6 * Copyright © 2006-2007 Advanced Micro Devices, Inc. 37 static struct gpio_desc *gpios[5]; variable 46 gpios[i] = devm_gpiod_get(&dcon->client->dev, pin[i].name, in dcon_init_xo_1() 48 if (IS_ERR(gpios[i])) { in dcon_init_xo_1() 49 ret = PTR_ERR(gpios[i]); in dcon_init_xo_1() 50 pr_err("failed to request %s GPIO: %d\n", pin[i].name, in dcon_init_xo_1() 69 dcon->curr_src = cs5535_gpio_isset(OLPC_GPIO_DCON_LOAD, GPIO_OUTPUT_VAL) in dcon_init_xo_1() 72 dcon->pending_src = dcon->curr_src; in dcon_init_xo_1() [all …]
|
/openbmc/u-boot/include/ |
H A D | sysreset.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 11 SYSRESET_WARM, /* Reset CPU, keep GPIOs active */ 12 SYSRESET_COLD, /* Reset CPU and GPIOs */ 21 * request() - request a sysreset of the given type 25 * @type: Reset type to request 26 * @return -EINPROGRESS if the reset has been started and 27 * will complete soon, -EPROTONOSUPPORT if not supported 31 int (*request)(struct udevice *dev, enum sysreset_t type); member 33 * get_status() - get printable reset status information 38 * @return 0 if OK, -ve on error [all …]
|
/openbmc/u-boot/drivers/gpio/ |
H A D | Kconfig | 14 particular GPIOs that they provide. The uclass interface 15 is defined in include/asm-generic/gpio.h. 24 is a mechanism providing automatic GPIO request and config- 25 uration as part of the gpio-controller's driver probe function. 34 is a mechanism providing automatic GPIO request and config- 35 uration as part of the gpio-controller's driver probe function. 64 lines. Each I/O line may be dedicated as a general-purpose 68 responsible for the general-purpose I/O. 98 95 GPIOs which can be configured from the device tree. 118 This driver supports CREG GPIOs on Synopsys HSDK SOC. [all …]
|
/openbmc/u-boot/drivers/i2c/muxes/ |
H A D | i2c-mux-gpio.c | 1 // SPDX-License-Identifier: GPL-2.0+ 11 #include <asm-generic/gpio.h> 22 * struct i2c_mux_gpio_priv - private data for i2c mux gpio 26 * @gpios: the mux-gpios array 27 * @n_gpios: num of gpios in mux-gpios 28 * @idle: the value of idle-state 33 struct gpio_desc *gpios; member 45 for (i = 0; i < priv->n_gpios; i++) { in i2c_mux_gpio_select() 46 ret = dm_gpio_set_value(&priv->gpios[i], (channel >> i) & 1); in i2c_mux_gpio_select() 60 for (i = 0; i < priv->n_gpios; i++) { in i2c_mux_gpio_deselect() [all …]
|
/openbmc/linux/drivers/bus/ |
H A D | ts-nbus.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * NBUS driver for TS-4600 based boards 5 * Copyright (c) 2016 - Savoir-faire Linux 8 * This driver implements a GPIOs bit-banged bus, called the NBUS by Technologic 10 * TS-4600 SoM. 21 #include <linux/ts-nbus.h> 40 * request all gpios required by the bus. 45 ts_nbus->data = devm_gpiod_get_array(&pdev->dev, "ts,data", in ts_nbus_init_pdata() 47 if (IS_ERR(ts_nbus->data)) { in ts_nbus_init_pdata() 48 dev_err(&pdev->dev, "failed to retrieve ts,data-gpio from dts\n"); in ts_nbus_init_pdata() [all …]
|
/openbmc/phosphor-host-postd/ipmisnoop/ |
H A D | ipmisnoop.cpp | 30 // Configure the seven segment display connected GPIOs direction 52 return -1; in configGPIODirOutput() 56 // Request GPIO output to specified value in configGPIODirOutput() 59 gpioLine.request({__FUNCTION__, in configGPIODirOutput() 66 std::string errMsg = "Failed to request " + gpioStr + " output"; in configGPIODirOutput() 68 return -1; in configGPIODirOutput() 80 // split byte to write into GPIOs in postCodeDisplay() 112 posVal = std::get<size_t>(valPropMap->second); in getSelectorPositionSignal() 117 postcodes = reporters[posVal - 1]->value(); in getSelectorPositionSignal() 130 // handle muti-host D-bus [all …]
|
/openbmc/linux/drivers/extcon/ |
H A D | extcon-intel-int3496.c | 1 // SPDX-License-Identifier: GPL-2.0 14 #include <linux/devm-helpers.h> 15 #include <linux/extcon-provider.h> 53 { "id-gpios", &id_gpios, 1, ACPI_GPIO_QUIRK_NO_IO_RESTRICTION }, 54 { "vbus-gpios", &vbus_gpios, 1 }, 55 { "mux-gpios", &mux_gpios, 1 }, 63 if (IS_ERR_OR_NULL(data->vbus_boost)) in int3496_set_vbus_boost() 66 if (data->vbus_boost_enabled == enable) in int3496_set_vbus_boost() 70 ret = regulator_enable(data->vbus_boost); in int3496_set_vbus_boost() 72 ret = regulator_disable(data->vbus_boost); in int3496_set_vbus_boost() [all …]
|
/openbmc/linux/drivers/watchdog/ |
H A D | mena21_wdt.c | 1 // SPDX-License-Identifier: GPL-2.0+ 34 struct gpio_desc *gpios[NUM_GPIOS]; member 46 reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST0]) ? (1 << 0) : 0; in a21_wdt_get_bootstatus() 47 reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST1]) ? (1 << 1) : 0; in a21_wdt_get_bootstatus() 48 reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST2]) ? (1 << 2) : 0; in a21_wdt_get_bootstatus() 57 gpiod_set_value(drv->gpios[GPIO_WD_ENAB], 1); in a21_wdt_start() 66 gpiod_set_value(drv->gpios[GPIO_WD_ENAB], 0); in a21_wdt_stop() 75 gpiod_set_value(drv->gpios[GPIO_WD_TRIG], 0); in a21_wdt_ping() 77 gpiod_set_value(drv->gpios[GPIO_WD_TRIG], 1); in a21_wdt_ping() 88 dev_err(wdt->parent, "Only 1 and 30 allowed as timeout\n"); in a21_wdt_set_timeout() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/net/ |
H A D | fsl,fec.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Shawn Guo <shawnguo@kernel.org> 11 - Wei Fang <wei.fang@nxp.com> 12 - NXP Linux Team <linux-imx@nxp.com> 15 - $ref: ethernet-controller.yaml# 20 - enum: 21 - fsl,imx25-fec 22 - fsl,imx27-fec [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/power/reset/ |
H A D | gpio-restart.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/power/reset/gpio-restart.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Sebastian Reichel <sre@kernel.org> 16 request the given gpio line and install a restart handler. If the optional properties 17 'open-source' is not found, the GPIO line will be driven in the inactive state. Otherwise its 22 This will also cause an inactive->active edge condition, triggering positive edge triggered 23 reset. After a delay specified by active-delay, the GPIO is set to inactive, thus causing an 24 active->inactive edge, triggering negative edge triggered reset. After a delay specified by [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/i2c/ |
H A D | i2c-imx.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/i2c/i2c-imx.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Freescale Inter IC (I2C) and High Speed Inter IC (HS-I2C) for i.MX 10 - Oleksij Rempel <o.rempel@pengutronix.de> 13 - $ref: /schemas/i2c/i2c-controller.yaml# 18 - const: fsl,imx1-i2c 19 - const: fsl,imx21-i2c 20 - const: fsl,vf610-i2c [all …]
|