Hi,
I'm using an i.mx6ull based custom board and is battery powered. I have an LCD device driver using i2c. I need to enable all segments during booting and wait for three seconds then disable all segments. Once all segments are turned off, I need to print some messages on the display.
- For waiting three seconds I have used mdelay(3000). This causes kernel panic when it is powered from a battery(Battery was fully charged and there is no severe voltage drop). It works as expected when it is powered from USB. Also, if we split the mdelay(3000) to (mdelay(1000) X 3 times) or (mdelay(2000) and mdelay(1000)), no issue is found. What would be the reason for it? Any workaround for this?
- Since mdelay was causing panic, I created a timer delay and initialized a tasklet for displaying a message from timer ISR. There are around 30-40 i2c transactions for displaying the message. While executing this it throws.

It takes a long time to boot. Is it a clock stretching? What will be the best solution for the given requirement?
This is bit critical. Please reply fast.
Thanks in advance.