/linux-6.12.1/drivers/gpio/ ! |
D | gpio-en7523.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 #include <linux/gpio/driver.h> 15 * struct airoha_gpio_ctrl - Airoha GPIO driver data 18 * @dir: [0] The direction register for the lower 16 pins. 25 void __iomem *dir[2]; member 34 static int airoha_dir_set(struct gpio_chip *gc, unsigned int gpio, in airoha_dir_set() argument 38 u32 dir = ioread32(ctrl->dir[gpio / 16]); in airoha_dir_set() local 39 u32 output = ioread32(ctrl->output); in airoha_dir_set() 40 u32 mask = BIT((gpio % 16) * 2); in airoha_dir_set() 43 dir |= mask; in airoha_dir_set() [all …]
|
D | gpio-clps711x.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * CLPS711X GPIO driver 10 #include <linux/gpio/driver.h> 15 struct device_node *np = pdev->dev.of_node; in clps711x_gpio_probe() 16 void __iomem *dat, *dir; in clps711x_gpio_probe() local 21 return -ENODEV; in clps711x_gpio_probe() 23 id = of_alias_get_id(np, "gpio"); in clps711x_gpio_probe() 25 return -ENODEV; in clps711x_gpio_probe() 27 gc = devm_kzalloc(&pdev->dev, sizeof(*gc), GFP_KERNEL); in clps711x_gpio_probe() 29 return -ENOMEM; in clps711x_gpio_probe() [all …]
|
D | gpio-xilinx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Xilinx gpio driver for xps/axi_gpio IP. 5 * Copyright 2008 - 2013 Xilinx, Inc. 12 #include <linux/gpio/driver.h> 35 /* Read/Write access to the GPIO registers */ 45 * struct xgpio_instance - Stores information about GPIO device 46 * @gc: GPIO chip 48 * @hw_map: GPIO pin mapping on hardware side 49 * @sw_map: GPIO pin mapping on software side 50 * @state: GPIO write state shadow register [all …]
|
D | gpio-dln2.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Driver for the Diolan DLN-2 USB-GPIO adapter 15 #include <linux/gpio/driver.h> 48 struct gpio_chip gpio; member 56 /* active IRQs - not synced to hardware */ 58 /* active IRQS - synced to hardware */ 83 return -EPROTO; in dln2_gpio_get_pin_count() 94 return dln2_transfer_tx(dln2->pdev, cmd, &req, sizeof(req)); in dln2_gpio_pin_cmd() 106 ret = dln2_transfer(dln2->pdev, cmd, &req, sizeof(req), &rsp, &len); in dln2_gpio_pin_val() 110 return -EPROTO; in dln2_gpio_pin_val() [all …]
|
D | gpio-f7188x.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * GPIO driver for Fintek and Nuvoton Super-I/O chips 5 * Copyright (C) 2010-2013 LaCie 10 #define DRVNAME "gpio-f7188x" 17 #include <linux/gpio/driver.h> 21 * Super-I/O registers 26 #define SIO_UNLOCK_KEY 0x87 /* Key to enable Super-I/O */ 27 #define SIO_LOCK_KEY 0xAA /* Key to disable Super-I/O */ 46 #define SIO_LD_GPIO_FINTEK 0x06 /* GPIO logical device */ 53 #define SIO_LD_GPIO_NUVOTON 0x07 /* GPIO logical device */ [all …]
|
D | gpio-davinci.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * TI DaVinci GPIO Support 5 * Copyright (c) 2006-2007 David Brownell 9 #include <linux/gpio/driver.h> 30 u32 dir; member 44 #define BINTEN 0x8 /* GPIO Interrupt Per-Bank Enable Register */ 58 /* Serialize access to GPIO registers */ 67 static inline u32 __gpio_mask(unsigned gpio) in __gpio_mask() argument 69 return 1 << (gpio % 32); in __gpio_mask() 83 /*--------------------------------------------------------------------------*/ [all …]
|
D | gpio-mockup.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * GPIO Testing Device Driver 6 * Copyright (C) 2015-2016 Bamvor Jian Zhang <bamv2005@gmail.com> 15 #include <linux/gpio/driver.h> 31 * We're storing two values per chip: the GPIO base and the number 32 * of GPIO lines. 39 * struct gpio_pin_status - structure describing a GPIO status 40 * @dir: Configures direction of gpio as "in" or "out" 41 * @value: Configures status of the gpio as 0(low) or 1(high) 42 * @pull: Configures the current pull of the GPIO as 0 (pull-down) or [all …]
|
D | gpio-lpc18xx.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * GPIO driver for NXP LPC18xx/43xx. 11 #include <linux/gpio/driver.h> 21 /* LPC18xx GPIO register offsets */ 27 /* LPC18xx GPIO pin interrupt controller register offsets */ 48 struct gpio_chip gpio; member 57 u32 val = readl_relaxed(ic->base + LPC18XX_GPIO_PIN_IC_ISEL); in lpc18xx_gpio_pin_ic_isel() 64 writel_relaxed(val, ic->base + LPC18XX_GPIO_PIN_IC_ISEL); in lpc18xx_gpio_pin_ic_isel() 70 writel_relaxed(BIT(pin), ic->base + reg); in lpc18xx_gpio_pin_ic_set() 75 struct lpc18xx_gpio_pin_ic *ic = d->chip_data; in lpc18xx_gpio_pin_ic_mask() [all …]
|
D | gpio-virtuser.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Configurable virtual GPIO consumer module. 5 * Copyright (C) 2023-2024 Bartosz Golaszewski <bartosz.golaszewski@linaro.org> 19 #include <linux/gpio/consumer.h> 20 #include <linux/gpio/machine.h> 77 int dir; member 98 init_completion(&ctx->work_completion); in gpio_virtuser_init_irq_work_context() 104 irq_work_queue(&ctx->work); in gpio_virtuser_irq_work_queue_sync() 105 wait_for_completion(&ctx->work_completion); in gpio_virtuser_irq_work_queue_sync() 124 struct gpio_descs *descs = ctx->descs; in gpio_virtuser_get_value_array_atomic() [all …]
|
D | gpio-zevio.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * GPIO controller in LSI ZEVIO SoCs. 5 * Author: Fabian Vogt <fabian@ritter-vogt.de> 17 #include <linux/gpio/driver.h> 21 * This chip has four gpio sections, each controls 8 GPIOs. 22 * Bit 0 in section 0 is GPIO 0, bit 2 in section 1 is GPIO 10. 25 …tp://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports#90000000_-_General_Purpose_I.2FO_… 27 * 0x00-0x3F: Section 0 28 * +0x00: Masked interrupt status (read-only) 31 * +0x0C: W: Unmask interrupt (write-only) [all …]
|
/linux-6.12.1/Documentation/devicetree/bindings/gpio/ ! |
D | gpio-ep9301.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/gpio/gpio-ep9301.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: EP93xx GPIO controller 10 - Linus Walleij <linus.walleij@linaro.org> 11 - Bartosz Golaszewski <brgl@bgdev.pl> 12 - Nikita Shubin <nikita.shubin@maquefel.me> 17 - const: cirrus,ep9301-gpio 18 - items: [all …]
|
/linux-6.12.1/include/dt-bindings/sound/ ! |
D | cs35l45.h | 1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 3 * cs35l45.h -- CS35L45 ALSA SoC audio driver DT bindings header 12 * cirrus,asp-sdout-hiz-ctrl 14 * TX_HIZ_UNUSED: TX pin high-impedance during unused slots. 15 * TX_HIZ_DISABLED: TX pin high-impedance when all channels disabled. 21 * Optional GPIOX Sub-nodes: 22 * The cs35l45 node can have up to three "cirrus,gpio-ctrlX" ('X' = [1,2,3]) 23 * sub-nodes for configuring the GPIO pins. 25 * - gpio-dir : GPIO pin direction. Valid only when 'gpio-ctrl' 30 * - gpio-lvl : GPIO level. Valid only when 'gpio-ctrl' is 1 and 'gpio-dir' is 0. [all …]
|
/linux-6.12.1/Documentation/devicetree/bindings/sound/ ! |
D | cirrus,cs35l45.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Ricardo Rivera-Matos <rriveram@opensource.cirrus.com> 11 - Richard Fitzgerald <rf@opensource.cirrus.com> 18 - $ref: dai-common.yaml# 23 - cirrus,cs35l45 31 '#sound-dai-cells': 34 reset-gpios: 37 vdd-a-supply: [all …]
|
/linux-6.12.1/arch/m68k/coldfire/ ! |
D | gpio.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Coldfire generic GPIO support. 12 #include <linux/gpio/driver.h> 19 int __mcfgpio_get_value(unsigned gpio) in __mcfgpio_get_value() argument 21 return mcfgpio_read(__mcfgpio_ppdr(gpio)) & mcfgpio_bit(gpio); in __mcfgpio_get_value() 25 void __mcfgpio_set_value(unsigned gpio, int value) in __mcfgpio_set_value() argument 27 if (gpio < MCFGPIO_SCR_START) { in __mcfgpio_set_value() 32 data = mcfgpio_read(__mcfgpio_podr(gpio)); in __mcfgpio_set_value() 34 data |= mcfgpio_bit(gpio); in __mcfgpio_set_value() 36 data &= ~mcfgpio_bit(gpio); in __mcfgpio_set_value() [all …]
|
/linux-6.12.1/arch/arm/boot/dts/cirrus/ ! |
D | ep93xx.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 5 #include <dt-bindings/gpio/gpio.h> 6 #include <dt-bindings/leds/common.h> 7 #include <dt-bindings/input/input.h> 8 #include <dt-bindings/clock/cirrus,ep9301-syscon.h> 11 compatible = "simple-bus"; 13 #address-cells = <1>; 14 #size-cells = <1>; 17 compatible = "cirrus,ep9301-syscon", "syscon"; 20 #clock-cells = <1>; [all …]
|
/linux-6.12.1/Documentation/devicetree/bindings/mmc/ ! |
D | arm,pl18x.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Linus Walleij <linus.walleij@linaro.org> 11 - Ulf Hansson <ulf.hansson@linaro.org> 20 - $ref: /schemas/arm/primecell.yaml# 21 - $ref: mmc-controller.yaml# 29 - arm,pl180 30 - arm,pl181 31 - arm,pl18x [all …]
|
/linux-6.12.1/drivers/mfd/ ! |
D | wm8350-gpio.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * wm8350-core.c -- Device access for Wolfson WM8350 15 #include <linux/mfd/wm8350/gpio.h> 18 static int gpio_set_dir(struct wm8350 *wm8350, int gpio, int dir) in gpio_set_dir() argument 23 if (dir == WM8350_GPIO_DIR_OUT) in gpio_set_dir() 26 1 << gpio); in gpio_set_dir() 30 1 << gpio); in gpio_set_dir() 35 static int wm8350_gpio_set_debounce(struct wm8350 *wm8350, int gpio, int db) in wm8350_gpio_set_debounce() argument 39 1 << gpio); in wm8350_gpio_set_debounce() 42 WM8350_GPIO_DEBOUNCE, 1 << gpio); in wm8350_gpio_set_debounce() [all …]
|
/linux-6.12.1/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/ ! |
D | nv10.c | 29 nv10_gpio_sense(struct nvkm_gpio *gpio, int line) in nv10_gpio_sense() argument 31 struct nvkm_device *device = gpio->subdev.device; in nv10_gpio_sense() 38 line = (line - 2) * 4; in nv10_gpio_sense() 43 line = (line - 10) * 4; in nv10_gpio_sense() 48 return -EINVAL; in nv10_gpio_sense() 52 nv10_gpio_drive(struct nvkm_gpio *gpio, int line, int dir, int out) in nv10_gpio_drive() argument 54 struct nvkm_device *device = gpio->subdev.device; in nv10_gpio_drive() 61 data = (dir << 4) | out; in nv10_gpio_drive() 64 line = (line - 2) * 4; in nv10_gpio_drive() 67 data = (dir << 1) | out; in nv10_gpio_drive() [all …]
|
D | base.c | 29 nvkm_gpio_drive(struct nvkm_gpio *gpio, int idx, int line, int dir, int out) in nvkm_gpio_drive() argument 31 return gpio->func->drive(gpio, line, dir, out); in nvkm_gpio_drive() 35 nvkm_gpio_sense(struct nvkm_gpio *gpio, int idx, int line) in nvkm_gpio_sense() argument 37 return gpio->func->sense(gpio, line); in nvkm_gpio_sense() 41 nvkm_gpio_reset(struct nvkm_gpio *gpio, u8 func) in nvkm_gpio_reset() argument 43 if (gpio->func->reset) in nvkm_gpio_reset() 44 gpio->func->reset(gpio, func); in nvkm_gpio_reset() 48 nvkm_gpio_find(struct nvkm_gpio *gpio, int idx, u8 tag, u8 line, in nvkm_gpio_find() argument 51 struct nvkm_device *device = gpio->subdev.device; in nvkm_gpio_find() 52 struct nvkm_bios *bios = device->bios; in nvkm_gpio_find() [all …]
|
/linux-6.12.1/arch/powerpc/platforms/8xx/ ! |
D | cpm1.c | 1 // SPDX-License-Identifier: GPL-2.0 27 #include <linux/dma-mapping.h> 48 #include <linux/gpio/legacy-of-mm-gpiochip.h> 58 cpmp = &mpc8xx_immr->im_cpm; in cpm_reset() 62 out_be16(&cpmp->cp_cpcr, CPM_CR_RST | CPM_CR_FLG); in cpm_reset() 65 while (in_be16(&cpmp->cp_cpcr) & CPM_CR_FLG); in cpm_reset() 80 out_be32(&mpc8xx_immr->im_siu_conf.sc_sdcr, 0x40); in cpm_reset() 82 out_be32(&mpc8xx_immr->im_siu_conf.sc_sdcr, 1); in cpm_reset() 95 return -EINVAL; in cpm_command() 100 out_be16(&cpmp->cp_cpcr, command | CPM_CR_FLG | (opcode << 8)); in cpm_command() [all …]
|
/linux-6.12.1/drivers/pinctrl/ ! |
D | pinctrl-stmfx.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Driver for STMicroelectronics Multi-Function eXpander (STMFX) GPIO expander 8 #include <linux/gpio/driver.h> 20 #include "pinctrl-utils.h" 54 * Pins availability is managed thanks to gpio-ranges property. 113 ret = regmap_read(pctl->stmfx->map, reg, &value); in stmfx_gpio_get() 124 regmap_write_bits(pctl->stmfx->map, reg + get_reg(offset), in stmfx_gpio_set() 136 ret = regmap_read(pctl->stmfx->map, reg, &val); in stmfx_gpio_get_direction() 138 * On stmfx, gpio pins direction is (0)input, (1)output. in stmfx_gpio_get_direction() 155 return regmap_write_bits(pctl->stmfx->map, reg, mask, 0); in stmfx_gpio_direction_input() [all …]
|
/linux-6.12.1/arch/arm/boot/dts/broadcom/ ! |
D | bcm47094-dlink-dir-890l.dts | 1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT 3 * Device tree for D-Link DIR-890L 4 * D-Link calls this board "WRGAC36" 5 * this router has the same looks and form factor as D-Link DIR-885L. 7 * Some differences from DIR-885L include a separate USB2 port, separate LEDs 13 * Based on the device tree for DIR-885L 18 /dts-v1/; 21 #include "bcm5301x-nand-cs0-bch1.dtsi" 24 compatible = "dlink,dir-890l", "brcm,bcm47094", "brcm,bcm4708"; 25 model = "D-Link DIR-890L"; [all …]
|
/linux-6.12.1/arch/mips/bcm63xx/ ! |
D | gpio.c | 7 * Copyright (C) 2008-2011 Florian Fainelli <florian@openwrt.org> 14 #include <linux/gpio/driver.h> 39 unsigned gpio, int val) in bcm63xx_gpio_set() argument 46 BUG_ON(gpio >= chip->ngpio); in bcm63xx_gpio_set() 48 if (gpio < 32) { in bcm63xx_gpio_set() 50 mask = 1 << gpio; in bcm63xx_gpio_set() 54 mask = 1 << (gpio - 32); in bcm63xx_gpio_set() 67 static int bcm63xx_gpio_get(struct gpio_chip *chip, unsigned gpio) in bcm63xx_gpio_get() argument 72 BUG_ON(gpio >= chip->ngpio); in bcm63xx_gpio_get() 74 if (gpio < 32) { in bcm63xx_gpio_get() [all …]
|
/linux-6.12.1/tools/gpio/ ! |
D | Makefile | 1 # SPDX-License-Identifier: GPL-2.0 6 # This will work when gpio is built in tools env. where srctree 11 srctree := $(patsubst %/,%,$(dir $(CURDIR))) 12 srctree := $(patsubst %/,%,$(dir $(srctree))) 15 # Do not use make's built-in rules 16 # (this improves performance and avoids hard-to-debug behaviour); 17 MAKEFLAGS += -r 19 override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include 21 ALL_TARGETS := lsgpio gpio-hammer gpio-event-mon gpio-watch 32 $(OUTPUT)include/linux/gpio.h: ../../include/uapi/linux/gpio.h [all …]
|
/linux-6.12.1/arch/mips/kernel/ ! |
D | gpio_txx9.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * A gpio chip driver for TXx9 SoCs 10 #include <linux/gpio/driver.h> 21 return !!(__raw_readl(&txx9_pioptr->din) & (1 << offset)); in txx9_gpio_get() 27 val = __raw_readl(&txx9_pioptr->dout); in txx9_gpio_set_raw() 32 __raw_writel(val, &txx9_pioptr->dout); in txx9_gpio_set_raw() 49 __raw_writel(__raw_readl(&txx9_pioptr->dir) & ~(1 << offset), in txx9_gpio_dir_in() 50 &txx9_pioptr->dir); in txx9_gpio_dir_in() 62 __raw_writel(__raw_readl(&txx9_pioptr->dir) | (1 << offset), in txx9_gpio_dir_out() 63 &txx9_pioptr->dir); in txx9_gpio_dir_out() [all …]
|