Home
last modified time | relevance | path

Searched refs:gpio (Results 1 – 25 of 2852) sorted by relevance

12345678910>>...115

/linux/drivers/gpu/drm/amd/display/dc/gpio/
H A Dgpio_base.c53 struct gpio *gpio, in dal_gpio_open() argument
56 return dal_gpio_open_ex(gpio, mode); in dal_gpio_open()
60 struct gpio *gpio, in dal_gpio_open_ex() argument
63 if (gpio->pin) { in dal_gpio_open_ex()
69 if (!gpio->hw_container.ddc) { in dal_gpio_open_ex()
73 gpio->mode = mode; in dal_gpio_open_ex()
75 return dal_gpio_service_open(gpio); in dal_gpio_open_ex()
79 const struct gpio *gpio, in dal_gpio_get_value() argument
82 if (!gpio->pin) { in dal_gpio_get_value()
87 return gpio->pin->funcs->get_value(gpio->pin, value); in dal_gpio_get_value()
[all …]
/linux/drivers/gpio/
H A DMakefile16 obj-$(CONFIG_GPIO_REGMAP) += gpio-regmap.o
17 obj-$(CONFIG_GPIO_GENERIC) += gpio-generic.o
20 gpio-generic-$(CONFIG_GPIO_GENERIC) += gpio-mmio.o
22 obj-$(CONFIG_GPIO_104_DIO_48E) += gpio-104-dio-48e.o
23 obj-$(CONFIG_GPIO_104_IDI_48) += gpio-104-idi-48.o
24 obj-$(CONFIG_GPIO_104_IDIO_16) += gpio-104-idio-16.o
25 obj-$(CONFIG_GPIO_74X164) += gpio-74x164.o
26 obj-$(CONFIG_GPIO_74XX_MMIO) += gpio-74xx-mmio.o
27 obj-$(CONFIG_GPIO_ADNP) += gpio-adnp.o
28 obj-$(CONFIG_GPIO_ADP5520) += gpio-adp5520.o
[all …]
H A Dgpio-aspeed.c223 void (*reg_bit_set)(struct aspeed_gpio *gpio, unsigned int offset,
225 bool (*reg_bit_get)(struct aspeed_gpio *gpio, unsigned int offset,
227 int (*reg_bank_get)(struct aspeed_gpio *gpio, unsigned int offset,
229 void (*privilege_ctrl)(struct aspeed_gpio *gpio, unsigned int offset, int owner);
230 void (*privilege_init)(struct aspeed_gpio *gpio);
231 bool (*copro_request)(struct aspeed_gpio *gpio, unsigned int offset);
232 void (*copro_release)(struct aspeed_gpio *gpio, unsigned int offset);
255 static void __iomem *aspeed_gpio_g4_bank_reg(struct aspeed_gpio *gpio, in aspeed_gpio_g4_bank_reg() argument
261 return gpio->base + bank->val_regs + GPIO_VAL_VALUE; in aspeed_gpio_g4_bank_reg()
263 return gpio->base + bank->rdata_reg; in aspeed_gpio_g4_bank_reg()
[all …]
H A Dgpio-regmap.c33 int (*reg_mask_xlate)(struct gpio_regmap *gpio, unsigned int base,
48 static int gpio_regmap_simple_xlate(struct gpio_regmap *gpio, in gpio_regmap_simple_xlate() argument
52 unsigned int line = offset % gpio->ngpio_per_reg; in gpio_regmap_simple_xlate()
53 unsigned int stride = offset / gpio->ngpio_per_reg; in gpio_regmap_simple_xlate()
55 *reg = base + stride * gpio->reg_stride; in gpio_regmap_simple_xlate()
63 struct gpio_regmap *gpio = gpiochip_get_data(chip); in gpio_regmap_get() local
68 if (gpio->reg_dat_base) in gpio_regmap_get()
69 base = gpio_regmap_addr(gpio->reg_dat_base); in gpio_regmap_get()
71 base = gpio_regmap_addr(gpio->reg_set_base); in gpio_regmap_get()
73 ret = gpio->reg_mask_xlate(gpio, base, offset, &reg, &mask); in gpio_regmap_get()
[all …]
H A Dgpio-npcm-sgpio.c137 static void __iomem *bank_reg(struct npcm_sgpio *gpio, in bank_reg() argument
143 return gpio->base + bank->rdata_reg; in bank_reg()
145 return gpio->base + bank->wdata_reg; in bank_reg()
147 return gpio->base + bank->event_config; in bank_reg()
149 return gpio->base + bank->event_status; in bank_reg()
152 dev_WARN(gpio->chip.parent, "Getting here is an error condition"); in bank_reg()
165 struct npcm_sgpio **gpio, in npcm_sgpio_irqd_to_data() argument
174 *gpio = internal; in npcm_sgpio_irqd_to_data()
180 static int npcm_sgpio_init_port(struct npcm_sgpio *gpio) in npcm_sgpio_init_port() argument
184 in_port = GPIO_BANK(gpio->nin_sgpio); in npcm_sgpio_init_port()
[all …]
H A Dgpio-zynq.c163 static int zynq_gpio_is_zynq(struct zynq_gpio *gpio) in zynq_gpio_is_zynq() argument
165 return !!(gpio->p_data->quirks & ZYNQ_GPIO_QUIRK_IS_ZYNQ); in zynq_gpio_is_zynq()
174 static int gpio_data_ro_bug(struct zynq_gpio *gpio) in gpio_data_ro_bug() argument
176 return !!(gpio->p_data->quirks & GPIO_QUIRK_DATA_RO_BUG); in gpio_data_ro_bug()
194 struct zynq_gpio *gpio) in zynq_gpio_get_bank_pin() argument
198 for (bank = 0; bank < gpio->p_data->max_bank; bank++) { in zynq_gpio_get_bank_pin()
199 if ((pin_num >= gpio->p_data->bank_min[bank]) && in zynq_gpio_get_bank_pin()
200 (pin_num <= gpio->p_data->bank_max[bank])) { in zynq_gpio_get_bank_pin()
203 gpio->p_data->bank_min[bank]; in zynq_gpio_get_bank_pin()
206 if (gpio->p_data->quirks & GPIO_QUIRK_VERSAL) in zynq_gpio_get_bank_pin()
[all …]
H A Dgpio-pca9570.c44 static int pca9570_read(struct pca9570 *gpio, u8 *value) in pca9570_read() argument
46 struct i2c_client *client = to_i2c_client(gpio->chip.parent); in pca9570_read()
49 if (gpio->chip_data->command != 0) in pca9570_read()
50 ret = i2c_smbus_read_byte_data(client, gpio->chip_data->command); in pca9570_read()
61 static int pca9570_write(struct pca9570 *gpio, u8 value) in pca9570_write() argument
63 struct i2c_client *client = to_i2c_client(gpio->chip.parent); in pca9570_write()
65 if (gpio->chip_data->command != 0) in pca9570_write()
66 return i2c_smbus_write_byte_data(client, gpio->chip_data->command, value); in pca9570_write()
80 struct pca9570 *gpio = gpiochip_get_data(chip); in pca9570_get() local
84 ret = pca9570_read(gpio, &buffer); in pca9570_get()
[all …]
H A Dgpio-pisosr.c36 static int pisosr_gpio_refresh(struct pisosr_gpio *gpio) in pisosr_gpio_refresh() argument
40 mutex_lock(&gpio->lock); in pisosr_gpio_refresh()
42 if (gpio->load_gpio) { in pisosr_gpio_refresh()
43 gpiod_set_value_cansleep(gpio->load_gpio, 1); in pisosr_gpio_refresh()
45 gpiod_set_value_cansleep(gpio->load_gpio, 0); in pisosr_gpio_refresh()
49 ret = spi_read(gpio->spi, gpio->buffer, gpio->buffer_size); in pisosr_gpio_refresh()
51 mutex_unlock(&gpio->lock); in pisosr_gpio_refresh()
79 struct pisosr_gpio *gpio = gpiochip_get_data(chip); in pisosr_gpio_get() local
82 pisosr_gpio_refresh(gpio); in pisosr_gpio_get()
84 return (gpio->buffer[offset / 8] >> (offset % 8)) & 0x1; in pisosr_gpio_get()
[all …]
/linux/arch/mips/include/asm/mach-au1x00/
H A Dgpio-au1000.h43 struct gpio;
45 static inline int au1000_gpio1_to_irq(int gpio) in au1000_gpio1_to_irq() argument
47 return MAKE_IRQ(1, gpio - ALCHEMY_GPIO1_BASE); in au1000_gpio1_to_irq()
50 static inline int au1000_gpio2_to_irq(int gpio) in au1000_gpio2_to_irq() argument
63 static inline int au1500_gpio1_to_irq(int gpio) in au1500_gpio1_to_irq() argument
65 gpio -= ALCHEMY_GPIO1_BASE; in au1500_gpio1_to_irq()
67 switch (gpio) { in au1500_gpio1_to_irq()
70 case 23 ... 28: return MAKE_IRQ(1, gpio); in au1500_gpio1_to_irq()
76 static inline int au1500_gpio2_to_irq(int gpio) in au1500_gpio2_to_irq() argument
78 gpio -= ALCHEMY_GPIO2_BASE; in au1500_gpio2_to_irq()
[all …]
/linux/drivers/gpu/drm/amd/display/include/
H A Dgpio_interface.h32 struct gpio;
36 struct gpio *gpio,
40 struct gpio *gpio,
45 const struct gpio *gpio,
50 const struct gpio *gpio,
55 const struct gpio *gpio);
59 struct gpio *gpio,
64 struct gpio *gpio);
68 struct gpio *gpio);
72 const struct gpio *gpio);
[all …]
/linux/arch/arm/boot/dts/samsung/
H A Dexynos5410-pinctrl.dtsi12 gpa0: gpa0-gpio-bank {
13 gpio-controller;
14 #gpio-cells = <2>;
20 gpa1: gpa1-gpio-bank {
21 gpio-controller;
22 #gpio-cells = <2>;
28 gpa2: gpa2-gpio-bank {
29 gpio-controller;
30 #gpio-cells = <2>;
36 gpb0: gpb0-gpio-bank {
[all …]
/linux/arch/arc/boot/dts/
H A Dabilis_tb100.dtsi37 pctl_gpio_a: pctl-gpio-a { /* GPIO bank A */
50 pctl_gpio_c: pctl-gpio-c { /* GPIO bank C */
63 pctl_gpio_e: pctl-gpio-e { /* GPIO bank E */
76 pctl_gpio_g: pctl-gpio-g { /* GPIO bank G */
83 pctl_gpio_j: pctl-gpio-j { /* GPIO bank J */
86 pctl_gpio_k: pctl-gpio-k { /* GPIO bank K */
118 pctl_gpio_l: pctl-gpio-l { /* GPIO bank L */
121 pctl_gpio_m: pctl-gpio-m { /* GPIO bank M */
132 pctl_gpio_n: pctl-gpio-n {
136 pctl_gpio_b: pctl-gpio-b {
[all …]
H A Dabilis_tb101.dtsi37 pctl_gpio_a: pctl-gpio-a { /* GPIO bank A */
50 pctl_gpio_c: pctl-gpio-c { /* GPIO bank C */
63 pctl_gpio_e: pctl-gpio-e { /* GPIO bank E */
76 pctl_gpio_g: pctl-gpio-g { /* GPIO bank G */
83 pctl_gpio_j: pctl-gpio-j { /* GPIO bank J */
86 pctl_gpio_k: pctl-gpio-k { /* GPIO bank K */
124 pctl_gpio_l: pctl-gpio-l { /* GPIO bank L */
127 pctl_gpio_m: pctl-gpio-m { /* GPIO bank M */
141 pctl_gpio_n: pctl-gpio-n {
145 pctl_gpio_b: pctl-gpio-b {
[all …]
/linux/drivers/ssb/
H A Ddriver_gpio.c26 static int ssb_gpio_to_irq(struct gpio_chip *chip, unsigned int gpio) in ssb_gpio_to_irq() argument
31 return irq_find_mapping(bus->irq_domain, gpio); in ssb_gpio_to_irq()
41 static int ssb_gpio_chipco_get_value(struct gpio_chip *chip, unsigned int gpio) in ssb_gpio_chipco_get_value() argument
45 return !!ssb_chipco_gpio_in(&bus->chipco, 1 << gpio); in ssb_gpio_chipco_get_value()
48 static void ssb_gpio_chipco_set_value(struct gpio_chip *chip, unsigned int gpio, in ssb_gpio_chipco_set_value() argument
53 ssb_chipco_gpio_out(&bus->chipco, 1 << gpio, value ? 1 << gpio : 0); in ssb_gpio_chipco_set_value()
57 unsigned int gpio) in ssb_gpio_chipco_direction_input() argument
61 ssb_chipco_gpio_outen(&bus->chipco, 1 << gpio, 0); in ssb_gpio_chipco_direction_input()
66 unsigned int gpio, int value) in ssb_gpio_chipco_direction_output() argument
70 ssb_chipco_gpio_outen(&bus->chipco, 1 << gpio, 1 << gpio); in ssb_gpio_chipco_direction_output()
[all …]
/linux/Documentation/devicetree/bindings/pinctrl/
H A Dmarvell,armada-375-pinctrl.txt16 mpp0 0 gpio, dev(ad2), spi0(cs1), spi1(cs1)
17 mpp1 1 gpio, dev(ad3), spi0(mosi), spi1(mosi)
18 mpp2 2 gpio, dev(ad4), ptp(evreq), led(c0), audio(sdi)
19 mpp3 3 gpio, dev(ad5), ptp(trig), led(p3), audio(mclk)
20 mpp4 4 gpio, dev(ad6), spi0(miso), spi1(miso)
21 mpp5 5 gpio, dev(ad7), spi0(cs2), spi1(cs2)
22 mpp6 6 gpio, dev(ad0), led(p1), audio(lrclk)
23 mpp7 7 gpio, dev(ad1), ptp(clk), led(p2), audio(extclk)
24 mpp8 8 gpio, dev (bootcs), spi0(cs0), spi1(cs0)
25 mpp9 9 gpio, spi0(sck), spi1(sck), nand(we)
[all …]
H A Dmarvell,kirkwood-pinctrl.txt24 mpp0 0 gpio, nand(io2), spi(cs)
28 mpp4 4 gpio, nand(io6), uart0(rxd), ptp(clk)
32 mpp8 8 gpio, twsi0(sda), uart0(rts), uart1(rts), ptp(clk),
34 mpp9 9 gpio, twsi(sck), uart0(cts), uart1(cts), ptp(evreq),
37 mpp11 11 gpio, spi(miso), uart0(rxd), ptp(clk), ptp-1(evreq),
40 mpp13 13 gpio, sdio(cmd), uart1(txd)
41 mpp14 14 gpio, sdio(d0), uart1(rxd), mii(col)
42 mpp15 15 gpio, sdio(d1), uart0(rts), uart1(txd)
43 mpp16 16 gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs)
44 mpp17 17 gpio, sdio(d3)
[all …]
H A Dmarvell,armada-xp-pinctrl.txt21 mpp0 0 gpio, ge0(txclkout), lcd(d0)
22 mpp1 1 gpio, ge0(txd0), lcd(d1)
23 mpp2 2 gpio, ge0(txd1), lcd(d2)
24 mpp3 3 gpio, ge0(txd2), lcd(d3)
25 mpp4 4 gpio, ge0(txd3), lcd(d4)
26 mpp5 5 gpio, ge0(txctl), lcd(d5)
27 mpp6 6 gpio, ge0(rxd0), lcd(d6)
28 mpp7 7 gpio, ge0(rxd1), lcd(d7)
29 mpp8 8 gpio, ge0(rxd2), lcd(d8)
30 mpp9 9 gpio, ge0(rxd3), lcd(d9)
[all …]
H A Dmarvell,orion-pinctrl.txt24 mpp0 0 pcie(rstout), pci(req2), gpio
25 mpp1 1 gpio, pci(gnt2)
26 mpp2 2 gpio, pci(req3), pci-1(pme)
27 mpp3 3 gpio, pci(gnt3)
28 mpp4 4 gpio, pci(req4)
29 mpp5 5 gpio, pci(gnt4)
30 mpp6 6 gpio, pci(req5), pci-1(clk)
31 mpp7 7 gpio, pci(gnt5), pci-1(clk)
32 mpp8 8 gpio, ge(col)
33 mpp9 9 gpio, ge(rxerr)
[all …]
H A Dmarvell,armada-39x-pinctrl.txt18 mpp0 0 gpio, ua0(rxd)
19 mpp1 1 gpio, ua0(txd)
20 mpp2 2 gpio, i2c0(sck)
21 mpp3 3 gpio, i2c0(sda)
22 mpp4 4 gpio, ua1(txd), ua0(rts), smi(mdc)
23 mpp5 5 gpio, ua1(rxd), ua0(cts), smi(mdio)
24 mpp6 6 gpio, dev(cs3), xsmi(mdio)
25 mpp7 7 gpio, dev(ad9), xsmi(mdc)
26 mpp8 8 gpio, dev(ad10), ptp(trig)
27 mpp9 9 gpio, dev(ad11), ptp(clk)
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/
H A Dbase.c29 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()
80 nvkm_gpio_set(struct nvkm_gpio *gpio, int idx, u8 tag, u8 line, int state) in nvkm_gpio_set() argument
[all …]
/linux/arch/arm64/boot/dts/tesla/
H A Dfsd-pinctrl.dtsi14 gpf0: gpf0-gpio-bank {
15 gpio-controller;
16 #gpio-cells = <2>;
22 gpf1: gpf1-gpio-bank {
23 gpio-controller;
24 #gpio-cells = <2>;
30 gpf6: gpf6-gpio-bank {
31 gpio-controller;
32 #gpio-cells = <2>;
38 gpf4: gpf4-gpio-bank {
[all …]
/linux/arch/arm64/boot/dts/ti/
H A Dk3-am65-iot2050-arduino-connector.dtsi15 "d0-uart0-rxd", "d0-gpio", "d0-gpio-pullup", "d0-gpio-pulldown",
16 "d1-uart0-txd", "d1-gpio", "d1-gpio-pullup", "d1-gpio-pulldown",
17 "d2-uart0-ctsn", "d2-gpio", "d2-gpio-pullup", "d2-gpio-pulldown",
18 "d3-uart0-rtsn", "d3-gpio", "d3-gpio-pullup", "d3-gpio-pulldown",
19 "d10-spi0-cs0", "d10-gpio", "d10-gpio-pullup", "d10-gpio-pulldown",
20 "d11-spi0-d0", "d11-gpio", "d11-gpio-pullup", "d11-gpio-pulldown",
21 "d12-spi0-d1", "d12-gpio", "d12-gpio-pullup", "d12-gpio-pulldown",
22 "d13-spi0-clk", "d13-gpio", "d13-gpio-pullup", "d13-gpio-pulldown",
23 "a0-gpio", "a0-gpio-pullup", "a0-gpio-pulldown",
24 "a1-gpio", "a1-gpio-pullup", "a1-gpio-pulldown",
[all …]
/linux/arch/m68k/coldfire/
H A Dgpio.c19 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()
37 mcfgpio_write(data, __mcfgpio_podr(gpio)); in __mcfgpio_set_value()
41 mcfgpio_write(mcfgpio_bit(gpio), in __mcfgpio_set_value()
42 MCFGPIO_SETR_PORT(gpio)); in __mcfgpio_set_value()
[all …]
/linux/arch/arm/boot/dts/aspeed/
H A Daspeed-bmc-opp-swift.dts4 #include <dt-bindings/gpio/aspeed-gpio.h>
38 gpio-keys {
39 compatible = "gpio-keys";
43 gpios = <&gpio ASPEED_GPIO(B, 5) GPIO_ACTIVE_LOW>;
49 gpios = <&gpio ASPEED_GPIO(J, 2) GPIO_ACTIVE_LOW>;
55 gpios = <&gpio ASPEED_GPIO(R, 7) GPIO_ACTIVE_LOW>;
61 gpios = <&gpio ASPEED_GPIO(N, 0) GPIO_ACTIVE_LOW>;
67 gpios = <&gpio ASPEED_GPIO(A, 7) GPIO_ACTIVE_LOW>;
73 gpios = <&gpio ASPEED_GPIO(I, 0) GPIO_ACTIVE_LOW>;
83 gpio-keys-polled {
[all …]
/linux/arch/arm/boot/dts/intel/pxa/
H A Dpxa3xx.dtsi5 #define MFP_PIN_PXA300(gpio) \ argument
6 ((gpio <= 2) ? (0x00b4 + 4 * gpio) : \
7 (gpio <= 26) ? (0x027c + 4 * (gpio - 3)) : \
8 (gpio <= 98) ? (0x0400 + 4 * (gpio - 27)) : \
9 (gpio <= 127) ? (0x0600 + 4 * (gpio - 99)) : \
11 #define MFP_PIN_PXA300_2(gpio) \ argument
12 ((gpio <= 1) ? (0x674 + 4 * gpio) : \
13 (gpio <= 6) ? (0x2dc + 4 * gpio) : \
16 #define MFP_PIN_PXA310(gpio) \ argument
17 ((gpio <= 2) ? (0x00b4 + 4 * gpio) : \
[all …]

12345678910>>...115