Searched refs:trig_info (Results 1 - 4 of 4) sorted by relevance

/linux-4.4.14/drivers/staging/iio/trigger/
H A Diio-trig-periodic-rtc.c34 struct iio_prtc_trigger_info *trig_info = iio_trigger_get_drvdata(trig); iio_trig_periodic_rtc_set_state() local
37 if (trig_info->frequency == 0 && state) iio_trig_periodic_rtc_set_state()
39 dev_dbg(&trig_info->rtc->dev, "trigger frequency is %u\n", iio_trig_periodic_rtc_set_state()
40 trig_info->frequency); iio_trig_periodic_rtc_set_state()
41 ret = rtc_irq_set_state(trig_info->rtc, &trig_info->task, state); iio_trig_periodic_rtc_set_state()
43 trig_info->state = state; iio_trig_periodic_rtc_set_state()
53 struct iio_prtc_trigger_info *trig_info = iio_trigger_get_drvdata(trig); iio_trig_periodic_read_freq() local
55 return sprintf(buf, "%u\n", trig_info->frequency); iio_trig_periodic_read_freq()
64 struct iio_prtc_trigger_info *trig_info = iio_trigger_get_drvdata(trig); iio_trig_periodic_write_freq() local
73 ret = rtc_irq_set_freq(trig_info->rtc, &trig_info->task, val); iio_trig_periodic_write_freq()
74 if (ret == 0 && trig_info->state && trig_info->frequency == 0) iio_trig_periodic_write_freq()
75 ret = rtc_irq_set_state(trig_info->rtc, iio_trig_periodic_write_freq()
76 &trig_info->task, 1); iio_trig_periodic_write_freq()
78 ret = rtc_irq_set_state(trig_info->rtc, &trig_info->task, 0); iio_trig_periodic_write_freq()
83 trig_info->frequency = val; iio_trig_periodic_write_freq()
122 struct iio_prtc_trigger_info *trig_info; iio_trig_periodic_rtc_probe() local
137 trig_info = kzalloc(sizeof(*trig_info), GFP_KERNEL); iio_trig_periodic_rtc_probe()
138 if (!trig_info) { iio_trig_periodic_rtc_probe()
142 iio_trigger_set_drvdata(trig, trig_info); iio_trig_periodic_rtc_probe()
145 trig_info->rtc = rtc_class_open(pdata[i]); iio_trig_periodic_rtc_probe()
146 if (!trig_info->rtc) { iio_trig_periodic_rtc_probe()
150 trig_info->task.func = iio_prtc_trigger_poll; iio_trig_periodic_rtc_probe()
151 trig_info->task.private_data = trig; iio_trig_periodic_rtc_probe()
152 ret = rtc_irq_register(trig_info->rtc, &trig_info->task); iio_trig_periodic_rtc_probe()
162 rtc_irq_unregister(trig_info->rtc, &trig_info->task); iio_trig_periodic_rtc_probe()
164 rtc_class_close(trig_info->rtc); iio_trig_periodic_rtc_probe()
166 kfree(trig_info); iio_trig_periodic_rtc_probe()
175 trig_info = iio_trigger_get_drvdata(trig); iio_trig_periodic_rtc_probe()
176 rtc_irq_unregister(trig_info->rtc, &trig_info->task); iio_trig_periodic_rtc_probe()
177 rtc_class_close(trig_info->rtc); iio_trig_periodic_rtc_probe()
178 kfree(trig_info); iio_trig_periodic_rtc_probe()
187 struct iio_prtc_trigger_info *trig_info; iio_trig_periodic_rtc_remove() local
194 trig_info = iio_trigger_get_drvdata(trig); iio_trig_periodic_rtc_remove()
195 rtc_irq_unregister(trig_info->rtc, &trig_info->task); iio_trig_periodic_rtc_remove()
196 rtc_class_close(trig_info->rtc); iio_trig_periodic_rtc_remove()
197 kfree(trig_info); iio_trig_periodic_rtc_remove()
/linux-4.4.14/drivers/iio/trigger/
H A Diio-trig-interrupt.c37 struct iio_interrupt_trigger_info *trig_info; iio_interrupt_trigger_probe() local
58 trig_info = kzalloc(sizeof(*trig_info), GFP_KERNEL); iio_interrupt_trigger_probe()
59 if (!trig_info) { iio_interrupt_trigger_probe()
63 iio_trigger_set_drvdata(trig, trig_info); iio_interrupt_trigger_probe()
64 trig_info->irq = irq; iio_interrupt_trigger_probe()
85 kfree(trig_info); iio_interrupt_trigger_probe()
95 struct iio_interrupt_trigger_info *trig_info; iio_interrupt_trigger_remove() local
98 trig_info = iio_trigger_get_drvdata(trig); iio_interrupt_trigger_remove()
100 free_irq(trig_info->irq, trig); iio_interrupt_trigger_remove()
101 kfree(trig_info); iio_interrupt_trigger_remove()
/linux-4.4.14/drivers/iio/
H A Dindustrialio-trigger.c67 int iio_trigger_register(struct iio_trigger *trig_info) iio_trigger_register() argument
71 trig_info->id = ida_simple_get(&iio_trigger_ida, 0, 0, GFP_KERNEL); iio_trigger_register()
72 if (trig_info->id < 0) iio_trigger_register()
73 return trig_info->id; iio_trigger_register()
76 dev_set_name(&trig_info->dev, "trigger%ld", iio_trigger_register()
77 (unsigned long) trig_info->id); iio_trigger_register()
79 ret = device_add(&trig_info->dev); iio_trigger_register()
85 list_add_tail(&trig_info->list, &iio_trigger_list); iio_trigger_register()
91 ida_simple_remove(&iio_trigger_ida, trig_info->id); iio_trigger_register()
96 void iio_trigger_unregister(struct iio_trigger *trig_info) iio_trigger_unregister() argument
99 list_del(&trig_info->list); iio_trigger_unregister()
102 ida_simple_remove(&iio_trigger_ida, trig_info->id); iio_trigger_unregister()
104 device_del(&trig_info->dev); iio_trigger_unregister()
/linux-4.4.14/include/linux/iio/
H A Dtrigger.h124 * @trig_info: trigger to be registered
126 int iio_trigger_register(struct iio_trigger *trig_info);
130 * @trig_info: trigger to be unregistered
132 void iio_trigger_unregister(struct iio_trigger *trig_info);

Completed in 196 milliseconds