lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210727144816.8697-3-sergio.paracuellos@gmail.com>
Date:   Tue, 27 Jul 2021 16:48:15 +0200
From:   Sergio Paracuellos <sergio.paracuellos@...il.com>
To:     linux-gpio@...r.kernel.org
Cc:     linus.walleij@...aro.org, gregory.0xf0@...il.com,
        bgolaszewski@...libre.com, f.fainelli@...il.com,
        matthias.bgg@...il.com, opensource@...rst.com,
        andy.shevchenko@...il.com, git@...nthomson.fastmail.com.au,
        neil@...wn.name, hofrat@...dl.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 2/3] gpio: mt7621: support gpio-line-names property

This driver uses multiple gpiochip banks per device.
To support 'gpio-line-names' along the banks 'offset'
for each bank must be set explicitly.

Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@...il.com>
---
 drivers/gpio/gpio-mt7621.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-mt7621.c b/drivers/gpio/gpio-mt7621.c
index 82fb20dca53a..5854a9343491 100644
--- a/drivers/gpio/gpio-mt7621.c
+++ b/drivers/gpio/gpio-mt7621.c
@@ -241,6 +241,7 @@ mediatek_gpio_bank_probe(struct device *dev,
 	if (!rg->chip.label)
 		return -ENOMEM;
 
+	rg->chip.offset = bank * MTK_BANK_WIDTH;
 	rg->irq_chip.name = dev_name(dev);
 	rg->irq_chip.parent_device = dev;
 	rg->irq_chip.irq_unmask = mediatek_gpio_irq_unmask;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ