Re: [PATCH 1/2] GPIO: Add support for dual channel in gpio-xilinx.c

From: Michal Simek
Date: Thu Jun 20 2013 - 03:51:37 EST


On 06/17/2013 07:29 AM, Linus Walleij wrote:
> On Fri, May 31, 2013 at 9:34 AM, Michal Simek <monstr@xxxxxxxxx> wrote:
>> On 05/31/2013 09:14 AM, Linus Walleij wrote:
>
>>> It's OK, but fix the boolean member so as to just needing to
>>> be present:
>>>
>>> xlnx,is-dual;
>>>
>>> Rather than
>>>
>>> xlnx,is-dual = <1>;
>>
>> Surely I can do it but it means to change our BSP and because
>> this IP is used on Microblaze from beginning this change
>> breaks all DTSes from past.
>
> I think of_property_read_bool() will accept
> xlnx,is-dual = <1>; to mean the same as xlnx,is-dual;
> try it.

First of all sorry for delay.
You are right that of_property_read_bool()
also accept xlnx,is-dual = <1>;
but also accept and return 1 when xlnx,is-dual = <0>;
which is incorrect behaviour.

If of_prorety_read_bool return 0 for case when xlnx,is-dual = <0>
we can use it.
Maybe this will be good change for this function behaviour.
If there is also value then use it. 0 -> false, 1 -> true

Thanks,
Michal

--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


Attachment: signature.asc
Description: OpenPGP digital signature