/Zephyr-latest/dts/bindings/haptics/ |
D | ti,drv2605.yaml | 2 # SPDX-License-Identifier: Apache-2.0 5 DRV2605 Haptic Driver for ERM and LRA with built-in library and smart-loop 10 include: i2c-device.yaml 13 actuator-mode: 17 - "ERM" 18 - "LRA" 19 feedback-brake-factor: 22 - "1X" 23 - "2X" 24 - "3X" [all …]
|
/Zephyr-latest/samples/boards/st/steval_stwinbx1/sensors/src/ |
D | main.c | 4 * SPDX-License-Identifier: Apache-2.0 22 const struct sensor_trigger *trig) in stts22h_trigger_handler() argument 32 const struct sensor_trigger *trig) in iis2dlpc_trigger_handler() argument 43 const struct sensor_trigger *trig) in iis2mdc_trigger_handler() argument 55 const struct sensor_trigger *trig) in ism330dhcx_acc_trigger_handler() argument 62 const struct sensor_trigger *trig) in ism330dhcx_gyr_trigger_handler() argument 73 const struct sensor_trigger *trig) in iis2iclx_trigger_handler() argument 95 struct sensor_trigger trig; in stts22h_config() local 97 trig.type = SENSOR_TRIG_DATA_READY; in stts22h_config() 98 trig.chan = SENSOR_CHAN_AMBIENT_TEMP; in stts22h_config() [all …]
|
/Zephyr-latest/drivers/sensor/ams/tsl2540/ |
D | tsl2540_trigger.c | 2 * Copyright (c) 2022 T-Mobile USA, Inc. 4 * SPDX-License-Identifier: Apache-2.0 14 const struct tsl2540_config *config = dev->config; in tsl2540_setup_int() 19 gpio_pin_interrupt_configure_dt(&config->int_gpio, flags); in tsl2540_setup_int() 24 struct tsl2540_data *drv_data = dev->data; in tsl2540_handle_int() 29 k_sem_give(&drv_data->trig_sem); in tsl2540_handle_int() 31 k_work_submit(&drv_data->work); in tsl2540_handle_int() 40 tsl2540_handle_int(data->dev); in tsl2540_gpio_callback() 45 const struct tsl2540_config *config = dev->config; in tsl2540_process_int() 46 struct tsl2540_data *data = dev->data; in tsl2540_process_int() [all …]
|
/Zephyr-latest/drivers/interrupt_controller/ |
D | intc_xmc4xxx.c | 4 * SPDX-License-Identifier: Apache-2.0 12 #include <zephyr/dt-bindings/interrupt-controller/infineon-xmc4xxx-intc.h> 17 /* In Infineon XMC4XXX SoCs, gpio interrupts are triggered via an Event Request Unit (ERU) */ 18 /* module. A subset of the GPIOs are connected to the ERU. The ERU monitors edge triggers */ 24 /* unset on a negative edge (or vice-versa depending on the configuration). The value of */ 28 /* The ERU configurations for supported port/pin combinations are stored in a devicetree file */ 29 /* dts/arm/infineon/xmc4xxx_x_x-intc.dtsi. The configurations are stored in the opaque array */ 30 /* uint16 port_line_mapping[]. The bitfields for the opaque entries are defined in */ 31 /* dt-bindings/interrupt-controller/infineon-xmc4xxx-intc.h. */ 56 enum gpio_int_trig trig, in intc_xmc4xxx_gpio_enable_interrupt() argument [all …]
|
/Zephyr-latest/drivers/gpio/ |
D | gpio_litex.c | 2 * Copyright (c) 2019-2021 Antmicro <www.antmicro.com> 5 * SPDX-License-Identifier: Apache-2.0 34 "Cannot handle all of the gpios with the register of given size\n"; 36 "Cannot change port direction selected in device tree\n"; 58 ((const struct gpio_litex_cfg *)(dev)->config) 67 regv = litex_read(config->reg_addr, config->reg_size); in set_bit() 69 litex_write(config->reg_addr, config->reg_size, new_regv); in set_bit() 74 int regv = litex_read(config->reg_addr, config->reg_size); in get_bit() 81 litex_write(config->reg_addr, config->reg_size, value); in set_port() 86 int regv = litex_read(config->reg_addr, config->reg_size); in get_port() [all …]
|
D | gpio_nct38xx_port.c | 4 * SPDX-License-Identifier: Apache-2.0 43 const struct gpio_nct38xx_port_config *const config = dev->config; in gpio_nct38xx_pin_config() 44 struct gpio_nct38xx_port_data *const data = dev->data; in gpio_nct38xx_pin_config() 49 /* Don't support simultaneous in/out mode */ in gpio_nct38xx_pin_config() 51 return -ENOTSUP; in gpio_nct38xx_pin_config() 56 return -ENOTSUP; in gpio_nct38xx_pin_config() 59 /* Don't support pull-up/pull-down */ in gpio_nct38xx_pin_config() 61 return -ENOTSUP; in gpio_nct38xx_pin_config() 64 k_sem_take(data->lock, K_FOREVER); in gpio_nct38xx_pin_config() 67 if (config->gpio_port == 0) { in gpio_nct38xx_pin_config() [all …]
|
D | gpio_lpc11u6x.c | 5 * SPDX-License-Identifier: Apache-2.0 14 * This driver allows to configure the GPIOs found on the LPC11U6x MCUs. 78 * This structure is included by all the per-port private configuration. 108 const struct gpio_lpc11u6x_config *config = port->config; in gpio_lpc11u6x_pin_configure() 110 (config->shared->gpio_base + LPC11U6X_GPIO_REGS); in gpio_lpc11u6x_pin_configure() 111 uint8_t port_num = config->port_num; in gpio_lpc11u6x_pin_configure() 115 if (pin >= config->ngpios) { in gpio_lpc11u6x_pin_configure() 116 return -EINVAL; in gpio_lpc11u6x_pin_configure() 121 * 0. They still can be configured as GPIOs but only in open drain mode in gpio_lpc11u6x_pin_configure() 122 * and with no pull-down or pull-up resistor enabled. in gpio_lpc11u6x_pin_configure() [all …]
|
D | gpio_rt1718s_port.c | 4 * SPDX-License-Identifier: Apache-2.0 10 * @file Driver for RS1718S TCPC chip GPIOs. 41 const struct gpio_rt1718s_port_config *const config = dev->config; in gpio_rt1718s_pin_config() 42 struct gpio_rt1718s_port_data *const data = dev->data; in gpio_rt1718s_pin_config() 46 /* Don't support simultaneous in/out mode */ in gpio_rt1718s_pin_config() 48 return -ENOTSUP; in gpio_rt1718s_pin_config() 53 return -ENOTSUP; in gpio_rt1718s_pin_config() 56 /* RT1718S has 3 GPIOs so check range */ in gpio_rt1718s_pin_config() 58 return -EINVAL; in gpio_rt1718s_pin_config() 64 /* Set pull-high/low input */ in gpio_rt1718s_pin_config() [all …]
|
D | gpio_ite_it8xxx2_v2.c | 4 * SPDX-License-Identifier: Apache-2.0 18 #include <zephyr/dt-bindings/gpio/ite-it8xxx2-gpio.h> 19 #include <zephyr/dt-bindings/interrupt-controller/ite-intc.h> 80 const struct gpio_ite_cfg *gpio_config = dev->config; in gpio_ite_configure() 81 volatile uint8_t *reg_gpdr = (uint8_t *)gpio_config->reg_gpdr; in gpio_ite_configure() 82 volatile uint8_t *reg_gpotr = (uint8_t *)gpio_config->reg_gpotr; in gpio_ite_configure() 83 volatile uint8_t *reg_p18scr = (uint8_t *)gpio_config->reg_p18scr; in gpio_ite_configure() 84 volatile uint8_t *reg_gpcr = (uint8_t *)gpio_config->reg_gpcr + pin; in gpio_ite_configure() 85 struct gpio_ite_data *data = dev->data; in gpio_ite_configure() 92 return -ENOTSUP; in gpio_ite_configure() [all …]
|
D | gpio_pca_series.c | 4 * SPDX-License-Identifier: Apache-2.0 8 * @file Driver for PCA(L)xxxx SERIES I2C-based GPIO expander. 57 * @note must be consistent in order with @ref enum gpio_pca_series_part_no 70 * - Type 0: PCA953X, PCA955X 71 * - Type 1: PCAL953X, PCAL955X, PCAL64XXA 72 * - Type 2: PCA957X 73 * - Type 3: PCAL65XX 101 * #1: "pull_enable" register is named "bus_hold" in PCA957x datasheet. 103 * port-level "pin output configuration" register. 144 uint8_t port_no; /* number of 8-pin ports on device */ [all …]
|
D | gpio_intel.c | 2 * Copyright (c) 2018-2019 Intel Corporation 4 * SPDX-License-Identifier: Apache-2.0 14 * both GPIOs and Pinmuxing function. This driver provides 17 * Due to GPIO callback only allowing 32 pins (as a 32-bit mask) at once, 18 * each set is further sub-divided into multiple devices, so 30 #include <zephyr/dt-bindings/interrupt-controller/intel-ioapic.h> 92 ((const struct gpio_intel_config *)(_dev)->config) 93 #define DEV_DATA(_dev) ((struct gpio_intel_data *)(_dev)->data) 130 #define REG_GPI_INT_STS_BASE_GET(data) (data)->intr_stat_reg 132 #define REG_GPI_INT_EN_BASE_GET(data) (data)->intr_stat_reg + 0x20 [all …]
|
D | gpio_ite_it8xxx2.c | 4 * SPDX-License-Identifier: Apache-2.0 11 #include <zephyr/dt-bindings/gpio/ite-it8xxx2-gpio.h> 12 #include <zephyr/dt-bindings/interrupt-controller/ite-intc.h> 43 /* Index in gpio_1p8v for voltage level control register element. */ 57 ((struct gpio_ite_data *)(dev)->data) 60 ((const struct gpio_ite_cfg *)(dev)->config) 63 * Convert wake-up controller (WUC) group to the corresponding wake-up edge 73 * From WUESR1-WUESR4, the address increases by ones. From WUESR5 on in wuesr() 77 (volatile uint8_t *)(IT8XXX2_WUC_WUESR1 + grp-1) : in wuesr() 78 (volatile uint8_t *)(IT8XXX2_WUC_WUESR5 + 4*(grp-5)); in wuesr() [all …]
|
/Zephyr-latest/drivers/sensor/lm77/ |
D | lm77.c | 4 * SPDX-License-Identifier: Apache-2.0 20 * Only compile in trigger support if enabled in Kconfig and at least one 21 * enabled lm77 devicetree node has the int-gpios property. 71 const struct lm77_config *config = dev->config; in lm77_write_config() 74 return i2c_write_dt(&config->i2c, buf, sizeof(buf)); in lm77_write_config() 79 const struct lm77_config *config = dev->config; in lm77_read_temp() 83 err = i2c_write_read_dt(&config->i2c, ®, sizeof(reg), &buf, sizeof(buf)); in lm77_read_temp() 96 const struct lm77_config *config = dev->config; in lm77_write_temp() 99 return i2c_write_dt(&config->i2c, buf, sizeof(buf)); in lm77_write_temp() 104 /* Integer part in degrees Celsius (LSB = 0.5 degrees Celsius) */ in lm77_sensor_value_to_temp() [all …]
|
/Zephyr-latest/drivers/sensor/lm75/ |
D | lm75.c | 5 * SPDX-License-Identifier: Apache-2.0 23 * Only compile in trigger support if enabled in Kconfig and at least one 24 * enabled lm75 devicetree node has the int-gpios property. 71 const struct lm75_config *cfg = dev->config; in lm75_reg_read() 73 return i2c_burst_read_dt(&cfg->i2c, reg, buf, size); in lm75_reg_read() 79 const struct lm75_config *cfg = dev->config; in lm75_reg_write() 81 return i2c_burst_write_dt(&cfg->i2c, reg, buf, size); in lm75_reg_write() 92 return -EIO; in lm75_temp_read() 110 *temp = val->val1 * 10; in lm75_sensor_value_to_temp() 111 *temp += val->val2 / 100000U; in lm75_sensor_value_to_temp() [all …]
|
/Zephyr-latest/drivers/sensor/honeywell/sm351lt/ |
D | sm351lt.c | 4 * SPDX-License-Identifier: Apache-2.0 24 const struct sensor_trigger *trig, in sm351lt_trigger_set() argument 27 const struct sm351lt_config *const config = dev->config; in sm351lt_trigger_set() 28 struct sm351lt_data *data = dev->data; in sm351lt_trigger_set() 29 int ret = -ENOTSUP; in sm351lt_trigger_set() 31 if (trig->chan == SENSOR_CHAN_PROX) { in sm351lt_trigger_set() 32 data->changed_handler = handler; in sm351lt_trigger_set() 33 data->changed_trigger = trig; in sm351lt_trigger_set() 34 ret = gpio_pin_interrupt_configure_dt(&config->int_gpio, in sm351lt_trigger_set() 35 (handler ? data->trigger_type in sm351lt_trigger_set() [all …]
|
/Zephyr-latest/include/zephyr/drivers/ |
D | gpio.h | 2 * Copyright (c) 2019-2020 Nordic Semiconductor ASA 5 * Copyright (c) 2015-2016 Intel Corporation. 7 * SPDX-License-Identifier: Apache-2.0 27 #include <zephyr/dt-bindings/gpio/gpio.h> 231 * The pin with index n is present in the set if and only if the bit 252 * This reduced-size type is sufficient to record a pin number, 253 * e.g. from a devicetree GPIOS property. 260 * All GPIO flags that can be expressed in devicetree fit in the low 16 261 * bits of the full flags field, so use a reduced-size type to record 262 * that part of a GPIOS property. [all …]
|