{"id":810440,"url":"http://patchwork.ozlabs.org/api/patches/810440/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/1504686995-30345-1-git-send-email-kever.yang@rock-chips.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1504686995-30345-1-git-send-email-kever.yang@rock-chips.com>","list_archive_url":null,"date":"2017-09-06T08:36:31","name":"[U-Boot] rockchip: pinctrl: use fdtdec_get_int_array() to get interrupt","commit_ref":null,"pull_url":null,"state":"rejected","archived":false,"hash":"3da4be7243ca6b4f53630f612a428ae76211dea5","submitter":{"id":64532,"url":"http://patchwork.ozlabs.org/api/people/64532/?format=json","name":"Kever Yang","email":"kever.yang@rock-chips.com"},"delegate":{"id":69486,"url":"http://patchwork.ozlabs.org/api/users/69486/?format=json","username":"ptomsich","first_name":"Philipp","last_name":"Tomsich","email":"philipp.tomsich@theobroma-systems.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1504686995-30345-1-git-send-email-kever.yang@rock-chips.com/mbox/","series":[{"id":1720,"url":"http://patchwork.ozlabs.org/api/series/1720/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=1720","date":"2017-09-06T08:36:31","name":"[U-Boot] rockchip: pinctrl: use fdtdec_get_int_array() to get interrupt","version":1,"mbox":"http://patchwork.ozlabs.org/series/1720/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/810440/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/810440/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"X0rxn/Fb\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnH4t2NmLz9sBW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  6 Sep 2017 18:37:00 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid A4888C21E27; Wed,  6 Sep 2017 08:36:53 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id BDE2AC21C3F;\n\tWed,  6 Sep 2017 08:36:50 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid F1A84C21C3F; Wed,  6 Sep 2017 08:36:48 +0000 (UTC)","from mail-pf0-f195.google.com (mail-pf0-f195.google.com\n\t[209.85.192.195])\n\tby lists.denx.de (Postfix) with ESMTPS id 8A7A8C21C26\n\tfor <u-boot@lists.denx.de>; Wed,  6 Sep 2017 08:36:47 +0000 (UTC)","by mail-pf0-f195.google.com with SMTP id q76so2790124pfq.5\n\tfor <u-boot@lists.denx.de>; Wed, 06 Sep 2017 01:36:47 -0700 (PDT)","from localhost.localdomain ([103.29.142.67])\n\tby smtp.gmail.com with ESMTPSA id\n\tf13sm2334982pfj.127.2017.09.06.01.36.42\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 06 Sep 2017 01:36:44 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_MSPIKE_H2,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no\n\tversion=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:from:to:cc:subject:date:message-id;\n\tbh=Qw4Ohu/HoDQeI8wtKOapBXYoftHWqFz1AelCMoXUMIo=;\n\tb=X0rxn/FblMrzpUt3XvFHYizR4sx49WuwBe3vHlXhTFndGjGgrO8CPayEm/GS691I2A\n\t0RO/7gHoBuphg2S1FsduuS65s4B+1JN8n3dfPoSvU+mg9ddURqLAzAxnbP8qBqv4KIQu\n\t9TSpcZe2Cytc3a3RdJKtceJawcjtP4krPMGTzNUWqKSSGWIqZjmhsvmAsGnAvE+P5wCq\n\ta63sP6UVErg42dKTSqxI5iDfcQlqIvW9zs4jr27JrN4X+mVn6ULpNoT1W1pFCWDNy5XL\n\tMBUfIsU8+AlvMjVQ3mXfcuIoJG3xZ3NNmx0cy0puxRaryz0Pt6PoXz7dyhcCeKzFqDrK\n\tV8cw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id;\n\tbh=Qw4Ohu/HoDQeI8wtKOapBXYoftHWqFz1AelCMoXUMIo=;\n\tb=CYmY/kyO2sFFrh1qw4IC/wvckFWqpQofTZJLhsuFCRmOpHhm36Z38Hgjry+DotGj1j\n\tfBroxIhRLw1FWSH/JCLJJdREKuTUR9X5Uj+D0n7akaZTzrftlmc/1ObsRXd4REnRFE4K\n\tIUbaLrQTmvCO+tr5FJCS8L0WY+F+m5DxJpNowI116P4FIo2kkdkIRBbwG9T0NbbR0Thy\n\tPrWZAP0PSzLqWha00bo8kyB3sUNxPcsbquNT1ZKYv+e34wWDatCrnIt4x2DJ2UlNeE4m\n\t0m/cAzCoWJhPKi/EOukMHemB65NqLFHG/p2lFO9wM9W/L7J5/iZqBQxGSsbKwcKycHqy\n\tuWvg==","X-Gm-Message-State":"AHPjjUgJPgVpMkIHwiE3BpMg4UFt41nb9aIskK0Nd5GBCGKdvy1R/qm6\n\tJ/QpgBw4l9i20g6s","X-Google-Smtp-Source":"ADKCNb7l2WOcVFQ6Yu4LrMnJwLstGS3SM49pyIYhZ5m/CimqYA4zLZ/g/B7W5Oz3N4LAiQ1Ur3s0ZA==","X-Received":"by 10.84.132.3 with SMTP id 3mr7472775ple.377.1504687005605;\n\tWed, 06 Sep 2017 01:36:45 -0700 (PDT)","From":"Kever Yang <kever.yang@rock-chips.com>","To":"u-boot@lists.denx.de","Date":"Wed,  6 Sep 2017 16:36:31 +0800","Message-Id":"<1504686995-30345-1-git-send-email-kever.yang@rock-chips.com>","X-Mailer":"git-send-email 1.9.1","Cc":"Romain Perier <romain.perier@collabora.com>,\n\tAndy Yan <andy.yan@rock-chips.com>,\n\tWilliam Zhang <william.zhang@rock-chips.com>","Subject":"[U-Boot] [PATCH] rockchip: pinctrl: use fdtdec_get_int_array() to\n\tget interrupt","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"Not all the udevice have a available DT node, eg. rksdmmc@ff500000.blk\nwhich add by mmc_bind(), if we use dev_read_u32_array(), the interface\nwill use the ofnode directly and end with:\n\tassert(ofnode_valid(node));\n\nUse fdtdec_get_int_array() instead.\n\nSigned-off-by: Kever Yang <kever.yang@rock-chips.com>\n---\n\n drivers/pinctrl/rockchip/pinctrl_rk3036.c | 3 ++-\n drivers/pinctrl/rockchip/pinctrl_rk3188.c | 3 ++-\n drivers/pinctrl/rockchip/pinctrl_rk3288.c | 3 ++-\n drivers/pinctrl/rockchip/pinctrl_rk3328.c | 3 ++-\n drivers/pinctrl/rockchip/pinctrl_rk3399.c | 3 ++-\n drivers/pinctrl/rockchip/pinctrl_rv1108.c | 3 ++-\n 6 files changed, 12 insertions(+), 6 deletions(-)","diff":"diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3036.c b/drivers/pinctrl/rockchip/pinctrl_rk3036.c\nindex 94f6d7a..9215d6c 100644\n--- a/drivers/pinctrl/rockchip/pinctrl_rk3036.c\n+++ b/drivers/pinctrl/rockchip/pinctrl_rk3036.c\n@@ -193,7 +193,8 @@ static int rk3036_pinctrl_get_periph_id(struct udevice *dev,\n \tu32 cell[3];\n \tint ret;\n \n-\tret = dev_read_u32_array(periph, \"interrupts\", cell, ARRAY_SIZE(cell));\n+\tret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),\n+\t\t\t\t   \"interrupts\", cell, ARRAY_SIZE(cell));\n \tif (ret < 0)\n \t\treturn -EINVAL;\n \ndiff --git a/drivers/pinctrl/rockchip/pinctrl_rk3188.c b/drivers/pinctrl/rockchip/pinctrl_rk3188.c\nindex 692d8e2..65c1f66 100644\n--- a/drivers/pinctrl/rockchip/pinctrl_rk3188.c\n+++ b/drivers/pinctrl/rockchip/pinctrl_rk3188.c\n@@ -370,7 +370,8 @@ static int rk3188_pinctrl_get_periph_id(struct udevice *dev,\n \tu32 cell[3];\n \tint ret;\n \n-\tret = dev_read_u32_array(periph, \"interrupts\", cell, ARRAY_SIZE(cell));\n+\tret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),\n+\t\t\t\t   \"interrupts\", cell, ARRAY_SIZE(cell));\n \tif (ret < 0)\n \t\treturn -EINVAL;\n \ndiff --git a/drivers/pinctrl/rockchip/pinctrl_rk3288.c b/drivers/pinctrl/rockchip/pinctrl_rk3288.c\nindex 3c9ae97..ab64056 100644\n--- a/drivers/pinctrl/rockchip/pinctrl_rk3288.c\n+++ b/drivers/pinctrl/rockchip/pinctrl_rk3288.c\n@@ -595,7 +595,8 @@ static int rk3288_pinctrl_get_periph_id(struct udevice *dev,\n \tu32 cell[3];\n \tint ret;\n \n-\tret = dev_read_u32_array(periph, \"interrupts\", cell, ARRAY_SIZE(cell));\n+\tret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),\n+\t\t\t\t   \"interrupts\", cell, ARRAY_SIZE(cell));\n \tif (ret < 0)\n \t\treturn -EINVAL;\n \ndiff --git a/drivers/pinctrl/rockchip/pinctrl_rk3328.c b/drivers/pinctrl/rockchip/pinctrl_rk3328.c\nindex c74163e..f3e7eec 100644\n--- a/drivers/pinctrl/rockchip/pinctrl_rk3328.c\n+++ b/drivers/pinctrl/rockchip/pinctrl_rk3328.c\n@@ -249,7 +249,8 @@ static int rk3328_pinctrl_get_periph_id(struct udevice *dev,\n \tu32 cell[3];\n \tint ret;\n \n-\tret = dev_read_u32_array(periph, \"interrupts\", cell, ARRAY_SIZE(cell));\n+\tret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),\n+\t\t\t\t   \"interrupts\", cell, ARRAY_SIZE(cell));\n \tif (ret < 0)\n \t\treturn -EINVAL;\n \ndiff --git a/drivers/pinctrl/rockchip/pinctrl_rk3399.c b/drivers/pinctrl/rockchip/pinctrl_rk3399.c\nindex cab268c..d93b903 100644\n--- a/drivers/pinctrl/rockchip/pinctrl_rk3399.c\n+++ b/drivers/pinctrl/rockchip/pinctrl_rk3399.c\n@@ -350,7 +350,8 @@ static int rk3399_pinctrl_get_periph_id(struct udevice *dev,\n \tu32 cell[3];\n \tint ret;\n \n-\tret = dev_read_u32_array(periph, \"interrupts\", cell, ARRAY_SIZE(cell));\n+\tret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),\n+\t\t\t\t   \"interrupts\", cell, ARRAY_SIZE(cell));\n \tif (ret < 0)\n \t\treturn -EINVAL;\n \ndiff --git a/drivers/pinctrl/rockchip/pinctrl_rv1108.c b/drivers/pinctrl/rockchip/pinctrl_rv1108.c\nindex cda94f4..bdf3910 100644\n--- a/drivers/pinctrl/rockchip/pinctrl_rv1108.c\n+++ b/drivers/pinctrl/rockchip/pinctrl_rv1108.c\n@@ -108,7 +108,8 @@ static int rv1108_pinctrl_get_periph_id(struct udevice *dev,\n \tu32 cell[3];\n \tint ret;\n \n-\tret = dev_read_u32_array(periph, \"interrupts\", cell, ARRAY_SIZE(cell));\n+\tret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),\n+\t\t\t\t   \"interrupts\", cell, ARRAY_SIZE(cell));\n \tif (ret < 0)\n \t\treturn -EINVAL;\n \n","prefixes":["U-Boot"]}