Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755842AbbHQPmd (ORCPT ); Mon, 17 Aug 2015 11:42:33 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:46149 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755375AbbHQPma (ORCPT ); Mon, 17 Aug 2015 11:42:30 -0400 X-AuditID: cbfee61a-f79a06d000005c6f-ab-55d200e4732f From: Bartlomiej Zolnierkiewicz To: Eduardo Valentin Cc: Greg Kroah-Hartman , Jiri Slaby , Fabio Estevam , Sascha Hauer , Linux PM , linux-serial@vger.kernel.org, LKML Subject: Re: [PATCHv4 2/4] serial: imx: add runtime pm support Date: Mon, 17 Aug 2015 17:40:59 +0200 Message-id: <2095117.mcCCLIRizo@amdc1976> User-Agent: KMail/4.13.3 (Linux/3.13.0-57-generic; KDE/4.13.3; x86_64; ; ) In-reply-to: <1439613468-22366-3-git-send-email-edubezval@gmail.com> References: <1439613468-22366-1-git-send-email-edubezval@gmail.com> <1439613468-22366-3-git-send-email-edubezval@gmail.com> MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset=us-ascii X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRmVeSWpSXmKPExsVy+t9jQd0nDJdCDb4eE7eYf+Uaq8XDq/4W zYvXs1lM2fCByeLyrjlsFp97jzBanFncy27xd/smFgcOj52z7rJ77J+7ht2j/6+Bx/otV1k8 Pm+SC2CN4rJJSc3JLEst0rdL4MqYsuMgW8F5nort39ezNjD+5exi5OSQEDCR2HD6JjOELSZx 4d56NhBbSGAWo8Tdc/xdjFxA9ldGiWfr+plAEmwCVhIT21cxgtgiAloSJy5tZwIpYhboYpJ4 d+cTK0hCWMBO4uat+0BTOThYBFQltr1TAgnzCmhKHH33mB3EFhXwkvj+qwFsMaeAi8SyT/8Z IRbXShx7uIcZol5Q4sfkeywgNrOAvMS+/VNZIWwtifU7jzNNYAS6EqFsFpKyWUjKFjAyr2KU SC1ILihOSs81zEst1ytOzC0uzUvXS87P3cQIDvhnUjsYD+5yP8QowMGoxMOr8edCqBBrYllx Ze4hRgkOZiUR3pmfLoYK8aYkVlalFuXHF5XmpBYfYpTmYFES55XdsDlUSCA9sSQ1OzW1ILUI JsvEwSnVwMgYtjNQQi9rVsrhvqpth6Ru8aewCqinz5vYcUDmyUEdE4Wj2/2dhaZL1WhKdJ+s e1m3ek+htcWradXcJzttdn6sttq3coL6PuPdsyQldaaVlf8NrOi7Of1yr8Ay5qLX69K86su3 aH/w+ab/LFT5Knftx6W/LD5uEb5gy3tpw67EZ8Z1KUdWhSmxFGckGmoxFxUnAgCZYk1adAIA AA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1821 Lines: 46 Hi, On Friday, August 14, 2015 09:37:46 PM Eduardo Valentin wrote: > This change introduces the runtime pm support on imx serial > driver. The objective is to be able to idle the uart > port whenever it is not in use while still being able > to wake it up when needed. The key changes in this patch are: > 1. Move the clock handling to runtime pm. Both, ipg and per, > are now handled in the suspend and resume callbacks. Only > enabling and disabling the clocks are handled in runtime > suspend and resume, so we are able to use runtime pm > in IRQ context. > 2. Clocks are prepared in probe and unprepared in remove, > so we do not need to prepare (may sleep) in runtime pm. > 3. We mark the device activity based on uart and console > callbacks. Whenever the device is needed and we want to > access registers, we runtime_pm_get and then mark its > last usage when we are done. This is done also across > IRQs and DMA callbacks. > 4. We reuse the infrastructure in place for suspend and > resume, so we do not need to redo wakeup configuration, > or context save and restore. > > After this change, the clocks are still sane, in the sense > of having balanced clock prepare and enable. The clock changes in this patch seem to make this driver non-functional with CONFIG_PM=n. Have you tested your changes with CONFIG_PM=n? Generally the driver should not depend on PM support to enable its clocks. We had this issue in few Exynos-specific drivers not that long time ago.. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics -- 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/