Thread (19 messages) 19 messages, 4 authors, 2023-08-23

Re: [PATCH 2/7] pinctrl: realtek: Add pinctrl driver for RTD1315E

From: <hidden>
Date: 2023-08-14 21:07:01
Also in: linux-gpio, lkml

Wed, Jul 26, 2023 at 05:04:04PM +0800, TY Chang kirjoitti:
Add RTD1315E support using realtek common pinctrl driver.
...
+config PINCTRL_RTD1315E
+	tristate "Realtek DHC 1315E pin controller driver"
+	depends on PINCTRL_RTD
Why not select and the above be hidden symbol?

...
+#include <linux/module.h>
+#include <linux/of.h>
Not used. Use correct headers
+#include <linux/platform_device.h>
+ Blank line
+#include <linux/pinctrl/pinctrl.h>
Make use of struct pinconfig, struct pinfunction and respective PINCTRL_PIN*()
macros.

...
+#define RTD1315E_GROUP(_name) \
+	{ \
+		.name = # _name, \
+		.pins = rtd1315e_ ## _name ## _pins, \
+		.num_pins = ARRAY_SIZE(rtd1315e_ ## _name ## _pins), \
+	}
NIH PINCTRL_PINGROUP().

...
+#define RTD1315E_FUNC(_name) \
+	{ \
+		.name = # _name, \
+		.groups = rtd1315e_ ## _name ## _groups, \
+		.num_groups = ARRAY_SIZE(rtd1315e_ ## _name ## _groups), \
+	}
NIH PINCTRL_PINFUNCTION().

...
+static const struct of_device_id rtd1315e_pinctrl_of_match[] = {
+	{ .compatible = "realtek,rtd13xxe-pinctrl", },
+	{},
No comma for the terminator entry.
+};
...

Same comments for all new drivers in the series.

-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help