From mboxrd@z Thu Jan 1 00:00:00 1970 From: zhangfei gao Subject: Re: [PATCH] mmc: sdio: reset card during power_restore Date: Wed, 29 Jun 2011 17:19:14 +0800 Message-ID: References: <20110605123852.BC6F39D401C@zog.reactivated.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from mail-qw0-f46.google.com ([209.85.216.46]:60165 "EHLO mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754153Ab1F2JTP (ORCPT ); Wed, 29 Jun 2011 05:19:15 -0400 Received: by qwk3 with SMTP id 3so515810qwk.19 for ; Wed, 29 Jun 2011 02:19:14 -0700 (PDT) In-Reply-To: Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Ohad Ben-Cohen Cc: linux-mmc@vger.kernel.org, Daniel Drake , Bing Zhao On Wed, Jun 29, 2011 at 4:57 PM, Ohad Ben-Cohen wrote: > On Wed, Jun 29, 2011 at 11:43 AM, zhangfei gao wrote: >> However still not fully understand how to call ->remove to power off >> wlan, using suspend system looks to me is only test method, which >> counting on bus_ops->suspend returns -ENOSYS. > > Please take a look at mac80211 and wl12xx. > > We're not using ->remove, ->probe or -ENOSYS at all. > > When the user brings up the interface, we then power up the chip and > download the firmware. > Likewise, when the interface is brought down, we just power off the chip. Thanks a lot Ohad & Daniel :) Enable wlan: # ifconfig up mlan0 -> power up the chip via runtime PM -> wlan_probe download the firmware Disable wlan: # ifconfig down mlan0 -> power down the chip via runtime PM -> wlan_remove ? So every time ifconfig up/down, the chip is power up/down, and firmware reloaded? Is this understand correct? Then runtime pm should also integrated into wlan driver as well.