Problem in loading module of Software trigger

SIMRAN SINGHAL singhalsimran0 at gmail.com
Sun Mar 26 14:51:56 EDT 2017


On Sun, Mar 26, 2017 at 1:47 PM, Jonathan Cameron
<jic23 at 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 at 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 at 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.



More information about the Kernelnewbies mailing list