From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiang Qiu Subject: Re: [PATCH v7 2/3] gpio: dwapb: convert device node to fwnode Date: Thu, 7 Apr 2016 19:14:27 +0800 Message-ID: <57064113.2040603@huawei.com> References: <1459926480-32966-1-git-send-email-qiujiang@huawei.com> <1459926480-32966-3-git-send-email-qiujiang@huawei.com> Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from szxga03-in.huawei.com ([119.145.14.66]:5263 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755385AbcDGLPC (ORCPT ); Thu, 7 Apr 2016 07:15:02 -0400 In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Andy Shevchenko Cc: Linus Walleij , Alexandre Courbot , Mika Westerberg , Alan Tull , Jamie Iles , charles.chenxin@huawei.com, "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "linux-acpi@vger.kernel.org" , linuxarm@huawei.com =E5=9C=A8 2016/4/6 21:01, Andy Shevchenko =E5=86=99=E9=81=93: > On Wed, Apr 6, 2016 at 10:07 AM, qiujiang wrote= : >> This patch converts device node to fwnode for dwapb driver, so >> as to provide a unified fwnode for DT and ACPI bindings. >> >> Acked-by: Andy Shevchenko >> Signed-off-by: qiujiang >=20 >> static struct dwapb_platform_data * >> -dwapb_gpio_get_pdata_of(struct device *dev) >> +dwapb_gpio_get_pdata(struct device *dev) >=20 > I don't remember if I had asked already > does it fit now one row? Hi Andy, It dose not fit one row yet, checkpatch.pl will report a warning. >=20 >> @@ -495,9 +493,10 @@ dwapb_gpio_get_pdata_of(struct device *dev) >> * Only port A can provide interrupts in all configu= rations of >> * the IP. >> */ >> - if (pp->idx =3D=3D 0 && >> - of_property_read_bool(port_np, "interrupt-contro= ller")) { >> - pp->irq =3D irq_of_parse_and_map(port_np, 0)= ; >> + if (dev->of_node && pp->idx =3D=3D 0 && >=20 > is_of_fwnode() && ? >=20 >> + fwnode_property_read_bool(fwnode, >> + "interrupt-control= ler")) { >> + pp->irq =3D irq_of_parse_and_map(to_of_node(= fwnode), 0); >> if (!pp->irq) >> dev_warn(dev, "no irq for this bank\= n"); >=20 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755887AbcDGLPE (ORCPT ); Thu, 7 Apr 2016 07:15:04 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:5263 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755385AbcDGLPC (ORCPT ); Thu, 7 Apr 2016 07:15:02 -0400 Reply-To: Subject: Re: [PATCH v7 2/3] gpio: dwapb: convert device node to fwnode References: <1459926480-32966-1-git-send-email-qiujiang@huawei.com> <1459926480-32966-3-git-send-email-qiujiang@huawei.com> To: Andy Shevchenko CC: Linus Walleij , Alexandre Courbot , Mika Westerberg , "Alan Tull" , Jamie Iles , , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "linux-acpi@vger.kernel.org" , From: Jiang Qiu Message-ID: <57064113.2040603@huawei.com> Date: Thu, 7 Apr 2016 19:14:27 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.74.160.152] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0203.57064127.00B8,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: ee4317522fc8ab9fecb86690e9ae68eb Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2016/4/6 21:01, Andy Shevchenko 写道: > On Wed, Apr 6, 2016 at 10:07 AM, qiujiang wrote: >> This patch converts device node to fwnode for dwapb driver, so >> as to provide a unified fwnode for DT and ACPI bindings. >> >> Acked-by: Andy Shevchenko >> Signed-off-by: qiujiang > >> static struct dwapb_platform_data * >> -dwapb_gpio_get_pdata_of(struct device *dev) >> +dwapb_gpio_get_pdata(struct device *dev) > > I don't remember if I had asked already > does it fit now one row? Hi Andy, It dose not fit one row yet, checkpatch.pl will report a warning. > >> @@ -495,9 +493,10 @@ dwapb_gpio_get_pdata_of(struct device *dev) >> * Only port A can provide interrupts in all configurations of >> * the IP. >> */ >> - if (pp->idx == 0 && >> - of_property_read_bool(port_np, "interrupt-controller")) { >> - pp->irq = irq_of_parse_and_map(port_np, 0); >> + if (dev->of_node && pp->idx == 0 && > > is_of_fwnode() && ? > >> + fwnode_property_read_bool(fwnode, >> + "interrupt-controller")) { >> + pp->irq = irq_of_parse_and_map(to_of_node(fwnode), 0); >> if (!pp->irq) >> dev_warn(dev, "no irq for this bank\n"); >