Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2696263ybl; Thu, 29 Aug 2019 11:36:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6YyXHxmt/FiSsSndUY2+Mp1hnajiiFPX4oVpCUEVlqMAPU2O6v1bc4gMkZpwuL4u/ITqD X-Received: by 2002:a17:90a:24cc:: with SMTP id i70mr11843769pje.12.1567103763823; Thu, 29 Aug 2019 11:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567103763; cv=none; d=google.com; s=arc-20160816; b=XsmJpILDDeRl1pg+j8zspmqSz46ZEyYB68Z/CVkIFVDP5Pmh1cRb7XIqVtY/68dUGK ebgq+znGT5t/1SNSRTnTwpMPmr2+5FQVqQh2sVLxPrc15/NafbqQCdd9RIO+kMEe8tK2 r0mZ2f2Xy0oLgY93P+h29EDQ5BuVw7CB2xBuP6Qq4kqtzvrUvXH17xlRhHNebtZvbZeh w4bZxfVw/m+Kjy1vxGzynbzF43i06OR1kBg/8McMMVdQDABq8MaLszjt2UkWU5w/PAko bE/+TMnZ+KIyoKczaXxTj+HoIzlv3cs9m1TdpQQCJw4walUjlMWGVSeizUpca2v4trWU NBFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature; bh=Q/GoS+/SlHe4VU0k2tuyy7w1CyeAPHyVcIpgOU2xG0o=; b=WUSN5gf2Ad+LlX7uX0I1ec+Xc09igjc+Y+FO5jFbizLUyrw1O2Cw65b61Mf+NSozWC 6/Tg1Q9RZ5xsSaXegXRccYE2mXTPGUX4BXzRDAX92BgpkqOsY6cd3CIAFsjxDqyVpFDa oe6oCLro40pHpBtKuUoNdMEJSHKs/XvO6Rv6H4A+zub+HDH816xLVD/lZOnhbo1ijEiC rLhEcpt+0JeWDfjYQV5N67vH/z+etMlzXMOiMpZn2V0ZldJ76H2Luji8mjKbY4+l5aWs Puu/1YHYNQJM5v8bD5yfbn568apAw4BIZU0GY++PvEB9lNn0m5DOBOrWiqMeKuj8CUp8 QsxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=KIgEPVQp; dkim=pass header.i=@codeaurora.org header.s=default header.b=Nyzgyb8c; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b10si2617982plk.367.2019.08.29.11.35.48; Thu, 29 Aug 2019 11:36:03 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=KIgEPVQp; dkim=pass header.i=@codeaurora.org header.s=default header.b=Nyzgyb8c; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728506AbfH2SfB (ORCPT + 99 others); Thu, 29 Aug 2019 14:35:01 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:59502 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726518AbfH2SfB (ORCPT ); Thu, 29 Aug 2019 14:35:01 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2F1F9686A4; Thu, 29 Aug 2019 18:12:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1567103699; bh=rS68WLR481l1COMdQ2jk/qCVOqr85DyICDhl53r3iQE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KIgEPVQpEQaxoE3SnjaRFx8tjgi/VAre9a+7+dnPGm1pH33cptaNhOKvLnwXrDPNl n2ciXi0FlxHIXKhmpXomZfU3sdQErwalP1QvJMOJzSXb1/mSl34lV0+Kn6hs9MDVFl J4WHpPK4W1+xbMpsiyOnXx+0vn0U7WOBng0fr2Dc= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from codeaurora.org (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ilina@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id B8EB468997; Thu, 29 Aug 2019 18:12:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1567102347; bh=rS68WLR481l1COMdQ2jk/qCVOqr85DyICDhl53r3iQE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nyzgyb8c62V8KHiqGWcqXJsfpL1vdt1tW7PnmZou0JbmKQjBHnp62ZrCDdtqj2IEA Np6D7cjv8U7RSZyHLXtWsDuNyOVKmdldOclcfUiZgFMJmFFXI8j5P5eos4CH/92fYf HuCM5eC1yOz4ftXxDl0BHN0nE5lciYqRV4VwP6ak= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B8EB468997 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=ilina@codeaurora.org From: Lina Iyer To: swboyd@chromium.org, evgreen@chromium.org, marc.zyngier@arm.com, linus.walleij@linaro.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, mkshah@codeaurora.org, linux-gpio@vger.kernel.org, rnayak@codeaurora.org, Lina Iyer Subject: [PATCH RFC 09/14] drivers: pinctrl: msm: fix use of deprecated gpiolib APIs Date: Thu, 29 Aug 2019 12:11:58 -0600 Message-Id: <20190829181203.2660-10-ilina@codeaurora.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190829181203.2660-1-ilina@codeaurora.org> References: <20190829181203.2660-1-ilina@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace gpiochip_irqchip_add() and gpiochip_set_chained_irqchip() calls by populating the gpio_irq_chip data structures instead. Signed-off-by: Lina Iyer --- drivers/pinctrl/qcom/pinctrl-msm.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index 7f35c196bb3e..76e8528e4d0a 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -1027,7 +1027,19 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl) pctrl->irq_chip.irq_request_resources = msm_gpio_irq_reqres; pctrl->irq_chip.irq_release_resources = msm_gpio_irq_relres; - ret = gpiochip_add_data(&pctrl->chip, pctrl); + chip->irq.chip = &pctrl->irq_chip; + chip->irq.default_type = IRQ_TYPE_NONE; + chip->irq.handler = handle_bad_irq; + chip->irq.fwnode = pctrl->dev->fwnode; + chip->irq.parent_handler = msm_gpio_irq_handler; + chip->irq.num_parents = 1; + chip->irq.parents = devm_kcalloc(pctrl->dev, 1, + sizeof(*chip->irq.parents), + GFP_KERNEL); + if (!chip->irq.parents) + return -ENOMEM; + + ret = devm_gpiochip_add_data(pctrl->dev, chip, pctrl); if (ret) { dev_err(pctrl->dev, "Failed register gpiochip\n"); return ret; @@ -1053,20 +1065,6 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl) } } - ret = gpiochip_irqchip_add(chip, - &pctrl->irq_chip, - 0, - handle_edge_irq, - IRQ_TYPE_NONE); - if (ret) { - dev_err(pctrl->dev, "Failed to add irqchip to gpiochip\n"); - gpiochip_remove(&pctrl->chip); - return -ENOSYS; - } - - gpiochip_set_chained_irqchip(chip, &pctrl->irq_chip, pctrl->irq, - msm_gpio_irq_handler); - return 0; } -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project