Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751848AbaBKJZ5 (ORCPT ); Tue, 11 Feb 2014 04:25:57 -0500 Received: from rtits2.realtek.com ([60.250.210.242]:60530 "EHLO rtits2.realtek.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751757AbaBKJZv (ORCPT ); Tue, 11 Feb 2014 04:25:51 -0500 X-SpamFilter-By: BOX Solutions SpamTrap 5.39 with qID s1B9OpYi010210, This message is accepted by code: ctloc85258 Message-ID: <52F9ED02.6000604@realtek.com> Date: Tue, 11 Feb 2014 17:27:30 +0800 From: Roger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Ulf Hansson CC: Samuel Ortiz , Lee Jones , Chris Ball , Greg Kroah-Hartman , Maxim Levitsky , Alex Dubov , Dan Carpenter , "linux-kernel@vger.kernel.org" , linux-mmc , , Wei WANG , Subject: Re: [PATCH v3 2/3] mmc: Add realtek USB sdmmc host driver References: <1391697307-23457-1-git-send-email-rogerable@realtek.com> <1391697307-23457-3-git-send-email-rogerable@realtek.com> <201402110748.s1B7miQ8010938@rtits1.realtek.com> In-Reply-To: <201402110748.s1B7miQ8010938@rtits1.realtek.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [172.21.81.189] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/10/2014 10:58 PM, Ulf Hansson wrote: > On 6 February 2014 15:35, wrote: >> From: Roger Tseng >> >> Realtek USB SD/MMC host driver provides mmc host support based on the Realtek >> USB card reader MFD driver. >> >> Signed-off-by: Roger Tseng >> --- >> drivers/mmc/host/Kconfig | 7 + >> drivers/mmc/host/Makefile | 1 + >> drivers/mmc/host/rtsx_usb_sdmmc.c | 1500 +++++++++++++++++++++++++++++++++++++ >> 3 files changed, 1508 insertions(+) >> create mode 100644 drivers/mmc/host/rtsx_usb_sdmmc.c [snip] >> +#ifdef CONFIG_PM_RUNTIME > > There are stubs for pm_runtime* functions, thus the ifdefs can be removed. > Please go though the complete patch and remove all instances. > >> + pm_runtime_put(sdmmc_dev(host)); > > I don't know so much about USB mmc hosts hardware, but I just wanted > to find out if I have understood this correct. > > You can't do fine grained power management of the USB parent device, > since it needs to be runtime resumed to be able keep the power the > card? Once it becomes runtime suspended, the power to the card will > thus also be dropped? > Yes, and to keep some internal state of the controller. [snip] >> +#ifdef CONFIG_PM > > I suppose this should be CONFIG_PM_SLEEP? > ... >> + err = mmc_suspend_host(mmc); > > This won't compile. The mmc_suspend_host API has been removed. > ... >> + return mmc_resume_host(mmc); > > This won't compile. The mmc_resume_host API has been removed. > ... >> +static struct platform_driver rtsx_usb_sdmmc_driver = { >> + .probe = rtsx_usb_sdmmc_drv_probe, >> + .remove = rtsx_usb_sdmmc_drv_remove, >> + .id_table = rtsx_usb_sdmmc_ids, >> + .suspend = rtsx_usb_sdmmc_suspend, >> + .resume = rtsx_usb_sdmmc_resume, > > Please use the modern pm_ops instead of the legacy suspend/resume callbacks. > I suggest you then also switch to use the SIMPLE_DEV_PM_OPS macro. I just missed the removal of mmc_suspend|resume_host. I'll remove all these unnecessary mmc host pm things as done in commit ff71c4bcb0af2730d047989e485303ae4e1ce794 for drivers of our PCIe devices. Thanks for pointing this out. > Kind regards > Ulf Hansson -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/