| /OK3568_Linux_fs/kernel/drivers/tty/serial/ |
| H A D | serial_mctrl_gpio.c | 1 // SPDX-License-Identifier: GPL-2.0+ 10 #include <linux/irq.h> 22 int irq[UART_GPIO_MAX]; member 45 void mctrl_gpio_set(struct mctrl_gpios *gpios, unsigned int mctrl) in mctrl_gpio_set() argument 52 if (gpios == NULL) in mctrl_gpio_set() 56 if (gpios->gpio[i] && mctrl_gpio_flags_is_dir_out(i)) { in mctrl_gpio_set() 57 desc_array[count] = gpios->gpio[i]; in mctrl_gpio_set() 66 struct gpio_desc *mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios, in mctrl_gpio_to_gpiod() argument 69 if (gpios == NULL) in mctrl_gpio_to_gpiod() 72 return gpios->gpio[gidx]; in mctrl_gpio_to_gpiod() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/hsi/clients/ |
| H A D | nokia-modem.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * nokia-modem.c 33 struct nokia_modem_gpio *gpios; member 46 dev_info(modem->device, "CMT rst line change detected\n"); in do_nokia_modem_rst_ind_tasklet() 48 if (modem->ssi_protocol) in do_nokia_modem_rst_ind_tasklet() 49 ssip_reset_event(modem->ssi_protocol); in do_nokia_modem_rst_ind_tasklet() 52 static irqreturn_t nokia_modem_rst_ind_isr(int irq, void *data) in nokia_modem_rst_ind_isr() argument 56 tasklet_schedule(&modem->nokia_modem_rst_ind_tasklet); in nokia_modem_rst_ind_isr() 66 for (i = 0; i < modem->gpio_amount; i++) { in nokia_modem_gpio_unexport() 67 sysfs_remove_link(&dev->kobj, modem->gpios[i].name); in nokia_modem_gpio_unexport() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/input/misc/ |
| H A D | rotary_encoder.c | 1 // SPDX-License-Identifier: GPL-2.0-only 11 * See file:Documentation/input/devices/rotary-encoder.rst for more information 26 #define DRV_NAME "rotary-encoder" 46 struct gpio_descs *gpios; member 48 unsigned int *irq; member 51 signed char dir; /* 1 - clockwise, -1 - CCW */ 61 for (i = 0; i < encoder->gpios->ndescs; ++i) { in rotary_encoder_get_state() 62 int val = gpiod_get_value_cansleep(encoder->gpios->desc[i]); in rotary_encoder_get_state() 65 if (encoder->encoding == ROTENC_GRAY && ret & 1) in rotary_encoder_get_state() 76 if (encoder->relative_axis) { in rotary_encoder_report_event() [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/driver-api/gpio/ |
| 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 …]
|
| H A D | consumer.rst | 6 it describes the new descriptor-based interface. For a description of the 7 deprecated integer-based GPIO interface please refer to gpio-legacy.txt. 10 Guidelines for GPIOs consumers 15 obtain and use GPIOs are available by including the following file: 23 - Simple compile coverage with e.g. COMPILE_TEST - it does not matter that 27 - Truly optional GPIOLIB support - where the driver does not really make use 28 of the GPIOs on certain compile-time configurations for certain systems, but 29 will use it under other compile-time configurations. In this case the 33 All the functions that work with the descriptor-based GPIO interface are 40 Obtaining and Disposing GPIOs [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpio/ |
| H A D | gpio-davinci.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (c) 2006-2007 David Brownell 15 #include <linux/irq.h> 22 #include <linux/platform_data/gpio-davinci.h> 26 #include <asm-generic/gpio.h> 44 typedef struct irq_chip *(*gpio_get_irq_chip_cb_t)(unsigned int irq); 46 #define BINTEN 0x8 /* GPIO Interrupt Per-Bank Enable Register */ 83 /*--------------------------------------------------------------------------*/ 96 g = d->regs[bank]; in __davinci_direction() 97 spin_lock_irqsave(&d->lock, flags); in __davinci_direction() [all …]
|
| H A D | gpiolib.c | 1 // SPDX-License-Identifier: GPL-2.0 6 #include <linux/irq.h> 26 #include "gpiolib-of.h" 27 #include "gpiolib-acpi.h" 28 #include "gpiolib-cdev.h" 29 #include "gpiolib-sysfs.h" 38 * The GPIO programming interface allows for inlining speed-critical 39 * get/set operations for common cases, so that access to SOC-integrated 40 * GPIOs can sometimes cost only an instruction or two per bit. 56 /* Device and char device-related information */ [all …]
|
| H A D | gpiolib-acpi.c | 1 // SPDX-License-Identifier: GPL-2.0 22 #include "gpiolib-acpi.h" 24 static int run_edge_events_on_boot = -1; 27 "Run edge _AEI event-handlers at boot: 0=no, 1=yes, -1=auto"); 41 * struct acpi_gpio_event - ACPI GPIO event handler data 43 * @node: list-entry of the events list of the struct acpi_gpio_chip 44 * @handle: handle of ACPI method to execute when the IRQ triggers 45 * @handler: handler function to pass to request_irq() when requesting the IRQ 47 * @irq: Linux IRQ number for the event, for request_irq() / free_irq() 48 * @irqflags: flags to pass to request_irq() when requesting the IRQ [all …]
|
| /OK3568_Linux_fs/kernel/sound/soc/ |
| H A D | soc-jack.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // soc-jack.c -- ALSA SoC jack handling 23 struct snd_soc_jack_gpio *gpios; member 27 * snd_soc_jack_report - Report the current status for a jack 51 dapm = &jack->card->dapm; in snd_soc_jack_report() 53 mutex_lock(&jack->mutex); in snd_soc_jack_report() 55 jack->status &= ~mask; in snd_soc_jack_report() 56 jack->status |= status & mask; in snd_soc_jack_report() 60 list_for_each_entry(pin, &jack->pins, list) { in snd_soc_jack_report() 61 enable = pin->mask & jack->status; in snd_soc_jack_report() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/staging/olpc_dcon/ |
| H A D | olpc_dcon_xo_1_5.c | 1 // SPDX-License-Identifier: GPL-2.0 36 #define VX855_GENL_PURPOSE_OUTPUT 0x44c /* PMIO_Rx4c-4f */ 68 static struct gpio_desc *gpios[3]; variable 72 /* irq status will appear in PMIO_Rx50[6] (RW1C) on gpio12 */ in dcon_clear_irq() 80 /* irq status will appear in PMIO_Rx50[6] on gpio12 */ in dcon_was_irq() 88 unsigned int irq; in dcon_init_xo_1_5() local 94 gpios_table.dev_id = dev_name(&dcon->client->dev); in dcon_init_xo_1_5() 99 gpios[i] = devm_gpiod_get(&dcon->client->dev, pin[i].name, in dcon_init_xo_1_5() 101 if (IS_ERR(gpios[i])) { in dcon_init_xo_1_5() 102 ret = PTR_ERR(gpios[i]); in dcon_init_xo_1_5() [all …]
|
| 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() 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() 75 gpiod_direction_input(gpios[OLPC_DCON_STAT0]); in dcon_init_xo_1() [all …]
|
| /OK3568_Linux_fs/kernel/include/linux/gpio/ |
| H A D | driver.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 7 #include <linux/irq.h> 12 #include <linux/pinctrl/pinconf-generic.h> 30 * struct gpio_irq_chip - GPIO interrupt controller 36 * GPIO IRQ chip implementation, provided by GPIO driver. 44 * hwirq number and Linux IRQ number. 51 * Table of interrupt domain operations for this IRQ chip. 67 * If non-NULL, will be set as the parent of this GPIO interrupt 68 * controller's IRQ domain to establish a hierarchical interrupt 77 * This callback translates a child hardware IRQ offset to a parent [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/sound/ |
| H A D | ak4118.txt | 7 - compatible : "asahi-kasei,ak4118" 8 - reg : The I2C address of the device for I2C 9 - reset-gpios: A GPIO specifier for the reset pin 10 - irq-gpios: A GPIO specifier for the IRQ pin 16 #sound-dai-cells = <0>; 17 compatible = "asahi-kasei,ak4118"; 19 reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW> 20 irq-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/input/touchscreen/ |
| H A D | zforce_ts.txt | 4 - compatible: must be "neonode,zforce" 5 - reg: I2C address of the chip 6 - interrupts: interrupt to which the chip is connected 7 - reset-gpios: reset gpio the chip is connected to 8 - x-size: horizontal resolution of touchscreen 9 - y-size: vertical resolution of touchscreen 12 - irq-gpios : interrupt gpio the chip is connected to 13 - vdd-supply: Regulator controlling the controller supply 24 vdd-supply = <®_zforce_vdd>; 26 reset-gpios = <&gpio5 9 0>; /* RST */ [all …]
|
| H A D | goodix.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Dmitry Torokhov <dmitry.torokhov@gmail.com> 13 - $ref: touchscreen.yaml# 18 - goodix,gt1151 19 - goodix,gt5663 20 - goodix,gt5688 21 - goodix,gt911 22 - goodix,gt9110 [all …]
|
| /OK3568_Linux_fs/kernel/drivers/pcmcia/ |
| H A D | pxa2xx_hx4700.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #include <linux/irq.h> 12 #include <asm/mach-types.h> 17 static struct gpio gpios[] = { variable 26 ret = gpio_request_array(gpios, ARRAY_SIZE(gpios)); in hx4700_pcmcia_hw_init() 31 * IRQ type must be set before soc_pcmcia_hw_init() calls request_irq(). in hx4700_pcmcia_hw_init() 32 * The asic3 default IRQ type is level trigger low level detect, exactly in hx4700_pcmcia_hw_init() 34 * If the IRQ type is not changed, the asic3 interrupt handler will loop in hx4700_pcmcia_hw_init() 39 skt->stat[SOC_STAT_CD].gpio = GPIOD4_CF_nCD; in hx4700_pcmcia_hw_init() 40 skt->stat[SOC_STAT_CD].name = "PCMCIA CD"; in hx4700_pcmcia_hw_init() [all …]
|
| /OK3568_Linux_fs/kernel/arch/arm/boot/dts/ |
| H A D | ste-nomadik-nhk15.dts | 1 // SPDX-License-Identifier: GPL-2.0 6 /dts-v1/; 7 #include <dt-bindings/interrupt-controller/irq.h> 8 #include <dt-bindings/gpio/gpio.h> 9 #include "ste-nomadik-stn8815.dtsi" 13 compatible = "st,nomadik-nhk-15"; 22 stmpe-i2c0 = &stmpe0; 23 stmpe-i2c1 = &stmpe1; 39 pins = "GPIO76_B20"; // IRQ line 51 pins = "GPIO78_A8"; // IRQ line [all …]
|
| H A D | emev2-kzm9d.dts | 1 // SPDX-License-Identifier: GPL-2.0 7 /dts-v1/; 10 #include <dt-bindings/gpio/gpio.h> 11 #include <dt-bindings/input/input.h> 12 #include <dt-bindings/interrupt-controller/irq.h> 29 stdout-path = "serial1:115200n8"; 33 compatible = "gpio-keys"; 35 debounce-interval = <50>; 36 wakeup-source; 37 label = "DSW2-1"; [all …]
|
| H A D | exynos5250-snow-common.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <dt-bindings/gpio/gpio.h> 9 #include <dt-bindings/clock/maxim,max77686.h> 10 #include <dt-bindings/interrupt-controller/irq.h> 11 #include <dt-bindings/input/input.h> 12 #include <dt-bindings/sound/samsung-i2s.h> 27 stdout-path = "serial3:115200n8"; 30 gpio-keys { 31 compatible = "gpio-keys"; 32 pinctrl-names = "default"; [all …]
|
| H A D | s5pv210-aries.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 6 /dts-v1/; 7 #include <dt-bindings/gpio/gpio.h> 8 #include <dt-bindings/interrupt-controller/irq.h> 32 reserved-memory { 33 #address-cells = <1>; 34 #size-cells = <1>; 38 compatible = "shared-dma-pool"; 39 no-map; 44 compatible = "shared-dma-pool"; [all …]
|
| H A D | stm32mp15xx-dhcom-pdk2.dtsi | 1 // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause 3 * Copyright (C) 2019-2020 Marek Vasut <marex@denx.de> 6 #include <dt-bindings/input/input.h> 7 #include <dt-bindings/pwm/pwm.h> 17 stdout-path = "serial0:115200n8"; 20 clk_ext_audio_codec: clock-codec { 21 compatible = "fixed-clock"; 22 #clock-cells = <0>; 23 clock-frequency = <24000000>; 26 display_bl: display-bl { [all …]
|
| H A D | r8a73a4-ape6evm.dts | 1 // SPDX-License-Identifier: GPL-2.0 8 /dts-v1/; 10 #include <dt-bindings/gpio/gpio.h> 11 #include <dt-bindings/input/input.h> 23 stdout-path = "serial0:115200n8"; 36 vcc_mmc0: regulator-mmc0 { 37 compatible = "regulator-fixed"; 38 regulator-name = "MMC0 Vcc"; 39 regulator-min-microvolt = <2800000>; 40 regulator-max-microvolt = <2800000>; [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/input/ |
| H A D | key-uclass.c | 4 * SPDX-License-Identifier: GPL-2.0+ 11 #include <irq-generic.h> 14 #include <dm/uclass-internal.h> 38 return (cntpct > base) ? (cntpct - base) : 0; in key_timer() 64 if (uc_key->in_volt) { in key_adc_event() 69 debug("[%s] <%d, %d, %d>: adcval=%d -> mV=%d\n", in key_adc_event() 70 uc_key->name, uc_key->min, uc_key->center, uc_key->max, in key_adc_event() 73 return (val <= uc_key->max && val >= uc_key->min) ? in key_adc_event() 80 if (!dm_gpio_is_valid(&uc_key->gpio)) { in key_gpio_event() 81 KEY_ERR("'%s' Invalid gpio\n", uc_key->name); in key_gpio_event() [all …]
|
| /OK3568_Linux_fs/u-boot/include/ |
| H A D | key.h | 4 * SPDX-License-Identifier: GPL-2.0+ 10 #include <asm-generic/gpio.h> 11 #include <dt-bindings/input/linux-event-codes.h> 23 KEY_PRESS_DOWN, /* press -> release */ 42 u32 irq; member 43 u32 gpios[2]; /* gpios[0]: gpio controller phandle, gpios[1]: pin */ member 53 /* Only for pwrkey gpio irq */ 54 void (*irq_thread)(int irq, struct udevice *dev);
|
| /OK3568_Linux_fs/kernel/arch/arm/mach-pxa/ |
| H A D | am300epd.c | 2 * am300epd.c -- Platform device for AM300 EPD kit 10 * This work was made possible by help and equipment support from E-Ink 14 * on the AM300 EPD prototype kit/development kit with an E-Ink 800x600 28 #include <linux/irq.h> 32 #include "mfp-pxa25x.h" 34 #include <linux/platform_data/video-pxafb.h> 56 /* this is the 16-bit hdb bus 58-73 */ 94 static int gpios[] = { PWR_GPIO_PIN, CFG_GPIO_PIN, RDY_GPIO_PIN, DC_GPIO_PIN, variable 98 "CS", "IRQ", "LED" }; 103 wait_event(par->waitq, gpio_get_value(RDY_GPIO_PIN)); in am300_wait_event() [all …]
|