/kernel/linux/linux-5.10/drivers/iio/ |
D | industrialio-trigger.c | 52 struct iio_trigger *trig = to_iio_trigger(dev); in iio_trigger_read_name() local 53 return sprintf(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 120 if (!indio_dev || !trig) in iio_trigger_set_immutable() 126 indio_dev->trig = iio_trigger_get(trig); in iio_trigger_set_immutable() 148 struct iio_trigger *trig = NULL, *iter; in iio_trigger_acquire_by_name() local 153 trig = iter; in iio_trigger_acquire_by_name() 154 iio_trigger_get(trig); in iio_trigger_acquire_by_name() 159 return trig; in iio_trigger_acquire_by_name() 162 void iio_trigger_poll(struct iio_trigger *trig) in iio_trigger_poll() argument [all …]
|
D | iio_core_trigger.h | 22 int iio_trigger_attach_poll_func(struct iio_trigger *trig, 24 int iio_trigger_detach_poll_func(struct iio_trigger *trig, 46 static inline int iio_trigger_attach_poll_func(struct iio_trigger *trig, in iio_trigger_attach_poll_func() argument 51 static inline int iio_trigger_detach_poll_func(struct iio_trigger *trig, in iio_trigger_detach_poll_func() argument
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/include/linux/iio/ |
D | trigger.h | 33 int (*set_trigger_state)(struct iio_trigger *trig, bool state); 34 int (*try_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 …]
|
/kernel/linux/linux-5.10/drivers/iio/trigger/ |
D | iio-trig-interrupt.c | 34 struct iio_trigger *trig; in iio_interrupt_trigger_probe() local 48 trig = iio_trigger_alloc("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("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 t->trig->dev.parent = &iio_sysfs_trig_dev; 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()
|
D | Makefile | 8 obj-$(CONFIG_IIO_HRTIMER_TRIGGER) += iio-trig-hrtimer.o 9 obj-$(CONFIG_IIO_INTERRUPT_TRIGGER) += iio-trig-interrupt.o 12 obj-$(CONFIG_IIO_SYSFS_TRIGGER) += iio-trig-sysfs.o 13 obj-$(CONFIG_IIO_TIGHTLOOP_TRIGGER) += iio-trig-loop.o
|
/kernel/linux/linux-5.10/drivers/iio/common/st_sensors/ |
D | st_sensors_trigger.c | 60 struct iio_trigger *trig = p; in st_sensors_irq_handler() local 61 struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig); in st_sensors_irq_handler() 76 struct iio_trigger *trig = p; in st_sensors_irq_thread() local 77 struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig); in st_sensors_irq_thread() 126 sdata->trig = iio_trigger_alloc("%s-trigger", indio_dev->name); 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() 134 sdata->trig->dev.parent = sdata->dev; in st_sensors_allocate_trigger() 213 sdata->trig->name, in st_sensors_allocate_trigger() [all …]
|
/kernel/linux/linux-5.10/drivers/iio/gyro/ |
D | itg3200_buffer.c | 65 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("%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->dev.parent = &st->i2c->dev; in itg3200_probe_trigger() 131 st->trig->ops = &itg3200_trigger_ops; in itg3200_probe_trigger() 132 iio_trigger_set_drvdata(st->trig, indio_dev); in itg3200_probe_trigger() 133 ret = iio_trigger_register(st->trig); in itg3200_probe_trigger() [all …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/drivers/iio/imu/ |
D | adis_trigger.c | 18 static int adis_data_rdy_trigger_set_state(struct iio_trigger *trig, bool state) in adis_data_rdy_trigger_set_state() argument 20 struct adis *adis = iio_trigger_get_drvdata(trig); in adis_data_rdy_trigger_set_state() 31 adis->trig->dev.parent = &adis->spi->dev; in adis_trigger_setup() 32 adis->trig->ops = &adis_trigger_ops; in adis_trigger_setup() 33 iio_trigger_set_drvdata(adis->trig, adis); in adis_trigger_setup() 74 adis->trig = devm_iio_trigger_alloc(&adis->spi->dev, "%s-dev%d", in devm_adis_probe_trigger() 76 if (!adis->trig) in devm_adis_probe_trigger() 89 adis->trig); in devm_adis_probe_trigger() 93 return devm_iio_trigger_register(&adis->spi->dev, adis->trig); in devm_adis_probe_trigger()
|
/kernel/linux/linux-5.10/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 | 23 struct led_trigger *trig; in led_trigger_set_panic() local 25 list_for_each_entry(trig, &trigger_list, next_trig) { in led_trigger_set_panic() 26 if (strcmp("panic", trig->name)) in led_trigger_set_panic() 30 list_add_tail(&led_cdev->trig_list, &trig->led_cdevs); in led_trigger_set_panic() 36 led_cdev->trigger = trig; in led_trigger_set_panic() 37 if (trig->activate) in led_trigger_set_panic() 38 trig->activate(led_cdev); in led_trigger_set_panic()
|
/kernel/linux/linux-5.10/drivers/net/wireless/intel/iwlwifi/fw/ |
D | dbg.h | 109 enum iwl_fw_dbg_trigger trig, const char *str, 134 iwl_fw_dbg_trigger_vif_match(struct iwl_fw_dbg_trigger_tlv *trig, in iwl_fw_dbg_trigger_vif_match() argument 137 u32 trig_vif = le32_to_cpu(trig->vif_type); in iwl_fw_dbg_trigger_vif_match() 145 struct iwl_fw_dbg_trigger_tlv *trig) in iwl_fw_dbg_trigger_stop_conf_match() argument 147 return ((trig->mode & IWL_FW_DBG_TRIGGER_STOP) && in iwl_fw_dbg_trigger_stop_conf_match() 149 (BIT(fwrt->dump.conf) & le32_to_cpu(trig->stop_conf_ids)))); in iwl_fw_dbg_trigger_stop_conf_match() 170 struct iwl_fw_dbg_trigger_tlv *trig) in iwl_fw_dbg_trigger_check_stop() argument 172 u32 usec = le16_to_cpu(trig->trig_dis_ms) * USEC_PER_MSEC; in iwl_fw_dbg_trigger_check_stop() 174 if (wdev && !iwl_fw_dbg_trigger_vif_match(trig, wdev)) in iwl_fw_dbg_trigger_check_stop() 177 if (iwl_fw_dbg_no_trig_window(fwrt, le32_to_cpu(trig->id), usec)) { in iwl_fw_dbg_trigger_check_stop() [all …]
|
/kernel/linux/linux-5.10/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 hw->trig->dev.parent = hw->dev; in hts221_allocate_trigger() 139 iio_dev->trig = iio_trigger_get(hw->trig); in hts221_allocate_trigger() 141 return devm_iio_trigger_register(hw->dev, hw->trig); in hts221_allocate_trigger() [all …]
|
/kernel/linux/linux-5.10/drivers/iio/common/hid-sensors/ |
D | hid-sensor-trigger.c | 221 static int hid_sensor_data_rdy_trigger_set_state(struct iio_trigger *trig, in hid_sensor_data_rdy_trigger_set_state() argument 224 return hid_sensor_power_state(iio_trigger_get_drvdata(trig), state); in hid_sensor_data_rdy_trigger_set_state() 251 struct iio_trigger *trig; in hid_sensor_setup_trigger() local 260 trig = iio_trigger_alloc("%s-dev%d", name, indio_dev->id); in hid_sensor_setup_trigger() 261 if (trig == NULL) { in hid_sensor_setup_trigger() 267 trig->dev.parent = indio_dev->dev.parent; in hid_sensor_setup_trigger() 268 iio_trigger_set_drvdata(trig, attrb); in hid_sensor_setup_trigger() 269 trig->ops = &hid_sensor_trigger_ops; in hid_sensor_setup_trigger() 270 ret = iio_trigger_register(trig); in hid_sensor_setup_trigger() 276 attrb->trigger = trig; in hid_sensor_setup_trigger() [all …]
|
/kernel/linux/linux-5.10/drivers/iio/imu/inv_mpu6050/ |
D | inv_mpu_trigger.c | 205 static int inv_mpu_data_rdy_trigger_set_state(struct iio_trigger *trig, in inv_mpu_data_rdy_trigger_set_state() argument 208 struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig); in inv_mpu_data_rdy_trigger_set_state() 228 st->trig = devm_iio_trigger_alloc(&indio_dev->dev, in inv_mpu6050_probe_trigger() 232 if (!st->trig) in inv_mpu6050_probe_trigger() 239 st->trig); in inv_mpu6050_probe_trigger() 243 st->trig->dev.parent = regmap_get_device(st->map); in inv_mpu6050_probe_trigger() 244 st->trig->ops = &inv_mpu_trigger_ops; in inv_mpu6050_probe_trigger() 245 iio_trigger_set_drvdata(st->trig, indio_dev); in inv_mpu6050_probe_trigger() 247 ret = devm_iio_trigger_register(&indio_dev->dev, st->trig); in inv_mpu6050_probe_trigger() 251 indio_dev->trig = iio_trigger_get(st->trig); in inv_mpu6050_probe_trigger()
|
/kernel/linux/linux-5.10/drivers/net/wireless/intel/iwlwifi/ |
D | iwl-dbg-tlv.c | 276 struct iwl_fw_ini_trigger_tlv *trig = (void *)tlv->data; in iwl_dbg_tlv_alloc_trigger() local 277 u32 tp = le32_to_cpu(trig->time_point); in iwl_dbg_tlv_alloc_trigger() 281 if (le32_to_cpu(tlv->length) < sizeof(*trig)) in iwl_dbg_tlv_alloc_trigger() 292 if (!le32_to_cpu(trig->occurrences)) { in iwl_dbg_tlv_alloc_trigger() 297 trig = (void *)dup->data; in iwl_dbg_tlv_alloc_trigger() 298 trig->occurrences = cpu_to_le32(-1); in iwl_dbg_tlv_alloc_trigger() 725 .trig = (void *)timer_node->tlv->data, in iwl_dbg_tlv_periodic_trig_handler() 731 u32 occur = le32_to_cpu(dump_data.trig->occurrences); in iwl_dbg_tlv_periodic_trig_handler() 732 u32 collect_interval = le32_to_cpu(dump_data.trig->data[0]); in iwl_dbg_tlv_periodic_trig_handler() 748 struct iwl_fw_ini_trigger_tlv *trig = (void *)node->tlv.data; in iwl_dbg_tlv_set_periodic_trigs() local [all …]
|
/kernel/linux/linux-5.10/drivers/iio/adc/ |
D | ad_sigma_delta.c | 426 iio_trigger_notify_done(indio_dev->trig); in ad_sd_trigger_handler() 446 iio_trigger_poll(sigma_delta->trig); in ad_sd_data_rdy_trig_poll() 459 int ad_sd_validate_trigger(struct iio_dev *indio_dev, struct iio_trigger *trig) in ad_sd_validate_trigger() argument 463 if (sigma_delta->trig != trig) in ad_sd_validate_trigger() 478 sigma_delta->trig = iio_trigger_alloc("%s-dev%d", indio_dev->name, in ad_sd_probe_trigger() 480 if (sigma_delta->trig == NULL) { in ad_sd_probe_trigger() 484 sigma_delta->trig->ops = &ad_sd_trigger_ops; in ad_sd_probe_trigger() 499 sigma_delta->trig->dev.parent = &sigma_delta->spi->dev; in ad_sd_probe_trigger() 500 iio_trigger_set_drvdata(sigma_delta->trig, sigma_delta); in ad_sd_probe_trigger() 502 ret = iio_trigger_register(sigma_delta->trig); in ad_sd_probe_trigger() [all …]
|
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() 252 if (!ad7766->trig) in ad7766_probe() 255 ad7766->trig->ops = &ad7766_trigger_ops; in ad7766_probe() 256 ad7766->trig->dev.parent = &spi->dev; in ad7766_probe() 257 iio_trigger_set_drvdata(ad7766->trig, ad7766); in ad7766_probe() 261 ad7766->trig); in ad7766_probe() [all …]
|