/drivers/iio/ |
D | industrialio-trigger.c | 48 struct iio_trigger *trig = to_iio_trigger(dev); in iio_trigger_read_name() local 49 return sprintf(buf, "%s\n", trig->name); in iio_trigger_read_name() 114 struct iio_trigger *trig = NULL, *iter; in iio_trigger_find_by_name() local 119 trig = iter; in iio_trigger_find_by_name() 124 return trig; in iio_trigger_find_by_name() 127 void iio_trigger_poll(struct iio_trigger *trig, s64 time) in iio_trigger_poll() argument 130 if (!trig->use_count) in iio_trigger_poll() 132 if (trig->subirqs[i].enabled) { in iio_trigger_poll() 133 trig->use_count++; in iio_trigger_poll() 134 generic_handle_irq(trig->subirq_base + i); in iio_trigger_poll() [all …]
|
/drivers/leds/ |
D | led-triggers.c | 39 struct led_trigger *trig; in led_trigger_store() local 55 list_for_each_entry(trig, &trigger_list, next_trig) { in led_trigger_store() 56 if (!strcmp(trigger_name, trig->name)) { in led_trigger_store() 58 led_trigger_set(led_cdev, trig); in led_trigger_store() 75 struct led_trigger *trig; in led_trigger_show() local 86 list_for_each_entry(trig, &trigger_list, next_trig) { in led_trigger_show() 88 trig->name)) in led_trigger_show() 89 len += sprintf(buf+len, "[%s] ", trig->name); in led_trigger_show() 91 len += sprintf(buf+len, "%s ", trig->name); in led_trigger_show() 102 void led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trig) in led_trigger_set() argument [all …]
|
/drivers/staging/iio/trigger/ |
D | iio-trig-gpio.c | 57 struct iio_trigger *trig, *trig2; in iio_gpio_trigger_probe() local 75 trig = iio_trigger_alloc("irqtrig%d", irq); in iio_gpio_trigger_probe() 76 if (!trig) { in iio_gpio_trigger_probe() 86 iio_trigger_set_drvdata(trig, trig_info); in iio_gpio_trigger_probe() 88 trig->ops = &iio_gpio_trigger_ops; in iio_gpio_trigger_probe() 90 irqflags, trig->name, trig); in iio_gpio_trigger_probe() 97 ret = iio_trigger_register(trig); in iio_gpio_trigger_probe() 101 list_add_tail(&trig->alloc_list, in iio_gpio_trigger_probe() 113 free_irq(irq, trig); in iio_gpio_trigger_probe() 117 iio_trigger_put(trig); in iio_gpio_trigger_probe() [all …]
|
D | iio-trig-periodic-rtc.c | 31 static int iio_trig_periodic_rtc_set_state(struct iio_trigger *trig, bool state) in iio_trig_periodic_rtc_set_state() argument 33 struct iio_prtc_trigger_info *trig_info = iio_trigger_get_drvdata(trig); in iio_trig_periodic_rtc_set_state() 44 struct iio_trigger *trig = to_iio_trigger(dev); in iio_trig_periodic_read_freq() local 45 struct iio_prtc_trigger_info *trig_info = iio_trigger_get_drvdata(trig); in iio_trig_periodic_read_freq() 54 struct iio_trigger *trig = to_iio_trigger(dev); in iio_trig_periodic_write_freq() local 55 struct iio_prtc_trigger_info *trig_info = iio_trigger_get_drvdata(trig); in iio_trig_periodic_write_freq() 108 struct iio_trigger *trig, *trig2; in iio_trig_periodic_rtc_probe() local 115 trig = iio_trigger_alloc("periodic%s", pdata[i]); in iio_trig_periodic_rtc_probe() 116 if (!trig) { in iio_trig_periodic_rtc_probe() 120 list_add(&trig->alloc_list, &iio_prtc_trigger_list); in iio_trig_periodic_rtc_probe() [all …]
|
D | iio-trig-sysfs.c | 19 struct iio_trigger *trig; member 96 struct iio_sysfs_trig *trig = container_of(work, struct iio_sysfs_trig, in iio_sysfs_trigger_work() local 99 iio_trigger_poll(trig->trig, 0); in iio_sysfs_trigger_work() 105 struct iio_trigger *trig = to_iio_trigger(dev); in iio_sysfs_trigger_poll() local 106 struct iio_sysfs_trig *sysfs_trig = iio_trigger_get_drvdata(trig); in iio_sysfs_trigger_poll() 154 t->trig = iio_trigger_alloc("sysfstrig%d", id); in iio_sysfs_trigger_probe() 155 if (!t->trig) { in iio_sysfs_trigger_probe() 160 t->trig->dev.groups = iio_sysfs_trigger_attr_groups; in iio_sysfs_trigger_probe() 161 t->trig->ops = &iio_sysfs_trigger_ops; in iio_sysfs_trigger_probe() 162 t->trig->dev.parent = &iio_sysfs_trig_dev; in iio_sysfs_trigger_probe() [all …]
|
D | iio-trig-bfin-timer.c | 58 struct iio_trigger *trig; member 66 static int iio_bfin_tmr_set_state(struct iio_trigger *trig, bool state) in iio_bfin_tmr_set_state() argument 68 struct bfin_tmr_state *st = iio_trigger_get_drvdata(trig); in iio_bfin_tmr_set_state() 84 struct iio_trigger *trig = to_iio_trigger(dev); in iio_bfin_tmr_frequency_store() local 85 struct bfin_tmr_state *st = iio_trigger_get_drvdata(trig); in iio_bfin_tmr_frequency_store() 127 struct iio_trigger *trig = to_iio_trigger(dev); in iio_bfin_tmr_frequency_show() local 128 struct bfin_tmr_state *st = iio_trigger_get_drvdata(trig); in iio_bfin_tmr_frequency_show() 162 iio_trigger_poll(st->trig, 0); in iio_bfin_tmr_trigger_isr() 210 st->trig = iio_trigger_alloc("bfintmr%d", st->timer_num); in iio_bfin_tmr_trigger_probe() 211 if (!st->trig) { in iio_bfin_tmr_trigger_probe() [all …]
|
D | Makefile | 5 obj-$(CONFIG_IIO_PERIODIC_RTC_TRIGGER) += iio-trig-periodic-rtc.o 6 obj-$(CONFIG_IIO_GPIO_TRIGGER) += iio-trig-gpio.o 7 obj-$(CONFIG_IIO_SYSFS_TRIGGER) += iio-trig-sysfs.o 8 obj-$(CONFIG_IIO_BFIN_TMR_TRIGGER) += iio-trig-bfin-timer.o
|
D | Kconfig | 30 module will be called iio-trig-sysfs. 41 module will be called iio-trig-bfin-timer.
|
/drivers/staging/iio/meter/ |
D | ade7758_trigger.c | 32 static int ade7758_data_rdy_trigger_set_state(struct iio_trigger *trig, in ade7758_data_rdy_trigger_set_state() argument 35 struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig); in ade7758_data_rdy_trigger_set_state() 45 static int ade7758_trig_try_reen(struct iio_trigger *trig) in ade7758_trig_try_reen() argument 47 struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig); in ade7758_trig_try_reen() 66 st->trig = iio_trigger_alloc("%s-dev%d", in ade7758_probe_trigger() 69 if (st->trig == NULL) { in ade7758_probe_trigger() 78 st->trig); in ade7758_probe_trigger() 82 st->trig->dev.parent = &st->us->dev; in ade7758_probe_trigger() 83 st->trig->ops = &ade7758_trigger_ops; in ade7758_probe_trigger() 84 iio_trigger_set_drvdata(st->trig, indio_dev); in ade7758_probe_trigger() [all …]
|
/drivers/iio/imu/ |
D | adis_trigger.c | 19 static int adis_data_rdy_trigger_set_state(struct iio_trigger *trig, in adis_data_rdy_trigger_set_state() argument 22 struct adis *adis = iio_trigger_get_drvdata(trig); in adis_data_rdy_trigger_set_state() 45 adis->trig = iio_trigger_alloc("%s-dev%d", indio_dev->name, in adis_probe_trigger() 47 if (adis->trig == NULL) in adis_probe_trigger() 54 adis->trig); in adis_probe_trigger() 58 adis->trig->dev.parent = &adis->spi->dev; in adis_probe_trigger() 59 adis->trig->ops = &adis_trigger_ops; in adis_probe_trigger() 60 iio_trigger_set_drvdata(adis->trig, adis); in adis_probe_trigger() 61 ret = iio_trigger_register(adis->trig); in adis_probe_trigger() 63 indio_dev->trig = adis->trig; in adis_probe_trigger() [all …]
|
/drivers/iio/common/st_sensors/ |
D | st_sensors_trigger.c | 27 sdata->trig = iio_trigger_alloc("%s-trigger", indio_dev->name); in st_sensors_allocate_trigger() 28 if (sdata->trig == NULL) { in st_sensors_allocate_trigger() 38 sdata->trig->name, in st_sensors_allocate_trigger() 39 sdata->trig); in st_sensors_allocate_trigger() 43 iio_trigger_set_drvdata(sdata->trig, indio_dev); in st_sensors_allocate_trigger() 44 sdata->trig->ops = trigger_ops; in st_sensors_allocate_trigger() 45 sdata->trig->dev.parent = sdata->dev; in st_sensors_allocate_trigger() 47 err = iio_trigger_register(sdata->trig); in st_sensors_allocate_trigger() 52 indio_dev->trig = sdata->trig; in st_sensors_allocate_trigger() 57 free_irq(sdata->get_irq_data_ready(indio_dev), sdata->trig); in st_sensors_allocate_trigger() [all …]
|
/drivers/iio/common/hid-sensors/ |
D | hid-sensor-trigger.c | 31 static int hid_sensor_data_rdy_trigger_set_state(struct iio_trigger *trig, in hid_sensor_data_rdy_trigger_set_state() argument 34 struct hid_sensor_common *st = iio_trigger_get_drvdata(trig); in hid_sensor_data_rdy_trigger_set_state() 54 iio_trigger_unregister(indio_dev->trig); in hid_sensor_remove_trigger() 55 iio_trigger_free(indio_dev->trig); in hid_sensor_remove_trigger() 56 indio_dev->trig = NULL; in hid_sensor_remove_trigger() 69 struct iio_trigger *trig; in hid_sensor_setup_trigger() local 71 trig = iio_trigger_alloc("%s-dev%d", name, indio_dev->id); in hid_sensor_setup_trigger() 72 if (trig == NULL) { in hid_sensor_setup_trigger() 78 trig->dev.parent = indio_dev->dev.parent; in hid_sensor_setup_trigger() 79 iio_trigger_set_drvdata(trig, attrb); in hid_sensor_setup_trigger() [all …]
|
/drivers/iio/gyro/ |
D | itg3200_buffer.c | 63 iio_trigger_notify_done(indio_dev->trig); in itg3200_trigger_handler() 81 static int itg3200_data_rdy_trigger_set_state(struct iio_trigger *trig, in itg3200_data_rdy_trigger_set_state() argument 84 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 …]
|
D | st_gyro_buffer.c | 26 int st_gyro_trig_set_state(struct iio_trigger *trig, bool state) in st_gyro_trig_set_state() argument 28 struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig); in st_gyro_trig_set_state()
|
/drivers/iio/imu/inv_mpu6050/ |
D | inv_mpu_trigger.c | 103 static int inv_mpu_data_rdy_trigger_set_state(struct iio_trigger *trig, in inv_mpu_data_rdy_trigger_set_state() argument 106 return inv_mpu6050_set_enable(iio_trigger_get_drvdata(trig), state); in inv_mpu_data_rdy_trigger_set_state() 119 st->trig = iio_trigger_alloc("%s-dev%d", in inv_mpu6050_probe_trigger() 122 if (st->trig == NULL) { in inv_mpu6050_probe_trigger() 129 st->trig); in inv_mpu6050_probe_trigger() 132 st->trig->dev.parent = &st->client->dev; in inv_mpu6050_probe_trigger() 133 st->trig->ops = &inv_mpu_trigger_ops; in inv_mpu6050_probe_trigger() 134 iio_trigger_set_drvdata(st->trig, indio_dev); in inv_mpu6050_probe_trigger() 135 ret = iio_trigger_register(st->trig); in inv_mpu6050_probe_trigger() 138 indio_dev->trig = st->trig; in inv_mpu6050_probe_trigger() [all …]
|
/drivers/leds/trigger/ |
D | ledtrig-cpu.c | 49 struct led_trigger_cpu *trig = &__get_cpu_var(cpu_trig); in ledtrig_cpu() local 56 led_trigger_event(trig->_trig, LED_FULL); in ledtrig_cpu() 63 led_trigger_event(trig->_trig, LED_OFF); in ledtrig_cpu() 108 struct led_trigger_cpu *trig = &per_cpu(cpu_trig, cpu); in ledtrig_cpu_init() local 110 snprintf(trig->name, MAX_NAME_LEN, "cpu%d", cpu); in ledtrig_cpu_init() 112 led_trigger_register_simple(trig->name, &trig->_trig); in ledtrig_cpu_init() 128 struct led_trigger_cpu *trig = &per_cpu(cpu_trig, cpu); in ledtrig_cpu_exit() local 130 led_trigger_unregister_simple(trig->_trig); in ledtrig_cpu_exit() 131 trig->_trig = NULL; in ledtrig_cpu_exit() 132 memset(trig->name, 0, MAX_NAME_LEN); in ledtrig_cpu_exit()
|
/drivers/staging/iio/accel/ |
D | lis3l02dq_ring.c | 34 iio_trigger_poll(st->trig, iio_get_time_ns()); in lis3l02dq_data_rdy_trig_poll() 157 iio_trigger_notify_done(indio_dev->trig); in lis3l02dq_trigger_handler() 228 static int lis3l02dq_data_rdy_trigger_set_state(struct iio_trigger *trig, in lis3l02dq_data_rdy_trigger_set_state() argument 231 struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig); in lis3l02dq_data_rdy_trigger_set_state() 253 static int lis3l02dq_trig_try_reen(struct iio_trigger *trig) in lis3l02dq_trig_try_reen() argument 255 struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig); in lis3l02dq_trig_try_reen() 285 st->trig = iio_trigger_alloc("lis3l02dq-dev%d", indio_dev->id); in lis3l02dq_probe_trigger() 286 if (!st->trig) { in lis3l02dq_probe_trigger() 291 st->trig->dev.parent = &st->us->dev; in lis3l02dq_probe_trigger() 292 st->trig->ops = &lis3l02dq_trigger_ops; in lis3l02dq_probe_trigger() [all …]
|
/drivers/iio/adc/ |
D | at91_adc.c | 57 struct iio_trigger **trig; member 89 iio_trigger_notify_done(idev->trig); in at91_adc_trigger_handler() 110 iio_trigger_poll(idev->trig, iio_get_time_ns()); in at91_adc_eoc_trigger() 193 static int at91_adc_configure_trigger(struct iio_trigger *trig, bool state) in at91_adc_configure_trigger() argument 195 struct iio_dev *idev = iio_trigger_get_drvdata(trig); in at91_adc_configure_trigger() 205 idev->trig->name); in at91_adc_configure_trigger() 252 struct iio_trigger *trig; in at91_adc_allocate_trigger() local 255 trig = iio_trigger_alloc("%s-dev%d-%s", idev->name, in at91_adc_allocate_trigger() 257 if (trig == NULL) in at91_adc_allocate_trigger() 260 trig->dev.parent = idev->dev.parent; in at91_adc_allocate_trigger() [all …]
|
D | ad_sigma_delta.c | 396 iio_trigger_notify_done(indio_dev->trig); in ad_sd_trigger_handler() 418 iio_trigger_poll(sigma_delta->trig, iio_get_time_ns()); in ad_sd_data_rdy_trig_poll() 431 int ad_sd_validate_trigger(struct iio_dev *indio_dev, struct iio_trigger *trig) in ad_sd_validate_trigger() argument 435 if (sigma_delta->trig != trig) in ad_sd_validate_trigger() 451 sigma_delta->trig = iio_trigger_alloc("%s-dev%d", indio_dev->name, in ad_sd_probe_trigger() 453 if (sigma_delta->trig == NULL) { in ad_sd_probe_trigger() 457 sigma_delta->trig->ops = &ad_sd_trigger_ops; in ad_sd_probe_trigger() 472 sigma_delta->trig->dev.parent = &sigma_delta->spi->dev; in ad_sd_probe_trigger() 473 iio_trigger_set_drvdata(sigma_delta->trig, sigma_delta); in ad_sd_probe_trigger() 475 ret = iio_trigger_register(sigma_delta->trig); in ad_sd_probe_trigger() [all …]
|
/drivers/staging/iio/Documentation/ |
D | trigger.txt | 8 struct iio_trig *trig = iio_trigger_alloc("<trigger format string>", ...); 13 trig->owner 17 trig->set_trigger_state: 21 trig->alloc_list which is useful for drivers that allocate multiple 26 iio_trigger_register(trig);
|
/drivers/staging/iio/adc/ |
D | mxs-lradc.c | 138 struct iio_trigger *trig; member 601 iio_trigger_poll(iio->trig, iio_get_time_ns()); in mxs_lradc_handle_irq() 639 iio_trigger_notify_done(iio->trig); in mxs_lradc_trigger_handler() 644 static int mxs_lradc_configure_trigger(struct iio_trigger *trig, bool state) in mxs_lradc_configure_trigger() argument 646 struct iio_dev *iio = iio_trigger_get_drvdata(trig); in mxs_lradc_configure_trigger() 663 struct iio_trigger *trig; in mxs_lradc_trigger_init() local 665 trig = iio_trigger_alloc("%s-dev%i", iio->name, iio->id); in mxs_lradc_trigger_init() 666 if (trig == NULL) in mxs_lradc_trigger_init() 669 trig->dev.parent = iio->dev.parent; in mxs_lradc_trigger_init() 670 iio_trigger_set_drvdata(trig, iio); in mxs_lradc_trigger_init() [all …]
|
/drivers/gpio/ |
D | gpio-msic.c | 197 u8 trig = 0; in msic_bus_sync_unlock() local 210 trig |= MSIC_GPIO_TRIG_RISE; in msic_bus_sync_unlock() 212 trig |= MSIC_GPIO_TRIG_FALL; in msic_bus_sync_unlock() 214 intel_msic_reg_update(reg, trig, MSIC_GPIO_INTCNT_MASK); in msic_bus_sync_unlock()
|
/drivers/iio/accel/ |
D | st_accel_buffer.c | 26 int st_accel_trig_set_state(struct iio_trigger *trig, bool state) in st_accel_trig_set_state() argument 28 struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig); in st_accel_trig_set_state()
|
/drivers/video/ |
D | pxa168fb.h | 266 #define CFG_FRAME_TRIG(trig) ((trig) << 31) argument 268 #define CFG_VSYNC_TRIG(trig) ((trig) << 28) argument
|
/drivers/isdn/hisax/ |
D | elsa.c | 353 if (cs->hw.elsa.trig) in elsa_interrupt() 354 byteout(cs->hw.elsa.trig, 0x00); in elsa_interrupt() 481 if (cs->hw.elsa.trig) in reset_elsa() 482 byteout(cs->hw.elsa.trig, 0xff); in reset_elsa() 671 if (cs->hw.elsa.trig) in Elsa_card_msg() 672 byteout(cs->hw.elsa.trig, 0xff); in Elsa_card_msg() 864 cs->hw.elsa.trig = cs->hw.elsa.base + ELSA_TRIG_IRQ; in setup_elsa_isa() 983 cs->hw.elsa.trig = cs->hw.elsa.base + ELSA_TRIG_IRQ; in setup_elsa_isapnp() 1016 cs->hw.elsa.trig = 0; in setup_elsa_pcmcia() 1074 cs->hw.elsa.trig = 0; in setup_elsa_pci() [all …]
|