Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp550059ybb; Wed, 8 Apr 2020 05:21:25 -0700 (PDT) X-Google-Smtp-Source: APiQypKAQ71FwQDmkPWaTlYS10IaV0PHLBFwhBXQTfeky+IH21gDEKWCu4IrPaGJFQez3wu6s7Ib X-Received: by 2002:a05:6830:1313:: with SMTP id p19mr5517637otq.179.1586348485291; Wed, 08 Apr 2020 05:21:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586348485; cv=none; d=google.com; s=arc-20160816; b=TS60W+PjUi16jlf590QdpmjE9thNjpHOWmM/1gTYA/9nj9yR0mFT3+itynDka5HMAP mNPt0N6n4/Lk8aBNSzGXs+FM3eq92+q4gVgOGfgcUrBo7nuMXDAfdaHyt2YCcqi3Q1Qd SkAqVY5XLuXROvLqXBvzkgHUmS+btYA/dBWsbgTKIV97PfFgdXi1zCaXhwfOnBjrc6sH EUlaXXfwcTiwmfOYerdyKwUMg+ibMN0KWBDzrFdgBvm5kE0YteI4urJ9ASazQR1uv3lg xZ5zBH+ADZDbiNc/NaJ5WtcMYvUsJbnhAspwpc2ek3Nv8gSAggGG6xN/Tg4+TkM5SkcS oAHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=3HPmJadm94YjUaQXTNco/0VlSLGDxiGH1ojAlD5jvp8=; b=M/hIl2bjzRFdBnF0citEEcDWyBhXlZYSOFuwTwhnJr+SEprMWfsVT4zp7HO0ZSL3/8 se2Vyaaij6aGdt0tvhOA+h3AtYAuZJSL1A2TWuieO5OoNgE5VrzYc1W1hIyg8vIw0kfO Ad8wuuUG4+ATJIufcPmwYbbrOlJn3MduDc6J9YZ297kQw5Zgf4d1SPDB2aT4raXBFXgR QVK75MBlVCT5Z5onWeWXecQcA8Aj8Osv9w1y4Jw57W6FMSRgqjqDyKXz88v/SoLLVKPk 3x6Kkj88h6w2vuHVHXdf6mrd87VSH1f8oj+WNnWjEZtYsvPlL0sneQa1VCYmrxFddZP9 vQGQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 m18si1068941otp.244.2020.04.08.05.21.11; Wed, 08 Apr 2020 05:21:25 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728195AbgDHKfu (ORCPT + 99 others); Wed, 8 Apr 2020 06:35:50 -0400 Received: from inva020.nxp.com ([92.121.34.13]:43918 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbgDHKfu (ORCPT ); Wed, 8 Apr 2020 06:35:50 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 248741A16DB; Wed, 8 Apr 2020 12:35:49 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6BD031A0153; Wed, 8 Apr 2020 12:35:43 +0200 (CEST) Received: from titan.ap.freescale.net (titan.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 3334C40285; Wed, 8 Apr 2020 18:35:36 +0800 (SGT) From: Hui Song To: Shawn Guo , Li Yang , Rob Herring , Mark Rutland , Linus Walleij , Bartosz Golaszewski Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Song Hui Subject: [PATCH] gpio: mpc8xxx: Add shutdown function. Date: Wed, 8 Apr 2020 18:21:18 +0800 Message-Id: <20200408102118.17572-2-hui.song_1@nxp.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20200408102118.17572-1-hui.song_1@nxp.com> References: <20200408102118.17572-1-hui.song_1@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Song Hui The shutdown function needed to make interrupt handler to be NULL when kexec execute. Signed-off-by: Song Hui --- drivers/gpio/gpio-mpc8xxx.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index 604dfec..a24e6c5 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -446,9 +446,21 @@ static int mpc8xxx_remove(struct platform_device *pdev) return 0; } +static int mpc8xxx_shutdown(struct platform_device *pdev) +{ + struct mpc8xxx_gpio_chip *mpc8xxx_gc = platform_get_drvdata(pdev); + + if (mpc8xxx_gc->irq) { + irq_set_chained_handler_and_data(mpc8xxx_gc->irqn, NULL, NULL); + irq_domain_remove(mpc8xxx_gc->irq); + } + + return 0; +} static struct platform_driver mpc8xxx_plat_driver = { .probe = mpc8xxx_probe, .remove = mpc8xxx_remove, + .shutdown = mpc8xxx_shutdown, .driver = { .name = "gpio-mpc8xxx", .of_match_table = mpc8xxx_gpio_ids, -- 2.9.5