[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNATaT74Cr8S6WBkgezQJfnh6w4qRe8dqxS0_Zz6c_onJfA@mail.gmail.com>
Date: Thu, 16 Jul 2015 13:07:20 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [Question] How to implement GPIO driver for sparse hw numbers?
Hi Linus,
2015-07-15 7:04 GMT+09:00 Linus Walleij <linus.walleij@...aro.org>:
> On Fri, Jun 19, 2015 at 5:27 AM, Masahiro Yamada
> <yamada.masahiro@...ionext.com> wrote:
>
>> In my understanding, the GPIO driver framework requires that
>> the hw numbers should be contiguous within each GPIO chip.
>
> Yes but noone says that .request() to the driver has to succeed
> on every GPIO so just cover all GPIOs from 0 to 307 with
> your GPIO chip and then implement your "holes" in the GPIO
> range from 0 to 307 by letting .request() fail.
Thanks,
At first I also thought about it, but finally I did not adopt it.
Having holes in the GPIO range is not handy because:
[1] When we map a gpio range into a pin range,
we must divide "gpio-ranges" property into many lines
gpio-ranges = <phandle 0 x 8
phandle 10 (x+8) 8
phandle 20 (x+16) 8
phandle 30 (x+24) 8
...
[2] implementation of .set_multiple() gets more complicated
--
Best Regards
Masahiro Yamada
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists