Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1264845pxb; Wed, 2 Feb 2022 00:24:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyOn9GU963072MCYYp4F5ZPLp2AVB8x4KjcY5HeAtq5PYw8GHproM9XYkJdEen8ueL9Y5z6 X-Received: by 2002:a17:902:c40d:: with SMTP id k13mr29053933plk.151.1643790246544; Wed, 02 Feb 2022 00:24:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643790246; cv=none; d=google.com; s=arc-20160816; b=Bm3xQPvQzAOqdKb015dVXU3bihRLwqPIAScZlZ6GS29EFO3ogWJWGgD2PRDJL0xSRD E8oOlN8jEL/jCPT7gVvmexp2xWpC9tTJAl32Z/UeyT1/zq6mgl4Lb5l1mXNLLzBaC8zu UOb66gmXHyFi2JirtkKE1RwUVpB9AtdUgpLmRXwa7qiIO1XDjdf0iAto2QV4jI+ORs91 Bzy0+x0Lov0Wo8ewfeUtGf3iuVqxvHRdeV2CQC6D1bn4FxtfLtwFmJ5YvAHU9OmDZRQa vKxNJHeKaMDTQusZU4o9D9tN1nOJmJc99KWOgjSSv4l/kjv2YC7LACdxH3mByRajbfQb BgHA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6DAUClijAMumMWAdGH4ZMzibgwHAuWB9BHDWB3bxFDc=; b=wXPVkx4D5/X0VkkaiyOCm/6+ohdtljMzb6Q7uz6HlsRv3CmeX538rqnE28MRC35isx oldFjFJZL9pbTqU/J3RNzAhKakNsa7TtARxMhO1XfgQyoi2Fq4884Wh15yz+ry0+kieQ EGzj2IHgd/plcjXltZhy9d1zsZxGgo+n+qnLtZenNg6OCscrgx9pGUHW6sdpG9rwlpLj tRE61mdDCRBA1ApATaJ6zyjlmn8icXPGRIuVSafw/cgciSwL5hDtYarMMMa/jCO799DA ixf6NjnjtlognGSVETwkeu2LeEJyfgQBxrZUFSSNR2J+520BKCiYE/1NanLf4nmvd5Mu +yfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B3lw4d52; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o4si19425073plg.576.2022.02.02.00.23.54; Wed, 02 Feb 2022 00:24:06 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B3lw4d52; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237682AbiBAMDu (ORCPT + 99 others); Tue, 1 Feb 2022 07:03:50 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:52750 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237548AbiBAMDg (ORCPT ); Tue, 1 Feb 2022 07:03:36 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E5A96B82D95; Tue, 1 Feb 2022 12:03:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FC71C34100; Tue, 1 Feb 2022 12:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643717013; bh=KWL2fyg8MRHueo+NEu+eGDCCCAKrlXyhb1IXYgaqrtc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B3lw4d52fFz0bapRJ7Z+VB64gw4orIeO2n4aUWIS1xj1maM2zUFnCYYEGjk9ioEni ZjiEII/ommlLCge/BjAbg71DLtnW/N7qVTiA1O5lr1KbCE6v9eL60Y1E1KFiJPNPeM L7CtPZ3UEogF11sClIaCMNaBXxtiIf/OHEwNB5cYTRpWR4cg4hZe+FG8quXBJTNHSd 5Bmq4jlKxYsYSqoXwtbOacpEAM0j2u2okX6V2//Ul53CwcqX1XtppJ/vMP1IbNsrXL HZ2DjI10BIMbqeu3lr7djOOCQlutkQTiZiOz0d6G0+PDDB92CNUjRltnCEXUF7yx10 /guNYAFOce1gQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nErsh-004d46-OT; Tue, 01 Feb 2022 12:03:31 +0000 From: Marc Zyngier To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Cc: Linus Walleij , Bartosz Golaszewski , Matthias Brugger , Grygorii Strashko , Santosh Shilimkar , Kevin Hilman , Thomas Gleixner , Shawn Guo , Sascha Hauer , Avi Fishman , Tomer Maimon , Tali Perry , Emil Renner Berthing Subject: [PATCH 07/12] gpio: omap: Move PM device over to irq domain Date: Tue, 1 Feb 2022 12:03:05 +0000 Message-Id: <20220201120310.878267-8-maz@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220201120310.878267-1-maz@kernel.org> References: <20220201120310.878267-1-maz@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linus.walleij@linaro.org, brgl@bgdev.pl, matthias.bgg@gmail.com, grygorii.strashko@ti.com, ssantosh@kernel.org, khilman@kernel.org, tglx@linutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, avifishman70@gmail.com, tmaimon77@gmail.com, tali.perry1@gmail.com, kernel@esmil.dk X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move the reference to the device over to the irq domain. Signed-off-by: Marc Zyngier --- drivers/gpio/gpio-omap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index e099c39e0355..80ddc43fd875 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -986,7 +986,8 @@ static void omap_gpio_mod_init(struct gpio_bank *bank) writel_relaxed(0, base + bank->regs->ctrl); } -static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc) +static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc, + struct device *pm_dev) { struct gpio_irq_chip *irq; static int gpio; @@ -1052,6 +1053,7 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc) if (ret) return dev_err_probe(bank->chip.parent, ret, "Could not register gpio chip\n"); + irq_domain_set_pm_device(bank->chip.irq.domain, pm_dev); ret = devm_request_irq(bank->chip.parent, bank->irq, omap_gpio_irq_handler, 0, dev_name(bank->chip.parent), bank); @@ -1402,7 +1404,6 @@ static int omap_gpio_probe(struct platform_device *pdev) irqc->irq_bus_sync_unlock = gpio_irq_bus_sync_unlock, irqc->name = dev_name(&pdev->dev); irqc->flags = IRQCHIP_MASK_ON_SUSPEND; - irqc->parent_device = dev; bank->irq = platform_get_irq(pdev, 0); if (bank->irq <= 0) { @@ -1466,7 +1467,7 @@ static int omap_gpio_probe(struct platform_device *pdev) omap_gpio_mod_init(bank); - ret = omap_gpio_chip_init(bank, irqc); + ret = omap_gpio_chip_init(bank, irqc, dev); if (ret) { pm_runtime_put_sync(dev); pm_runtime_disable(dev); -- 2.30.2