Hi Ulf,
Thanks for the prompt reply!
On Monday, June 25, 2018 05:00 PM, Ulf Hansson wrote:
On 24 June 2018 at 22:46, Daniel Mack <daniel@xxxxxxxxxx> wrote:
Please advise, I'm happy to test approaches and send patches.
From a top level point of view, I think this needs to be changed:
1)
In cases when the libertas sdio driver's ->suspend() callback, thinks
of returning -ENOSYS, it should instead call if_sdio_power_off().
Depending if if_sdio_power_save() has already been called, this shall
be skipped.
The important thing here is to disable the SDIO func device and to
release the SDIO irq.
2)
During resume, depending on whether the earlier ->suspend() callback
invoked if_sdio_power_off(), libertas sdio driver's ->resume()
callback should call if_sdio_power_on().
This should re-initiate the libertas sdio device and re-program the
firmware. To complete these actions, the firmware file also needs to
be fetched, which requires file system accesses also to be resumed.
We also need to wait for the firmware programming to be completed,
hence also do a "wait_event(card->pwron_waitq, priv->fw_ready);" from
somewhere.
Great, thanks, that helped a lot! I have something that does the job ob
my board. Will send out a patch shortly.
Best regards,
Daniel