2011-03-22 12:10:48 BF524 Standby and USB MUSB_HDRC driver
Reggy Perrin (UNITED STATES)
Message: 99136
Hi ADI folks,
We are working with the BF524 and standby mode. Periodically (1s intervals), and external interrupt source wakes our device to allow us to check for events and respond.
We have isolated our problems down to the MUSB_HDRC driver. If we do not load this driver, we can operate in this mode for extended periods of time (a device just ran all weekend, for example). If we load this driver, we see the device stop entering standby after some period of time (often in < 15m).
It appears to be related to the sysfs. We have created a test which which uses a "while loop" to go into standby and waits for the external interrupt. After receiving the interrupt, we go back into standby.
When entering standby, we write out "standby" to /sys/power/state. When the device fails to enter standby, we see the write to the sysfs occur, but the buffer that is sysfs actually receives is not correct. Instead of "standby", we are seeing "standbstandbstandb....." in the buffer.
Since the kernel triggers off of the value of "standby" being written to that sysfs entry, it never detects the incorrect string, and therefore never go into standby. If we don't load the MUSB_HDRC driver, this is written correctly every time.
Can you please assist in diagnosing this issue?
Thanks,
RP
QuoteReplyEditDelete
2011-03-22 12:24:35 Re: BF524 Standby and USB MUSB_HDRC driver
Mike Frysinger (UNITED STATES)
Message: 99137
how exactly are you writing standby to /sys/power/state ?
QuoteReplyEditDelete
2011-03-22 14:44:16 Re: BF524 Standby and USB MUSB_HDRC driver
Reggy Perrin (UNITED STATES)
Message: 99138
After configuring our support micro to wake us up every 1s, we do this loop:
echo 0 > proc/sys/kernel/printk //get rid of all prints to the terminal
while true; do
echo standby > /sys/power/state
done
QuoteReplyEditDelete
2011-03-22 14:57:03 Re: BF524 Standby and USB MUSB_HDRC driver
Mike Frysinger (UNITED STATES)
Message: 99139
if the system cannot currently go into standby, the write to /sys/power/state will fail. busybox's echo currently does not flush its I/O when a write error occurs, thus you end up writing partial strings over and over.
how are you looking at the sysfs buffer ? are you doing `cat /sys/power/state` ?
you really need to review the `dmesg` output when the first write fails. it should tell you why the system did not go into standby.
QuoteReplyEditDelete
2011-03-23 09:38:13 Re: BF524 Standby and USB MUSB_HDRC driver
Reggy Perrin (UNITED STATES)
Message: 99166
Thanks, Mike. You are right, we needed to make the write to /sys/power/state more robust. Once we did that, we are further along.
The issue isn't resolved, but we are still trying to work out how the musb_hdrc driver is affecting standby mode negatively.