From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Herbrechtsmeier Date: Fri, 20 Jul 2018 21:31:40 +0200 Subject: [U-Boot] [RFC PATCH] gpio: zynq: Setup bank_name to dev->name In-Reply-To: <3a5a2fbe9d0aad4fdbbbf197c39dc0f973e5045e.1531404282.git.michal.simek@xilinx.com> References: <3a5a2fbe9d0aad4fdbbbf197c39dc0f973e5045e.1531404282.git.michal.simek@xilinx.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Hi Michal, Am 12.07.2018 um 16:04 schrieb Michal Simek: > There should be proper bank name setup to distiguish between different > gpio drivers. Use dev->name for it. > > Signed-off-by: Michal Simek > --- > > drivers/gpio/zynq_gpio.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpio/zynq_gpio.c b/drivers/gpio/zynq_gpio.c > index 26f69b1a713f..f793ee5754a8 100644 > --- a/drivers/gpio/zynq_gpio.c > +++ b/drivers/gpio/zynq_gpio.c > @@ -337,6 +337,8 @@ static int zynq_gpio_probe(struct udevice *dev) > struct zynq_gpio_privdata *priv =3D dev_get_priv(dev); > struct gpio_dev_priv *uc_priv =3D dev_get_uclass_priv(dev); > =20 > + uc_priv->bank_name =3D dev->name; > + > if (priv->p_data) > uc_priv->gpio_count =3D priv->p_data->ngpio; > =20 Does this not lead to ugly names because the gpio number is append to=20 the bank_name? Have you check the "gpio status -a" output? Other drivers use the gpio-bank-name from the device tree. Best regards =C2=A0 Stefan