Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4675221yba; Mon, 20 May 2019 01:33:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzM6we6H2hOusKMWsBWxPcK5Z9Out/sxOLC75GvQqX1uy77gURahPoP4Mo0plkyt9g6AUDz X-Received: by 2002:a17:902:163:: with SMTP id 90mr75486754plb.212.1558341219358; Mon, 20 May 2019 01:33:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558341219; cv=none; d=google.com; s=arc-20160816; b=qOX0UZohnQRIMADbjcubSeo726vFS49yRSrZ8cMbj7IMVVc0IYn/Y12ps92UdOzclh 7mrTt1cJUYJ+nZPFpzAn9aSMJ9QQmvtXAZc6Eq4EUbSGaazffHLYosYWscR4Q6OgDsYD GKsxkEc2TCI6LdGwnMlWrStDzJ6I+PeZX9glrrIvp1IgRt8il7FgCbyi2E57GgWDYFIf Oqpux8+zJdsG8WKacEHShxm53qppcNCF0dMD9140m7iajarS50zq8FwhJoNROP5UvtiK qBBaqKZ6Ui8xyR7tq3e9yzaPiZaP1EdfI03AG53MvA3KfxDv4Enfe2TCAWS0EPIHXXhO Ml6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=33YX5R8PmkzdWm+eur9703rXCTwKjIvAQ3tNLBN8u/4=; b=MywVkHxXlz+kJ6hYv7pBpexNpt9hSawYPdPdmvuIR4CI3MklKJYBguBThElvz9Y4pN npkZkqPtwHEhEBuECBrWNfy0c1nbPeAYWB47sEAH8QjtnLUW6e3pTaNYsEULVj65bC0U IRUjkXvHYL3WR4aAayWO1ZGem4mPDa2NeXayRZrKOtvfwo7rad37Zmg7BLAxYdp3vBi3 o0eUg+i65QaOi/5nQ/k9cYnTpzNFWth/HLQeHfaiB64eVVhNOhoKdBtGpSjWyXN/bBEk ym1S1cfkpm8/g8HDn0y5cXUofxXHnz9VXZ0F8VL7mIyLlC6CfG+QRovLjv4iimbFtlgt Mjkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=MmgHf+Ka; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si18675190pgu.189.2019.05.20.01.33.24; Mon, 20 May 2019 01:33:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=MmgHf+Ka; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730805AbfETGsR (ORCPT + 99 others); Mon, 20 May 2019 02:48:17 -0400 Received: from mail-eopbgr60068.outbound.protection.outlook.com ([40.107.6.68]:18715 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726052AbfETGsR (ORCPT ); Mon, 20 May 2019 02:48:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=33YX5R8PmkzdWm+eur9703rXCTwKjIvAQ3tNLBN8u/4=; b=MmgHf+Kaqd89N/aQ6IBnsC6tiI03CZ1Le1UtCRiNngxVaPXyOLphIK4O8rn56XDBx1weH2LOR2INPD6rG0z7woLOP/gswxphwskq61TIWn3mStDH87UYPsNit8j6iVTDVx5uFvYzhphT4Q6tfrLPCaAngNissvbpEQvD4UeYEas= Received: from AM5PR0402MB2865.eurprd04.prod.outlook.com (10.175.44.16) by AM5PR0402MB2689.eurprd04.prod.outlook.com (10.175.46.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1900.16; Mon, 20 May 2019 06:48:13 +0000 Received: from AM5PR0402MB2865.eurprd04.prod.outlook.com ([fe80::d8ed:b418:4ee9:a51]) by AM5PR0402MB2865.eurprd04.prod.outlook.com ([fe80::d8ed:b418:4ee9:a51%9]) with mapi id 15.20.1900.020; Mon, 20 May 2019 06:48:13 +0000 From: Ran Wang To: Pavel Machek CC: Leo Li , Rob Herring , Mark Rutland , "Rafael J . Wysocki" , Len Brown , Greg Kroah-Hartman , "linuxppc-dev@lists.ozlabs.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" Subject: RE: [PATCH V2 3/3] soc: fsl: add RCPM driver Thread-Topic: [PATCH V2 3/3] soc: fsl: add RCPM driver Thread-Index: AQHVDGHzIQrvIPzRX0ytn5pxhdLuLqZy/bMAgACX+4A= Date: Mon, 20 May 2019 06:48:13 +0000 Message-ID: References: <20190517033946.30763-1-ran.wang_1@nxp.com> <20190517033946.30763-3-ran.wang_1@nxp.com> <20190519213844.GH31403@amd> In-Reply-To: <20190519213844.GH31403@amd> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=ran.wang_1@nxp.com; x-originating-ip: [92.121.36.198] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5d0f9db8-930c-42dc-005c-08d6dcef215a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:AM5PR0402MB2689; x-ms-traffictypediagnostic: AM5PR0402MB2689: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-forefront-prvs: 004395A01C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(39860400002)(136003)(396003)(346002)(366004)(189003)(199004)(26005)(186003)(305945005)(9686003)(7736002)(55016002)(2906002)(3846002)(99286004)(7416002)(6116002)(76176011)(33656002)(316002)(25786009)(5660300002)(53546011)(6506007)(74316002)(68736007)(7696005)(52536014)(446003)(11346002)(476003)(486006)(4326008)(6916009)(6436002)(14444005)(256004)(102836004)(229853002)(53936002)(86362001)(64756008)(66946007)(66556008)(66476007)(73956011)(76116006)(66446008)(8936002)(71200400001)(71190400001)(54906003)(81156014)(6246003)(8676002)(66066001)(478600001)(14454004)(81166006);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0402MB2689;H:AM5PR0402MB2865.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: GPFJe1rRXtwMD0DZ7BXyf/zcy3pI4o6DSiAVXZwVRIaHUfSDmfyJ50ibcznwpXuQmiY6vshHb+xb4IRfKSuoxgu9NQghvNA9dFQIK1mzUKz+MG+q5QEKvKPJRLY29FqHIPdh4n+0ajP6Y+G8YMwJOZGeHfTQ/gN4f6OSAqTb7VurEZVH16m+Pg76+zXNyXp77SRPpdfcvPU82nsR6WeislODehwvMnM2I5QJwpTynQFKohDYsqu66FO57Dxzs9a1guHAMuFB7oJP0HUJesiYO0J4yP6EQDLIzY/yyO81B0gGFlNwaMNMsiDblrSqRSQgZwgtZDhlZovVI+X3rsphlFHG5UElZHmk4J83zH2LCOD/UINnXlSGsHjXPymWc+YyeTlfjF2B3h1iqfn0wjB2PrhIO3bJiJb002x7X7dTE54= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d0f9db8-930c-42dc-005c-08d6dcef215a X-MS-Exchange-CrossTenant-originalarrivaltime: 20 May 2019 06:48:13.3584 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0402MB2689 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pavel, On Monday, May 20, 2019 05:39, Pavel Machek wrote: >=20 > Hi! >=20 >=20 > > + > > +struct rcpm { > > + unsigned int wakeup_cells; > > + void __iomem *ippdexpcr_base; > > + bool little_endian; > > +}; >=20 > Inconsistent whitespace OK, will make them aligned. >=20 > > +static int rcpm_pm_prepare(struct device *dev) { > > + struct device_node *np =3D dev->of_node; > > + struct wakeup_source *ws; > > + struct rcpm *rcpm; > > + u32 value[RCPM_WAKEUP_CELL_MAX_SIZE + 1], tmp; > > + int i, ret; > > + > > + rcpm =3D dev_get_drvdata(dev); > > + if (!rcpm) > > + return -EINVAL; > > + > > + /* Begin with first registered wakeup source */ > > + ws =3D wakeup_source_get_next(NULL); > > + while (ws) { >=20 > while (ws =3D wakeup_source_get_next(NULL)) ? Actually, we only pass NULL to wakeup_source_get_next() at very first call to get 1st wakeup source. Then in the while loop, we will fetch next source but not 1st, that's different. I am afraid your suggestion is not quite correct. >=20 > > +static int rcpm_probe(struct platform_device *pdev) { > > + struct device *dev =3D &pdev->dev; > > + struct resource *r; > > + struct rcpm *rcpm; > > + int ret; >=20 > Whitespace. OK, will update, thanks for your review. Regards, Ran