Re: Problem in loading module of Software trigger
On Sun, Mar 26, 2017 at 1:47 PM, Jonathan Cameron <jic23@jic23.retrosnub.co.uk> wrote:
Insmod will not pick up dependencies in the same way modprobe will.
Make sure to also insmod industrialio.ko and iio-sw-trigger.ko before the sw trigger module. I think those are the only ones you will need.
Thanks modprobe works for me as it's depended on industrialio-sw-trigger.ko But now I am facing one more probem with iio_generic_buffer in tools/iio I am trying to execute iio_generic_buffer: as given I can use -N <num> -t <trigger_name> I create trigger with name trig-sample present in /config/iio/triggers/trig-sample. $./iio_generic_buffer -N iio_dummy_part_no iio device number being used is 0 Failed to find the trigger my_dummy_device-trigger Its giving me ^ this error: What wrong I am doing? I have loaded all the modules including iio_dummy_evgen, iio_dummy. How I will be pass trig-sample as an argument to it? and one more question how can I find Trigger-number of a trigger. I am facing same problem with iio_event_monitor:- $ ./iio_event_monitor /sys/bus/iio/devices/iio_evgen/poke_ev0 getting following error:- Failed to retrieve event fd Same with all other events. This is working fine for me: echo 1 > /sys/bus/iio/devices/iio_evgen/poke_ev0 Thanks Simran
J
On 26 March 2017 08:02:05 BST, SIMRAN SINGHAL <singhalsimran0@gmail.com> wrote:
I read this documentation "Documentation/iio/iio_configfs.txt" for creating software trigger.
So, by following this I created the module with name iio-trig-sample.c in drivers/iio/trigger/.
iio-trigger-sample.c also compiled successfully.
Now, when I tried to insert module:
$ sudo insmod iio-trig-sample.ko insmod: ERROR: could not insert module iio-trig-sample.ko: Unknown symbol in module
Ans in /var/log/kern.log: I am getting following reason:- iio_trig_sample: Unknown symbol iio_unregister_sw_trigger_type (err 0) iio_trig_sample: Unknown symbol iio_register_sw_trigger_type (err 0) -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Hi, On Sun, Mar 26, 2017 at 9:51 PM, SIMRAN SINGHAL <singhalsimran0@gmail.com> wrote:
On Sun, Mar 26, 2017 at 1:47 PM, Jonathan Cameron <jic23@jic23.retrosnub.co.uk> wrote:
Insmod will not pick up dependencies in the same way modprobe will.
Make sure to also insmod industrialio.ko and iio-sw-trigger.ko before the sw trigger module. I think those are the only ones you will need.
Thanks
modprobe works for me as it's depended on industrialio-sw-trigger.ko
But now I am facing one more probem with iio_generic_buffer in tools/iio
I am trying to execute iio_generic_buffer: as given I can use -N <num> -t <trigger_name>
I create trigger with name trig-sample present in /config/iio/triggers/trig-sample.
How did you create the trigger here? The trigger must be created according to its type. So far we have only hrtimer trigger type, so creating a trigger implies creating a directory in: /config/iio/triggers/hrtimer See: http://lxr.free-electrons.com/source/Documentation/iio/iio_configfs.txt#L83
$./iio_generic_buffer -N iio_dummy_part_no iio device number being used is 0 Failed to find the trigger my_dummy_device-trigger
Its giving me ^ this error:
What wrong I am doing?
I have loaded all the modules including iio_dummy_evgen, iio_dummy.
How I will be pass trig-sample as an argument to it? and one more question how can I find Trigger-number of a trigger.
I am facing same problem with iio_event_monitor:-
$ ./iio_event_monitor /sys/bus/iio/devices/iio_evgen/poke_ev0
Here you should use the device node. It is usually /dev/iio:device0. If there is not already created by a daemon there, create it using mknod /dev/iio:device0 c major minor. The major and minor can be found in /sys/bus/iio/devices/iio:device0/dev file/
getting following error:- Failed to retrieve event fd
Same with all other events.
This is working fine for me: echo 1 > /sys/bus/iio/devices/iio_evgen/poke_ev0
thanks, Daniel.
participants (2)
-
Daniel Baluta -
SIMRAN SINGHAL