From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolin Chen Subject: Re: [PATCH V1] ASoC: fsl_ssi: refine ipg clock usage in this module Date: Tue, 9 Sep 2014 14:09:50 -0700 Message-ID: <20140909210949.GA1816@Asurada> References: <20140909183804.GA6944@Asurada> <540F5706.1050303@tabi.org> <20140909195928.GA5224@Asurada> <540F5D29.7040309@tabi.org> <20140909202710.GB5224@Asurada> <540F6506.4060302@tabi.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) by alsa0.perex.cz (Postfix) with ESMTP id CEE932652F4 for ; Tue, 9 Sep 2014 23:18:47 +0200 (CEST) Received: by mail-pd0-f177.google.com with SMTP id y10so1987243pdj.8 for ; Tue, 09 Sep 2014 14:18:46 -0700 (PDT) Content-Disposition: inline In-Reply-To: <540F6506.4060302@tabi.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Timur Tabi , Shengjiu Wang Cc: alsa-devel@alsa-project.org, tiwai@suse.de, Li.Xiubo@freescale.com, lgirdwood@gmail.com, broonie@kernel.org, mpa@pengutronix.de, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org List-Id: alsa-devel@alsa-project.org On Tue, Sep 09, 2014 at 03:37:26PM -0500, Timur Tabi wrote: > >However, my approach doesn't need any check. The open() or pm_resume() > >can just call clk_prepare_enable() directly. The __clk_enable() will > >then handle the 'clk == NULL' case: > > Yes, I was thinking the same thing. Because that's following your suggestion :) @Shengjiu Another thing I forgot to mention is we still need a return check for clk_prepare_enable() which isn't in the current version. And I said "doesn't need any check" is indicating the pre-check of the call. Thank you Nicolin From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [IPv6:2607:f8b0:400e:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 5BF9A1A003B for ; Wed, 10 Sep 2014 07:18:50 +1000 (EST) Received: by mail-pa0-f44.google.com with SMTP id kx10so6213915pab.17 for ; Tue, 09 Sep 2014 14:18:46 -0700 (PDT) Date: Tue, 9 Sep 2014 14:09:50 -0700 From: Nicolin Chen To: Timur Tabi , Shengjiu Wang Subject: Re: [PATCH V1] ASoC: fsl_ssi: refine ipg clock usage in this module Message-ID: <20140909210949.GA1816@Asurada> References: <20140909183804.GA6944@Asurada> <540F5706.1050303@tabi.org> <20140909195928.GA5224@Asurada> <540F5D29.7040309@tabi.org> <20140909202710.GB5224@Asurada> <540F6506.4060302@tabi.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <540F6506.4060302@tabi.org> Cc: alsa-devel@alsa-project.org, tiwai@suse.de, Li.Xiubo@freescale.com, lgirdwood@gmail.com, perex@perex.cz, broonie@kernel.org, mpa@pengutronix.de, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, Sep 09, 2014 at 03:37:26PM -0500, Timur Tabi wrote: > >However, my approach doesn't need any check. The open() or pm_resume() > >can just call clk_prepare_enable() directly. The __clk_enable() will > >then handle the 'clk == NULL' case: > > Yes, I was thinking the same thing. Because that's following your suggestion :) @Shengjiu Another thing I forgot to mention is we still need a return check for clk_prepare_enable() which isn't in the current version. And I said "doesn't need any check" is indicating the pre-check of the call. Thank you Nicolin From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752701AbaIIVSs (ORCPT ); Tue, 9 Sep 2014 17:18:48 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:55993 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750910AbaIIVSq (ORCPT ); Tue, 9 Sep 2014 17:18:46 -0400 Date: Tue, 9 Sep 2014 14:09:50 -0700 From: Nicolin Chen To: Timur Tabi , Shengjiu Wang Cc: Li.Xiubo@freescale.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.de, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, mpa@pengutronix.de Subject: Re: [PATCH V1] ASoC: fsl_ssi: refine ipg clock usage in this module Message-ID: <20140909210949.GA1816@Asurada> References: <20140909183804.GA6944@Asurada> <540F5706.1050303@tabi.org> <20140909195928.GA5224@Asurada> <540F5D29.7040309@tabi.org> <20140909202710.GB5224@Asurada> <540F6506.4060302@tabi.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <540F6506.4060302@tabi.org> User-Agent: Mutt/1.5.22 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 09, 2014 at 03:37:26PM -0500, Timur Tabi wrote: > >However, my approach doesn't need any check. The open() or pm_resume() > >can just call clk_prepare_enable() directly. The __clk_enable() will > >then handle the 'clk == NULL' case: > > Yes, I was thinking the same thing. Because that's following your suggestion :) @Shengjiu Another thing I forgot to mention is we still need a return check for clk_prepare_enable() which isn't in the current version. And I said "doesn't need any check" is indicating the pre-check of the call. Thank you Nicolin