{"id":818909,"url":"http://patchwork.ozlabs.org/api/covers/818909/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-imx/cover/1506480022-8995-1-git-send-email-yamada.masahiro@socionext.com/","project":{"id":19,"url":"http://patchwork.ozlabs.org/api/projects/19/?format=json","name":"Linux IMX development","link_name":"linux-imx","list_id":"linux-imx-kernel.lists.patchwork.ozlabs.org","list_email":"linux-imx-kernel@lists.patchwork.ozlabs.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1506480022-8995-1-git-send-email-yamada.masahiro@socionext.com>","list_archive_url":null,"date":"2017-09-27T02:40:20","name":"[v6,0/2] gpio: uniphier: UniPhier GPIO driver","submitter":{"id":65882,"url":"http://patchwork.ozlabs.org/api/people/65882/?format=json","name":"Masahiro Yamada","email":"yamada.masahiro@socionext.com"},"mbox":"http://patchwork.ozlabs.org/project/linux-imx/cover/1506480022-8995-1-git-send-email-yamada.masahiro@socionext.com/mbox/","series":[{"id":5273,"url":"http://patchwork.ozlabs.org/api/series/5273/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-imx/list/?series=5273","date":"2017-09-27T02:40:20","name":"gpio: uniphier: UniPhier GPIO driver","version":6,"mbox":"http://patchwork.ozlabs.org/series/5273/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/818909/comments/","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"BvSZ/yrB\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=nifty.com header.i=@nifty.com\n\theader.b=\"v0dr3Dqr\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y22MQ3GDmz9t3x\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tWed, 27 Sep 2017 12:48:50 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dx2Ox-0007cc-Nx; Wed, 27 Sep 2017 02:48:43 +0000","from conuserg-08.nifty.com ([210.131.2.75])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dx2IP-00022s-Rq for linux-arm-kernel@lists.infradead.org;\n\tWed, 27 Sep 2017 02:42:01 +0000","from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp\n\t[153.142.97.92]) (authenticated)\n\tby conuserg-08.nifty.com with ESMTP id v8R2eoYQ029272;\n\tWed, 27 Sep 2017 11:40:50 +0900"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:\n\tList-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:\n\tSubject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:\n\tReferences:List-Owner; bh=7ytgy0/mIbTgLeDLYduheQYAX2HPBecp/aQu0jlJnWA=;\n\tb=BvS\n\tZ/yrBcqfE9i/nVZh0es+RADKK9WdG0D3nRsjc5OYKgFd5Bv3iSQ+flk1xlMu3PoaJHlKle+7J/64V\n\th5FNG9LioOEjj8lbSnsSFxW/KAO6OG2AXCy+inmbtMHAsqFkj5P08iCcDQlS7U250eWogL75SVbgx\n\t0tX/aFRzQzcLSTvVgsRQEKAHI5C4pP0UboapBp3BibLCtHUIJhUKHXDPYIVT6W2ovZ5IaX0PE2NJN\n\t/k34WZQFZiBFTeYNMCN3M9vG11ZTvMUXIO8v/dILPPRqwz0vZTcDYToD+cYf5vSgAn9UQ6eiXuexG\n\tR9PNF8XuIxktD7UC+MSaX3u4EjVD58g==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com;\n\ts=dec2015msa; t=1506480051;\n\tbh=lrmfbzVXJ3yV3iP4p79dHBvZGUhM2zh1Xn7WJ+C4W/Y=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=v0dr3Dqrn2jnBLw9iR5uqzliku7iiPwZY+OtyR6o2AEOKjjmd1hCnpR3QpGAXc8cX\n\tKVrDkdZUANbPCtA383aDfUpMpSMzMQ+7hswQJ2hCAHLOf79NMyb47R9FxRTOe7jL5r\n\t63qhpSkkv10n6hUPOuJqOj1ZwqLFDEwGsaX5pZ+wTf+IQ0gs+/dYJN9T1HgGq6YE52\n\t7NPa49jjxmN48wLgam+KiA0IvlGQcTgUcm6sq2xsI4uhzR7m1Pm8o7pz9PyoqU8vyF\n\tNLbpSbHwBO4Iljc49bMi50vKkB5o74OtSXn/jnv6ro0bvTLnSikt9xvMDRY1DQJquh\n\tBWxa8jmemLHeg=="],"DKIM-Filter":"OpenDKIM Filter v2.10.3 conuserg-08.nifty.com v8R2eoYQ029272","X-Nifty-SrcIP":"[153.142.97.92]","From":"Masahiro Yamada <yamada.masahiro@socionext.com>","To":"linux-gpio@vger.kernel.org","Subject":"[PATCH v6 0/2] gpio: uniphier: UniPhier GPIO driver","Date":"Wed, 27 Sep 2017 11:40:20 +0900","Message-Id":"<1506480022-8995-1-git-send-email-yamada.masahiro@socionext.com>","X-Mailer":"git-send-email 2.7.4","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170926_194158_318368_093DB07C ","X-CRM114-Status":"GOOD (  15.55  )","X-Spam-Score":"-1.2 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.2 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, devicetree@vger.kernel.org,\n\tJassi Brar <jaswinder.singh@linaro.org>,\n\tGreg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\tLinus Walleij <linus.walleij@linaro.org>,\n\tRandy Dunlap <rdunlap@infradead.org>, \n\tlinux-kernel@vger.kernel.org, \"David S. Miller\" <davem@davemloft.net>,\n\tMasahiro Yamada <yamada.masahiro@socionext.com>,\n\tRob Herring <robh+dt@kernel.org>,\n\tMasami Hiramatsu <mhiramat@kernel.org>, \n\tMauro Carvalho Chehab <mchehab@kernel.org>,\n\tRob Herring <robh@kernel.org>, linux-arm-kernel@lists.infradead.org","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"},"content":"This series adds UniPhier GPIO driver.\n\nThe interrupt controller part is implemented by using hierarchy irqdomain.\n\nIMHO, the problem of the hierarchy irqdomain is that drivers must hard-code\nthe fwspec of the interrupt parent.  We will never know the DT binding of\nthe parent unless we parse #interrupt-cell, etc.\n\nI asked about this:\nhttps://lkml.org/lkml/2017/7/6/758\n\nApparently, the current kernel does not provide a systematic way to\ndescribe it.\n\nIn v1-v3, I hard-coded the parent hwirq numbers in the driver because\nirqchip drivers are forced to hard-code more or less about the parent.\nThis was not accepted by Linus Walleij.\n\nIn v4, I tried to use the new API irq_domain_push_irq().  I needed to\nchange the irqdomain framework to make it work for DT, but seemed\ncontroversial in the irqdomain subsystem review.\n\nIn v5, I tried another solution.  At first I thought it worked, but\nI found a dead-lock if an irq is disposed from the .alloc hook.\n\nAfter I considered more, I thought \"interrupts\" property does not\nmake much sense here because the last cell (which usually specifies\nthe trigger type) is useless for the hierarchy irqdomain.\n\nI decided to use a vendor-specific property.  This is what some drivers\nactually do.\n\n\nChanges in v6:\n  - Add \"socionext,interrupt-ranges\"\n\nChanges in v5:\n  - Split into a separate patch for DT binding\n  - Add a new patch to export of_phandle_args_to_fwspec\n  - Split DT binding into a separate file\n  - v4 depends on some patches that change irq_domain_push_irq(), but\n    they got negative feedback in the irqdomain subsystem review.\n    Yet another approach here.  Parse \"interrupts\" property in\n    .alloc() hook.  If the parent IRQ is already mapped, dispose it\n    and re-alloc in irqdomain manner.\n\nChanges in v4:\n  - Add COMPILE_TEST and select IRQ_DOMAIN_HIERARCHY\n  - Reimplement irqchip part by using irq_domain_push_irq()\n\nChanges in v3:\n  - Add .irq_set_affinity() hook\n  - Use irq_domain_create_hierarchy() instead of legacy\n    irq_domain_add_hierarchy()\n\nChanges in v2:\n  - Remove +32 offset for parent interrupts to follow the GIC\n    binding convention\n  - Let uniphier_gpio_irq_alloc() fail if nr_irqs != 1\n  - Allocate gpio_chip statically because just one instance is\n    supported\n  - Fix suspend and resume hooks\n\nMasahiro Yamada (2):\n  dt-bindings: gpio: uniphier: add UniPhier GPIO binding\n  gpio: uniphier: add UniPhier GPIO controller driver\n\n .../devicetree/bindings/gpio/gpio-uniphier.txt     |  40 ++\n MAINTAINERS                                        |   1 +\n drivers/gpio/Kconfig                               |   8 +\n drivers/gpio/Makefile                              |   1 +\n drivers/gpio/gpio-uniphier.c                       | 507 +++++++++++++++++++++\n include/dt-bindings/gpio/uniphier-gpio.h           |  18 +\n 6 files changed, 575 insertions(+)\n create mode 100644 Documentation/devicetree/bindings/gpio/gpio-uniphier.txt\n create mode 100644 drivers/gpio/gpio-uniphier.c\n create mode 100644 include/dt-bindings/gpio/uniphier-gpio.h"}