Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp530895ybb; Wed, 8 Apr 2020 05:01:05 -0700 (PDT) X-Google-Smtp-Source: APiQypLbmb4y5fkVTxuS1QcsQpIA3ZAvNOliaPmxhlSBf6lszwXYGvVa6Jvvy6jaYS0fKaXBqIhc X-Received: by 2002:a9d:6ad9:: with SMTP id m25mr5511266otq.160.1586347265817; Wed, 08 Apr 2020 05:01:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586347265; cv=none; d=google.com; s=arc-20160816; b=yX0a2lMtwJ2KiJR7310i03QWUMyfFFlfRgsjq0cQw+WwzwTCbPMepq/cm2ZbQpE+X8 2ikkh6EVh33NtmzoUn5R4jIAIaTfl3sOHNxm55Gxpx1gEmRM8cLYhX6Uc2f4lNJfVSzi LtmlAoLNhoBempX77HIFxqzZitFqwyoFFNGJPDjQ0cDp3a3TgDMjR7JTZaOH9fh3QArW V+GFJoVmj6pnk21OGtkMAAUtSI7oOIGEATPsk76PzlPwLAoo74gqWPtwDpLfk07JlCOS pJIbChksgSLzQChXJNLld3a/3WS0Cl/p2e0JrCuwfmiXaVyqX7oPf80FBwRr/st1weTa jWPA== 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=sl9ZsFvkKf2/27ODs/CswQdn1/U7wfrX8I2zt+cIrrpFO9pDZb+BIsnDRBi8dRGaFE A+l06VAQEeEFxT8+GiJhkwok4JhbLBuhKTYJ9NlyXVJN4YzxEbw8upzr9FNmaeRZeOzU dzYfC3lHi5DyQoyt7Ombqem6SHC5a7P+bybC/Y1qmZyuwARMVIuZ1EE/foc+NO80kT7N o4zVsZzJ2HBhCEZFks0zSO2At39+Ev7d/2BMIDubWohlN4d+FCZpQEFRUMI6kCFo8KQm 0SO2PYx4P/h7Nfc+4nY6WU/IaD8sE5Cqq6AjzLXRByFGGiIXxk4Ihw5UDy30AmqaYPzi Xotw== 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 r18si2583744otq.124.2020.04.08.05.00.50; Wed, 08 Apr 2020 05:01:05 -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 S1728353AbgDHLJl (ORCPT + 99 others); Wed, 8 Apr 2020 07:09:41 -0400 Received: from inva021.nxp.com ([92.121.34.21]:33052 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728081AbgDHLJl (ORCPT ); Wed, 8 Apr 2020 07:09:41 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id A9CB520144F; Wed, 8 Apr 2020 13:09:39 +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 31588201476; Wed, 8 Apr 2020 13:09:36 +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 938A5402D5; Wed, 8 Apr 2020 19:09:31 +0800 (SGT) From: Hui Song To: linux-devel@linux.nxdi.nxp.com 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:55:22 +0800 Message-Id: <20200408105522.18194-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