/Linux-v5.15/drivers/iio/ |
D | industrialio-trigger.c | 53 struct iio_trigger *trig = to_iio_trigger(dev); in iio_trigger_read_name() local 54 return sysfs_emit(buf, "%s\n", trig->name); in iio_trigger_read_name() 118 int iio_trigger_set_immutable(struct iio_dev *indio_dev, struct iio_trigger *trig) in iio_trigger_set_immutable() argument 122 if (!indio_dev || !trig) in iio_trigger_set_immutable() 129 indio_dev->trig = iio_trigger_get(trig); in iio_trigger_set_immutable() 151 struct iio_trigger *trig = NULL, *iter; in iio_trigger_acquire_by_name() local 156 trig = iter; in iio_trigger_acquire_by_name() 157 iio_trigger_get(trig); in iio_trigger_acquire_by_name() 162 return trig; in iio_trigger_acquire_by_name() 165 void iio_trigger_poll(struct iio_trigger *trig) in iio_trigger_poll() argument [all …]
|
D | iio_core_trigger.h | 24 int iio_trigger_attach_poll_func(struct iio_trigger *trig, 26 int iio_trigger_detach_poll_func(struct iio_trigger *trig, 48 static inline int iio_trigger_attach_poll_func(struct iio_trigger *trig, in iio_trigger_attach_poll_func() argument 53 static inline int iio_trigger_detach_poll_func(struct iio_trigger *trig, in iio_trigger_detach_poll_func() argument
|
/Linux-v5.15/drivers/leds/ |
D | led-triggers.c | 31 trigger_relevant(struct led_classdev *led_cdev, struct led_trigger *trig) in trigger_relevant() argument 33 return !trig->trigger_type || trig->trigger_type == led_cdev->trigger_type; in trigger_relevant() 42 struct led_trigger *trig; in led_trigger_write() local 58 list_for_each_entry(trig, &trigger_list, next_trig) { in led_trigger_write() 59 if (sysfs_streq(buf, trig->name) && trigger_relevant(led_cdev, trig)) { in led_trigger_write() 61 led_trigger_set(led_cdev, trig); in led_trigger_write() 97 struct led_trigger *trig; in led_trigger_format() local 101 list_for_each_entry(trig, &trigger_list, next_trig) { in led_trigger_format() 104 if (!trigger_relevant(led_cdev, trig)) in led_trigger_format() 107 hit = led_cdev->trigger && !strcmp(led_cdev->trigger->name, trig->name); in led_trigger_format() [all …]
|
/Linux-v5.15/include/linux/iio/ |
D | trigger.h | 33 int (*set_trigger_state)(struct iio_trigger *trig, bool state); 34 void (*reenable)(struct iio_trigger *trig); 35 int (*validate_device)(struct iio_trigger *trig, 85 static inline void iio_trigger_put(struct iio_trigger *trig) in iio_trigger_put() argument 87 module_put(trig->owner); in iio_trigger_put() 88 put_device(&trig->dev); in iio_trigger_put() 91 static inline struct iio_trigger *iio_trigger_get(struct iio_trigger *trig) in iio_trigger_get() argument 93 get_device(&trig->dev); in iio_trigger_get() 94 __module_get(trig->owner); in iio_trigger_get() 96 return trig; in iio_trigger_get() [all …]
|
/Linux-v5.15/drivers/iio/trigger/ |
D | iio-trig-interrupt.c | 34 struct iio_trigger *trig; in iio_interrupt_trigger_probe() local 48 trig = iio_trigger_alloc(NULL, "irqtrig%d", irq); in iio_interrupt_trigger_probe() 49 if (!trig) { in iio_interrupt_trigger_probe() 59 iio_trigger_set_drvdata(trig, trig_info); in iio_interrupt_trigger_probe() 61 trig->ops = &iio_interrupt_trigger_ops; in iio_interrupt_trigger_probe() 63 irqflags, trig->name, trig); in iio_interrupt_trigger_probe() 70 ret = iio_trigger_register(trig); in iio_interrupt_trigger_probe() 73 platform_set_drvdata(pdev, trig); in iio_interrupt_trigger_probe() 79 free_irq(irq, trig); in iio_interrupt_trigger_probe() 83 iio_trigger_free(trig); in iio_interrupt_trigger_probe() [all …]
|
D | iio-trig-sysfs.c | 17 struct iio_trigger *trig; member 94 struct iio_sysfs_trig *trig = container_of(work, struct iio_sysfs_trig, in iio_sysfs_trigger_work() local 97 iio_trigger_poll(trig->trig); in iio_sysfs_trigger_work() 103 struct iio_trigger *trig = to_iio_trigger(dev); in iio_sysfs_trigger_poll() local 104 struct iio_sysfs_trig *sysfs_trig = iio_trigger_get_drvdata(trig); in iio_sysfs_trigger_poll() 152 t->trig = iio_trigger_alloc(&iio_sysfs_trig_dev, "sysfstrig%d", id); in iio_sysfs_trigger_probe() 153 if (!t->trig) { in iio_sysfs_trigger_probe() 158 t->trig->dev.groups = iio_sysfs_trigger_attr_groups; in iio_sysfs_trigger_probe() 159 t->trig->ops = &iio_sysfs_trigger_ops; in iio_sysfs_trigger_probe() 160 iio_trigger_set_drvdata(t->trig, t); in iio_sysfs_trigger_probe() [all …]
|
D | stm32-lptimer-trigger.c | 29 static int stm32_lptim_validate_device(struct iio_trigger *trig, in stm32_lptim_validate_device() argument 49 bool is_stm32_lptim_trigger(struct iio_trigger *trig) in is_stm32_lptim_trigger() argument 51 return (trig->ops == &stm32_lptim_trigger_ops); in is_stm32_lptim_trigger() 57 struct iio_trigger *trig; in stm32_lptim_setup_trig() local 59 trig = devm_iio_trigger_alloc(priv->dev, "%s", priv->trg); in stm32_lptim_setup_trig() 60 if (!trig) in stm32_lptim_setup_trig() 63 trig->dev.parent = priv->dev->parent; in stm32_lptim_setup_trig() 64 trig->ops = &stm32_lptim_trigger_ops; in stm32_lptim_setup_trig() 65 iio_trigger_set_drvdata(trig, priv); in stm32_lptim_setup_trig() 67 return devm_iio_trigger_register(priv->dev, trig); in stm32_lptim_setup_trig()
|
D | stm32-timer-trigger.c | 117 struct iio_trigger *trig, in stm32_timer_start() argument 163 if (stm32_timer_is_trgo2_name(trig->name)) in stm32_timer_start() 181 struct iio_trigger *trig) in stm32_timer_stop() argument 197 if (stm32_timer_is_trgo2_name(trig->name)) in stm32_timer_stop() 216 struct iio_trigger *trig = to_iio_trigger(dev); in stm32_tt_store_frequency() local 217 struct stm32_timer_trigger *priv = iio_trigger_get_drvdata(trig); in stm32_tt_store_frequency() 226 stm32_timer_stop(priv, trig); in stm32_tt_store_frequency() 228 ret = stm32_timer_start(priv, trig, freq); in stm32_tt_store_frequency() 239 struct iio_trigger *trig = to_iio_trigger(dev); in stm32_tt_read_frequency() local 240 struct stm32_timer_trigger *priv = iio_trigger_get_drvdata(trig); in stm32_tt_read_frequency() [all …]
|
D | iio-trig-loop.c | 44 struct iio_trigger *trig = data; in iio_loop_thread() local 49 iio_trigger_poll_chained(trig); in iio_loop_thread() 55 static int iio_loop_trigger_set_state(struct iio_trigger *trig, bool state) in iio_loop_trigger_set_state() argument 57 struct iio_loop_info *loop_trig = iio_trigger_get_drvdata(trig); in iio_loop_trigger_set_state() 61 trig, trig->name); in iio_loop_trigger_set_state() 63 dev_err(&trig->dev, in iio_loop_trigger_set_state()
|
/Linux-v5.15/drivers/iio/common/st_sensors/ |
D | st_sensors_trigger.c | 59 struct iio_trigger *trig = p; in st_sensors_irq_handler() local 60 struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig); in st_sensors_irq_handler() 75 struct iio_trigger *trig = p; in st_sensors_irq_thread() local 76 struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig); in st_sensors_irq_thread() 125 sdata->trig = iio_trigger_alloc(sdata->dev, "%s-trigger", in st_sensors_allocate_trigger() 127 if (sdata->trig == NULL) { in st_sensors_allocate_trigger() 132 iio_trigger_set_drvdata(sdata->trig, indio_dev); in st_sensors_allocate_trigger() 133 sdata->trig->ops = trigger_ops; in st_sensors_allocate_trigger() 212 sdata->trig->name, in st_sensors_allocate_trigger() 213 sdata->trig); in st_sensors_allocate_trigger() [all …]
|
/Linux-v5.15/drivers/iio/gyro/ |
D | itg3200_buffer.c | 64 iio_trigger_notify_done(indio_dev->trig); in itg3200_trigger_handler() 82 static int itg3200_data_rdy_trigger_set_state(struct iio_trigger *trig, in itg3200_data_rdy_trigger_set_state() argument 85 struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig); in itg3200_data_rdy_trigger_set_state() 116 st->trig = iio_trigger_alloc(&st->i2c->dev, "%s-dev%d", indio_dev->name, in itg3200_probe_trigger() 118 if (!st->trig) in itg3200_probe_trigger() 125 st->trig); in itg3200_probe_trigger() 130 st->trig->ops = &itg3200_trigger_ops; in itg3200_probe_trigger() 131 iio_trigger_set_drvdata(st->trig, indio_dev); in itg3200_probe_trigger() 132 ret = iio_trigger_register(st->trig); in itg3200_probe_trigger() 137 indio_dev->trig = iio_trigger_get(st->trig); in itg3200_probe_trigger() [all …]
|
/Linux-v5.15/drivers/clk/bcm/ |
D | clk-bcm281xx.c | 25 .trig = TRIGGER(0x0e04, 0), 47 .trig = TRIGGER(0x0a40, 4), 57 .trig = TRIGGER(0x0a40, 0), 65 .trig = TRIGGER(0x0a40, 2), 88 .trig = TRIGGER(0x0e84, 1), 111 .trig = TRIGGER(0x0afc, 9), 123 .trig = TRIGGER(0x0afc, 10), 135 .trig = TRIGGER(0x0afc, 12), 147 .trig = TRIGGER(0x0afc, 11), 157 .trig = TRIGGER(0x0afc, 7), [all …]
|
D | clk-bcm21664.c | 47 .trig = TRIGGER(0x0a40, 4), 74 .trig = TRIGGER(0x0afc, 9), 86 .trig = TRIGGER(0x0afc, 10), 98 .trig = TRIGGER(0x0afc, 12), 110 .trig = TRIGGER(0x0afc, 11), 169 .trig = TRIGGER(0x0afc, 2), 179 .trig = TRIGGER(0x0afc, 3), 189 .trig = TRIGGER(0x0afc, 4), 200 .trig = TRIGGER(0x0afc, 23), 211 .trig = TRIGGER(0x0afc, 24), [all …]
|
D | clk-kona-setup.c | 22 #define trigger_clear_exists(trig) FLAG_CLEAR(trig, TRIG, EXISTS) argument 85 struct bcm_clk_trig *trig; in peri_clk_data_offsets_valid() local 157 trig = &peri->trig; in peri_clk_data_offsets_valid() 158 if (trigger_exists(trig)) { in peri_clk_data_offsets_valid() 159 if (trig->offset > limit) { in peri_clk_data_offsets_valid() 161 __func__, name, trig->offset, limit); in peri_clk_data_offsets_valid() 166 trig = &peri->pre_trig; in peri_clk_data_offsets_valid() 167 if (trigger_exists(trig)) { in peri_clk_data_offsets_valid() 168 if (trig->offset > limit) { in peri_clk_data_offsets_valid() 170 __func__, name, trig->offset, limit); in peri_clk_data_offsets_valid() [all …]
|
/Linux-v5.15/drivers/leds/trigger/ |
D | ledtrig-cpu.c | 53 struct led_trigger_cpu *trig = this_cpu_ptr(&cpu_trig); in ledtrig_cpu() local 54 bool is_active = trig->is_active; in ledtrig_cpu() 76 if (is_active != trig->is_active) { in ledtrig_cpu() 81 trig->is_active = is_active; in ledtrig_cpu() 86 led_trigger_event(trig->_trig, in ledtrig_cpu() 150 struct led_trigger_cpu *trig = &per_cpu(cpu_trig, cpu); in ledtrig_cpu_init() local 155 snprintf(trig->name, MAX_NAME_LEN, "cpu%d", cpu); in ledtrig_cpu_init() 157 led_trigger_register_simple(trig->name, &trig->_trig); in ledtrig_cpu_init()
|
D | ledtrig-panic.c | 24 struct led_trigger *trig; in led_trigger_set_panic() local 26 list_for_each_entry(trig, &trigger_list, next_trig) { in led_trigger_set_panic() 27 if (strcmp("panic", trig->name)) in led_trigger_set_panic() 31 list_add_tail(&led_cdev->trig_list, &trig->led_cdevs); in led_trigger_set_panic() 37 led_cdev->trigger = trig; in led_trigger_set_panic() 38 if (trig->activate) in led_trigger_set_panic() 39 trig->activate(led_cdev); in led_trigger_set_panic()
|
/Linux-v5.15/drivers/iio/imu/ |
D | adis_trigger.c | 18 static int adis_data_rdy_trigger_set_state(struct iio_trigger *trig, in adis_data_rdy_trigger_set_state() argument 21 struct adis *adis = iio_trigger_get_drvdata(trig); in adis_data_rdy_trigger_set_state() 64 adis->trig = devm_iio_trigger_alloc(&adis->spi->dev, "%s-dev%d", in devm_adis_probe_trigger() 67 if (!adis->trig) in devm_adis_probe_trigger() 70 adis->trig->ops = &adis_trigger_ops; in devm_adis_probe_trigger() 71 iio_trigger_set_drvdata(adis->trig, adis); in devm_adis_probe_trigger() 81 adis->trig); in devm_adis_probe_trigger() 85 return devm_iio_trigger_register(&adis->spi->dev, adis->trig); in devm_adis_probe_trigger()
|
/Linux-v5.15/drivers/net/wireless/intel/iwlwifi/fw/ |
D | dbg.h | 52 enum iwl_fw_dbg_trigger trig, const char *str, 77 iwl_fw_dbg_trigger_vif_match(struct iwl_fw_dbg_trigger_tlv *trig, in iwl_fw_dbg_trigger_vif_match() argument 80 u32 trig_vif = le32_to_cpu(trig->vif_type); in iwl_fw_dbg_trigger_vif_match() 88 struct iwl_fw_dbg_trigger_tlv *trig) in iwl_fw_dbg_trigger_stop_conf_match() argument 90 return ((trig->mode & IWL_FW_DBG_TRIGGER_STOP) && in iwl_fw_dbg_trigger_stop_conf_match() 92 (BIT(fwrt->dump.conf) & le32_to_cpu(trig->stop_conf_ids)))); in iwl_fw_dbg_trigger_stop_conf_match() 113 struct iwl_fw_dbg_trigger_tlv *trig) in iwl_fw_dbg_trigger_check_stop() argument 115 u32 usec = le16_to_cpu(trig->trig_dis_ms) * USEC_PER_MSEC; in iwl_fw_dbg_trigger_check_stop() 117 if (wdev && !iwl_fw_dbg_trigger_vif_match(trig, wdev)) in iwl_fw_dbg_trigger_check_stop() 120 if (iwl_fw_dbg_no_trig_window(fwrt, le32_to_cpu(trig->id), usec)) { in iwl_fw_dbg_trigger_check_stop() [all …]
|
/Linux-v5.15/drivers/iio/humidity/ |
D | hts221_buffer.c | 38 static int hts221_trig_set_state(struct iio_trigger *trig, bool state) in hts221_trig_set_state() argument 40 struct iio_dev *iio_dev = iio_trigger_get_drvdata(trig); in hts221_trig_set_state() 70 iio_trigger_poll_chained(hw->trig); in hts221_trigger_handler_thread() 131 hw->trig = devm_iio_trigger_alloc(hw->dev, "%s-trigger", in hts221_allocate_trigger() 133 if (!hw->trig) in hts221_allocate_trigger() 136 iio_trigger_set_drvdata(hw->trig, iio_dev); in hts221_allocate_trigger() 137 hw->trig->ops = &hts221_trigger_ops; in hts221_allocate_trigger() 138 iio_dev->trig = iio_trigger_get(hw->trig); in hts221_allocate_trigger() 140 return devm_iio_trigger_register(hw->dev, hw->trig); in hts221_allocate_trigger() 186 iio_trigger_notify_done(hw->trig); in hts221_buffer_handler_thread()
|
/Linux-v5.15/drivers/iio/imu/inv_mpu6050/ |
D | inv_mpu_trigger.c | 202 static int inv_mpu_data_rdy_trigger_set_state(struct iio_trigger *trig, in inv_mpu_data_rdy_trigger_set_state() argument 205 struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig); in inv_mpu_data_rdy_trigger_set_state() 225 st->trig = devm_iio_trigger_alloc(&indio_dev->dev, in inv_mpu6050_probe_trigger() 229 if (!st->trig) in inv_mpu6050_probe_trigger() 236 st->trig); in inv_mpu6050_probe_trigger() 240 st->trig->dev.parent = regmap_get_device(st->map); in inv_mpu6050_probe_trigger() 241 st->trig->ops = &inv_mpu_trigger_ops; in inv_mpu6050_probe_trigger() 242 iio_trigger_set_drvdata(st->trig, indio_dev); in inv_mpu6050_probe_trigger() 244 ret = devm_iio_trigger_register(&indio_dev->dev, st->trig); in inv_mpu6050_probe_trigger() 248 indio_dev->trig = iio_trigger_get(st->trig); in inv_mpu6050_probe_trigger()
|
/Linux-v5.15/drivers/net/wireless/intel/iwlwifi/ |
D | iwl-dbg-tlv.c | 230 const struct iwl_fw_ini_trigger_tlv *trig = (const void *)tlv->data; in iwl_dbg_tlv_alloc_trigger() local 232 u32 tp = le32_to_cpu(trig->time_point); in iwl_dbg_tlv_alloc_trigger() 236 if (le32_to_cpu(tlv->length) < sizeof(*trig)) in iwl_dbg_tlv_alloc_trigger() 247 if (!le32_to_cpu(trig->occurrences)) { in iwl_dbg_tlv_alloc_trigger() 685 .trig = (void *)timer_node->tlv->data, in iwl_dbg_tlv_periodic_trig_handler() 691 u32 occur = le32_to_cpu(dump_data.trig->occurrences); in iwl_dbg_tlv_periodic_trig_handler() 692 u32 collect_interval = le32_to_cpu(dump_data.trig->data[0]); in iwl_dbg_tlv_periodic_trig_handler() 708 struct iwl_fw_ini_trigger_tlv *trig = (void *)node->tlv.data; in iwl_dbg_tlv_set_periodic_trigs() local 710 u32 occur = le32_to_cpu(trig->occurrences), collect_interval; in iwl_dbg_tlv_set_periodic_trigs() 720 sizeof(*trig) + sizeof(__le32)) { in iwl_dbg_tlv_set_periodic_trigs() [all …]
|
/Linux-v5.15/drivers/iio/common/hid-sensors/ |
D | hid-sensor-trigger.c | 206 static int hid_sensor_data_rdy_trigger_set_state(struct iio_trigger *trig, in hid_sensor_data_rdy_trigger_set_state() argument 209 return hid_sensor_power_state(iio_trigger_get_drvdata(trig), state); in hid_sensor_data_rdy_trigger_set_state() 236 struct iio_trigger *trig; in hid_sensor_setup_trigger() local 251 trig = iio_trigger_alloc(indio_dev->dev.parent, in hid_sensor_setup_trigger() 253 if (trig == NULL) { in hid_sensor_setup_trigger() 259 iio_trigger_set_drvdata(trig, attrb); in hid_sensor_setup_trigger() 260 trig->ops = &hid_sensor_trigger_ops; in hid_sensor_setup_trigger() 261 ret = iio_trigger_register(trig); in hid_sensor_setup_trigger() 267 attrb->trigger = trig; in hid_sensor_setup_trigger() 268 indio_dev->trig = iio_trigger_get(trig); in hid_sensor_setup_trigger() [all …]
|
/Linux-v5.15/Documentation/translations/zh_CN/iio/ |
D | iio_configfs.rst | 48 * drivers/iio/trigger/iio-trig-sample.c 74 .name = "trig-sample", 81 每种触发器类型在/config/iio/triggers下都有其自己的目录。 加载iio-trig-sample 82 模块将创建“ trig-sample”触发器类型目录/config/iio/triggers/trig-sample. 91 加载iio-trig-hrtimer模块将注册hrtimer触发器类型,从而允许用户在
|
/Linux-v5.15/drivers/iio/light/ |
D | acpi-als.c | 63 struct iio_trigger *trig; member 111 iio_trigger_poll_chained(als->trig); in acpi_als_notify() 180 iio_trigger_notify_done(indio_dev->trig); in acpi_als_trigger_handler() 207 als->trig = devm_iio_trigger_alloc(dev, "%s-dev%d", indio_dev->name, in acpi_als_add() 209 if (!als->trig) in acpi_als_add() 212 ret = devm_iio_trigger_register(dev, als->trig); in acpi_als_add() 219 indio_dev->trig = iio_trigger_get(als->trig); in acpi_als_add()
|
/Linux-v5.15/drivers/iio/adc/ |
D | ad7766.c | 42 struct iio_trigger *trig; member 81 iio_trigger_notify_done(indio_dev->trig); in ad7766_trigger_handler() 194 static int ad7766_set_trigger_state(struct iio_trigger *trig, bool enable) in ad7766_set_trigger_state() argument 196 struct ad7766 *ad7766 = iio_trigger_get_drvdata(trig); in ad7766_set_trigger_state() 250 ad7766->trig = devm_iio_trigger_alloc(&spi->dev, "%s-dev%d", in ad7766_probe() 253 if (!ad7766->trig) in ad7766_probe() 256 ad7766->trig->ops = &ad7766_trigger_ops; in ad7766_probe() 257 iio_trigger_set_drvdata(ad7766->trig, ad7766); in ad7766_probe() 267 ad7766->trig); in ad7766_probe() 271 ret = devm_iio_trigger_register(&spi->dev, ad7766->trig); in ad7766_probe()
|