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

Michal Simek monstr at monstr.eu
Thu Jun 20 17:51:22 EST 2013


On 06/17/2013 07:29 AM, Linus Walleij wrote:
> On Fri, May 31, 2013 at 9:34 AM, Michal Simek <monstr at monstr.eu> 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20130620/a7d42040/attachment-0001.sig>


More information about the devicetree-discuss mailing list