From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751200AbcBJNDu (ORCPT ); Wed, 10 Feb 2016 08:03:50 -0500 Received: from mga09.intel.com ([134.134.136.24]:46488 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750728AbcBJNDt (ORCPT ); Wed, 10 Feb 2016 08:03:49 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,425,1449561600"; d="scan'208";a="881194869" Subject: Re: [RFC PATCH] mmc: sdhci-of-at91: don't put device in suspend after probe To: nicolas.ferre@atmel.com, Ludovic Desroches References: <1455098283-14500-1-git-send-email-ludovic.desroches@atmel.com> <56BB2414.1040606@intel.com> <20160210125139.GB14937@odux.rfo.atmel.com> Cc: ulf.hansson@linaro.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: <56BB3459.6090506@intel.com> Date: Wed, 10 Feb 2016 15:00:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160210125139.GB14937@odux.rfo.atmel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/02/16 14:51, Ludovic Desroches wrote: > Hi Adrian, > > On Wed, Feb 10, 2016 at 01:50:44PM +0200, Adrian Hunter wrote: >> On 10/02/16 11:58, Ludovic Desroches wrote: >>> By putting the device in suspend at the end of the probe, it is >>> impossible to wake up on non software event such as card >>> insertion/removal. >>> >>> Signed-off-by: Ludovic Desroches >>> --- >>> >>> Hi, >>> >>> Since I had no feedback on this topic: >>> http://permalink.gmane.org/gmane.linux.kernel.mmc/35160 >>> >>> I would like to no more put the device in suspend at the end of the probe. If >>> my device is suspended at the end of the probe, I have no issue to resume on >>> a software event such as mounting my sdcard but hardware event such as card >>> insertion and removal do not trigger a resume. >> >> You can't use runtime PM unless you have a way to wake-up. >> > > Thanks for your feedback. I am a bit disappointed since Ulf advised me to use > runtime PM instead of system PM. > >> Currently, sdhci disables card detect interrupts when runtime suspended, >> and drivers use a card-detect GPIO to wake-up. >> > > It is what I have seen going through the sdhci layer. So next question is: > is it normal to not take care of card detect interrupts? We keep enabled > some IRQs probably for SDIO modules IRQ but not for card detection. I > don't understand the reason. Does sdhci-of-at91.c generate card detect interrupts while runtime suspended?