From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH 2/2] gpiolib: Fix array members of same chip processed separately Date: Mon, 24 Sep 2018 10:13:02 +0200 Message-ID: References: <2785169.v6aIfS3K2k@z50> <20180923235336.22148-1-jmkrzyszt@gmail.com> <20180923235336.22148-3-jmkrzyszt@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <20180923235336.22148-3-jmkrzyszt@gmail.com> Sender: netdev-owner@vger.kernel.org To: Janusz Krzysztofik Cc: Jonathan Corbet , Miguel Ojeda Sandonis , Peter Korsgaard , Peter Rosin , Ulf Hansson , Andrew Lunn , Florian Fainelli , "David S. Miller" , Dominik Brodowski , Greg KH , kishon@ti.com, Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald , Jiri Slaby , Willy Tarreau , Geert Uytterhoeven , Sebastien Bourdelin List-Id: linux-i2c@vger.kernel.org On Mon, Sep 24, 2018 at 1:52 AM Janusz Krzysztofik wrote: > New code introduced by commit bf9346f5d47b ("gpiolib: Identify arrays > matching GPIO hardware") forcibly tries to find an array member which > has its array index number equal to its hardware pin number and set > up an array info for possible fast bitmap processing of all arrray > pins belonging to that chip which also satisfy that numbering rule. > > Depending on array content, it may happen that consecutive array > members which belong to the same chip but don't have array indexes > equal to their pin hardware numbers will be split into groups, some of > them processed together via the fast bitmap path, and rest of them > separetely. However, applications may expect all those pins being > processed together with a single call to .set_multiple() chip callback, > like that was done before the change. > > Limit applicability of fast bitmap processing path to cases where all > pins of consecutive array members starting from 0 which belong to the > same chip have their hardware numbers equal to their corresponding > array indexes. That should still speed up processing of applications > using whole GPIO banks as I/O ports, while not breaking simultaneous > manipulation of consecutive pins of the same chip which don't follow > the equal numbering rule. > > Cc: Jonathan Corbet > Signed-off-by: Janusz Krzysztofik Patch applied! Yours, Linus Walleij