[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdxrBbnkBDfhb3q7KM3CkAzyAq86gqjLFD5aaKNzVJCHQ@mail.gmail.com>
Date: Tue, 27 Jul 2021 18:04:57 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Sergio Paracuellos <sergio.paracuellos@...il.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Linus Walleij <linus.walleij@...aro.org>,
gregory.0xf0@...il.com,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Florian Fainelli <f.fainelli@...il.com>,
Matthias Brugger <matthias.bgg@...il.com>,
René van Dorst <opensource@...rst.com>,
John Thomson <git@...nthomson.fastmail.com.au>,
NeilBrown <neil@...wn.name>,
Nicholas Mc Guire <hofrat@...dl.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/3] gpiolib: convert 'devprop_gpiochip_set_names' to
support multiple gpiochip banks per device
On Tue, Jul 27, 2021 at 5:48 PM Sergio Paracuellos
<sergio.paracuellos@...il.com> wrote:
>
> The default gpiolib-of implementation does not work with the multiple
> gpiochip banks per device structure used for example by the gpio-mt7621
> and gpio-brcmstb drivers. To fix these kind of situations driver code
> is forced to fill the names to avoid the gpiolib code to set names
> repeated along the banks. Instead of continue with that antipattern
> fix the gpiolib core function to get expected behaviour for every
> single situation adding a field 'offset' in the gpiochip structure.
> Doing in this way, we can assume this offset will be zero for normal
> driver code where only one gpiochip bank per device is used but
> can be set explicitly in those drivers that really need more than
> one gpiochip.
...
> + dev_warn(&gdev->dev, "gpio-line-names too short (length %d) "
> + "cannot map names for the gpiochip at offset %u\n",
Reflow this that string literal will be on one line (it's fine to be
over even 100).
> + count, chip->offset);
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists