LInux kernel: invoke callback function in user space from the kernel space

I am writing a Linux user space application. Where I want to invoke registered callback function in user space area from the kernel space. Here the interrupt arriving on GPIO pin (For this event trigger I am using external button press) and registered function getting called in user space.

For your information I am using hardware is Jetson Xavier NX board running with linux OS (tegra-4.9) and GPIO9 AUDIO_MCLK connected to external switch (push button).

Is there any method is available to do this?

Thanks in advance for your response
Krrish

hello kannakishan37,

you could use this GitHub - NVIDIA/jetson-gpio: A Python library that enables the use of Jetson's GPIOs,
there’s sample, button_interrupt.py for your reference,
thanks

Hi JerryChang

Thanks for your response.

I am looking specially in c language.

Is there any reference code in C language.

Thanks

check this discussion thread, Topic 144550, for several ways to access GPIOs. such as, kernel APIs, python scripts, C++ samples.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.