Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp487784imi; Thu, 21 Jul 2022 05:18:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ujKx2lR/PyZP+x7domFfPKjuzN4G6cd+KCnTnNpRUfOegBfjmPQRRIqCOLat4MnU9zTj4i X-Received: by 2002:a02:9101:0:b0:341:a089:e855 with SMTP id a1-20020a029101000000b00341a089e855mr669769jag.230.1658405934599; Thu, 21 Jul 2022 05:18:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658405934; cv=none; d=google.com; s=arc-20160816; b=bOqYA/ZUxsw+UkshNBGd2wEjfC0yK4BSrcLY/NMes3ln982pKT1OiRQIjg7qZ/N8pg ZeTnCuIHiQMLdLcbUgd8RNDHNsa6wImlt0mI64EmmjJn5nVA6BN4TwMZzQPHKbEFtVdL 5EyrxJJqjRCg3pEd3hdg2gk6HtKUGq4QRVWk+zLa89gXXj3bwkoraDw2RWOlKNK0NoMK SlvwKhIE6BS331OHAP7AAhc8uuK0E9uQSMpPIcuxvN+x0/554AmMGg8lvwhLDQMMoMXT 3Y2ExQUcx78kMoZ+SfsUS6XiOwJOY2CMVzEB3QFHB8uq8PwBW7fTPBOmYK22x5vwohxk k5bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=qo1/TVfLTJGsHaYVoEhj2LCqUeSkNzdL/yUEqADs3W4=; b=uYAEslbCvH/I2Tvhy6zaFZAIEMJvcrIgAJ7Y+JTqFo5Hdr5USt7IqoII21swippOlL 3JxrBkVc+CqGRaxxb1f+QCPOkq6vWOQQR/5RjCj27e4T1c2rEIJQLt/Rr28Emzic1l3g GMapxFyrHgJWl1Y+ILx4Y52oPDuxm8tVZ8AM+DEOU1yaxy8HfRI6Hc0o8d90VHrQdE8J lr+Y7Luy7N3UyXYDpHHoOfYTtT9UwYYwCDP/ASLcY2ANNV1Lfgs10kurfx03Hvx2n39s tZnj2fgXgOUIOtPw4YL7XAXXJr3PEjRlVTuep5MfUvG6Aw5nb5z4FU96xsBlup7ItKb0 INdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j11-20020a056e02154b00b002dc386c9a23si1417173ilu.76.2022.07.21.05.18.39; Thu, 21 Jul 2022 05:18:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233233AbiGULt0 (ORCPT + 99 others); Thu, 21 Jul 2022 07:49:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230230AbiGULtZ (ORCPT ); Thu, 21 Jul 2022 07:49:25 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEA7E823A6 for ; Thu, 21 Jul 2022 04:49:24 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oEUfx-0002Sl-Ls; Thu, 21 Jul 2022 13:49:05 +0200 Message-ID: <6cf47684e92d21a343dbb7861f5d4e5ad1949cdc.camel@pengutronix.de> Subject: Re: [PATCH v5 3/3] soc: imx: gpcv2: fix suspend/resume by setting GENPD_FLAG_IRQ_ON From: Lucas Stach To: Martin Kepplinger , rafael@kernel.org, khilman@kernel.org, ulf.hansson@linaro.org, robh@kernel.org, krzysztof.kozlowski@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, pavel@ucw.cz Cc: kernel@puri.sm, linux-imx@nxp.com, broonie@kernel.org, aford173@gmail.com, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Thu, 21 Jul 2022 13:49:03 +0200 In-Reply-To: <20220721043608.1527686-4-martin.kepplinger@puri.sm> References: <20220721043608.1527686-1-martin.kepplinger@puri.sm> <20220721043608.1527686-4-martin.kepplinger@puri.sm> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Donnerstag, dem 21.07.2022 um 06:36 +0200 schrieb Martin Kepplinger: > For boards that use power-domains' power-supplies that need interrupts > to work (like regulator over i2c), set GENPD_FLAG_IRQ_ON. > This will tell genpd to adjust accordingly. Currently it "only" sets the > correct suspend/resume callbacks. > > This fixes suspend/resume on imx8mq-librem5 boards (tested) and > imx8mq-evk (by looking at dts) and possibly more. > > Signed-off-by: Martin Kepplinger > --- > drivers/soc/imx/gpcv2.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c > index 6383a4edc360..e058aed76602 100644 > --- a/drivers/soc/imx/gpcv2.c > +++ b/drivers/soc/imx/gpcv2.c > @@ -1337,6 +1337,9 @@ static int imx_pgc_domain_probe(struct platform_device *pdev) > regmap_update_bits(domain->regmap, domain->regs->map, > domain->bits.map, domain->bits.map); > > + if (of_parse_phandle(domain->dev->of_node, "power-supply", 0)) We don't actually need to parse the phandle. For a simple presence check of_property_read_bool() is enough. Regards, Lucas > + domain->genpd.flags |= GENPD_FLAG_IRQ_ON; > + > ret = pm_genpd_init(&domain->genpd, NULL, true); > if (ret) { > dev_err(domain->dev, "Failed to init power domain\n");