[PATCH 2/2] libertas: implement if_sdio runtime power management
dsd at laptop.org
Tue Aug 2 12:05:31 EDT 2011
On 2 August 2011 10:04, Vasily Khoruzhick <anarsoul at gmail.com> wrote:
>> + ret = if_sdio_power_on(card);
> Why do you power on card here? Maybe it's possible do it in lbs_start_card?
The device must be powered while lbs_start_card() is executed. This is
because lbs_start_card() runs a few commands, such as reading the MAC
Moving the poweron/poweroff into lbs_start card() is possible, and I
guess you are also finding for SPI that the only thing you need to
power up the card for during probe is to execute lbs_start_card().
But personally I think it makes more sense at the interface driver
level. Moving it into lbs_start_card() would be problematic if you
ever needed the device powered for something else during the probe
routine - you'd be forced to power-cycle the card again before or
after running lbs_start_card().
>> + if_sdio_power_off(card);
> Same for power off.
The card should be powered off at this point because the network
interface is not up. It will then be powered on when userspace brings
More information about the libertas-dev