From patchwork Wed Sep 13 08:56:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 112413 Delivered-To: patch@linaro.org Received: by 10.80.202.13 with SMTP id d13csp712747edi; Wed, 13 Sep 2017 01:57:56 -0700 (PDT) X-Google-Smtp-Source: ADKCNb6LM95IkBFkXpJiYPw8aOF715yurVCYQuYOg8crPsqVbJhvw+f+eEFk7QJyX9MIHEdZT/5P X-Received: by 10.84.132.4 with SMTP id 4mr6798021ple.449.1505293076496; Wed, 13 Sep 2017 01:57:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505293076; cv=none; d=google.com; s=arc-20160816; b=jfh8Ah9WatU/FTeAPUBqL18vcZtUzr9AIivVphZbppvI0Kd3i+GfTb3RYvE5B64t7x W5D9agFw9wU12E3WicnDmtIBC4NCgOfhlmAanHXTYBhKjAb59JUXF5A4nUcRqwfhAI1T G3UE/F9nGFmFeBbUGsH9kGOMyflyS0ejfbg+AJKKlNghkYJk2Wg/RCX+0kLwMfCwbWnX g29E2WcdLsSLIonew4soX5ynq/hkmfwIgSmP+VyrnxMmiulC86uv2pcjllfM781IGMRC PNTIjSKGbXDTTbbY+MZXrLM0zQsZVUHkPiQ8W7Ql10/wCxHGUgE938CCbMyDQb+IVa3Y phvw== 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:dkim-signature:dkim-filter :arc-authentication-results; bh=Fi0rMYmY34XQC0s7Emb9gJxaVO+VmzBCKsLBPuTRECI=; b=Zngm2+hjgudouoXcqZdEWENqF326B8T/sKBcvniWLq0hvLBtgs8i8xlTGptlxnZeDT dyQqqGQsm4x78gathZNchq7Y2abPUGe1No2IEHRuNujNl5VJK8/uhvsNkgvDdApxTcqz AhAree6Ivr/cCTX/aPRHwJaLCfB57qntRwZrEQ1+DcwOPXDT0YuBZbixEm2v8dM0sqxU pPWjo0ZI9HarV+3K87EnASLfmOiF2HLeKm1dFf6aTOvWxTxrbSp3ddavcpIjXkYZifTf jD2E3U4IBgVlntYZ2zgB/FswPDH3mBFhiWZ3qCmtDvEddPmnInUCODK1zT/NILehGYtN 1Zzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=tNqCiR+k; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 9si9162243pgr.594.2017.09.13.01.57.56; Wed, 13 Sep 2017 01:57:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=tNqCiR+k; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751529AbdIMI5z (ORCPT + 5 others); Wed, 13 Sep 2017 04:57:55 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:63482 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751509AbdIMI5y (ORCPT ); Wed, 13 Sep 2017 04:57:54 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id v8D8ugqj027391; Wed, 13 Sep 2017 17:56:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com v8D8ugqj027391 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1505293004; bh=K71TLI2/P3W5pwWNaeGBWb/aEFj77mq1rVvWPb8V2yc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tNqCiR+k1LS9sStTgVnfvEBXEfxYZ/xYBrL4uhmK/vlUIg82j2S9V2jh+ad5EqNWc otvvHP8Sz/kIfVFIz9tp+VE7r46iQKmZMbN3n/WGAc2+mGbKejOmkbSMzDWV1Qw05B wZKF71hCm62mmcvo/yzKV3qfv6JDYR4JhFbSohq3ens8rihj+Sb8ZX7Ip/jHEQMi56 4Rr6wyOXDx89JzEjq1eNJ3WEzvztakrZkRx4WB5+rXawdhjtJtLVNFSDMzl2C9KTi6 ylIr1QOnPgPdfxOKRYBloYdlAkTfg+KtUUAmLrurQuN5MGJl/XZut7OR2Cgm5iXMIP kiuinI0BGzgNA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Marc Zyngier , linux-gpio@vger.kernel.org Cc: Thomas Gleixner , Jason Cooper , Rob Herring , Linus Walleij , David Daney , Masami Hiramatsu , Jassi Brar , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v5 1/3] irqdomain: export of_phandle_args_to_fwspec Date: Wed, 13 Sep 2017 17:56:28 +0900 Message-Id: <1505292990-22957-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505292990-22957-1-git-send-email-yamada.masahiro@socionext.com> References: <1505292990-22957-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This helper will be useful for irqchip drivers that need to convert DT binding into IRQ fwspec. Signed-off-by: Masahiro Yamada --- This patch is necessary for my GPIO driver. Since it is trivial enough, I hope Marc will allow this to go though the GPIO subsystem. If this patch is rejected, I can copy this function into my GPIO driver, but I'd like to avoid code duplication. include/linux/irqdomain.h | 2 ++ kernel/irq/irqdomain.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 81e4889..440772c 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -259,6 +259,8 @@ extern void irq_set_default_host(struct irq_domain *host); extern int irq_domain_alloc_descs(int virq, unsigned int nr_irqs, irq_hw_number_t hwirq, int node, const struct cpumask *affinity); +extern void of_phandle_args_to_fwspec(struct of_phandle_args *irq_data, + struct irq_fwspec *fwspec); static inline struct fwnode_handle *of_node_to_fwnode(struct device_node *node) { diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index e84b705..e34cd63 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -727,8 +727,8 @@ static int irq_domain_translate(struct irq_domain *d, return 0; } -static void of_phandle_args_to_fwspec(struct of_phandle_args *irq_data, - struct irq_fwspec *fwspec) +void of_phandle_args_to_fwspec(struct of_phandle_args *irq_data, + struct irq_fwspec *fwspec) { int i; @@ -738,6 +738,7 @@ static void of_phandle_args_to_fwspec(struct of_phandle_args *irq_data, for (i = 0; i < irq_data->args_count; i++) fwspec->param[i] = irq_data->args[i]; } +EXPORT_SYMBOL_GPL(of_phandle_args_to_fwspec); unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec) {