For reacting on interrupts in user space, I need provide the functionality to notify Power fail interrupts to user.
I am a beginner in this area. Currently I am using QT application in freescale board(IMX-6) with Ubuntu Linux. How can i get the power fail interrupt in Linux?
Any guidance will be appreciated
Regards,
Arun
Can i use userspace IO with IRQ driver loading? Please correct me if am wrong.
The i.MX6 SABRE Automotive board does not have any dedicated backup power supply, only a couple of bulk capacitors.
The board includes the MMPF0100 companion PMIC for i.MX6 series processors. The PMIC provides the power to the processor, memories and peripherals. The PMIC can signal the undervoltage condition on its input to the processor by asserting its INTB interrupt signal (active low). On the SABRE Automotive board, the INTB signal of PMIC is connected to the GPIO5_16 signal (DISP0_DAT22 pad) of the processor. So, actually, you can use the userspace GPIO driver to enable the corresponding interrupt. Also, you should enable the corresponding interrupt within PMIC using existing low-level I2C driver.
You can get at least the kernel version of Linux BSP using 'uname -a' command.
Best Regards,
Artur
Hi Artur,
Thanks for the explanation.
>>you can use the userspace GPIO driver to enable the corresponding interrupt
I think this is already enabled in my board. My /sys/class/gpio directory shows the following
export gpiochip128 gpiochip192 gpiochip232 gpiochip248 gpiochip64 unexport
gpiochip0 gpiochip160 gpiochip224 gpiochip240 gpiochip32 gpiochip96
>>you should enable the corresponding interrupt within PMIC using existing low-level I2C driver.
How can i do that? can you please elaborate
>>You can get at least the kernel version of Linux BSP using 'uname -a' command.
Below is the o/p.
Linux imx6qpsabreauto 3.14.52.828-svn828 #7 SMP PREEMPT Wed Mar 16 15:26:01 CET 2016 armv7l GNU/Linux
To make me able to provide you with an accurate answer, please describe the task in more details.
1. What i.MX6-based board do you use? Is it one of the reference boards by NXP/FSL? Please specify the exact board name.
2. What Linux version do you use? Is it one of the Linux BSPs by NXP? If so, please specify the exact package release number.
3. What should be the hardware source of the Power Fail interrupt? Is it an external Power Management IC (PMIC), or some comparator/voltage monitor, or something else? Please specify.
Best Regards,
Artur
Hi Artur,
Thanks for your reply!. Following are the details.
1. I am using i.mx6 Series SABRE( for automotive CPU card)
2.Sorry I dont know the linux release number
3.Power management means?. We are just connecting power code directly to board
I think board have some backup and will get some milliseconds after power failure. So, I want do some operation in my application when power failure happens.
Regards,
Arun