From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E60B1C072A4 for ; Mon, 20 May 2019 06:03:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C551A20859 for ; Mon, 20 May 2019 06:03:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730657AbfETGDc (ORCPT ); Mon, 20 May 2019 02:03:32 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:17279 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726196AbfETGDb (ORCPT ); Mon, 20 May 2019 02:03:31 -0400 X-UUID: 0b1af7105e2f48fd873b32133c84ed3c-20190520 X-UUID: 0b1af7105e2f48fd873b32133c84ed3c-20190520 Received: from mtkmrs01.mediatek.inc [(172.21.131.159)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 450186333; Mon, 20 May 2019 14:03:26 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 20 May 2019 14:03:25 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 20 May 2019 14:03:25 +0800 Message-ID: <1558332205.11080.6.camel@mtkswgap22> Subject: Re: [PATCH 3/4] iio: adc: mediatek: SET_LATE_SYSTEM_SLEEP_PM_OPS support From: Chun-Hung Wu To: Jonathan Cameron CC: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland , Matthias Brugger , , , , , , , , , Date: Mon, 20 May 2019 14:03:25 +0800 In-Reply-To: <20190518113527.5210b0bf@archlinux> References: <1557994247-16739-1-git-send-email-chun-hung.wu@mediatek.com> <1557994247-16739-4-git-send-email-chun-hung.wu@mediatek.com> <20190518113527.5210b0bf@archlinux> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jonathan: Thanks for the prompt reply, On Sat, 2019-05-18 at 11:35 +0100, Jonathan Cameron wrote: > On Thu, 16 May 2019 16:10:46 +0800 > Chun-Hung Wu wrote: > > > Move suspend/resume to late_suspend and > > early_resume to gurantee users can use auxadc > guarantee > will fix it in next version. > > driver at suspend/resume stage. > No problem with the patch content, but we need a reason why they may > want to do so? Our thermal drivers uses auxadc at suspend/resume stage. In order to avoid auxadc suspended prior to thermal driver, we move auxadc to late_suspend and early_resume. Thanks, Chun-Hung > > Thanks, > > Jonathan > > > > Signed-off-by: Chun-Hung Wu > > --- > > drivers/iio/adc/mt6577_auxadc.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/iio/adc/mt6577_auxadc.c b/drivers/iio/adc/mt6577_auxadc.c > > index e1bdcc0..58d7cb2 100644 > > --- a/drivers/iio/adc/mt6577_auxadc.c > > +++ b/drivers/iio/adc/mt6577_auxadc.c > > @@ -326,9 +326,10 @@ static int mt6577_auxadc_remove(struct platform_device *pdev) > > return 0; > > } > > > > -static SIMPLE_DEV_PM_OPS(mt6577_auxadc_pm_ops, > > - mt6577_auxadc_suspend, > > - mt6577_auxadc_resume); > > +static const struct dev_pm_ops mt6577_auxadc_pm_ops = { > > + SET_LATE_SYSTEM_SLEEP_PM_OPS(mt6577_auxadc_suspend, > > + mt6577_auxadc_resume) > > +}; > > > > static const struct of_device_id mt6577_auxadc_of_match[] = { > > { .compatible = "mediatek,mt2701-auxadc", .data = &mt8173_compat}, > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chun-Hung Wu Subject: Re: [PATCH 3/4] iio: adc: mediatek: SET_LATE_SYSTEM_SLEEP_PM_OPS support Date: Mon, 20 May 2019 14:03:25 +0800 Message-ID: <1558332205.11080.6.camel@mtkswgap22> References: <1557994247-16739-1-git-send-email-chun-hung.wu@mediatek.com> <1557994247-16739-4-git-send-email-chun-hung.wu@mediatek.com> <20190518113527.5210b0bf@archlinux> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190518113527.5210b0bf@archlinux> Sender: linux-kernel-owner@vger.kernel.org To: Jonathan Cameron Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland , Matthias Brugger , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, wsd_upstream@mediatek.com, peter.wang@mediatek.com, kuohong.wang@mediatek.com, jg_poxu@mediatek.com List-Id: devicetree@vger.kernel.org Hi Jonathan: Thanks for the prompt reply, On Sat, 2019-05-18 at 11:35 +0100, Jonathan Cameron wrote: > On Thu, 16 May 2019 16:10:46 +0800 > Chun-Hung Wu wrote: > > > Move suspend/resume to late_suspend and > > early_resume to gurantee users can use auxadc > guarantee > will fix it in next version. > > driver at suspend/resume stage. > No problem with the patch content, but we need a reason why they may > want to do so? Our thermal drivers uses auxadc at suspend/resume stage. In order to avoid auxadc suspended prior to thermal driver, we move auxadc to late_suspend and early_resume. Thanks, Chun-Hung > > Thanks, > > Jonathan > > > > Signed-off-by: Chun-Hung Wu > > --- > > drivers/iio/adc/mt6577_auxadc.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/iio/adc/mt6577_auxadc.c b/drivers/iio/adc/mt6577_auxadc.c > > index e1bdcc0..58d7cb2 100644 > > --- a/drivers/iio/adc/mt6577_auxadc.c > > +++ b/drivers/iio/adc/mt6577_auxadc.c > > @@ -326,9 +326,10 @@ static int mt6577_auxadc_remove(struct platform_device *pdev) > > return 0; > > } > > > > -static SIMPLE_DEV_PM_OPS(mt6577_auxadc_pm_ops, > > - mt6577_auxadc_suspend, > > - mt6577_auxadc_resume); > > +static const struct dev_pm_ops mt6577_auxadc_pm_ops = { > > + SET_LATE_SYSTEM_SLEEP_PM_OPS(mt6577_auxadc_suspend, > > + mt6577_auxadc_resume) > > +}; > > > > static const struct of_device_id mt6577_auxadc_of_match[] = { > > { .compatible = "mediatek,mt2701-auxadc", .data = &mt8173_compat}, > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18E25C04AAF for ; Mon, 20 May 2019 06:03:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E2B9F20851 for ; Mon, 20 May 2019 06:03:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bi/+Rrsy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2B9F20851 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MvS634f0pZKjDKONm1W4YnAJo83MI6FjQmj5JbTvv+E=; b=bi/+Rrsy2s3aw1 CzMnZa3Qk110/Bx11NGyUD9SJvYb6wjKai5u3hTEQ/l36lJO54yjVjybjmnW5Y0uTP35BiHJfFPyq ATcVM4I+1YC+jkvbRSWhbOdap0BBEuGxouJoXMNbbZpQvWYOtUBoAXEQj08q8+Q3isxVj51YplLqq GH5LH8RgBIlooplSF01vGqeg8cqhLuIusxytqLTi86xkhyyjDcqIf6s6RJrn7G7hQ53s7aJ9l1gH+ To+QLh9YoApWV1CwABTyftFm4nNTNdScGtU4LvPBEuspDhkhUthdYSJnjAz1H1+nknCIkfJIloAp4 E9ZK6L6hHBoFipBSuFUQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSbOf-0003Xw-Pr; Mon, 20 May 2019 06:03:41 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSbOc-0003XS-Sd; Mon, 20 May 2019 06:03:40 +0000 X-UUID: 357d6eef7b404846864f74a3baaeb5db-20190519 X-UUID: 357d6eef7b404846864f74a3baaeb5db-20190519 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1490184342; Sun, 19 May 2019 22:03:28 -0800 Received: from mtkmbs08n1.mediatek.inc (172.21.101.55) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sun, 19 May 2019 23:03:26 -0700 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 20 May 2019 14:03:25 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 20 May 2019 14:03:25 +0800 Message-ID: <1558332205.11080.6.camel@mtkswgap22> Subject: Re: [PATCH 3/4] iio: adc: mediatek: SET_LATE_SYSTEM_SLEEP_PM_OPS support From: Chun-Hung Wu To: Jonathan Cameron Date: Mon, 20 May 2019 14:03:25 +0800 In-Reply-To: <20190518113527.5210b0bf@archlinux> References: <1557994247-16739-1-git-send-email-chun-hung.wu@mediatek.com> <1557994247-16739-4-git-send-email-chun-hung.wu@mediatek.com> <20190518113527.5210b0bf@archlinux> X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190519_230338_930703_A9FB3502 X-CRM114-Status: GOOD ( 17.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Lars-Peter Clausen , wsd_upstream@mediatek.com, linux-iio@vger.kernel.org, kuohong.wang@mediatek.com, linux-kernel@vger.kernel.org, Rob Herring , linux-mediatek@lists.infradead.org, peter.wang@mediatek.com, Peter Meerwald-Stadler , Hartmut Knaack , Matthias Brugger , jg_poxu@mediatek.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Jonathan: Thanks for the prompt reply, On Sat, 2019-05-18 at 11:35 +0100, Jonathan Cameron wrote: > On Thu, 16 May 2019 16:10:46 +0800 > Chun-Hung Wu wrote: > > > Move suspend/resume to late_suspend and > > early_resume to gurantee users can use auxadc > guarantee > will fix it in next version. > > driver at suspend/resume stage. > No problem with the patch content, but we need a reason why they may > want to do so? Our thermal drivers uses auxadc at suspend/resume stage. In order to avoid auxadc suspended prior to thermal driver, we move auxadc to late_suspend and early_resume. Thanks, Chun-Hung > > Thanks, > > Jonathan > > > > Signed-off-by: Chun-Hung Wu > > --- > > drivers/iio/adc/mt6577_auxadc.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/iio/adc/mt6577_auxadc.c b/drivers/iio/adc/mt6577_auxadc.c > > index e1bdcc0..58d7cb2 100644 > > --- a/drivers/iio/adc/mt6577_auxadc.c > > +++ b/drivers/iio/adc/mt6577_auxadc.c > > @@ -326,9 +326,10 @@ static int mt6577_auxadc_remove(struct platform_device *pdev) > > return 0; > > } > > > > -static SIMPLE_DEV_PM_OPS(mt6577_auxadc_pm_ops, > > - mt6577_auxadc_suspend, > > - mt6577_auxadc_resume); > > +static const struct dev_pm_ops mt6577_auxadc_pm_ops = { > > + SET_LATE_SYSTEM_SLEEP_PM_OPS(mt6577_auxadc_suspend, > > + mt6577_auxadc_resume) > > +}; > > > > static const struct of_device_id mt6577_auxadc_of_match[] = { > > { .compatible = "mediatek,mt2701-auxadc", .data = &mt8173_compat}, > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel