mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] gio: add support for PCAL6408 chip to the pca953x driver
@ 2023-02-20  9:06 Michael Kopfensteiner
  2023-02-20  9:06 ` [PATCH 2/3] ARM: IMX8MP: add initial support for Variscite DT8MCustomBoard with iMX8MP Michael Kopfensteiner
  2023-02-20  9:06 ` [PATCH 3/3] Documentation: IMX: add doc for the Variscite DT8MCustomBoard Michael Kopfensteiner
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Kopfensteiner @ 2023-02-20  9:06 UTC (permalink / raw)
  To: barebox; +Cc: Michael Kopfensteiner

The PCAL6408 chip similar enough to the PCA95xx chip series such that
it can be handled by the pca953x driver as well.

This solution is copied from the linux kernel's pca953x driver.

Signed-off-by: Michael Kopfensteiner <michael.kopfensteiner@vahle.com>
---
 drivers/gpio/gpio-pca953x.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 4633d4f15d..2d3f8a8871 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -37,6 +37,8 @@
 
 #define PCA_GPIO_MASK		0x00FF
 #define PCA_INT			0x0100
+#define PCA_PCAL		0x0200
+#define PCA_LATCH_INT		(PCA_PCAL | PCA_INT)
 #define PCA953X_TYPE		0x1000
 #define PCA957X_TYPE		0x2000
 
@@ -56,6 +58,8 @@ static struct platform_device_id pca953x_id[] = {
 	{ "pca9575", 16 | PCA957X_TYPE | PCA_INT, },
 	{ "pca9698", 40 | PCA953X_TYPE, },
 
+	{ "pcal6408", 8 | PCA953X_TYPE | PCA_LATCH_INT, },
+
 	{ "max7310", 8  | PCA953X_TYPE, },
 	{ "max7312", 16 | PCA953X_TYPE | PCA_INT, },
 	{ "max7313", 16 | PCA953X_TYPE | PCA_INT, },
@@ -483,6 +487,8 @@ static const struct of_device_id pca953x_dt_ids[] = {
 	{ .compatible = "nxp,pca9575", .data = OF_957X(16, PCA_INT), },
 	{ .compatible = "nxp,pca9698", .data = OF_953X(40, 0), },
 
+	{ .compatible = "nxp,pcal6408", .data = OF_953X(8, PCA_LATCH_INT), },
+
 	{ .compatible = "maxim,max7310", .data = OF_953X( 8, 0), },
 	{ .compatible = "maxim,max7312", .data = OF_953X(16, PCA_INT), },
 	{ .compatible = "maxim,max7313", .data = OF_953X(16, PCA_INT), },
-- 
2.30.2




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-02-22 12:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20  9:06 [PATCH 1/3] gio: add support for PCAL6408 chip to the pca953x driver Michael Kopfensteiner
2023-02-20  9:06 ` [PATCH 2/3] ARM: IMX8MP: add initial support for Variscite DT8MCustomBoard with iMX8MP Michael Kopfensteiner
2023-02-21  9:20   ` Sascha Hauer
2023-02-22 11:15     ` Kopfensteiner_Michael
2023-02-22 12:43       ` Sascha Hauer
2023-02-21  9:24   ` Sascha Hauer
2023-02-20  9:06 ` [PATCH 3/3] Documentation: IMX: add doc for the Variscite DT8MCustomBoard Michael Kopfensteiner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox