Re: [PATCH v7] pinctrl: Add driver for Awinic AW9523/B I2C GPIO Expander

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 29/02/24 23:52, Linus Walleij ha scritto:
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxxx>

The Awinic AW9523(B) is a multi-function I2C gpio expander in a
TQFN-24L package, featuring PWM (max 37mA per pin, or total max
power 3.2Watts) for LED driving capability.

It has two ports with 8 pins per port (for a total of 16 pins),
configurable as either PWM with 1/256 stepping or GPIO input/output,
1.8V logic input; each GPIO can be configured as input or output
independently from each other.

This IC also has an internal interrupt controller, which is capable
of generating an interrupt for each GPIO, depending on the
configuration, and will raise an interrupt on the INTN pin to
advertise this to an external interrupt controller.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxxx>
Signed-off-by: David Bauer <mail@xxxxxxxxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Link: https://lore.kernel.org/r/20210624214458.68716-2-mail@xxxxxxxxxxxxxxx
Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
---
Resend and edit of David Bauers submission that is in use
in OpenWrt. It was so close to being merged that we better
just get it done.
---
Changes from v6->v7:
- Set default IRQ type to IRQ_TYPE_EDGE_BOTH
- Convert to immutable irq_chip
- Convert probe and remove to new signatures
- Drop some unused headers
- Rename some variables as I like them
---
  drivers/pinctrl/Kconfig          |   18 +
  drivers/pinctrl/Makefile         |    1 +
  drivers/pinctrl/pinctrl-aw9523.c | 1119 ++++++++++++++++++++++++++++++++++++++
  3 files changed, 1138 insertions(+)


..snip..

+
+static const struct of_device_id of_aw9523_i2c_match[] = {
+	{ .compatible = "awinic,aw9523-pinctrl", },
+};
+MODULE_DEVICE_TABLE(of, of_aw9523_i2c_match);
+
+static struct i2c_driver aw9523_driver = {
+	.driver = {
+		.name = "aw9523-pinctrl",
+		.of_match_table = of_aw9523_i2c_match,
+	},
+	.probe = aw9523_probe,
+	.remove = aw9523_remove,
+	.id_table = aw9523_i2c_id_table,
+};
+module_i2c_driver(aw9523_driver);
+
+MODULE_DESCRIPTION("Awinic AW9523 I2C GPIO Expander driver");
+MODULE_AUTHOR("AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxxx>");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:aw9523");

As pointed by Krzysztof, MODULE_ALIAS is actually unneeded...
...but the rest looks good.

Since it's signed off by .. me, and the author is still, well, me... it would
look weird if I gave you a R-b.

So...

After removing MODULE_ALIAS (and of course picking the bindings),

"R-b myself" :-)

Cheers,
Angelo




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux