Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp550044ybb; Wed, 8 Apr 2020 05:21:24 -0700 (PDT) X-Google-Smtp-Source: APiQypLxQ6bI2BXa3zI8a93NTiMWmxJW8SE/sQ11kZI123HiPSstIKYBfm7aTMbq8TIaaRcV3m5Z X-Received: by 2002:aca:ba42:: with SMTP id k63mr1839863oif.15.1586348484570; Wed, 08 Apr 2020 05:21:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586348484; cv=none; d=google.com; s=arc-20160816; b=cP/txUXfCt7F8bBYHAOOF7z6NuMjgD/Tah/gcvqlSlG5EbhXoJSLoWwRx7Lf/dE0cN 7l62tUEbqQA5Wcz4OdozCr7xqeypnuzTDRIB9BUv6JWvffuU2OEjuVlME6xCnF97oxPu wKBevJnMUo+W29WWG7mRG5+DCSqS+IwU2bZRJF/tKLHU0UJgNiegjjh6xwNbdXYV8v4E +vFYqo+7GY0ZTUHKz+9Ryd6zh6bplGguDMxBOmWvV1B7kOiuYvhmHVZta7VmTQRXNAyS IVfNvP6GahkUw/H1jismosYxtZhkozo7TqGQCaR+8RdZz3LNm8INUCwkldPUWuP/LJNW 2F1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=3HPmJadm94YjUaQXTNco/0VlSLGDxiGH1ojAlD5jvp8=; b=as6DfcfmbTTeqB8Hn8/W2YdhXrTeOWSednV+fIqgbrHvakwMvvE7d5QZK26ZCLiRxx FZBx5CuhJDTC68/fIgitXzK9buuXRrwQ+4uj/TbPsAibGBboZrs25SmLd6pusiOXOcv0 4ll8L/IsP3ezGsqDPV75KOV4Gu+uNv1KqEPlaE/T1lJmONem/g79/EhROoYfxWqjrLUv ySKHOXfSRp7uhsXfVDhpXRNWml9O/nRkA6HiKKitlZBjHRtESug+5uAF3B78iHy6TtEr +Um+Ypa5j8l7C1KRyjcAq5MNUTEC0334tJbSeuDC2VGFsDlNjJsozdn6v63GHCRCZiWy p1eg== 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 k70si2421186oih.24.2020.04.08.05.21.10; Wed, 08 Apr 2020 05:21:24 -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 S1728160AbgDHKfq (ORCPT + 99 others); Wed, 8 Apr 2020 06:35:46 -0400 Received: from inva021.nxp.com ([92.121.34.21]:59628 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbgDHKfp (ORCPT ); Wed, 8 Apr 2020 06:35:45 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id A4A2F201437; Wed, 8 Apr 2020 12:35:43 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 8311D201436; Wed, 8 Apr 2020 12:35:37 +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 48D95402E4; Wed, 8 Apr 2020 18:35:30 +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 v1] gpio: mpc8xxx: Add shutdown function. Date: Wed, 8 Apr 2020 18:21:17 +0800 Message-Id: <20200408102118.17572-1-hui.song_1@nxp.com> X-Mailer: git-send-email 2.9.5 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