Currently the header inclusion inside the pinctrl headers seems more arbitrary
than logical. This series is basically out of two parts:
- add missed headers to the pin control drivers / users
- clean up the headers of pin control subsystem
The idea is to have this series to be pulled after -rc1 by the GPIO and
pin control subsystems, so all new drivers will utilize cleaned up headers
of the pin control.
Please, review and comment.
Changelog v2:
- added preparatory patches: all, but last (LKP)
- added missed forward declaration to the last patch (LKP)
Andy Shevchenko (36):
gpiolib: tegra186: Add missed header(s)
gpiolib: cdev: Add missed header(s)
media: c8sectpfe: Add missed header(s)
pinctrl: actions: Add missed header(s)
pinctrl: aspeed: Add missed header(s)
pinctrl: at91: Add missed header(s)
pinctrl: axp209: Add missed header(s)
pinctrl: bcm: Add missed header(s)
pinctrl: cygnus-mux: Add missed header(s)
pinctrl: imx: Add missed header(s)
pinctrl: ingenic: Add missed header(s)
pinctrl: k210: Add missed header(s)
pinctrl: lochnagar: Add missed header(s)
pinctrl: mediatek: Add missed header(s)
pinctrl: mvebu: Add missed header(s)
pinctrl: npcm7xx: Add missed header(s)
pinctrl: ocelot: Add missed header(s)
pinctrl: qcom: Add missed header(s)
pinctrl: renesas: Add missed header(s)
pinctrl: samsung: Add missed header(s)
pinctrl: single: Add missed header(s)
pinctrl: spear: Add missed header(s)
pinctrl: sprd: Add missed header(s)
pinctrl: st: Add missed header(s)
pinctrl: starfive: Add missed header(s)
pinctrl: stm32: Add missed header(s)
pinctrl: stmfx: Add missed header(s)
pinctrl: tegra: Add missed header(s)
pinctrl: ti-iodelay: Add missed header(s)
pinctrl: uniphier: Add missed header(s)
pinctrl: zynqmp: Add missed header(s)
pinctrl: cherryview: Add missed header(s)
pinctrl: lynxpoint: Add missed header(s)
pinctrl: merrifield: Add missed header(s)
pinctrl: intel: Add missed header(s)
pinctrl: Clean up headers
drivers/gpio/gpio-tegra186.c | 3 +-
drivers/gpio/gpiolib-cdev.c | 6 ++--
.../st/sti/c8sectpfe/c8sectpfe-core.c | 8 +++--
drivers/pinctrl/actions/pinctrl-owl.c | 10 +++---
drivers/pinctrl/aspeed/pinctrl-aspeed.c | 1 +
drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 13 +++++---
drivers/pinctrl/bcm/pinctrl-cygnus-mux.c | 9 ++++--
drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 12 ++++---
drivers/pinctrl/bcm/pinctrl-ns2-mux.c | 8 +++--
drivers/pinctrl/bcm/pinctrl-nsp-mux.c | 8 +++--
drivers/pinctrl/cirrus/pinctrl-lochnagar.c | 6 ++--
drivers/pinctrl/core.c | 19 ++++++------
drivers/pinctrl/core.h | 12 ++++++-
drivers/pinctrl/devicetree.h | 6 ++++
drivers/pinctrl/freescale/pinctrl-imx.c | 8 +++--
drivers/pinctrl/intel/pinctrl-cherryview.c | 6 ++--
drivers/pinctrl/intel/pinctrl-intel.c | 6 ++--
drivers/pinctrl/intel/pinctrl-lynxpoint.c | 6 ++--
drivers/pinctrl/intel/pinctrl-merrifield.c | 4 ++-
drivers/pinctrl/mediatek/pinctrl-moore.c | 3 ++
drivers/pinctrl/mediatek/pinctrl-paris.c | 5 +++
drivers/pinctrl/mvebu/pinctrl-mvebu.c | 14 +++++----
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 11 ++++---
drivers/pinctrl/pinconf.h | 10 ++++++
drivers/pinctrl/pinctrl-at91-pio4.c | 10 ++++--
drivers/pinctrl/pinctrl-at91.c | 16 +++++-----
drivers/pinctrl/pinctrl-axp209.c | 8 +++--
drivers/pinctrl/pinctrl-ingenic.c | 10 +++---
drivers/pinctrl/pinctrl-k210.c | 12 ++++---
drivers/pinctrl/pinctrl-ocelot.c | 10 +++---
drivers/pinctrl/pinctrl-single.c | 5 ++-
drivers/pinctrl/pinctrl-st.c | 21 ++++++++-----
drivers/pinctrl/pinctrl-stmfx.c | 2 ++
drivers/pinctrl/pinctrl-utils.h | 5 +++
drivers/pinctrl/pinctrl-zynqmp.c | 4 ++-
drivers/pinctrl/pinmux.c | 17 +++++-----
drivers/pinctrl/pinmux.h | 11 +++++++
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 8 +++--
drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 8 +++--
drivers/pinctrl/renesas/pinctrl-rzg2l.c | 7 +++--
drivers/pinctrl/renesas/pinctrl-rzv2m.c | 4 ++-
drivers/pinctrl/renesas/pinctrl.c | 8 +++--
drivers/pinctrl/samsung/pinctrl-samsung.c | 11 ++++---
drivers/pinctrl/spear/pinctrl-spear.c | 6 ++--
drivers/pinctrl/sprd/pinctrl-sprd.c | 6 ++--
.../starfive/pinctrl-starfive-jh7100.c | 2 ++
drivers/pinctrl/stm32/pinctrl-stm32.c | 16 +++++-----
drivers/pinctrl/tegra/pinctrl-tegra.c | 6 ++--
drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 8 +++--
.../pinctrl/uniphier/pinctrl-uniphier-core.c | 8 +++--
include/linux/pinctrl/consumer.h | 31 +++++++++----------
include/linux/pinctrl/devinfo.h | 6 ++--
include/linux/pinctrl/machine.h | 8 +++--
include/linux/pinctrl/pinconf-generic.h | 23 ++++++++------
include/linux/pinctrl/pinctrl.h | 18 +++++------
include/linux/pinctrl/pinmux.h | 5 ++-
56 files changed, 328 insertions(+), 186 deletions(-)
base-commit: 9d157c89c5569f0ef560b7a5b2d7bf59ae98499c
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/aspeed/pinctrl-aspeed.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed.c b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
index a30912a92f05..3945612900e6 100644
--- a/drivers/pinctrl/aspeed/pinctrl-aspeed.c
+++ b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
@@ -5,6 +5,7 @@
#include <linux/mfd/syscon.h>
#include <linux/platform_device.h>
+#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/string.h>
#include "../core.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/pinctrl-axp209.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp209.c
index 7ab20ac15391..0bc1b381a2b8 100644
--- a/drivers/pinctrl/pinctrl-axp209.c
+++ b/drivers/pinctrl/pinctrl-axp209.c
@@ -16,13 +16,15 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
-#include <linux/pinctrl/pinconf-generic.h>
-#include <linux/pinctrl/pinctrl.h>
-#include <linux/pinctrl/pinmux.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/slab.h>
+#include <linux/pinctrl/consumer.h>
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinctrl.h>
+#include <linux/pinctrl/pinmux.h>
+
#define AXP20X_GPIO_FUNCTIONS 0x7
#define AXP20X_GPIO_FUNCTION_OUT_LOW 0
#define AXP20X_GPIO_FUNCTION_OUT_HIGH 1
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c
index cefe6b7bfdc4..4c5027a0480d 100644
--- a/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c
@@ -24,16 +24,18 @@
#include <linux/module.h>
#include <linux/of_gpio.h>
#include <linux/of_platform.h>
+#include <linux/pinctrl/consumer.h>
+#include <linux/pinctrl/pinctrl.h>
#include <linux/platform_device.h>
-#include <linux/usb.h>
#include <linux/slab.h>
#include <linux/time.h>
+#include <linux/usb.h>
#include <linux/wait.h>
-#include <linux/pinctrl/pinctrl.h>
-#include "c8sectpfe-core.h"
#include "c8sectpfe-common.h"
+#include "c8sectpfe-core.h"
#include "c8sectpfe-debugfs.h"
+
#include <media/dmxdev.h>
#include <media/dvb_demux.h>
#include <media/dvb_frontend.h>
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/bcm/pinctrl-cygnus-mux.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/bcm/pinctrl-cygnus-mux.c b/drivers/pinctrl/bcm/pinctrl-cygnus-mux.c
index 5251460f6327..bf9597800954 100644
--- a/drivers/pinctrl/bcm/pinctrl-cygnus-mux.c
+++ b/drivers/pinctrl/bcm/pinctrl-cygnus-mux.c
@@ -13,12 +13,15 @@
#include <linux/err.h>
#include <linux/io.h>
#include <linux/of.h>
-#include <linux/slab.h>
#include <linux/platform_device.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
+
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/pinctrl/pinconf-generic.h>
+
#include "../core.h"
#include "../pinctrl-utils.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/pinctrl-k210.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-k210.c b/drivers/pinctrl/pinctrl-k210.c
index ecab6bf63dc6..288e44457fec 100644
--- a/drivers/pinctrl/pinctrl-k210.c
+++ b/drivers/pinctrl/pinctrl-k210.c
@@ -3,18 +3,20 @@
* Copyright (C) 2020 Sean Anderson <[email protected]>
* Copyright (c) 2020 Western Digital Corporation or its affiliates.
*/
-#include <linux/io.h>
-#include <linux/of_device.h>
+#include <linux/bitfield.h>
#include <linux/clk.h>
+#include <linux/io.h>
#include <linux/mfd/syscon.h>
+#include <linux/of_device.h>
#include <linux/platform_device.h>
-#include <linux/bitfield.h>
#include <linux/regmap.h>
+#include <linux/seq_file.h>
#include <linux/slab.h>
+
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/pinctrl/pinconf-generic.h>
#include <dt-bindings/pinctrl/k210-fpioa.h>
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/pinctrl-ocelot.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
index 647e91490bac..a9343c242cd5 100644
--- a/drivers/pinctrl/pinctrl-ocelot.c
+++ b/drivers/pinctrl/pinctrl-ocelot.c
@@ -13,15 +13,17 @@
#include <linux/of_device.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
-#include <linux/pinctrl/pinctrl.h>
-#include <linux/pinctrl/pinmux.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/pinctrl/pinconf-generic.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/reset.h>
#include <linux/slab.h>
+#include <linux/pinctrl/consumer.h>
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
+#include <linux/pinctrl/pinctrl.h>
+#include <linux/pinctrl/pinmux.h>
+
#include "core.h"
#include "pinconf.h"
#include "pinmux.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 1c4e89b046de..ff5bcea172e8 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -11,14 +11,17 @@
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
+#include <linux/platform_device.h>
+#include <linux/property.h>
+#include <linux/regmap.h>
+#include <linux/seq_file.h>
+
+#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/machine.h>
-#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/platform_device.h>
-#include <linux/property.h>
-#include <linux/regmap.h>
/* GCR registers */
#define NPCM7XX_GCR_PDID 0x00
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/pinctrl-zynqmp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-zynqmp.c b/drivers/pinctrl/pinctrl-zynqmp.c
index 7d2fbf8a02cd..1a94db1ffa4f 100644
--- a/drivers/pinctrl/pinctrl-zynqmp.c
+++ b/drivers/pinctrl/pinctrl-zynqmp.c
@@ -14,10 +14,12 @@
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
+
#include <linux/firmware/xlnx-zynqmp.h>
-#include <linux/pinctrl/pinmux.h>
#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinctrl.h>
+#include <linux/pinctrl/pinmux.h>
#include "core.h"
#include "pinctrl-utils.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/spear/pinctrl-spear.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c
index e0543c1ad641..18de2e70ea50 100644
--- a/drivers/pinctrl/spear/pinctrl-spear.c
+++ b/drivers/pinctrl/spear/pinctrl-spear.c
@@ -19,11 +19,13 @@
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_gpio.h>
+#include <linux/platform_device.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
+
#include <linux/pinctrl/machine.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/platform_device.h>
-#include <linux/slab.h>
#include "pinctrl-spear.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/intel/pinctrl-merrifield.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/intel/pinctrl-merrifield.c b/drivers/pinctrl/intel/pinctrl-merrifield.c
index 5e752818adb4..527957ea35b7 100644
--- a/drivers/pinctrl/intel/pinctrl-merrifield.c
+++ b/drivers/pinctrl/intel/pinctrl-merrifield.c
@@ -12,8 +12,10 @@
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
-#include <linux/pinctrl/pinconf.h>
+#include <linux/seq_file.h>
+
#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
index 5b544fb7f3d8..6a8a9cfe8965 100644
--- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
+++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
@@ -15,8 +15,10 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
+#include <linux/seq_file.h>
#include <linux/spinlock.h>
+#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/intel/pinctrl-intel.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index 52ecd66ce357..b85140eaa9c4 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -14,12 +14,14 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/property.h>
+#include <linux/seq_file.h>
#include <linux/time.h>
-#include <linux/pinctrl/pinctrl.h>
-#include <linux/pinctrl/pinmux.h>
+#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinctrl.h>
+#include <linux/pinctrl/pinmux.h>
#include "../core.h"
#include "pinctrl-intel.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/pinctrl-st.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
index cf7f9cbe6044..985dfceb127d 100644
--- a/drivers/pinctrl/pinctrl-st.c
+++ b/drivers/pinctrl/pinctrl-st.c
@@ -5,21 +5,26 @@
* Srinivas Kandagatla <[email protected]>
*/
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/slab.h>
#include <linux/err.h>
+#include <linux/gpio/driver.h>
+#include <linux/init.h>
#include <linux/io.h>
+#include <linux/mfd/syscon.h>
+#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_irq.h>
#include <linux/of_address.h>
-#include <linux/gpio/driver.h>
+#include <linux/of_irq.h>
+#include <linux/platform_device.h>
#include <linux/regmap.h>
-#include <linux/mfd/syscon.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
+#include <linux/string_helpers.h>
+
+#include <linux/pinctrl/consumer.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/platform_device.h>
+
#include "core.h"
/* PIO Block registers */
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 13 ++++++++-----
drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 12 +++++++-----
drivers/pinctrl/bcm/pinctrl-ns2-mux.c | 8 +++++---
drivers/pinctrl/bcm/pinctrl-nsp-mux.c | 8 +++++---
4 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
index fd52a83387ef..73dbf29c002f 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
@@ -2,16 +2,19 @@
// Copyright (C) 2013-2017 Broadcom
#include <linux/err.h>
-#include <linux/io.h>
#include <linux/init.h>
+#include <linux/io.h>
#include <linux/of.h>
#include <linux/platform_device.h>
-#include <linux/pinctrl/pinctrl.h>
-#include <linux/pinctrl/pinmux.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/pinctrl/pinconf-generic.h>
#include <linux/regmap.h>
+#include <linux/seq_file.h>
#include <linux/slab.h>
+
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
+#include <linux/pinctrl/pinctrl.h>
+#include <linux/pinctrl/pinmux.h>
+
#include "../core.h"
#include "../pinctrl-utils.h"
diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
index 52fa2f4cd618..3df56a4ea510 100644
--- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
+++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
@@ -16,17 +16,19 @@
* SoCs IOMUX controller.
*/
-#include <linux/kernel.h>
-#include <linux/slab.h>
+#include <linux/gpio/driver.h>
#include <linux/interrupt.h>
#include <linux/io.h>
-#include <linux/gpio/driver.h>
#include <linux/ioport.h>
+#include <linux/kernel.h>
#include <linux/of_device.h>
#include <linux/of_irq.h>
-#include <linux/pinctrl/pinctrl.h>
-#include <linux/pinctrl/pinconf.h>
+#include <linux/slab.h>
+
+#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
+#include <linux/pinctrl/pinctrl.h>
#include "../pinctrl-utils.h"
diff --git a/drivers/pinctrl/bcm/pinctrl-ns2-mux.c b/drivers/pinctrl/bcm/pinctrl-ns2-mux.c
index 960e253f0be4..04f4fca854cc 100644
--- a/drivers/pinctrl/bcm/pinctrl-ns2-mux.c
+++ b/drivers/pinctrl/bcm/pinctrl-ns2-mux.c
@@ -9,12 +9,14 @@
#include <linux/err.h>
#include <linux/io.h>
#include <linux/of.h>
-#include <linux/pinctrl/pinconf.h>
+#include <linux/platform_device.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
+
#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/platform_device.h>
-#include <linux/slab.h>
#include "../core.h"
#include "../pinctrl-utils.h"
diff --git a/drivers/pinctrl/bcm/pinctrl-nsp-mux.c b/drivers/pinctrl/bcm/pinctrl-nsp-mux.c
index db8f79920ff0..eb6298507c1d 100644
--- a/drivers/pinctrl/bcm/pinctrl-nsp-mux.c
+++ b/drivers/pinctrl/bcm/pinctrl-nsp-mux.c
@@ -20,12 +20,14 @@
#include <linux/err.h>
#include <linux/io.h>
#include <linux/of.h>
-#include <linux/pinctrl/pinconf.h>
+#include <linux/platform_device.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
+
#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/platform_device.h>
-#include <linux/slab.h>
#include "../core.h"
#include "../pinctrl-utils.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/pinctrl-at91-pio4.c | 10 +++++++---
drivers/pinctrl/pinctrl-at91.c | 16 +++++++++-------
2 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index 82b921fd630d..e38c683aba09 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -7,18 +7,22 @@
*/
#include <dt-bindings/pinctrl/at91.h>
+
#include <linux/clk.h>
#include <linux/gpio/driver.h>
+#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
-#include <linux/init.h>
#include <linux/of.h>
#include <linux/platform_device.h>
-#include <linux/pinctrl/pinconf.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
+
#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/slab.h>
+
#include "core.h"
#include "pinconf.h"
#include "pinctrl-utils.h"
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 81dbffab621f..1e1813d7c550 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -7,22 +7,24 @@
#include <linux/clk.h>
#include <linux/err.h>
+#include <linux/gpio/driver.h>
#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/of_address.h>
+#include <linux/of_device.h>
#include <linux/of_irq.h>
+#include <linux/pm.h>
+#include <linux/seq_file.h>
#include <linux/slab.h>
-#include <linux/interrupt.h>
-#include <linux/io.h>
-#include <linux/gpio/driver.h>
+
+/* Since we request GPIOs from ourself */
+#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/machine.h>
#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-/* Since we request GPIOs from ourself */
-#include <linux/pinctrl/consumer.h>
-#include <linux/pm.h>
#include "pinctrl-at91.h"
#include "core.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/tegra/pinctrl-tegra.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers/pinctrl/tegra/pinctrl-tegra.c
index 50bd26a30ac0..834a2d50f89b 100644
--- a/drivers/pinctrl/tegra/pinctrl-tegra.c
+++ b/drivers/pinctrl/tegra/pinctrl-tegra.c
@@ -15,11 +15,13 @@
#include <linux/io.h>
#include <linux/of.h>
#include <linux/platform_device.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
+
#include <linux/pinctrl/machine.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/slab.h>
#include "../core.h"
#include "../pinctrl-utils.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/samsung/pinctrl-samsung.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c
index bd13b5ef246d..5736761927cb 100644
--- a/drivers/pinctrl/samsung/pinctrl-samsung.c
+++ b/drivers/pinctrl/samsung/pinctrl-samsung.c
@@ -15,15 +15,16 @@
// but provides extensions to which platform specific implementation of the gpio
// and wakeup interrupts can be hooked to.
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/io.h>
-#include <linux/property.h>
-#include <linux/slab.h>
#include <linux/err.h>
#include <linux/gpio/driver.h>
+#include <linux/init.h>
+#include <linux/io.h>
#include <linux/irqdomain.h>
#include <linux/of_device.h>
+#include <linux/platform_device.h>
+#include <linux/property.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
#include <linux/spinlock.h>
#include "../core.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/stm32/pinctrl-stm32.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c
index e485506ea599..cc9472b28404 100644
--- a/drivers/pinctrl/stm32/pinctrl-stm32.c
+++ b/drivers/pinctrl/stm32/pinctrl-stm32.c
@@ -13,22 +13,24 @@
#include <linux/irq.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
-#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
+#include <linux/of.h>
#include <linux/of_irq.h>
-#include <linux/pinctrl/consumer.h>
-#include <linux/pinctrl/machine.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/pinctrl/pinconf-generic.h>
-#include <linux/pinctrl/pinctrl.h>
-#include <linux/pinctrl/pinmux.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/reset.h>
+#include <linux/seq_file.h>
#include <linux/slab.h>
+#include <linux/pinctrl/consumer.h>
+#include <linux/pinctrl/machine.h>
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
+#include <linux/pinctrl/pinctrl.h>
+#include <linux/pinctrl/pinmux.h>
+
#include "../core.h"
#include "../pinconf.h"
#include "../pinctrl-utils.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/pinctrl-single.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 67bec7ea0f8b..bed97ac5b848 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -16,17 +16,16 @@
#include <linux/err.h>
#include <linux/list.h>
#include <linux/interrupt.h>
-
#include <linux/irqchip/chained_irq.h>
-
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
+#include <linux/seq_file.h>
+#include <linux/pinctrl/pinconf-generic.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/pinctrl/pinconf-generic.h>
#include <linux/platform_data/pinctrl-single.h>
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/mvebu/pinctrl-mvebu.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
index 8ef0a97d2bf5..8e6aac4164df 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
@@ -6,20 +6,22 @@
* Thomas Petazzoni <[email protected]>
*/
-#include <linux/platform_device.h>
-#include <linux/slab.h>
+#include <linux/err.h>
+#include <linux/gpio/driver.h>
#include <linux/io.h>
+#include <linux/mfd/syscon.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
-#include <linux/err.h>
-#include <linux/gpio/driver.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
+
#include <linux/pinctrl/machine.h>
#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/mfd/syscon.h>
-#include <linux/regmap.h>
#include "pinctrl-mvebu.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/sprd/pinctrl-sprd.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/sprd/pinctrl-sprd.c b/drivers/pinctrl/sprd/pinctrl-sprd.c
index dca7a505d413..c1806b7dcf78 100644
--- a/drivers/pinctrl/sprd/pinctrl-sprd.c
+++ b/drivers/pinctrl/sprd/pinctrl-sprd.c
@@ -13,12 +13,14 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
+#include <linux/slab.h>
+
+#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/machine.h>
-#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/slab.h>
#include "../core.h"
#include "../pinmux.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/intel/pinctrl-cherryview.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
index 5c4fd16e5b01..11b81213922d 100644
--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
@@ -16,12 +16,14 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/seq_file.h>
#include <linux/types.h>
+#include <linux/pinctrl/consumer.h>
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/pinctrl/pinconf-generic.h>
#include "pinctrl-intel.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/pinctrl-stmfx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index ab4dde40d3ed..1181c4b506b1 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -10,6 +10,8 @@
#include <linux/mfd/stmfx.h>
#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/seq_file.h>
+
#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinmux.h>
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/freescale/pinctrl-imx.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
index 3a7d2de10b13..e9aef764138f 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx.c
@@ -13,14 +13,16 @@
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/of_address.h>
+#include <linux/of_device.h>
+#include <linux/regmap.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
+
#include <linux/pinctrl/machine.h>
#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/slab.h>
-#include <linux/regmap.h>
#include "../core.h"
#include "../pinconf.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c
index 4e2382778d38..53abddaebce1 100644
--- a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c
+++ b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c
@@ -15,12 +15,14 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/pinctrl/pinconf-generic.h>
-#include <linux/pinctrl/pinctrl.h>
#include <linux/regmap.h>
+#include <linux/seq_file.h>
#include <linux/slab.h>
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
+#include <linux/pinctrl/pinctrl.h>
+
#include "../core.h"
#include "../devicetree.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/cirrus/pinctrl-lochnagar.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/cirrus/pinctrl-lochnagar.c b/drivers/pinctrl/cirrus/pinctrl-lochnagar.c
index 3fda4446d70b..0b78cf611afe 100644
--- a/drivers/pinctrl/cirrus/pinctrl-lochnagar.c
+++ b/drivers/pinctrl/cirrus/pinctrl-lochnagar.c
@@ -15,10 +15,12 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
+
+#include <linux/pinctrl/consumer.h>
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/pinctrl/pinconf-generic.h>
#include <linux/mfd/lochnagar.h>
#include <linux/mfd/lochnagar1_regs.h>
--
2.35.1
There is a few things done:
- include only the headers we are direct user of
- when pointer is in use, provide a forward declaration
- add missed headers
- group generic headers and subsystem headers
- sort each group alphabetically
While at it, fix some awkward indentations.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/core.c | 19 ++++++++-------
drivers/pinctrl/core.h | 12 +++++++++-
drivers/pinctrl/devicetree.h | 6 +++++
drivers/pinctrl/pinconf.h | 10 ++++++++
drivers/pinctrl/pinctrl-utils.h | 5 ++++
drivers/pinctrl/pinmux.c | 17 ++++++++------
drivers/pinctrl/pinmux.h | 11 +++++++++
include/linux/pinctrl/consumer.h | 31 +++++++++++--------------
include/linux/pinctrl/devinfo.h | 6 +++--
include/linux/pinctrl/machine.h | 8 ++++---
include/linux/pinctrl/pinconf-generic.h | 23 ++++++++++--------
include/linux/pinctrl/pinctrl.h | 18 +++++++-------
include/linux/pinctrl/pinmux.h | 5 ++--
13 files changed, 110 insertions(+), 61 deletions(-)
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 9e57f4c62e60..655f9502e73f 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -12,19 +12,21 @@
*/
#define pr_fmt(fmt) "pinctrl core: " fmt
-#include <linux/kernel.h>
-#include <linux/kref.h>
-#include <linux/export.h>
-#include <linux/init.h>
+#include <linux/debugfs.h>
#include <linux/device.h>
-#include <linux/slab.h>
#include <linux/err.h>
+#include <linux/export.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/kref.h>
#include <linux/list.h>
-#include <linux/debugfs.h>
#include <linux/seq_file.h>
+#include <linux/slab.h>
+
#include <linux/pinctrl/consumer.h>
-#include <linux/pinctrl/pinctrl.h>
+#include <linux/pinctrl/devinfo.h>
#include <linux/pinctrl/machine.h>
+#include <linux/pinctrl/pinctrl.h>
#ifdef CONFIG_GPIOLIB
#include "../gpio/gpiolib.h"
@@ -33,9 +35,8 @@
#include "core.h"
#include "devicetree.h"
-#include "pinmux.h"
#include "pinconf.h"
-
+#include "pinmux.h"
static bool pinctrl_dummy_state;
diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h
index 840103c40c14..4d0bdb9fb99b 100644
--- a/drivers/pinctrl/core.h
+++ b/drivers/pinctrl/core.h
@@ -9,12 +9,22 @@
*/
#include <linux/kref.h>
+#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/radix-tree.h>
-#include <linux/pinctrl/pinconf.h>
+#include <linux/types.h>
+
#include <linux/pinctrl/machine.h>
+struct dentry;
+struct device;
+struct device_node;
+struct module;
+
+struct pinctrl;
+struct pinctrl_desc;
struct pinctrl_gpio_range;
+struct pinctrl_state;
/**
* struct pinctrl_dev - pin control class device
diff --git a/drivers/pinctrl/devicetree.h b/drivers/pinctrl/devicetree.h
index efa80779de4f..def76aba99d1 100644
--- a/drivers/pinctrl/devicetree.h
+++ b/drivers/pinctrl/devicetree.h
@@ -5,8 +5,14 @@
* Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
*/
+#include <linux/errno.h>
+
+struct device_node;
struct of_phandle_args;
+struct pinctrl;
+struct pinctrl_dev;
+
#ifdef CONFIG_OF
void pinctrl_dt_free_maps(struct pinctrl *p);
diff --git a/drivers/pinctrl/pinconf.h b/drivers/pinctrl/pinconf.h
index be7311373299..694bfc9961fa 100644
--- a/drivers/pinctrl/pinconf.h
+++ b/drivers/pinctrl/pinconf.h
@@ -10,6 +10,16 @@
* Author: Linus Walleij <[email protected]>
*/
+#include <linux/errno.h>
+
+struct dentry;
+struct device_node;
+struct seq_file;
+
+struct pinctrl_dev;
+struct pinctrl_map;
+struct pinctrl_setting;
+
#ifdef CONFIG_PINCONF
int pinconf_check_ops(struct pinctrl_dev *pctldev);
diff --git a/drivers/pinctrl/pinctrl-utils.h b/drivers/pinctrl/pinctrl-utils.h
index cec407a8cc4e..4108ee2dd6d0 100644
--- a/drivers/pinctrl/pinctrl-utils.h
+++ b/drivers/pinctrl/pinctrl-utils.h
@@ -9,6 +9,11 @@
#ifndef __PINCTRL_UTILS_H__
#define __PINCTRL_UTILS_H__
+#include <linux/pinctrl/machine.h>
+
+struct pinctrl_dev;
+struct pinctrl_map;
+
int pinctrl_utils_reserve_map(struct pinctrl_dev *pctldev,
struct pinctrl_map **map, unsigned *reserved_maps,
unsigned *num_maps, unsigned reserve);
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
index f94d43b082d9..6bd7ac37a0e0 100644
--- a/drivers/pinctrl/pinmux.c
+++ b/drivers/pinctrl/pinmux.c
@@ -13,19 +13,22 @@
#define pr_fmt(fmt) "pinmux core: " fmt
#include <linux/ctype.h>
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/init.h>
+#include <linux/debugfs.h>
#include <linux/device.h>
-#include <linux/slab.h>
-#include <linux/radix-tree.h>
#include <linux/err.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
#include <linux/list.h>
-#include <linux/string.h>
-#include <linux/debugfs.h>
+#include <linux/module.h>
+#include <linux/radix-tree.h>
#include <linux/seq_file.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+
#include <linux/pinctrl/machine.h>
+#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
+
#include "core.h"
#include "pinmux.h"
diff --git a/drivers/pinctrl/pinmux.h b/drivers/pinctrl/pinmux.h
index 72fcf03eaa43..ea6f99c24aa5 100644
--- a/drivers/pinctrl/pinmux.h
+++ b/drivers/pinctrl/pinmux.h
@@ -9,6 +9,17 @@
*
* Author: Linus Walleij <[email protected]>
*/
+
+#include <linux/types.h>
+
+struct dentry;
+struct seq_file;
+
+struct pinctrl_dev;
+struct pinctrl_gpio_range;
+struct pinctrl_map;
+struct pinctrl_setting;
+
#ifdef CONFIG_PINMUX
int pinmux_check_ops(struct pinctrl_dev *pctldev);
diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h
index 019fecd75d0c..4729d54e8995 100644
--- a/include/linux/pinctrl/consumer.h
+++ b/include/linux/pinctrl/consumer.h
@@ -12,14 +12,15 @@
#define __LINUX_PINCTRL_CONSUMER_H
#include <linux/err.h>
-#include <linux/list.h>
-#include <linux/seq_file.h>
+#include <linux/types.h>
+
#include <linux/pinctrl/pinctrl-state.h>
+struct device;
+
/* This struct is private to the core and should be regarded as a cookie */
struct pinctrl;
struct pinctrl_state;
-struct device;
#ifdef CONFIG_PINCTRL
@@ -33,9 +34,8 @@ extern int pinctrl_gpio_set_config(unsigned gpio, unsigned long config);
extern struct pinctrl * __must_check pinctrl_get(struct device *dev);
extern void pinctrl_put(struct pinctrl *p);
-extern struct pinctrl_state * __must_check pinctrl_lookup_state(
- struct pinctrl *p,
- const char *name);
+extern struct pinctrl_state * __must_check pinctrl_lookup_state(struct pinctrl *p,
+ const char *name);
extern int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *s);
extern struct pinctrl * __must_check devm_pinctrl_get(struct device *dev);
@@ -101,9 +101,8 @@ static inline void pinctrl_put(struct pinctrl *p)
{
}
-static inline struct pinctrl_state * __must_check pinctrl_lookup_state(
- struct pinctrl *p,
- const char *name)
+static inline struct pinctrl_state * __must_check pinctrl_lookup_state(struct pinctrl *p,
+ const char *name)
{
return NULL;
}
@@ -145,8 +144,8 @@ static inline int pinctrl_pm_select_idle_state(struct device *dev)
#endif /* CONFIG_PINCTRL */
-static inline struct pinctrl * __must_check pinctrl_get_select(
- struct device *dev, const char *name)
+static inline struct pinctrl * __must_check pinctrl_get_select(struct device *dev,
+ const char *name)
{
struct pinctrl *p;
struct pinctrl_state *s;
@@ -171,14 +170,13 @@ static inline struct pinctrl * __must_check pinctrl_get_select(
return p;
}
-static inline struct pinctrl * __must_check pinctrl_get_select_default(
- struct device *dev)
+static inline struct pinctrl * __must_check pinctrl_get_select_default(struct device *dev)
{
return pinctrl_get_select(dev, PINCTRL_STATE_DEFAULT);
}
-static inline struct pinctrl * __must_check devm_pinctrl_get_select(
- struct device *dev, const char *name)
+static inline struct pinctrl * __must_check devm_pinctrl_get_select(struct device *dev,
+ const char *name)
{
struct pinctrl *p;
struct pinctrl_state *s;
@@ -203,8 +201,7 @@ static inline struct pinctrl * __must_check devm_pinctrl_get_select(
return p;
}
-static inline struct pinctrl * __must_check devm_pinctrl_get_select_default(
- struct device *dev)
+static inline struct pinctrl * __must_check devm_pinctrl_get_select_default(struct device *dev)
{
return devm_pinctrl_get_select(dev, PINCTRL_STATE_DEFAULT);
}
diff --git a/include/linux/pinctrl/devinfo.h b/include/linux/pinctrl/devinfo.h
index a48ff69acddd..9e8b559e1253 100644
--- a/include/linux/pinctrl/devinfo.h
+++ b/include/linux/pinctrl/devinfo.h
@@ -14,11 +14,15 @@
#ifndef PINCTRL_DEVINFO_H
#define PINCTRL_DEVINFO_H
+struct device;
+
#ifdef CONFIG_PINCTRL
/* The device core acts as a consumer toward pinctrl */
#include <linux/pinctrl/consumer.h>
+struct pinctrl;
+
/**
* struct dev_pin_info - pin state container for devices
* @p: pinctrl handle for the containing device
@@ -42,8 +46,6 @@ extern int pinctrl_init_done(struct device *dev);
#else
-struct device;
-
/* Stubs if we're not using pinctrl */
static inline int pinctrl_bind_pins(struct device *dev)
diff --git a/include/linux/pinctrl/machine.h b/include/linux/pinctrl/machine.h
index e987dc9fd2af..0639b36f43c5 100644
--- a/include/linux/pinctrl/machine.h
+++ b/include/linux/pinctrl/machine.h
@@ -11,7 +11,7 @@
#ifndef __LINUX_PINCTRL_MACHINE_H
#define __LINUX_PINCTRL_MACHINE_H
-#include <linux/bug.h>
+#include <linux/kernel.h> /* ARRAY_SIZE() */
#include <linux/pinctrl/pinctrl-state.h>
@@ -149,16 +149,18 @@ struct pinctrl_map {
#define PIN_MAP_CONFIGS_GROUP_HOG_DEFAULT(dev, grp, cfgs) \
PIN_MAP_CONFIGS_GROUP(dev, PINCTRL_STATE_DEFAULT, dev, grp, cfgs)
+struct pinctrl_map;
+
#ifdef CONFIG_PINCTRL
extern int pinctrl_register_mappings(const struct pinctrl_map *map,
- unsigned num_maps);
+ unsigned num_maps);
extern void pinctrl_unregister_mappings(const struct pinctrl_map *map);
extern void pinctrl_provide_dummies(void);
#else
static inline int pinctrl_register_mappings(const struct pinctrl_map *map,
- unsigned num_maps)
+ unsigned num_maps)
{
return 0;
}
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h
index 2422211d6a5a..940fc4e9e17c 100644
--- a/include/linux/pinctrl/pinconf-generic.h
+++ b/include/linux/pinctrl/pinconf-generic.h
@@ -11,9 +11,12 @@
#ifndef __LINUX_PINCTRL_PINCONF_GENERIC_H
#define __LINUX_PINCTRL_PINCONF_GENERIC_H
-#include <linux/device.h>
+#include <linux/types.h>
+
#include <linux/pinctrl/machine.h>
+struct device_node;
+
struct pinctrl_dev;
struct pinctrl_map;
@@ -196,25 +199,25 @@ int pinconf_generic_dt_node_to_map(struct pinctrl_dev *pctldev,
void pinconf_generic_dt_free_map(struct pinctrl_dev *pctldev,
struct pinctrl_map *map, unsigned num_maps);
-static inline int pinconf_generic_dt_node_to_map_group(
- struct pinctrl_dev *pctldev, struct device_node *np_config,
- struct pinctrl_map **map, unsigned *num_maps)
+static inline int pinconf_generic_dt_node_to_map_group(struct pinctrl_dev *pctldev,
+ struct device_node *np_config, struct pinctrl_map **map,
+ unsigned *num_maps)
{
return pinconf_generic_dt_node_to_map(pctldev, np_config, map, num_maps,
PIN_MAP_TYPE_CONFIGS_GROUP);
}
-static inline int pinconf_generic_dt_node_to_map_pin(
- struct pinctrl_dev *pctldev, struct device_node *np_config,
- struct pinctrl_map **map, unsigned *num_maps)
+static inline int pinconf_generic_dt_node_to_map_pin(struct pinctrl_dev *pctldev,
+ struct device_node *np_config, struct pinctrl_map **map,
+ unsigned *num_maps)
{
return pinconf_generic_dt_node_to_map(pctldev, np_config, map, num_maps,
PIN_MAP_TYPE_CONFIGS_PIN);
}
-static inline int pinconf_generic_dt_node_to_map_all(
- struct pinctrl_dev *pctldev, struct device_node *np_config,
- struct pinctrl_map **map, unsigned *num_maps)
+static inline int pinconf_generic_dt_node_to_map_all(struct pinctrl_dev *pctldev,
+ struct device_node *np_config, struct pinctrl_map **map,
+ unsigned *num_maps)
{
/*
* passing the type as PIN_MAP_TYPE_INVALID causes the underlying parser
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h
index 487117ccb1bc..31fe992412f0 100644
--- a/include/linux/pinctrl/pinctrl.h
+++ b/include/linux/pinctrl/pinctrl.h
@@ -11,20 +11,20 @@
#ifndef __LINUX_PINCTRL_PINCTRL_H
#define __LINUX_PINCTRL_PINCTRL_H
-#include <linux/radix-tree.h>
-#include <linux/list.h>
-#include <linux/seq_file.h>
-#include <linux/pinctrl/pinctrl-state.h>
-#include <linux/pinctrl/devinfo.h>
+#include <linux/types.h>
struct device;
+struct device_node;
+struct gpio_chip;
+struct module;
+struct seq_file;
+
+struct pin_config_item;
+struct pinconf_generic_params;
+struct pinconf_ops;
struct pinctrl_dev;
struct pinctrl_map;
struct pinmux_ops;
-struct pinconf_ops;
-struct pin_config_item;
-struct gpio_chip;
-struct device_node;
/**
* struct pingroup - provides information on pingroup
diff --git a/include/linux/pinctrl/pinmux.h b/include/linux/pinctrl/pinmux.h
index 9a647fa5c8f1..a7e370965c53 100644
--- a/include/linux/pinctrl/pinmux.h
+++ b/include/linux/pinctrl/pinmux.h
@@ -11,11 +11,10 @@
#ifndef __LINUX_PINCTRL_PINMUX_H
#define __LINUX_PINCTRL_PINMUX_H
-#include <linux/list.h>
-#include <linux/seq_file.h>
-#include <linux/pinctrl/pinctrl.h>
+#include <linux/types.h>
struct pinctrl_dev;
+struct pinctrl_gpio_range;
/**
* struct pinmux_ops - pinmux operations, to be implemented by pin controller
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/pinctrl-ingenic.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c
index 7e732076dedf..dbc25a60fbff 100644
--- a/drivers/pinctrl/pinctrl-ingenic.c
+++ b/drivers/pinctrl/pinctrl-ingenic.c
@@ -14,16 +14,18 @@
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/of.h>
-#include <linux/pinctrl/pinctrl.h>
-#include <linux/pinctrl/pinmux.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/pinctrl/pinconf-generic.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
+#include <linux/pinctrl/consumer.h>
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
+#include <linux/pinctrl/pinctrl.h>
+#include <linux/pinctrl/pinmux.h>
+
#include "core.h"
#include "pinconf.h"
#include "pinmux.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/gpio/gpiolib-cdev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index f8041d4898d1..60a60e2d60c5 100644
--- a/drivers/gpio/gpiolib-cdev.c
+++ b/drivers/gpio/gpiolib-cdev.c
@@ -10,8 +10,9 @@
#include <linux/device.h>
#include <linux/err.h>
#include <linux/file.h>
-#include <linux/gpio.h>
#include <linux/gpio/driver.h>
+#include <linux/gpio.h>
+#include <linux/hte.h>
#include <linux/interrupt.h>
#include <linux/irqreturn.h>
#include <linux/kernel.h>
@@ -20,11 +21,12 @@
#include <linux/mutex.h>
#include <linux/pinctrl/consumer.h>
#include <linux/poll.h>
+#include <linux/seq_file.h>
#include <linux/spinlock.h>
#include <linux/timekeeping.h>
#include <linux/uaccess.h>
#include <linux/workqueue.h>
-#include <linux/hte.h>
+
#include <uapi/linux/gpio.h>
#include "gpiolib.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
index ade348b49b31..18d3a4f69e63 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
@@ -6,12 +6,14 @@
#include <linux/list.h>
#include <linux/mfd/syscon.h>
#include <linux/of.h>
-#include <linux/pinctrl/pinconf.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/seq_file.h>
+
#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/platform_device.h>
-#include <linux/regmap.h>
#include "../core.h"
#include "../pinctrl-utils.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/renesas/pinctrl-rzg2l.c | 7 +++++--
drivers/pinctrl/renesas/pinctrl-rzv2m.c | 4 +++-
drivers/pinctrl/renesas/pinctrl.c | 8 +++++---
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
index a43824fd9505..a08eee092430 100644
--- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c
+++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c
@@ -8,16 +8,19 @@
#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/gpio/driver.h>
-#include <linux/io.h>
#include <linux/interrupt.h>
+#include <linux/io.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/of_irq.h>
+#include <linux/seq_file.h>
+#include <linux/spinlock.h>
+
+#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/pinconf-generic.h>
#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/spinlock.h>
#include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
diff --git a/drivers/pinctrl/renesas/pinctrl-rzv2m.c b/drivers/pinctrl/renesas/pinctrl-rzv2m.c
index e8c18198bebd..061f16c77304 100644
--- a/drivers/pinctrl/renesas/pinctrl-rzv2m.c
+++ b/drivers/pinctrl/renesas/pinctrl-rzv2m.c
@@ -15,11 +15,13 @@
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of_device.h>
+#include <linux/spinlock.h>
+
+#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/pinconf-generic.h>
#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/spinlock.h>
#include <dt-bindings/pinctrl/rzv2m-pinctrl.h>
diff --git a/drivers/pinctrl/renesas/pinctrl.c b/drivers/pinctrl/renesas/pinctrl.c
index b438d24c13b5..b74147800319 100644
--- a/drivers/pinctrl/renesas/pinctrl.c
+++ b/drivers/pinctrl/renesas/pinctrl.c
@@ -12,14 +12,16 @@
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
+#include <linux/spinlock.h>
+
#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/machine.h>
-#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/slab.h>
-#include <linux/spinlock.h>
#include "core.h"
#include "../core.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/intel/pinctrl-lynxpoint.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/intel/pinctrl-lynxpoint.c
index 5d1abee30f8f..8d05dad38556 100644
--- a/drivers/pinctrl/intel/pinctrl-lynxpoint.c
+++ b/drivers/pinctrl/intel/pinctrl-lynxpoint.c
@@ -16,13 +16,15 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
+#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/types.h>
+#include <linux/pinctrl/consumer.h>
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/pinctrl/pinconf-generic.h>
#include "pinctrl-intel.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 8 +++++---
drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 8 +++++---
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
index 8c31a8f6b7e4..89695b5a2ce7 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
@@ -9,15 +9,17 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_irq.h>
-#include <linux/pinctrl/pinconf-generic.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/pinctrl/pinmux.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
+#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/spmi.h>
#include <linux/types.h>
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
+#include <linux/pinctrl/pinmux.h>
+
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include "../core.h"
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
index 6937157f50b3..063177b79927 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c
@@ -7,14 +7,16 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_irq.h>
-#include <linux/pinctrl/pinconf-generic.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/pinctrl/pinmux.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
+#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/types.h>
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
+#include <linux/pinctrl/pinmux.h>
+
#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
#include "../core.h"
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/gpio/gpio-tegra186.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c
index 54d9fa7da9c1..fdc5bdcd5638 100644
--- a/drivers/gpio/gpio-tegra186.c
+++ b/drivers/gpio/gpio-tegra186.c
@@ -7,12 +7,13 @@
*/
#include <linux/gpio/driver.h>
+#include <linux/hte.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
-#include <linux/hte.h>
+#include <linux/seq_file.h>
#include <dt-bindings/gpio/tegra186-gpio.h>
#include <dt-bindings/gpio/tegra194-gpio.h>
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/mediatek/pinctrl-moore.c | 3 +++
drivers/pinctrl/mediatek/pinctrl-paris.c | 5 +++++
2 files changed, 8 insertions(+)
diff --git a/drivers/pinctrl/mediatek/pinctrl-moore.c b/drivers/pinctrl/mediatek/pinctrl-moore.c
index 526faaebaf77..9474ada5addb 100644
--- a/drivers/pinctrl/mediatek/pinctrl-moore.c
+++ b/drivers/pinctrl/mediatek/pinctrl-moore.c
@@ -9,6 +9,9 @@
*/
#include <linux/gpio/driver.h>
+
+#include <linux/pinctrl/consumer.h>
+
#include "pinctrl-moore.h"
#define PINCTRL_PINCTRL_DEV KBUILD_MODNAME
diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c
index 74517e810958..475f4172d508 100644
--- a/drivers/pinctrl/mediatek/pinctrl-paris.c
+++ b/drivers/pinctrl/mediatek/pinctrl-paris.c
@@ -11,7 +11,12 @@
#include <linux/gpio/driver.h>
#include <linux/module.h>
+#include <linux/seq_file.h>
+
+#include <linux/pinctrl/consumer.h>
+
#include <dt-bindings/pinctrl/mt65xx.h>
+
#include "pinctrl-paris.h"
#define PINCTRL_PINCTRL_DEV KBUILD_MODNAME
--
2.35.1
Do not imply that some of the generic headers may be always included.
Instead, include explicitly what we are direct user of.
While at it, sort headers alphabetically.
Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/pinctrl/actions/pinctrl-owl.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/pinctrl/actions/pinctrl-owl.c b/drivers/pinctrl/actions/pinctrl-owl.c
index ed46abc15d72..a84ace6e451e 100644
--- a/drivers/pinctrl/actions/pinctrl-owl.c
+++ b/drivers/pinctrl/actions/pinctrl-owl.c
@@ -17,13 +17,15 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
+#include <linux/spinlock.h>
+
#include <linux/pinctrl/machine.h>
+#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
-#include <linux/pinctrl/pinconf.h>
-#include <linux/pinctrl/pinconf-generic.h>
-#include <linux/slab.h>
-#include <linux/spinlock.h>
#include "../core.h"
#include "../pinctrl-utils.h"
--
2.35.1
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on 9d157c89c5569f0ef560b7a5b2d7bf59ae98499c]
url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/pinctrl-Clean-up-and-add-missed-headers/20221011-042138
base: 9d157c89c5569f0ef560b7a5b2d7bf59ae98499c
config: riscv-allmodconfig
compiler: riscv64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/4c604b9cf7e296809c5b17f12e9e9766bfda0ee4
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Andy-Shevchenko/pinctrl-Clean-up-and-add-missed-headers/20221011-042138
git checkout 4c604b9cf7e296809c5b17f12e9e9766bfda0ee4
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/pinctrl/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
All error/warnings (new ones prefixed by >>):
>> drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:897:21: error: variable 'starfive_pinconf_ops' has initializer but incomplete type
897 | static const struct pinconf_ops starfive_pinconf_ops = {
| ^~~~~~~~~~~
>> drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:898:10: error: 'const struct pinconf_ops' has no member named 'pin_config_get'
898 | .pin_config_get = starfive_pinconf_get,
| ^~~~~~~~~~~~~~
>> drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:898:27: warning: excess elements in struct initializer
898 | .pin_config_get = starfive_pinconf_get,
| ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:898:27: note: (near initialization for 'starfive_pinconf_ops')
>> drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:899:10: error: 'const struct pinconf_ops' has no member named 'pin_config_group_get'
899 | .pin_config_group_get = starfive_pinconf_group_get,
| ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:899:33: warning: excess elements in struct initializer
899 | .pin_config_group_get = starfive_pinconf_group_get,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:899:33: note: (near initialization for 'starfive_pinconf_ops')
>> drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:900:10: error: 'const struct pinconf_ops' has no member named 'pin_config_group_set'
900 | .pin_config_group_set = starfive_pinconf_group_set,
| ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:900:33: warning: excess elements in struct initializer
900 | .pin_config_group_set = starfive_pinconf_group_set,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:900:33: note: (near initialization for 'starfive_pinconf_ops')
>> drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:901:10: error: 'const struct pinconf_ops' has no member named 'pin_config_dbg_show'
901 | .pin_config_dbg_show = starfive_pinconf_dbg_show,
| ^~~~~~~~~~~~~~~~~~~
drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:901:32: warning: excess elements in struct initializer
901 | .pin_config_dbg_show = starfive_pinconf_dbg_show,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:901:32: note: (near initialization for 'starfive_pinconf_ops')
>> drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:902:10: error: 'const struct pinconf_ops' has no member named 'is_generic'
902 | .is_generic = true,
| ^~~~~~~~~~
drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:902:23: warning: excess elements in struct initializer
902 | .is_generic = true,
| ^~~~
drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:902:23: note: (near initialization for 'starfive_pinconf_ops')
>> drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c:897:33: error: storage size of 'starfive_pinconf_ops' isn't known
897 | static const struct pinconf_ops starfive_pinconf_ops = {
| ^~~~~~~~~~~~~~~~~~~~
vim +898 drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
ec648f6b7686b7 drivers/pinctrl/pinctrl-starfive.c Emil Renner Berthing 2021-07-06 896
ec648f6b7686b7 drivers/pinctrl/pinctrl-starfive.c Emil Renner Berthing 2021-07-06 @897 static const struct pinconf_ops starfive_pinconf_ops = {
ec648f6b7686b7 drivers/pinctrl/pinctrl-starfive.c Emil Renner Berthing 2021-07-06 @898 .pin_config_get = starfive_pinconf_get,
ec648f6b7686b7 drivers/pinctrl/pinctrl-starfive.c Emil Renner Berthing 2021-07-06 @899 .pin_config_group_get = starfive_pinconf_group_get,
ec648f6b7686b7 drivers/pinctrl/pinctrl-starfive.c Emil Renner Berthing 2021-07-06 @900 .pin_config_group_set = starfive_pinconf_group_set,
ec648f6b7686b7 drivers/pinctrl/pinctrl-starfive.c Emil Renner Berthing 2021-07-06 @901 .pin_config_dbg_show = starfive_pinconf_dbg_show,
ec648f6b7686b7 drivers/pinctrl/pinctrl-starfive.c Emil Renner Berthing 2021-07-06 @902 .is_generic = true,
ec648f6b7686b7 drivers/pinctrl/pinctrl-starfive.c Emil Renner Berthing 2021-07-06 903 };
ec648f6b7686b7 drivers/pinctrl/pinctrl-starfive.c Emil Renner Berthing 2021-07-06 904
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Hi Andy,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 9d157c89c5569f0ef560b7a5b2d7bf59ae98499c]
url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/pinctrl-Clean-up-and-add-missed-headers/20221011-042138
base: 9d157c89c5569f0ef560b7a5b2d7bf59ae98499c
config: s390-allyesconfig
compiler: s390-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/4c604b9cf7e296809c5b17f12e9e9766bfda0ee4
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Andy-Shevchenko/pinctrl-Clean-up-and-add-missed-headers/20221011-042138
git checkout 4c604b9cf7e296809c5b17f12e9e9766bfda0ee4
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
All warnings (new ones prefixed by >>):
drivers/pinctrl/pinctrl-single.c:666:21: error: variable 'pcs_pinconf_ops' has initializer but incomplete type
666 | static const struct pinconf_ops pcs_pinconf_ops = {
| ^~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:667:10: error: 'const struct pinconf_ops' has no member named 'pin_config_get'
667 | .pin_config_get = pcs_pinconf_get,
| ^~~~~~~~~~~~~~
>> drivers/pinctrl/pinctrl-single.c:667:27: warning: excess elements in struct initializer
667 | .pin_config_get = pcs_pinconf_get,
| ^~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:667:27: note: (near initialization for 'pcs_pinconf_ops')
drivers/pinctrl/pinctrl-single.c:668:10: error: 'const struct pinconf_ops' has no member named 'pin_config_set'
668 | .pin_config_set = pcs_pinconf_set,
| ^~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:668:27: warning: excess elements in struct initializer
668 | .pin_config_set = pcs_pinconf_set,
| ^~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:668:27: note: (near initialization for 'pcs_pinconf_ops')
drivers/pinctrl/pinctrl-single.c:669:10: error: 'const struct pinconf_ops' has no member named 'pin_config_group_get'
669 | .pin_config_group_get = pcs_pinconf_group_get,
| ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:669:33: warning: excess elements in struct initializer
669 | .pin_config_group_get = pcs_pinconf_group_get,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:669:33: note: (near initialization for 'pcs_pinconf_ops')
drivers/pinctrl/pinctrl-single.c:670:10: error: 'const struct pinconf_ops' has no member named 'pin_config_group_set'
670 | .pin_config_group_set = pcs_pinconf_group_set,
| ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:670:33: warning: excess elements in struct initializer
670 | .pin_config_group_set = pcs_pinconf_group_set,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:670:33: note: (near initialization for 'pcs_pinconf_ops')
drivers/pinctrl/pinctrl-single.c:671:10: error: 'const struct pinconf_ops' has no member named 'pin_config_dbg_show'
671 | .pin_config_dbg_show = pcs_pinconf_dbg_show,
| ^~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:671:32: warning: excess elements in struct initializer
671 | .pin_config_dbg_show = pcs_pinconf_dbg_show,
| ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:671:32: note: (near initialization for 'pcs_pinconf_ops')
drivers/pinctrl/pinctrl-single.c:672:10: error: 'const struct pinconf_ops' has no member named 'pin_config_group_dbg_show'
672 | .pin_config_group_dbg_show = pcs_pinconf_group_dbg_show,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:672:38: warning: excess elements in struct initializer
672 | .pin_config_group_dbg_show = pcs_pinconf_group_dbg_show,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:672:38: note: (near initialization for 'pcs_pinconf_ops')
drivers/pinctrl/pinctrl-single.c:673:10: error: 'const struct pinconf_ops' has no member named 'pin_config_config_dbg_show'
673 | .pin_config_config_dbg_show = pcs_pinconf_config_dbg_show,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:673:39: warning: excess elements in struct initializer
673 | .pin_config_config_dbg_show = pcs_pinconf_config_dbg_show,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:673:39: note: (near initialization for 'pcs_pinconf_ops')
drivers/pinctrl/pinctrl-single.c:674:10: error: 'const struct pinconf_ops' has no member named 'is_generic'
674 | .is_generic = true,
| ^~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:674:23: warning: excess elements in struct initializer
674 | .is_generic = true,
| ^~~~
drivers/pinctrl/pinctrl-single.c:674:23: note: (near initialization for 'pcs_pinconf_ops')
drivers/pinctrl/pinctrl-single.c:666:33: error: storage size of 'pcs_pinconf_ops' isn't known
666 | static const struct pinconf_ops pcs_pinconf_ops = {
| ^~~~~~~~~~~~~~~
--
drivers/pinctrl/pinctrl-lpc18xx.c:1122:21: error: variable 'lpc18xx_pconf_ops' has initializer but incomplete type
1122 | static const struct pinconf_ops lpc18xx_pconf_ops = {
| ^~~~~~~~~~~
drivers/pinctrl/pinctrl-lpc18xx.c:1123:10: error: 'const struct pinconf_ops' has no member named 'is_generic'
1123 | .is_generic = true,
| ^~~~~~~~~~
>> drivers/pinctrl/pinctrl-lpc18xx.c:1123:27: warning: excess elements in struct initializer
1123 | .is_generic = true,
| ^~~~
drivers/pinctrl/pinctrl-lpc18xx.c:1123:27: note: (near initialization for 'lpc18xx_pconf_ops')
drivers/pinctrl/pinctrl-lpc18xx.c:1124:10: error: 'const struct pinconf_ops' has no member named 'pin_config_get'
1124 | .pin_config_get = lpc18xx_pconf_get,
| ^~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-lpc18xx.c:1124:27: warning: excess elements in struct initializer
1124 | .pin_config_get = lpc18xx_pconf_get,
| ^~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-lpc18xx.c:1124:27: note: (near initialization for 'lpc18xx_pconf_ops')
drivers/pinctrl/pinctrl-lpc18xx.c:1125:10: error: 'const struct pinconf_ops' has no member named 'pin_config_set'
1125 | .pin_config_set = lpc18xx_pconf_set,
| ^~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-lpc18xx.c:1125:27: warning: excess elements in struct initializer
1125 | .pin_config_set = lpc18xx_pconf_set,
| ^~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-lpc18xx.c:1125:27: note: (near initialization for 'lpc18xx_pconf_ops')
drivers/pinctrl/pinctrl-lpc18xx.c:1122:33: error: storage size of 'lpc18xx_pconf_ops' isn't known
1122 | static const struct pinconf_ops lpc18xx_pconf_ops = {
| ^~~~~~~~~~~~~~~~~
--
drivers/pinctrl/pinctrl-microchip-sgpio.c:416:21: error: variable 'sgpio_confops' has initializer but incomplete type
416 | static const struct pinconf_ops sgpio_confops = {
| ^~~~~~~~~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:417:10: error: 'const struct pinconf_ops' has no member named 'is_generic'
417 | .is_generic = true,
| ^~~~~~~~~~
>> drivers/pinctrl/pinctrl-microchip-sgpio.c:417:23: warning: excess elements in struct initializer
417 | .is_generic = true,
| ^~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:417:23: note: (near initialization for 'sgpio_confops')
drivers/pinctrl/pinctrl-microchip-sgpio.c:418:10: error: 'const struct pinconf_ops' has no member named 'pin_config_get'
418 | .pin_config_get = sgpio_pinconf_get,
| ^~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:418:27: warning: excess elements in struct initializer
418 | .pin_config_get = sgpio_pinconf_get,
| ^~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:418:27: note: (near initialization for 'sgpio_confops')
drivers/pinctrl/pinctrl-microchip-sgpio.c:419:10: error: 'const struct pinconf_ops' has no member named 'pin_config_set'
419 | .pin_config_set = sgpio_pinconf_set,
| ^~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:419:27: warning: excess elements in struct initializer
419 | .pin_config_set = sgpio_pinconf_set,
| ^~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:419:27: note: (near initialization for 'sgpio_confops')
drivers/pinctrl/pinctrl-microchip-sgpio.c:420:10: error: 'const struct pinconf_ops' has no member named 'pin_config_config_dbg_show'
420 | .pin_config_config_dbg_show = pinconf_generic_dump_config,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:420:39: warning: excess elements in struct initializer
420 | .pin_config_config_dbg_show = pinconf_generic_dump_config,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:420:39: note: (near initialization for 'sgpio_confops')
drivers/pinctrl/pinctrl-microchip-sgpio.c:416:33: error: storage size of 'sgpio_confops' isn't known
416 | static const struct pinconf_ops sgpio_confops = {
| ^~~~~~~~~~~~~
--
drivers/pinctrl/pinctrl-bm1880.c:1285:21: error: variable 'bm1880_pinconf_ops' has initializer but incomplete type
1285 | static const struct pinconf_ops bm1880_pinconf_ops = {
| ^~~~~~~~~~~
drivers/pinctrl/pinctrl-bm1880.c:1286:10: error: 'const struct pinconf_ops' has no member named 'is_generic'
1286 | .is_generic = true,
| ^~~~~~~~~~
>> drivers/pinctrl/pinctrl-bm1880.c:1286:23: warning: excess elements in struct initializer
1286 | .is_generic = true,
| ^~~~
drivers/pinctrl/pinctrl-bm1880.c:1286:23: note: (near initialization for 'bm1880_pinconf_ops')
drivers/pinctrl/pinctrl-bm1880.c:1287:10: error: 'const struct pinconf_ops' has no member named 'pin_config_get'
1287 | .pin_config_get = bm1880_pinconf_cfg_get,
| ^~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-bm1880.c:1287:27: warning: excess elements in struct initializer
1287 | .pin_config_get = bm1880_pinconf_cfg_get,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-bm1880.c:1287:27: note: (near initialization for 'bm1880_pinconf_ops')
drivers/pinctrl/pinctrl-bm1880.c:1288:10: error: 'const struct pinconf_ops' has no member named 'pin_config_set'
1288 | .pin_config_set = bm1880_pinconf_cfg_set,
| ^~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-bm1880.c:1288:27: warning: excess elements in struct initializer
1288 | .pin_config_set = bm1880_pinconf_cfg_set,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-bm1880.c:1288:27: note: (near initialization for 'bm1880_pinconf_ops')
drivers/pinctrl/pinctrl-bm1880.c:1289:10: error: 'const struct pinconf_ops' has no member named 'pin_config_group_set'
1289 | .pin_config_group_set = bm1880_pinconf_group_set,
| ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-bm1880.c:1289:33: warning: excess elements in struct initializer
1289 | .pin_config_group_set = bm1880_pinconf_group_set,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-bm1880.c:1289:33: note: (near initialization for 'bm1880_pinconf_ops')
drivers/pinctrl/pinctrl-bm1880.c:1285:33: error: storage size of 'bm1880_pinconf_ops' isn't known
1285 | static const struct pinconf_ops bm1880_pinconf_ops = {
| ^~~~~~~~~~~~~~~~~~
--
drivers/pinctrl/renesas/pinctrl-rzn1.c:668:21: error: variable 'rzn1_pinconf_ops' has initializer but incomplete type
668 | static const struct pinconf_ops rzn1_pinconf_ops = {
| ^~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:669:10: error: 'const struct pinconf_ops' has no member named 'is_generic'
669 | .is_generic = true,
| ^~~~~~~~~~
>> drivers/pinctrl/renesas/pinctrl-rzn1.c:669:23: warning: excess elements in struct initializer
669 | .is_generic = true,
| ^~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:669:23: note: (near initialization for 'rzn1_pinconf_ops')
drivers/pinctrl/renesas/pinctrl-rzn1.c:670:10: error: 'const struct pinconf_ops' has no member named 'pin_config_get'
670 | .pin_config_get = rzn1_pinconf_get,
| ^~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:670:27: warning: excess elements in struct initializer
670 | .pin_config_get = rzn1_pinconf_get,
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:670:27: note: (near initialization for 'rzn1_pinconf_ops')
drivers/pinctrl/renesas/pinctrl-rzn1.c:671:10: error: 'const struct pinconf_ops' has no member named 'pin_config_set'
671 | .pin_config_set = rzn1_pinconf_set,
| ^~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:671:27: warning: excess elements in struct initializer
671 | .pin_config_set = rzn1_pinconf_set,
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:671:27: note: (near initialization for 'rzn1_pinconf_ops')
drivers/pinctrl/renesas/pinctrl-rzn1.c:672:10: error: 'const struct pinconf_ops' has no member named 'pin_config_group_get'
672 | .pin_config_group_get = rzn1_pinconf_group_get,
| ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:672:33: warning: excess elements in struct initializer
672 | .pin_config_group_get = rzn1_pinconf_group_get,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:672:33: note: (near initialization for 'rzn1_pinconf_ops')
drivers/pinctrl/renesas/pinctrl-rzn1.c:673:10: error: 'const struct pinconf_ops' has no member named 'pin_config_group_set'
673 | .pin_config_group_set = rzn1_pinconf_group_set,
| ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:673:33: warning: excess elements in struct initializer
673 | .pin_config_group_set = rzn1_pinconf_group_set,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:673:33: note: (near initialization for 'rzn1_pinconf_ops')
drivers/pinctrl/renesas/pinctrl-rzn1.c:674:10: error: 'const struct pinconf_ops' has no member named 'pin_config_config_dbg_show'
674 | .pin_config_config_dbg_show = pinconf_generic_dump_config,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:674:39: warning: excess elements in struct initializer
674 | .pin_config_config_dbg_show = pinconf_generic_dump_config,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:674:39: note: (near initialization for 'rzn1_pinconf_ops')
drivers/pinctrl/renesas/pinctrl-rzn1.c:668:33: error: storage size of 'rzn1_pinconf_ops' isn't known
668 | static const struct pinconf_ops rzn1_pinconf_ops = {
| ^~~~~~~~~~~~~~~~
vim +667 drivers/pinctrl/pinctrl-single.c
9dddb4df90d136 Haojian Zhuang 2013-02-17 665
022ab148d28e84 Laurent Pinchart 2013-02-16 @666 static const struct pinconf_ops pcs_pinconf_ops = {
8b8b091bf07fa7 Tony Lindgren 2012-07-10 @667 .pin_config_get = pcs_pinconf_get,
8b8b091bf07fa7 Tony Lindgren 2012-07-10 668 .pin_config_set = pcs_pinconf_set,
8b8b091bf07fa7 Tony Lindgren 2012-07-10 669 .pin_config_group_get = pcs_pinconf_group_get,
8b8b091bf07fa7 Tony Lindgren 2012-07-10 670 .pin_config_group_set = pcs_pinconf_group_set,
8b8b091bf07fa7 Tony Lindgren 2012-07-10 671 .pin_config_dbg_show = pcs_pinconf_dbg_show,
8b8b091bf07fa7 Tony Lindgren 2012-07-10 672 .pin_config_group_dbg_show = pcs_pinconf_group_dbg_show,
9dddb4df90d136 Haojian Zhuang 2013-02-17 673 .pin_config_config_dbg_show = pcs_pinconf_config_dbg_show,
a7bbdd7f8065b9 Axel Lin 2013-03-04 674 .is_generic = true,
8b8b091bf07fa7 Tony Lindgren 2012-07-10 675 };
8b8b091bf07fa7 Tony Lindgren 2012-07-10 676
--
0-DAY CI Kernel Test Service
https://01.org/lkp
On Mon, Oct 10, 2022 at 11:14:18PM +0300, Andy Shevchenko wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
> drivers/gpio/gpiolib-cdev.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
> index f8041d4898d1..60a60e2d60c5 100644
> --- a/drivers/gpio/gpiolib-cdev.c
> +++ b/drivers/gpio/gpiolib-cdev.c
> @@ -10,8 +10,9 @@
> #include <linux/device.h>
> #include <linux/err.h>
> #include <linux/file.h>
> -#include <linux/gpio.h>
> #include <linux/gpio/driver.h>
> +#include <linux/gpio.h>
> +#include <linux/hte.h>
Ok with the hte re-order.
But moving the gpio subsystem header after the gpio/driver is not
alphabetical ('.' precedes '/') and it read better and made more sense
to me the way it was.
> #include <linux/interrupt.h>
> #include <linux/irqreturn.h>
> #include <linux/kernel.h>
> @@ -20,11 +21,12 @@
> #include <linux/mutex.h>
> #include <linux/pinctrl/consumer.h>
> #include <linux/poll.h>
> +#include <linux/seq_file.h>
I wasn't aware that we use anything from seq_file.
What am I missing?
Cheers,
Kent.
> #include <linux/spinlock.h>
> #include <linux/timekeeping.h>
> #include <linux/uaccess.h>
> #include <linux/workqueue.h>
> -#include <linux/hte.h>
> +
> #include <uapi/linux/gpio.h>
>
> #include "gpiolib.h"
> --
> 2.35.1
>
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on 9d157c89c5569f0ef560b7a5b2d7bf59ae98499c]
url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/pinctrl-Clean-up-and-add-missed-headers/20221011-042138
base: 9d157c89c5569f0ef560b7a5b2d7bf59ae98499c
config: s390-allyesconfig
compiler: s390-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/4c604b9cf7e296809c5b17f12e9e9766bfda0ee4
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Andy-Shevchenko/pinctrl-Clean-up-and-add-missed-headers/20221011-042138
git checkout 4c604b9cf7e296809c5b17f12e9e9766bfda0ee4
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
All errors (new ones prefixed by >>):
>> drivers/pinctrl/pinctrl-bm1880.c:1285:21: error: variable 'bm1880_pinconf_ops' has initializer but incomplete type
1285 | static const struct pinconf_ops bm1880_pinconf_ops = {
| ^~~~~~~~~~~
>> drivers/pinctrl/pinctrl-bm1880.c:1286:10: error: 'const struct pinconf_ops' has no member named 'is_generic'
1286 | .is_generic = true,
| ^~~~~~~~~~
drivers/pinctrl/pinctrl-bm1880.c:1286:23: warning: excess elements in struct initializer
1286 | .is_generic = true,
| ^~~~
drivers/pinctrl/pinctrl-bm1880.c:1286:23: note: (near initialization for 'bm1880_pinconf_ops')
>> drivers/pinctrl/pinctrl-bm1880.c:1287:10: error: 'const struct pinconf_ops' has no member named 'pin_config_get'
1287 | .pin_config_get = bm1880_pinconf_cfg_get,
| ^~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-bm1880.c:1287:27: warning: excess elements in struct initializer
1287 | .pin_config_get = bm1880_pinconf_cfg_get,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-bm1880.c:1287:27: note: (near initialization for 'bm1880_pinconf_ops')
>> drivers/pinctrl/pinctrl-bm1880.c:1288:10: error: 'const struct pinconf_ops' has no member named 'pin_config_set'
1288 | .pin_config_set = bm1880_pinconf_cfg_set,
| ^~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-bm1880.c:1288:27: warning: excess elements in struct initializer
1288 | .pin_config_set = bm1880_pinconf_cfg_set,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-bm1880.c:1288:27: note: (near initialization for 'bm1880_pinconf_ops')
>> drivers/pinctrl/pinctrl-bm1880.c:1289:10: error: 'const struct pinconf_ops' has no member named 'pin_config_group_set'
1289 | .pin_config_group_set = bm1880_pinconf_group_set,
| ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-bm1880.c:1289:33: warning: excess elements in struct initializer
1289 | .pin_config_group_set = bm1880_pinconf_group_set,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-bm1880.c:1289:33: note: (near initialization for 'bm1880_pinconf_ops')
>> drivers/pinctrl/pinctrl-bm1880.c:1285:33: error: storage size of 'bm1880_pinconf_ops' isn't known
1285 | static const struct pinconf_ops bm1880_pinconf_ops = {
| ^~~~~~~~~~~~~~~~~~
--
>> drivers/pinctrl/pinctrl-lpc18xx.c:1122:21: error: variable 'lpc18xx_pconf_ops' has initializer but incomplete type
1122 | static const struct pinconf_ops lpc18xx_pconf_ops = {
| ^~~~~~~~~~~
>> drivers/pinctrl/pinctrl-lpc18xx.c:1123:10: error: 'const struct pinconf_ops' has no member named 'is_generic'
1123 | .is_generic = true,
| ^~~~~~~~~~
drivers/pinctrl/pinctrl-lpc18xx.c:1123:27: warning: excess elements in struct initializer
1123 | .is_generic = true,
| ^~~~
drivers/pinctrl/pinctrl-lpc18xx.c:1123:27: note: (near initialization for 'lpc18xx_pconf_ops')
>> drivers/pinctrl/pinctrl-lpc18xx.c:1124:10: error: 'const struct pinconf_ops' has no member named 'pin_config_get'
1124 | .pin_config_get = lpc18xx_pconf_get,
| ^~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-lpc18xx.c:1124:27: warning: excess elements in struct initializer
1124 | .pin_config_get = lpc18xx_pconf_get,
| ^~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-lpc18xx.c:1124:27: note: (near initialization for 'lpc18xx_pconf_ops')
>> drivers/pinctrl/pinctrl-lpc18xx.c:1125:10: error: 'const struct pinconf_ops' has no member named 'pin_config_set'
1125 | .pin_config_set = lpc18xx_pconf_set,
| ^~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-lpc18xx.c:1125:27: warning: excess elements in struct initializer
1125 | .pin_config_set = lpc18xx_pconf_set,
| ^~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-lpc18xx.c:1125:27: note: (near initialization for 'lpc18xx_pconf_ops')
>> drivers/pinctrl/pinctrl-lpc18xx.c:1122:33: error: storage size of 'lpc18xx_pconf_ops' isn't known
1122 | static const struct pinconf_ops lpc18xx_pconf_ops = {
| ^~~~~~~~~~~~~~~~~
--
>> drivers/pinctrl/pinctrl-microchip-sgpio.c:416:21: error: variable 'sgpio_confops' has initializer but incomplete type
416 | static const struct pinconf_ops sgpio_confops = {
| ^~~~~~~~~~~
>> drivers/pinctrl/pinctrl-microchip-sgpio.c:417:10: error: 'const struct pinconf_ops' has no member named 'is_generic'
417 | .is_generic = true,
| ^~~~~~~~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:417:23: warning: excess elements in struct initializer
417 | .is_generic = true,
| ^~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:417:23: note: (near initialization for 'sgpio_confops')
>> drivers/pinctrl/pinctrl-microchip-sgpio.c:418:10: error: 'const struct pinconf_ops' has no member named 'pin_config_get'
418 | .pin_config_get = sgpio_pinconf_get,
| ^~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:418:27: warning: excess elements in struct initializer
418 | .pin_config_get = sgpio_pinconf_get,
| ^~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:418:27: note: (near initialization for 'sgpio_confops')
>> drivers/pinctrl/pinctrl-microchip-sgpio.c:419:10: error: 'const struct pinconf_ops' has no member named 'pin_config_set'
419 | .pin_config_set = sgpio_pinconf_set,
| ^~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:419:27: warning: excess elements in struct initializer
419 | .pin_config_set = sgpio_pinconf_set,
| ^~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:419:27: note: (near initialization for 'sgpio_confops')
>> drivers/pinctrl/pinctrl-microchip-sgpio.c:420:10: error: 'const struct pinconf_ops' has no member named 'pin_config_config_dbg_show'
420 | .pin_config_config_dbg_show = pinconf_generic_dump_config,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:420:39: warning: excess elements in struct initializer
420 | .pin_config_config_dbg_show = pinconf_generic_dump_config,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-microchip-sgpio.c:420:39: note: (near initialization for 'sgpio_confops')
>> drivers/pinctrl/pinctrl-microchip-sgpio.c:416:33: error: storage size of 'sgpio_confops' isn't known
416 | static const struct pinconf_ops sgpio_confops = {
| ^~~~~~~~~~~~~
--
>> drivers/pinctrl/pinctrl-single.c:666:21: error: variable 'pcs_pinconf_ops' has initializer but incomplete type
666 | static const struct pinconf_ops pcs_pinconf_ops = {
| ^~~~~~~~~~~
>> drivers/pinctrl/pinctrl-single.c:667:10: error: 'const struct pinconf_ops' has no member named 'pin_config_get'
667 | .pin_config_get = pcs_pinconf_get,
| ^~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:667:27: warning: excess elements in struct initializer
667 | .pin_config_get = pcs_pinconf_get,
| ^~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:667:27: note: (near initialization for 'pcs_pinconf_ops')
>> drivers/pinctrl/pinctrl-single.c:668:10: error: 'const struct pinconf_ops' has no member named 'pin_config_set'
668 | .pin_config_set = pcs_pinconf_set,
| ^~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:668:27: warning: excess elements in struct initializer
668 | .pin_config_set = pcs_pinconf_set,
| ^~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:668:27: note: (near initialization for 'pcs_pinconf_ops')
>> drivers/pinctrl/pinctrl-single.c:669:10: error: 'const struct pinconf_ops' has no member named 'pin_config_group_get'
669 | .pin_config_group_get = pcs_pinconf_group_get,
| ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:669:33: warning: excess elements in struct initializer
669 | .pin_config_group_get = pcs_pinconf_group_get,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:669:33: note: (near initialization for 'pcs_pinconf_ops')
>> drivers/pinctrl/pinctrl-single.c:670:10: error: 'const struct pinconf_ops' has no member named 'pin_config_group_set'
670 | .pin_config_group_set = pcs_pinconf_group_set,
| ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:670:33: warning: excess elements in struct initializer
670 | .pin_config_group_set = pcs_pinconf_group_set,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:670:33: note: (near initialization for 'pcs_pinconf_ops')
>> drivers/pinctrl/pinctrl-single.c:671:10: error: 'const struct pinconf_ops' has no member named 'pin_config_dbg_show'
671 | .pin_config_dbg_show = pcs_pinconf_dbg_show,
| ^~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:671:32: warning: excess elements in struct initializer
671 | .pin_config_dbg_show = pcs_pinconf_dbg_show,
| ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:671:32: note: (near initialization for 'pcs_pinconf_ops')
>> drivers/pinctrl/pinctrl-single.c:672:10: error: 'const struct pinconf_ops' has no member named 'pin_config_group_dbg_show'
672 | .pin_config_group_dbg_show = pcs_pinconf_group_dbg_show,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:672:38: warning: excess elements in struct initializer
672 | .pin_config_group_dbg_show = pcs_pinconf_group_dbg_show,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:672:38: note: (near initialization for 'pcs_pinconf_ops')
>> drivers/pinctrl/pinctrl-single.c:673:10: error: 'const struct pinconf_ops' has no member named 'pin_config_config_dbg_show'
673 | .pin_config_config_dbg_show = pcs_pinconf_config_dbg_show,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:673:39: warning: excess elements in struct initializer
673 | .pin_config_config_dbg_show = pcs_pinconf_config_dbg_show,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:673:39: note: (near initialization for 'pcs_pinconf_ops')
>> drivers/pinctrl/pinctrl-single.c:674:10: error: 'const struct pinconf_ops' has no member named 'is_generic'
674 | .is_generic = true,
| ^~~~~~~~~~
drivers/pinctrl/pinctrl-single.c:674:23: warning: excess elements in struct initializer
674 | .is_generic = true,
| ^~~~
drivers/pinctrl/pinctrl-single.c:674:23: note: (near initialization for 'pcs_pinconf_ops')
>> drivers/pinctrl/pinctrl-single.c:666:33: error: storage size of 'pcs_pinconf_ops' isn't known
666 | static const struct pinconf_ops pcs_pinconf_ops = {
| ^~~~~~~~~~~~~~~
--
>> drivers/pinctrl/renesas/pinctrl-rzn1.c:668:21: error: variable 'rzn1_pinconf_ops' has initializer but incomplete type
668 | static const struct pinconf_ops rzn1_pinconf_ops = {
| ^~~~~~~~~~~
>> drivers/pinctrl/renesas/pinctrl-rzn1.c:669:10: error: 'const struct pinconf_ops' has no member named 'is_generic'
669 | .is_generic = true,
| ^~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:669:23: warning: excess elements in struct initializer
669 | .is_generic = true,
| ^~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:669:23: note: (near initialization for 'rzn1_pinconf_ops')
>> drivers/pinctrl/renesas/pinctrl-rzn1.c:670:10: error: 'const struct pinconf_ops' has no member named 'pin_config_get'
670 | .pin_config_get = rzn1_pinconf_get,
| ^~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:670:27: warning: excess elements in struct initializer
670 | .pin_config_get = rzn1_pinconf_get,
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:670:27: note: (near initialization for 'rzn1_pinconf_ops')
>> drivers/pinctrl/renesas/pinctrl-rzn1.c:671:10: error: 'const struct pinconf_ops' has no member named 'pin_config_set'
671 | .pin_config_set = rzn1_pinconf_set,
| ^~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:671:27: warning: excess elements in struct initializer
671 | .pin_config_set = rzn1_pinconf_set,
| ^~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:671:27: note: (near initialization for 'rzn1_pinconf_ops')
>> drivers/pinctrl/renesas/pinctrl-rzn1.c:672:10: error: 'const struct pinconf_ops' has no member named 'pin_config_group_get'
672 | .pin_config_group_get = rzn1_pinconf_group_get,
| ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:672:33: warning: excess elements in struct initializer
672 | .pin_config_group_get = rzn1_pinconf_group_get,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:672:33: note: (near initialization for 'rzn1_pinconf_ops')
>> drivers/pinctrl/renesas/pinctrl-rzn1.c:673:10: error: 'const struct pinconf_ops' has no member named 'pin_config_group_set'
673 | .pin_config_group_set = rzn1_pinconf_group_set,
| ^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:673:33: warning: excess elements in struct initializer
673 | .pin_config_group_set = rzn1_pinconf_group_set,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:673:33: note: (near initialization for 'rzn1_pinconf_ops')
>> drivers/pinctrl/renesas/pinctrl-rzn1.c:674:10: error: 'const struct pinconf_ops' has no member named 'pin_config_config_dbg_show'
674 | .pin_config_config_dbg_show = pinconf_generic_dump_config,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:674:39: warning: excess elements in struct initializer
674 | .pin_config_config_dbg_show = pinconf_generic_dump_config,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/renesas/pinctrl-rzn1.c:674:39: note: (near initialization for 'rzn1_pinconf_ops')
>> drivers/pinctrl/renesas/pinctrl-rzn1.c:668:33: error: storage size of 'rzn1_pinconf_ops' isn't known
668 | static const struct pinconf_ops rzn1_pinconf_ops = {
| ^~~~~~~~~~~~~~~~
vim +1286 drivers/pinctrl/pinctrl-bm1880.c
49bd61ebce5f2d Manivannan Sadhasivam 2019-05-20 1284
49bd61ebce5f2d Manivannan Sadhasivam 2019-05-20 @1285 static const struct pinconf_ops bm1880_pinconf_ops = {
49bd61ebce5f2d Manivannan Sadhasivam 2019-05-20 @1286 .is_generic = true,
49bd61ebce5f2d Manivannan Sadhasivam 2019-05-20 @1287 .pin_config_get = bm1880_pinconf_cfg_get,
49bd61ebce5f2d Manivannan Sadhasivam 2019-05-20 @1288 .pin_config_set = bm1880_pinconf_cfg_set,
49bd61ebce5f2d Manivannan Sadhasivam 2019-05-20 @1289 .pin_config_group_set = bm1880_pinconf_group_set,
49bd61ebce5f2d Manivannan Sadhasivam 2019-05-20 1290 };
49bd61ebce5f2d Manivannan Sadhasivam 2019-05-20 1291
--
0-DAY CI Kernel Test Service
https://01.org/lkp
On 10-10-22, 23:14, Andy Shevchenko wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
> drivers/pinctrl/spear/pinctrl-spear.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c
> index e0543c1ad641..18de2e70ea50 100644
> --- a/drivers/pinctrl/spear/pinctrl-spear.c
> +++ b/drivers/pinctrl/spear/pinctrl-spear.c
> @@ -19,11 +19,13 @@
> #include <linux/of.h>
> #include <linux/of_address.h>
> #include <linux/of_gpio.h>
> +#include <linux/platform_device.h>
> +#include <linux/seq_file.h>
> +#include <linux/slab.h>
> +
> #include <linux/pinctrl/machine.h>
> #include <linux/pinctrl/pinctrl.h>
> #include <linux/pinctrl/pinmux.h>
> -#include <linux/platform_device.h>
> -#include <linux/slab.h>
>
> #include "pinctrl-spear.h"
Acked-by: Viresh Kumar <[email protected]>
--
viresh
On 10/10/22 22:14, Andy Shevchenko wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
> drivers/pinctrl/pinctrl-st.c | 21 +++++++++++++--------
> 1 file changed, 13 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
> index cf7f9cbe6044..985dfceb127d 100644
> --- a/drivers/pinctrl/pinctrl-st.c
> +++ b/drivers/pinctrl/pinctrl-st.c
> @@ -5,21 +5,26 @@
> * Srinivas Kandagatla <[email protected]>
> */
>
> -#include <linux/init.h>
> -#include <linux/module.h>
> -#include <linux/slab.h>
> #include <linux/err.h>
> +#include <linux/gpio/driver.h>
> +#include <linux/init.h>
> #include <linux/io.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/module.h>
> #include <linux/of.h>
> -#include <linux/of_irq.h>
> #include <linux/of_address.h>
> -#include <linux/gpio/driver.h>
> +#include <linux/of_irq.h>
> +#include <linux/platform_device.h>
> #include <linux/regmap.h>
> -#include <linux/mfd/syscon.h>
> +#include <linux/seq_file.h>
> +#include <linux/slab.h>
> +#include <linux/string_helpers.h>
> +
> +#include <linux/pinctrl/consumer.h>
> +#include <linux/pinctrl/pinconf.h>
> #include <linux/pinctrl/pinctrl.h>
> #include <linux/pinctrl/pinmux.h>
> -#include <linux/pinctrl/pinconf.h>
> -#include <linux/platform_device.h>
> +
> #include "core.h"
>
> /* PIO Block registers */
Reviewed-by: Patrice Chotard <[email protected]>
Thanks
Patrice
On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
<[email protected]> wrote:
>
> Currently the header inclusion inside the pinctrl headers seems more arbitrary
> than logical. This series is basically out of two parts:
> - add missed headers to the pin control drivers / users
> - clean up the headers of pin control subsystem
>
> The idea is to have this series to be pulled after -rc1 by the GPIO and
> pin control subsystems, so all new drivers will utilize cleaned up headers
> of the pin control.
>
> Please, review and comment.
>
> Changelog v2:
> - added preparatory patches: all, but last (LKP)
> - added missed forward declaration to the last patch (LKP)
>
Thanks for doing this. Did you use any kind of automation for
detecting for which symbols the headers are missing?
Bart
On Tue, Oct 11, 2022 at 1:33 AM Damien Le Moal <[email protected]> wrote:
> On 2022/10/11 5:15, Andy Shevchenko wrote:
> > Do not imply that some of the generic headers may be always included.
> > Instead, include explicitly what we are direct user of.
> >
> > While at it, sort headers alphabetically.
> >
> > Signed-off-by: Andy Shevchenko <[email protected]>
>
> Looks OK to me, but the patch title should be:
>
> pinctrl: k210: Add missing header(s)
>
> Same remark for the entire series. You need s/missed/missing in all patch titles.
Oh, the missing word 'missing' :-) I will replace it locally (I won't
resend it because of that).
> With that fixed,
>
> Reviewed-by: Damien Le Moal <[email protected]>
Thanks!
--
With Best Regards,
Andy Shevchenko
On 10/11/2022 1:44 AM, Andy Shevchenko wrote:
> There is a few things done:
> - include only the headers we are direct user of
> - when pointer is in use, provide a forward declaration
> - add missed headers
> - group generic headers and subsystem headers
> - sort each group alphabetically
>
> While at it, fix some awkward indentations.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
> drivers/pinctrl/core.c | 19 ++++++++-------
> drivers/pinctrl/core.h | 12 +++++++++-
> drivers/pinctrl/devicetree.h | 6 +++++
> drivers/pinctrl/pinconf.h | 10 ++++++++
> drivers/pinctrl/pinctrl-utils.h | 5 ++++
> drivers/pinctrl/pinmux.c | 17 ++++++++------
> drivers/pinctrl/pinmux.h | 11 +++++++++
> include/linux/pinctrl/consumer.h | 31 +++++++++++--------------
> include/linux/pinctrl/devinfo.h | 6 +++--
> include/linux/pinctrl/machine.h | 8 ++++---
> include/linux/pinctrl/pinconf-generic.h | 23 ++++++++++--------
> include/linux/pinctrl/pinctrl.h | 18 +++++++-------
> include/linux/pinctrl/pinmux.h | 5 ++--
> 13 files changed, 110 insertions(+), 61 deletions(-)
>
> diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
> index 9e57f4c62e60..655f9502e73f 100644
> --- a/drivers/pinctrl/core.c
> +++ b/drivers/pinctrl/core.c
> @@ -12,19 +12,21 @@
> */
> #define pr_fmt(fmt) "pinctrl core: " fmt
>
> -#include <linux/kernel.h>
> -#include <linux/kref.h>
> -#include <linux/export.h>
> -#include <linux/init.h>
> +#include <linux/debugfs.h>
> #include <linux/device.h>
> -#include <linux/slab.h>
> #include <linux/err.h>
> +#include <linux/export.h>
> +#include <linux/init.h>
> +#include <linux/kernel.h>
> +#include <linux/kref.h>
> #include <linux/list.h>
> -#include <linux/debugfs.h>
> #include <linux/seq_file.h>
> +#include <linux/slab.h>
> +
> #include <linux/pinctrl/consumer.h>
> -#include <linux/pinctrl/pinctrl.h>
> +#include <linux/pinctrl/devinfo.h>
> #include <linux/pinctrl/machine.h>
> +#include <linux/pinctrl/pinctrl.h>
>
> #ifdef CONFIG_GPIOLIB
> #include "../gpio/gpiolib.h"
> @@ -33,9 +35,8 @@
>
> #include "core.h"
> #include "devicetree.h"
> -#include "pinmux.h"
> #include "pinconf.h"
> -
> +#include "pinmux.h"
>
> static bool pinctrl_dummy_state;
>
> diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h
> index 840103c40c14..4d0bdb9fb99b 100644
> --- a/drivers/pinctrl/core.h
> +++ b/drivers/pinctrl/core.h
> @@ -9,12 +9,22 @@
> */
>
> #include <linux/kref.h>
> +#include <linux/list.h>
> #include <linux/mutex.h>
> #include <linux/radix-tree.h>
> -#include <linux/pinctrl/pinconf.h>
Removing pinconf.h from the core.h may cause build failure in other files
because where-ever core.h is included to use “struct pinconf_ops”, there
is a need to include pinconf.h.
With that fixed,
Reviewed-by: Basavaraj Natikar <[email protected]>
Thanks,
--
Basavaraj
> +#include <linux/types.h>
> +
> #include <linux/pinctrl/machine.h>
>
> +struct dentry;
> +struct device;
> +struct device_node;
> +struct module;
> +
> +struct pinctrl;
> +struct pinctrl_desc;
> struct pinctrl_gpio_range;
> +struct pinctrl_state;
>
> /**
> * struct pinctrl_dev - pin control class device
> diff --git a/drivers/pinctrl/devicetree.h b/drivers/pinctrl/devicetree.h
> index efa80779de4f..def76aba99d1 100644
> --- a/drivers/pinctrl/devicetree.h
> +++ b/drivers/pinctrl/devicetree.h
> @@ -5,8 +5,14 @@
> * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
> */
>
> +#include <linux/errno.h>
> +
> +struct device_node;
> struct of_phandle_args;
>
> +struct pinctrl;
> +struct pinctrl_dev;
> +
> #ifdef CONFIG_OF
>
> void pinctrl_dt_free_maps(struct pinctrl *p);
> diff --git a/drivers/pinctrl/pinconf.h b/drivers/pinctrl/pinconf.h
> index be7311373299..694bfc9961fa 100644
> --- a/drivers/pinctrl/pinconf.h
> +++ b/drivers/pinctrl/pinconf.h
> @@ -10,6 +10,16 @@
> * Author: Linus Walleij <[email protected]>
> */
>
> +#include <linux/errno.h>
> +
> +struct dentry;
> +struct device_node;
> +struct seq_file;
> +
> +struct pinctrl_dev;
> +struct pinctrl_map;
> +struct pinctrl_setting;
> +
> #ifdef CONFIG_PINCONF
>
> int pinconf_check_ops(struct pinctrl_dev *pctldev);
> diff --git a/drivers/pinctrl/pinctrl-utils.h b/drivers/pinctrl/pinctrl-utils.h
> index cec407a8cc4e..4108ee2dd6d0 100644
> --- a/drivers/pinctrl/pinctrl-utils.h
> +++ b/drivers/pinctrl/pinctrl-utils.h
> @@ -9,6 +9,11 @@
> #ifndef __PINCTRL_UTILS_H__
> #define __PINCTRL_UTILS_H__
>
> +#include <linux/pinctrl/machine.h>
> +
> +struct pinctrl_dev;
> +struct pinctrl_map;
> +
> int pinctrl_utils_reserve_map(struct pinctrl_dev *pctldev,
> struct pinctrl_map **map, unsigned *reserved_maps,
> unsigned *num_maps, unsigned reserve);
> diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
> index f94d43b082d9..6bd7ac37a0e0 100644
> --- a/drivers/pinctrl/pinmux.c
> +++ b/drivers/pinctrl/pinmux.c
> @@ -13,19 +13,22 @@
> #define pr_fmt(fmt) "pinmux core: " fmt
>
> #include <linux/ctype.h>
> -#include <linux/kernel.h>
> -#include <linux/module.h>
> -#include <linux/init.h>
> +#include <linux/debugfs.h>
> #include <linux/device.h>
> -#include <linux/slab.h>
> -#include <linux/radix-tree.h>
> #include <linux/err.h>
> +#include <linux/init.h>
> +#include <linux/kernel.h>
> #include <linux/list.h>
> -#include <linux/string.h>
> -#include <linux/debugfs.h>
> +#include <linux/module.h>
> +#include <linux/radix-tree.h>
> #include <linux/seq_file.h>
> +#include <linux/slab.h>
> +#include <linux/string.h>
> +
> #include <linux/pinctrl/machine.h>
> +#include <linux/pinctrl/pinctrl.h>
> #include <linux/pinctrl/pinmux.h>
> +
> #include "core.h"
> #include "pinmux.h"
>
> diff --git a/drivers/pinctrl/pinmux.h b/drivers/pinctrl/pinmux.h
> index 72fcf03eaa43..ea6f99c24aa5 100644
> --- a/drivers/pinctrl/pinmux.h
> +++ b/drivers/pinctrl/pinmux.h
> @@ -9,6 +9,17 @@
> *
> * Author: Linus Walleij <[email protected]>
> */
> +
> +#include <linux/types.h>
> +
> +struct dentry;
> +struct seq_file;
> +
> +struct pinctrl_dev;
> +struct pinctrl_gpio_range;
> +struct pinctrl_map;
> +struct pinctrl_setting;
> +
> #ifdef CONFIG_PINMUX
>
> int pinmux_check_ops(struct pinctrl_dev *pctldev);
> diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h
> index 019fecd75d0c..4729d54e8995 100644
> --- a/include/linux/pinctrl/consumer.h
> +++ b/include/linux/pinctrl/consumer.h
> @@ -12,14 +12,15 @@
> #define __LINUX_PINCTRL_CONSUMER_H
>
> #include <linux/err.h>
> -#include <linux/list.h>
> -#include <linux/seq_file.h>
> +#include <linux/types.h>
> +
> #include <linux/pinctrl/pinctrl-state.h>
>
> +struct device;
> +
> /* This struct is private to the core and should be regarded as a cookie */
> struct pinctrl;
> struct pinctrl_state;
> -struct device;
>
> #ifdef CONFIG_PINCTRL
>
> @@ -33,9 +34,8 @@ extern int pinctrl_gpio_set_config(unsigned gpio, unsigned long config);
>
> extern struct pinctrl * __must_check pinctrl_get(struct device *dev);
> extern void pinctrl_put(struct pinctrl *p);
> -extern struct pinctrl_state * __must_check pinctrl_lookup_state(
> - struct pinctrl *p,
> - const char *name);
> +extern struct pinctrl_state * __must_check pinctrl_lookup_state(struct pinctrl *p,
> + const char *name);
> extern int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *s);
>
> extern struct pinctrl * __must_check devm_pinctrl_get(struct device *dev);
> @@ -101,9 +101,8 @@ static inline void pinctrl_put(struct pinctrl *p)
> {
> }
>
> -static inline struct pinctrl_state * __must_check pinctrl_lookup_state(
> - struct pinctrl *p,
> - const char *name)
> +static inline struct pinctrl_state * __must_check pinctrl_lookup_state(struct pinctrl *p,
> + const char *name)
> {
> return NULL;
> }
> @@ -145,8 +144,8 @@ static inline int pinctrl_pm_select_idle_state(struct device *dev)
>
> #endif /* CONFIG_PINCTRL */
>
> -static inline struct pinctrl * __must_check pinctrl_get_select(
> - struct device *dev, const char *name)
> +static inline struct pinctrl * __must_check pinctrl_get_select(struct device *dev,
> + const char *name)
> {
> struct pinctrl *p;
> struct pinctrl_state *s;
> @@ -171,14 +170,13 @@ static inline struct pinctrl * __must_check pinctrl_get_select(
> return p;
> }
>
> -static inline struct pinctrl * __must_check pinctrl_get_select_default(
> - struct device *dev)
> +static inline struct pinctrl * __must_check pinctrl_get_select_default(struct device *dev)
> {
> return pinctrl_get_select(dev, PINCTRL_STATE_DEFAULT);
> }
>
> -static inline struct pinctrl * __must_check devm_pinctrl_get_select(
> - struct device *dev, const char *name)
> +static inline struct pinctrl * __must_check devm_pinctrl_get_select(struct device *dev,
> + const char *name)
> {
> struct pinctrl *p;
> struct pinctrl_state *s;
> @@ -203,8 +201,7 @@ static inline struct pinctrl * __must_check devm_pinctrl_get_select(
> return p;
> }
>
> -static inline struct pinctrl * __must_check devm_pinctrl_get_select_default(
> - struct device *dev)
> +static inline struct pinctrl * __must_check devm_pinctrl_get_select_default(struct device *dev)
> {
> return devm_pinctrl_get_select(dev, PINCTRL_STATE_DEFAULT);
> }
> diff --git a/include/linux/pinctrl/devinfo.h b/include/linux/pinctrl/devinfo.h
> index a48ff69acddd..9e8b559e1253 100644
> --- a/include/linux/pinctrl/devinfo.h
> +++ b/include/linux/pinctrl/devinfo.h
> @@ -14,11 +14,15 @@
> #ifndef PINCTRL_DEVINFO_H
> #define PINCTRL_DEVINFO_H
>
> +struct device;
> +
> #ifdef CONFIG_PINCTRL
>
> /* The device core acts as a consumer toward pinctrl */
> #include <linux/pinctrl/consumer.h>
>
> +struct pinctrl;
> +
> /**
> * struct dev_pin_info - pin state container for devices
> * @p: pinctrl handle for the containing device
> @@ -42,8 +46,6 @@ extern int pinctrl_init_done(struct device *dev);
>
> #else
>
> -struct device;
> -
> /* Stubs if we're not using pinctrl */
>
> static inline int pinctrl_bind_pins(struct device *dev)
> diff --git a/include/linux/pinctrl/machine.h b/include/linux/pinctrl/machine.h
> index e987dc9fd2af..0639b36f43c5 100644
> --- a/include/linux/pinctrl/machine.h
> +++ b/include/linux/pinctrl/machine.h
> @@ -11,7 +11,7 @@
> #ifndef __LINUX_PINCTRL_MACHINE_H
> #define __LINUX_PINCTRL_MACHINE_H
>
> -#include <linux/bug.h>
> +#include <linux/kernel.h> /* ARRAY_SIZE() */
>
> #include <linux/pinctrl/pinctrl-state.h>
>
> @@ -149,16 +149,18 @@ struct pinctrl_map {
> #define PIN_MAP_CONFIGS_GROUP_HOG_DEFAULT(dev, grp, cfgs) \
> PIN_MAP_CONFIGS_GROUP(dev, PINCTRL_STATE_DEFAULT, dev, grp, cfgs)
>
> +struct pinctrl_map;
> +
> #ifdef CONFIG_PINCTRL
>
> extern int pinctrl_register_mappings(const struct pinctrl_map *map,
> - unsigned num_maps);
> + unsigned num_maps);
> extern void pinctrl_unregister_mappings(const struct pinctrl_map *map);
> extern void pinctrl_provide_dummies(void);
> #else
>
> static inline int pinctrl_register_mappings(const struct pinctrl_map *map,
> - unsigned num_maps)
> + unsigned num_maps)
> {
> return 0;
> }
> diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h
> index 2422211d6a5a..940fc4e9e17c 100644
> --- a/include/linux/pinctrl/pinconf-generic.h
> +++ b/include/linux/pinctrl/pinconf-generic.h
> @@ -11,9 +11,12 @@
> #ifndef __LINUX_PINCTRL_PINCONF_GENERIC_H
> #define __LINUX_PINCTRL_PINCONF_GENERIC_H
>
> -#include <linux/device.h>
> +#include <linux/types.h>
> +
> #include <linux/pinctrl/machine.h>
>
> +struct device_node;
> +
> struct pinctrl_dev;
> struct pinctrl_map;
>
> @@ -196,25 +199,25 @@ int pinconf_generic_dt_node_to_map(struct pinctrl_dev *pctldev,
> void pinconf_generic_dt_free_map(struct pinctrl_dev *pctldev,
> struct pinctrl_map *map, unsigned num_maps);
>
> -static inline int pinconf_generic_dt_node_to_map_group(
> - struct pinctrl_dev *pctldev, struct device_node *np_config,
> - struct pinctrl_map **map, unsigned *num_maps)
> +static inline int pinconf_generic_dt_node_to_map_group(struct pinctrl_dev *pctldev,
> + struct device_node *np_config, struct pinctrl_map **map,
> + unsigned *num_maps)
> {
> return pinconf_generic_dt_node_to_map(pctldev, np_config, map, num_maps,
> PIN_MAP_TYPE_CONFIGS_GROUP);
> }
>
> -static inline int pinconf_generic_dt_node_to_map_pin(
> - struct pinctrl_dev *pctldev, struct device_node *np_config,
> - struct pinctrl_map **map, unsigned *num_maps)
> +static inline int pinconf_generic_dt_node_to_map_pin(struct pinctrl_dev *pctldev,
> + struct device_node *np_config, struct pinctrl_map **map,
> + unsigned *num_maps)
> {
> return pinconf_generic_dt_node_to_map(pctldev, np_config, map, num_maps,
> PIN_MAP_TYPE_CONFIGS_PIN);
> }
>
> -static inline int pinconf_generic_dt_node_to_map_all(
> - struct pinctrl_dev *pctldev, struct device_node *np_config,
> - struct pinctrl_map **map, unsigned *num_maps)
> +static inline int pinconf_generic_dt_node_to_map_all(struct pinctrl_dev *pctldev,
> + struct device_node *np_config, struct pinctrl_map **map,
> + unsigned *num_maps)
> {
> /*
> * passing the type as PIN_MAP_TYPE_INVALID causes the underlying parser
> diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h
> index 487117ccb1bc..31fe992412f0 100644
> --- a/include/linux/pinctrl/pinctrl.h
> +++ b/include/linux/pinctrl/pinctrl.h
> @@ -11,20 +11,20 @@
> #ifndef __LINUX_PINCTRL_PINCTRL_H
> #define __LINUX_PINCTRL_PINCTRL_H
>
> -#include <linux/radix-tree.h>
> -#include <linux/list.h>
> -#include <linux/seq_file.h>
> -#include <linux/pinctrl/pinctrl-state.h>
> -#include <linux/pinctrl/devinfo.h>
> +#include <linux/types.h>
>
> struct device;
> +struct device_node;
> +struct gpio_chip;
> +struct module;
> +struct seq_file;
> +
> +struct pin_config_item;
> +struct pinconf_generic_params;
> +struct pinconf_ops;
> struct pinctrl_dev;
> struct pinctrl_map;
> struct pinmux_ops;
> -struct pinconf_ops;
> -struct pin_config_item;
> -struct gpio_chip;
> -struct device_node;
>
> /**
> * struct pingroup - provides information on pingroup
> diff --git a/include/linux/pinctrl/pinmux.h b/include/linux/pinctrl/pinmux.h
> index 9a647fa5c8f1..a7e370965c53 100644
> --- a/include/linux/pinctrl/pinmux.h
> +++ b/include/linux/pinctrl/pinmux.h
> @@ -11,11 +11,10 @@
> #ifndef __LINUX_PINCTRL_PINMUX_H
> #define __LINUX_PINCTRL_PINMUX_H
>
> -#include <linux/list.h>
> -#include <linux/seq_file.h>
> -#include <linux/pinctrl/pinctrl.h>
> +#include <linux/types.h>
>
> struct pinctrl_dev;
> +struct pinctrl_gpio_range;
>
> /**
> * struct pinmux_ops - pinmux operations, to be implemented by pin controller
On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
<[email protected]> wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
On Mon, 10 Oct 2022 at 22:26, Andy Shevchenko
<[email protected]> wrote:
>
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
The patch is fine, but I don't see any sorting other than just adding
the headers at the appropriate place.
In any case
Acked-by: Emil Renner Berthing <[email protected]>
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
> drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
> index 5b544fb7f3d8..6a8a9cfe8965 100644
> --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
> +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
> @@ -15,8 +15,10 @@
> #include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/reset.h>
> +#include <linux/seq_file.h>
> #include <linux/spinlock.h>
>
> +#include <linux/pinctrl/consumer.h>
> #include <linux/pinctrl/pinctrl.h>
> #include <linux/pinctrl/pinmux.h>
>
> --
> 2.35.1
>
>
> _______________________________________________
> linux-riscv mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-riscv
On Mon, Oct 10, 2022 at 11:14:29PM +0300, Andy Shevchenko wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
Acked-by: Charles Keepax <[email protected]>
Thanks,
Charles
On Tue, Oct 11, 2022 at 9:31 AM Basavaraj Natikar <[email protected]> wrote:
> On 10/11/2022 1:44 AM, Andy Shevchenko wrote:
> > There is a few things done:
> > - include only the headers we are direct user of
> > - when pointer is in use, provide a forward declaration
> > - add missed headers
> > - group generic headers and subsystem headers
> > - sort each group alphabetically
> >
> > While at it, fix some awkward indentations.
> >
> > Signed-off-by: Andy Shevchenko <[email protected]>
> > ---
> > drivers/pinctrl/core.c | 19 ++++++++-------
> > drivers/pinctrl/core.h | 12 +++++++++-
> > drivers/pinctrl/devicetree.h | 6 +++++
> > drivers/pinctrl/pinconf.h | 10 ++++++++
> > drivers/pinctrl/pinctrl-utils.h | 5 ++++
> > drivers/pinctrl/pinmux.c | 17 ++++++++------
> > drivers/pinctrl/pinmux.h | 11 +++++++++
> > include/linux/pinctrl/consumer.h | 31 +++++++++++--------------
> > include/linux/pinctrl/devinfo.h | 6 +++--
> > include/linux/pinctrl/machine.h | 8 ++++---
> > include/linux/pinctrl/pinconf-generic.h | 23 ++++++++++--------
> > include/linux/pinctrl/pinctrl.h | 18 +++++++-------
> > include/linux/pinctrl/pinmux.h | 5 ++--
> > 13 files changed, 110 insertions(+), 61 deletions(-)
> >
> > diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
> > index 9e57f4c62e60..655f9502e73f 100644
> > --- a/drivers/pinctrl/core.c
> > +++ b/drivers/pinctrl/core.c
> > @@ -12,19 +12,21 @@
> > */
> > #define pr_fmt(fmt) "pinctrl core: " fmt
> >
> > -#include <linux/kernel.h>
> > -#include <linux/kref.h>
> > -#include <linux/export.h>
> > -#include <linux/init.h>
> > +#include <linux/debugfs.h>
> > #include <linux/device.h>
> > -#include <linux/slab.h>
> > #include <linux/err.h>
> > +#include <linux/export.h>
> > +#include <linux/init.h>
> > +#include <linux/kernel.h>
> > +#include <linux/kref.h>
> > #include <linux/list.h>
> > -#include <linux/debugfs.h>
> > #include <linux/seq_file.h>
> > +#include <linux/slab.h>
> > +
> > #include <linux/pinctrl/consumer.h>
> > -#include <linux/pinctrl/pinctrl.h>
> > +#include <linux/pinctrl/devinfo.h>
> > #include <linux/pinctrl/machine.h>
> > +#include <linux/pinctrl/pinctrl.h>
> >
> > #ifdef CONFIG_GPIOLIB
> > #include "../gpio/gpiolib.h"
> > @@ -33,9 +35,8 @@
> >
> > #include "core.h"
> > #include "devicetree.h"
> > -#include "pinmux.h"
> > #include "pinconf.h"
> > -
> > +#include "pinmux.h"
> >
> > static bool pinctrl_dummy_state;
> >
> > diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h
> > index 840103c40c14..4d0bdb9fb99b 100644
> > --- a/drivers/pinctrl/core.h
> > +++ b/drivers/pinctrl/core.h
> > @@ -9,12 +9,22 @@
> > */
> >
> > #include <linux/kref.h>
> > +#include <linux/list.h>
> > #include <linux/mutex.h>
> > #include <linux/radix-tree.h>
> > -#include <linux/pinctrl/pinconf.h>
>
> Removing pinconf.h from the core.h may cause build failure in other files
> because where-ever core.h is included to use “struct pinconf_ops”, there
> is a need to include pinconf.h.
I can confirm adding
#include <linux/pinctrl/pinconf.h>
to drivers/pinctrl/renesas/pinctrl-rzn1.c and drivers/pinctrl/pinctrl-single.c
fixes the issues I was seeing with shmobile_defconfig and (out-of-tree)
renesas_defconfig.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
On Tue, Oct 11, 2022 at 01:00:11PM +0530, Basavaraj Natikar wrote:
> On 10/11/2022 1:44 AM, Andy Shevchenko wrote:
...
> > --- a/drivers/pinctrl/core.h
> > +++ b/drivers/pinctrl/core.h
> > -#include <linux/pinctrl/pinconf.h>
>
> Removing pinconf.h from the core.h may cause build failure in other files
> because where-ever core.h is included to use “struct pinconf_ops”, there
> is a need to include pinconf.h.
Yes, I compiled only few drivers with the core changes. Still I got a few
reports by LKP. Thank you for spotting this!
> With that fixed,
>
> Reviewed-by: Basavaraj Natikar <[email protected]>
Thank you!
--
With Best Regards,
Andy Shevchenko
On Tue, Oct 11, 2022 at 10:31:33AM +0200, Emil Renner Berthing wrote:
> On Mon, 10 Oct 2022 at 22:26, Andy Shevchenko
> <[email protected]> wrote:
> >
> > Do not imply that some of the generic headers may be always included.
> > Instead, include explicitly what we are direct user of.
> >
> > While at it, sort headers alphabetically.
>
> The patch is fine, but I don't see any sorting other than just adding
> the headers at the appropriate place.
I will amend commit message here.
> In any case
>
> Acked-by: Emil Renner Berthing <[email protected]>
Thank you!
--
With Best Regards,
Andy Shevchenko
On Tue, Oct 11, 2022 at 3:02 AM Kent Gibson <[email protected]> wrote:
> On Mon, Oct 10, 2022 at 11:14:18PM +0300, Andy Shevchenko wrote:
...
> > -#include <linux/gpio.h>
> > #include <linux/gpio/driver.h>
> > +#include <linux/gpio.h>
> > +#include <linux/hte.h>
>
> Ok with the hte re-order.
>
> But moving the gpio subsystem header after the gpio/driver is not
> alphabetical ('.' precedes '/') and it read better and made more sense
> to me the way it was.
I see, I guess this is vim sort vs shell sort. Strange, they should
follow the locale settings...
...
> > +#include <linux/seq_file.h>
>
> I wasn't aware that we use anything from seq_file.
> What am I missing?
I will recheck, because in v6.0 I don't see anything, but LKP was not
okay with something IIRC.
--
With Best Regards,
Andy Shevchenko
On Tue, Oct 11, 2022 at 10:46:30AM +0200, Geert Uytterhoeven wrote:
> On Tue, Oct 11, 2022 at 9:31 AM Basavaraj Natikar <[email protected]> wrote:
> > On 10/11/2022 1:44 AM, Andy Shevchenko wrote:
> > > +++ b/drivers/pinctrl/core.h
> > > -#include <linux/pinctrl/pinconf.h>
> >
> > Removing pinconf.h from the core.h may cause build failure in other files
> > because where-ever core.h is included to use “struct pinconf_ops”, there
> > is a need to include pinconf.h.
>
> I can confirm adding
>
> #include <linux/pinctrl/pinconf.h>
>
> to drivers/pinctrl/renesas/pinctrl-rzn1.c and drivers/pinctrl/pinctrl-single.c
> fixes the issues I was seeing with shmobile_defconfig and (out-of-tree)
> renesas_defconfig.
I will add this, thank you for reporting.
--
With Best Regards,
Andy Shevchenko
On Tue, Oct 11, 2022 at 09:10:07AM +0200, Bartosz Golaszewski wrote:
> On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
> <[email protected]> wrote:
> >
> > Currently the header inclusion inside the pinctrl headers seems more arbitrary
> > than logical. This series is basically out of two parts:
> > - add missed headers to the pin control drivers / users
> > - clean up the headers of pin control subsystem
> >
> > The idea is to have this series to be pulled after -rc1 by the GPIO and
> > pin control subsystems, so all new drivers will utilize cleaned up headers
> > of the pin control.
> >
> > Please, review and comment.
> >
> > Changelog v2:
> > - added preparatory patches: all, but last (LKP)
> > - added missed forward declaration to the last patch (LKP)
>
> Thanks for doing this.
You're welcome!
> Did you use any kind of automation for
> detecting for which symbols the headers are missing?
No, it's manual + what CI(s) reported back to me, that's why even in this
series I have got a few compile breakages. I have very limited compile-testing
cycle.
--
With Best Regards,
Andy Shevchenko
The 10/10/2022 23:14, Andy Shevchenko wrote:
>
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
Acked-by: Horatiu Vultur <[email protected]>
> drivers/pinctrl/pinctrl-ocelot.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
> index 647e91490bac..a9343c242cd5 100644
> --- a/drivers/pinctrl/pinctrl-ocelot.c
> +++ b/drivers/pinctrl/pinctrl-ocelot.c
> @@ -13,15 +13,17 @@
> #include <linux/of_device.h>
> #include <linux/of_irq.h>
> #include <linux/of_platform.h>
> -#include <linux/pinctrl/pinctrl.h>
> -#include <linux/pinctrl/pinmux.h>
> -#include <linux/pinctrl/pinconf.h>
> -#include <linux/pinctrl/pinconf-generic.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <linux/reset.h>
> #include <linux/slab.h>
>
> +#include <linux/pinctrl/consumer.h>
> +#include <linux/pinctrl/pinconf-generic.h>
> +#include <linux/pinctrl/pinconf.h>
> +#include <linux/pinctrl/pinctrl.h>
> +#include <linux/pinctrl/pinmux.h>
> +
> #include "core.h"
> #include "pinconf.h"
> #include "pinmux.h"
> --
> 2.35.1
>
--
/Horatiu
On Tue, Oct 11, 2022 at 11:05:42AM +0300, Andy Shevchenko wrote:
> On Tue, Oct 11, 2022 at 3:02 AM Kent Gibson <[email protected]> wrote:
> > On Mon, Oct 10, 2022 at 11:14:18PM +0300, Andy Shevchenko wrote:
...
> > > -#include <linux/gpio.h>
> > > #include <linux/gpio/driver.h>
> > > +#include <linux/gpio.h>
> > > +#include <linux/hte.h>
> >
> > Ok with the hte re-order.
> >
> > But moving the gpio subsystem header after the gpio/driver is not
> > alphabetical ('.' precedes '/') and it read better and made more sense
> > to me the way it was.
>
> I see, I guess this is vim sort vs shell sort. Strange, they should
> follow the locale settings...
I have checked, the shell and vim sort gave the same result as in this patch.
--
With Best Regards,
Andy Shevchenko
On Tue, Oct 11, 2022 at 04:48:17PM +0300, Andy Shevchenko wrote:
> On Tue, Oct 11, 2022 at 11:05:42AM +0300, Andy Shevchenko wrote:
> > On Tue, Oct 11, 2022 at 3:02 AM Kent Gibson <[email protected]> wrote:
> > > On Mon, Oct 10, 2022 at 11:14:18PM +0300, Andy Shevchenko wrote:
>
> ...
>
> > > > -#include <linux/gpio.h>
> > > > #include <linux/gpio/driver.h>
> > > > +#include <linux/gpio.h>
> > > > +#include <linux/hte.h>
> > >
> > > Ok with the hte re-order.
> > >
> > > But moving the gpio subsystem header after the gpio/driver is not
> > > alphabetical ('.' precedes '/') and it read better and made more sense
> > > to me the way it was.
> >
> > I see, I guess this is vim sort vs shell sort. Strange, they should
> > follow the locale settings...
>
> I have checked, the shell and vim sort gave the same result as in this patch.
>
The original order (sans hte.h) was done by VSCode Sort Lines Ascending,
and that still returns the same result. That matches what I would
expect to see given the content of the text.
And for me vim also gives the original order.
Just to confirm - is '.' 0x2e and '/' 0x2f in your universe?
Cheers,
Kent.
On Tue, Oct 11, 2022 at 10:13:02PM +0800, Kent Gibson wrote:
> On Tue, Oct 11, 2022 at 04:48:17PM +0300, Andy Shevchenko wrote:
> > On Tue, Oct 11, 2022 at 11:05:42AM +0300, Andy Shevchenko wrote:
> > > On Tue, Oct 11, 2022 at 3:02 AM Kent Gibson <[email protected]> wrote:
> > > > On Mon, Oct 10, 2022 at 11:14:18PM +0300, Andy Shevchenko wrote:
...
> > > > > -#include <linux/gpio.h>
> > > > > #include <linux/gpio/driver.h>
> > > > > +#include <linux/gpio.h>
> > > > > +#include <linux/hte.h>
> > > >
> > > > Ok with the hte re-order.
> > > >
> > > > But moving the gpio subsystem header after the gpio/driver is not
> > > > alphabetical ('.' precedes '/') and it read better and made more sense
> > > > to me the way it was.
> > >
> > > I see, I guess this is vim sort vs shell sort. Strange, they should
> > > follow the locale settings...
> >
> > I have checked, the shell and vim sort gave the same result as in this patch.
> >
>
> The original order (sans hte.h) was done by VSCode Sort Lines Ascending,
> and that still returns the same result. That matches what I would
> expect to see given the content of the text.
>
> And for me vim also gives the original order.
>
> Just to confirm - is '.' 0x2e and '/' 0x2f in your universe?
$ LC_COLLATE=C sort test1.txt
#include <linux/gpio.h>
#include <linux/gpio/driver.h>
$ LC_COLLATE= sort test1.txt
#include <linux/gpio/driver.h>
#include <linux/gpio.h>
I guess this explains the difference. Currently I have en_US.UTF-8.
--
With Best Regards,
Andy Shevchenko
Il 10/10/22 22:14, Andy Shevchenko ha scritto:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
> drivers/pinctrl/mediatek/pinctrl-moore.c | 3 +++
> drivers/pinctrl/mediatek/pinctrl-paris.c | 5 +++++
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/pinctrl/mediatek/pinctrl-moore.c b/drivers/pinctrl/mediatek/pinctrl-moore.c
> index 526faaebaf77..9474ada5addb 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-moore.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-moore.c
> @@ -9,6 +9,9 @@
> */
>
> #include <linux/gpio/driver.h>
> +
Apart from this blank line that I deem unnecessary....
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Hi Andy,
On Tue, Oct 11, 2022 at 4:31 PM Andy Shevchenko
<[email protected]> wrote:
> On Tue, Oct 11, 2022 at 10:13:02PM +0800, Kent Gibson wrote:
> > On Tue, Oct 11, 2022 at 04:48:17PM +0300, Andy Shevchenko wrote:
> > > On Tue, Oct 11, 2022 at 11:05:42AM +0300, Andy Shevchenko wrote:
> > > > On Tue, Oct 11, 2022 at 3:02 AM Kent Gibson <[email protected]> wrote:
> > > > > On Mon, Oct 10, 2022 at 11:14:18PM +0300, Andy Shevchenko wrote:
>
> ...
>
> > > > > > -#include <linux/gpio.h>
> > > > > > #include <linux/gpio/driver.h>
> > > > > > +#include <linux/gpio.h>
> > > > > > +#include <linux/hte.h>
> > > > >
> > > > > Ok with the hte re-order.
> > > > >
> > > > > But moving the gpio subsystem header after the gpio/driver is not
> > > > > alphabetical ('.' precedes '/') and it read better and made more sense
> > > > > to me the way it was.
> > > >
> > > > I see, I guess this is vim sort vs shell sort. Strange, they should
> > > > follow the locale settings...
> > >
> > > I have checked, the shell and vim sort gave the same result as in this patch.
> > >
> >
> > The original order (sans hte.h) was done by VSCode Sort Lines Ascending,
> > and that still returns the same result. That matches what I would
> > expect to see given the content of the text.
> >
> > And for me vim also gives the original order.
> >
> > Just to confirm - is '.' 0x2e and '/' 0x2f in your universe?
>
> $ LC_COLLATE=C sort test1.txt
> #include <linux/gpio.h>
> #include <linux/gpio/driver.h>
>
> $ LC_COLLATE= sort test1.txt
> #include <linux/gpio/driver.h>
> #include <linux/gpio.h>
>
> I guess this explains the difference. Currently I have en_US.UTF-8.
Throwing my can of paint into the mix...
I think it is more logical to first include the general <linux/gpio.h>,
followed by whatever <linux/gpio-foo.h> and <linux/gpio/bar.h>,
irrespective of (language-specific or phonebook) sort order.
Yeah, it sucks that this requires some manual work after running sort...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
On Tue, Oct 11, 2022 at 06:19:13PM +0300, Andy Shevchenko wrote:
> On Tue, Oct 11, 2022 at 04:39:46PM +0200, Geert Uytterhoeven wrote:
...
After all this patch is not needed. However, during checking of the necessity
of this patch I realized that seq_file is used in a few GPIO drivers without
any actual users, so I will prepare clean up series for that as well.
--
With Best Regards,
Andy Shevchenko
On Tue, Oct 11, 2022 at 4:16 AM Andy Shevchenko
<[email protected]> wrote:
>
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
Acked-by: Chen-Yu Tsai <[email protected]>
On 10/10/2022 16:14, Andy Shevchenko wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
> drivers/pinctrl/samsung/pinctrl-samsung.c | 11 ++++++-----
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof
On Tue, Oct 11, 2022 at 04:39:46PM +0200, Geert Uytterhoeven wrote:
> On Tue, Oct 11, 2022 at 4:31 PM Andy Shevchenko
> <[email protected]> wrote:
> > On Tue, Oct 11, 2022 at 10:13:02PM +0800, Kent Gibson wrote:
> > > On Tue, Oct 11, 2022 at 04:48:17PM +0300, Andy Shevchenko wrote:
> > > > On Tue, Oct 11, 2022 at 11:05:42AM +0300, Andy Shevchenko wrote:
> > > > > On Tue, Oct 11, 2022 at 3:02 AM Kent Gibson <[email protected]> wrote:
> > > > > > On Mon, Oct 10, 2022 at 11:14:18PM +0300, Andy Shevchenko wrote:
...
> > > > > > > -#include <linux/gpio.h>
> > > > > > > #include <linux/gpio/driver.h>
> > > > > > > +#include <linux/gpio.h>
> > > > > > > +#include <linux/hte.h>
> > > > > >
> > > > > > Ok with the hte re-order.
> > > > > >
> > > > > > But moving the gpio subsystem header after the gpio/driver is not
> > > > > > alphabetical ('.' precedes '/') and it read better and made more sense
> > > > > > to me the way it was.
> > > > >
> > > > > I see, I guess this is vim sort vs shell sort. Strange, they should
> > > > > follow the locale settings...
> > > >
> > > > I have checked, the shell and vim sort gave the same result as in this patch.
> > > >
> > >
> > > The original order (sans hte.h) was done by VSCode Sort Lines Ascending,
> > > and that still returns the same result. That matches what I would
> > > expect to see given the content of the text.
> > >
> > > And for me vim also gives the original order.
> > >
> > > Just to confirm - is '.' 0x2e and '/' 0x2f in your universe?
> >
> > $ LC_COLLATE=C sort test1.txt
> > #include <linux/gpio.h>
> > #include <linux/gpio/driver.h>
> >
> > $ LC_COLLATE= sort test1.txt
> > #include <linux/gpio/driver.h>
> > #include <linux/gpio.h>
> >
> > I guess this explains the difference. Currently I have en_US.UTF-8.
>
> Throwing my can of paint into the mix...
>
> I think it is more logical to first include the general <linux/gpio.h>,
> followed by whatever <linux/gpio-foo.h> and <linux/gpio/bar.h>,
> irrespective of (language-specific or phonebook) sort order.
>
> Yeah, it sucks that this requires some manual work after running sort...
It seems that kind of issue is in this patch only.
--
With Best Regards,
Andy Shevchenko
On 10/10/2022 1:14 PM, Andy Shevchenko wrote:
> Currently the header inclusion inside the pinctrl headers seems more arbitrary
> than logical. This series is basically out of two parts:
> - add missed headers to the pin control drivers / users
> - clean up the headers of pin control subsystem
>
> The idea is to have this series to be pulled after -rc1 by the GPIO and
> pin control subsystems, so all new drivers will utilize cleaned up headers
> of the pin control.
>
> Please, review and comment.
Did you really need to split this on a per-driver basis as opposed to
just a treewide drivers/pinctrl, drivers/media and drivers/gpiolib patch
set?
36 patches seems needlessly high when 4 patches could have achieve the
same outcome.
--
Florian
On 10.10.2022 23:14, Andy Shevchenko wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Claudiu Beznea <[email protected]>
> ---
> drivers/pinctrl/pinctrl-at91-pio4.c | 10 +++++++---
> drivers/pinctrl/pinctrl-at91.c | 16 +++++++++-------
> 2 files changed, 16 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
> index 82b921fd630d..e38c683aba09 100644
> --- a/drivers/pinctrl/pinctrl-at91-pio4.c
> +++ b/drivers/pinctrl/pinctrl-at91-pio4.c
> @@ -7,18 +7,22 @@
> */
>
> #include <dt-bindings/pinctrl/at91.h>
> +
> #include <linux/clk.h>
> #include <linux/gpio/driver.h>
> +#include <linux/init.h>
> #include <linux/interrupt.h>
> #include <linux/io.h>
> -#include <linux/init.h>
> #include <linux/of.h>
> #include <linux/platform_device.h>
> -#include <linux/pinctrl/pinconf.h>
> +#include <linux/seq_file.h>
> +#include <linux/slab.h>
> +
> #include <linux/pinctrl/pinconf-generic.h>
> +#include <linux/pinctrl/pinconf.h>
> #include <linux/pinctrl/pinctrl.h>
> #include <linux/pinctrl/pinmux.h>
> -#include <linux/slab.h>
> +
> #include "core.h"
> #include "pinconf.h"
> #include "pinctrl-utils.h"
> diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
> index 81dbffab621f..1e1813d7c550 100644
> --- a/drivers/pinctrl/pinctrl-at91.c
> +++ b/drivers/pinctrl/pinctrl-at91.c
> @@ -7,22 +7,24 @@
>
> #include <linux/clk.h>
> #include <linux/err.h>
> +#include <linux/gpio/driver.h>
> #include <linux/init.h>
> +#include <linux/interrupt.h>
> +#include <linux/io.h>
> #include <linux/of.h>
> -#include <linux/of_device.h>
> #include <linux/of_address.h>
> +#include <linux/of_device.h>
> #include <linux/of_irq.h>
> +#include <linux/pm.h>
> +#include <linux/seq_file.h>
> #include <linux/slab.h>
> -#include <linux/interrupt.h>
> -#include <linux/io.h>
> -#include <linux/gpio/driver.h>
> +
> +/* Since we request GPIOs from ourself */
> +#include <linux/pinctrl/consumer.h>
> #include <linux/pinctrl/machine.h>
> #include <linux/pinctrl/pinconf.h>
> #include <linux/pinctrl/pinctrl.h>
> #include <linux/pinctrl/pinmux.h>
> -/* Since we request GPIOs from ourself */
> -#include <linux/pinctrl/consumer.h>
> -#include <linux/pm.h>
>
> #include "pinctrl-at91.h"
> #include "core.h"
> --
> 2.35.1
>
Le lun., oct. 10 2022 at 23:14:27 +0300, Andy Shevchenko
<[email protected]> a ?crit :
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Paul Cercueil <[email protected]>
Cheers,
-Paul
> ---
> drivers/pinctrl/pinctrl-ingenic.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-ingenic.c
> b/drivers/pinctrl/pinctrl-ingenic.c
> index 7e732076dedf..dbc25a60fbff 100644
> --- a/drivers/pinctrl/pinctrl-ingenic.c
> +++ b/drivers/pinctrl/pinctrl-ingenic.c
> @@ -14,16 +14,18 @@
> #include <linux/kernel.h>
> #include <linux/mod_devicetable.h>
> #include <linux/of.h>
> -#include <linux/pinctrl/pinctrl.h>
> -#include <linux/pinctrl/pinmux.h>
> -#include <linux/pinctrl/pinconf.h>
> -#include <linux/pinctrl/pinconf-generic.h>
> #include <linux/platform_device.h>
> #include <linux/property.h>
> #include <linux/regmap.h>
> #include <linux/seq_file.h>
> #include <linux/slab.h>
>
> +#include <linux/pinctrl/consumer.h>
> +#include <linux/pinctrl/pinconf-generic.h>
> +#include <linux/pinctrl/pinconf.h>
> +#include <linux/pinctrl/pinctrl.h>
> +#include <linux/pinctrl/pinmux.h>
> +
> #include "core.h"
> #include "pinconf.h"
> #include "pinmux.h"
> --
> 2.35.1
>
On Tue, Oct 11, 2022 at 11:56 PM Florian Fainelli <[email protected]> wrote:
> On 10/10/2022 1:14 PM, Andy Shevchenko wrote:
> > Currently the header inclusion inside the pinctrl headers seems more arbitrary
> > than logical. This series is basically out of two parts:
> > - add missed headers to the pin control drivers / users
> > - clean up the headers of pin control subsystem
> >
> > The idea is to have this series to be pulled after -rc1 by the GPIO and
> > pin control subsystems, so all new drivers will utilize cleaned up headers
> > of the pin control.
> >
> > Please, review and comment.
>
> Did you really need to split this on a per-driver basis as opposed to
> just a treewide drivers/pinctrl, drivers/media and drivers/gpiolib patch
> set?
>
> 36 patches seems needlessly high when 4 patches could have achieve the
> same outcome.
I can combine them if maintainers ask for that, nevertheless for Intel
pin control and GPIO drivers, which I care more about, I would like to
leave as separate changes (easy to see in history what was done).
--
With Best Regards,
Andy Shevchenko
On Wed, Oct 12, 2022 at 04:30:05PM +0300, Andy Shevchenko wrote:
> On Tue, Oct 11, 2022 at 08:01:27AM +0800, Kent Gibson wrote:
> > On Mon, Oct 10, 2022 at 11:14:18PM +0300, Andy Shevchenko wrote:
>
> ...
>
> > > -#include <linux/gpio.h>
> > > #include <linux/gpio/driver.h>
> > > +#include <linux/gpio.h>
>
> > But moving the gpio subsystem header after the gpio/driver is not
> > alphabetical ('.' precedes '/') and it read better and made more sense
> > to me the way it was.
>
> Okay, I will move it back.
>
> ...
>
> > > +#include <linux/seq_file.h>
> >
> > I wasn't aware that we use anything from seq_file.
> > What am I missing?
>
>
> Eventually I can answer to your question: the commit 0ae3109a8391
> ("gpiolib: cdev: add fdinfo output for line request file descriptors")
> is what you are missing.
>
> That said, we need this patch.
>
Ah, yes - totally forgot that one is in flight.
That makes sense then.
With the gpio headers retaining their original order:
Rewiewed-by: Kent Gibson <[email protected]>
> --
> With Best Regards,
> Andy Shevchenko
>
>
On Tue, Oct 11, 2022 at 08:01:27AM +0800, Kent Gibson wrote:
> On Mon, Oct 10, 2022 at 11:14:18PM +0300, Andy Shevchenko wrote:
...
> > -#include <linux/gpio.h>
> > #include <linux/gpio/driver.h>
> > +#include <linux/gpio.h>
> But moving the gpio subsystem header after the gpio/driver is not
> alphabetical ('.' precedes '/') and it read better and made more sense
> to me the way it was.
Okay, I will move it back.
...
> > +#include <linux/seq_file.h>
>
> I wasn't aware that we use anything from seq_file.
> What am I missing?
Eventually I can answer to your question: the commit 0ae3109a8391
("gpiolib: cdev: add fdinfo output for line request file descriptors")
is what you are missing.
That said, we need this patch.
--
With Best Regards,
Andy Shevchenko
On 10/11/2022 4:14 AM, Andy Shevchenko wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
LGTM. Thanks.
Reviewed-by: Baolin Wang <[email protected]>
> ---
> drivers/pinctrl/sprd/pinctrl-sprd.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/sprd/pinctrl-sprd.c b/drivers/pinctrl/sprd/pinctrl-sprd.c
> index dca7a505d413..c1806b7dcf78 100644
> --- a/drivers/pinctrl/sprd/pinctrl-sprd.c
> +++ b/drivers/pinctrl/sprd/pinctrl-sprd.c
> @@ -13,12 +13,14 @@
> #include <linux/of.h>
> #include <linux/of_device.h>
> #include <linux/platform_device.h>
> +#include <linux/slab.h>
> +
> +#include <linux/pinctrl/consumer.h>
> #include <linux/pinctrl/machine.h>
> -#include <linux/pinctrl/pinconf.h>
> #include <linux/pinctrl/pinconf-generic.h>
> +#include <linux/pinctrl/pinconf.h>
> #include <linux/pinctrl/pinctrl.h>
> #include <linux/pinctrl/pinmux.h>
> -#include <linux/slab.h>
>
> #include "../core.h"
> #include "../pinmux.h"
On Mon, Oct 10, 2022 at 11:14:51PM +0300, Andy Shevchenko wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Mika Westerberg <[email protected]>
For all the intel pinctrl changes.
On Thu, Oct 13, 2022 at 05:53:31PM +0300, Mika Westerberg wrote:
> On Mon, Oct 10, 2022 at 11:14:51PM +0300, Andy Shevchenko wrote:
> > Do not imply that some of the generic headers may be always included.
> > Instead, include explicitly what we are direct user of.
> >
> > While at it, sort headers alphabetically.
> >
> > Signed-off-by: Andy Shevchenko <[email protected]>
>
> Reviewed-by: Mika Westerberg <[email protected]>
>
> For all the intel pinctrl changes.
Thank you, I have added it to the 4 Intel related patches.
--
With Best Regards,
Andy Shevchenko
On Wed, Oct 12, 2022 at 01:04:10PM +0300, Andy Shevchenko wrote:
> On Tue, Oct 11, 2022 at 11:56 PM Florian Fainelli <[email protected]> wrote:
> > On 10/10/2022 1:14 PM, Andy Shevchenko wrote:
> > > Currently the header inclusion inside the pinctrl headers seems more arbitrary
> > > than logical. This series is basically out of two parts:
> > > - add missed headers to the pin control drivers / users
> > > - clean up the headers of pin control subsystem
> > >
> > > The idea is to have this series to be pulled after -rc1 by the GPIO and
> > > pin control subsystems, so all new drivers will utilize cleaned up headers
> > > of the pin control.
> > >
> > > Please, review and comment.
> >
> > Did you really need to split this on a per-driver basis as opposed to
> > just a treewide drivers/pinctrl, drivers/media and drivers/gpiolib patch
> > set?
> >
> > 36 patches seems needlessly high when 4 patches could have achieve the
> > same outcome.
>
> I can combine them if maintainers ask for that, nevertheless for Intel
> pin control and GPIO drivers, which I care more about, I would like to
> leave as separate changes (easy to see in history what was done).
I can now tell why I don't like to combine. While doing a revert (it's not
related to GPIO nor to pin control), it appears that I reverted extra bits
as merge conflict resolution. This is per se is not an issue, but when
I tried to find and reapply that missed piece I can't, because the patch
is combined and Git simply ignores to have
`git cherry-pick _something in the past_` done.
But again, up to maintainers.
--
With Best Regards,
Andy Shevchenko
On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
<[email protected]> wrote:
> Currently the header inclusion inside the pinctrl headers seems more arbitrary
> than logical. This series is basically out of two parts:
> - add missed headers to the pin control drivers / users
> - clean up the headers of pin control subsystem
>
> The idea is to have this series to be pulled after -rc1 by the GPIO and
> pin control subsystems, so all new drivers will utilize cleaned up headers
> of the pin control.
Aha I see you want to send a pull request so I backed out the applied patches
from the series for now.
Yours,
Linus Walleij
On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
<[email protected]> wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
Patch applied!
Yours,
Linus Walleij
On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
<[email protected]> wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
Patch applied!
Yours,
Linus Walleij
On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
<[email protected]> wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
Patch applied!
Yours,
Linus Walleij
On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
<[email protected]> wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
Patch applied.
Yours,
Linus Walleij
On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
<[email protected]> wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Yours,
Linus Walleij
On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
<[email protected]> wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
Patch applied!
Yours,
Linus Walleij
On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
<[email protected]> wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
Patch applied!
Yours,
Linus Walleij
On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
<[email protected]> wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
Patch applied!
Yours,
Linus Walleij
On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
<[email protected]> wrote:
> Do not imply that some of the generic headers may be always included.
> Instead, include explicitly what we are direct user of.
>
> While at it, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
Patch applied!
Yours,
Linus Walleij
On Mon, Oct 17, 2022 at 11:02:09AM +0200, Linus Walleij wrote:
> On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
> <[email protected]> wrote:
>
> > Currently the header inclusion inside the pinctrl headers seems more arbitrary
> > than logical. This series is basically out of two parts:
> > - add missed headers to the pin control drivers / users
> > - clean up the headers of pin control subsystem
> >
> > The idea is to have this series to be pulled after -rc1 by the GPIO and
> > pin control subsystems, so all new drivers will utilize cleaned up headers
> > of the pin control.
>
> Aha I see you want to send a pull request so I backed out the applied patches
> from the series for now.
Can I consider all that you answered to as Rb tag?
--
With Best Regards,
Andy Shevchenko
On Mon, Oct 17, 2022 at 10:52 AM Linus Walleij <[email protected]> wrote:
>
> On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
> <[email protected]> wrote:
>
> > Do not imply that some of the generic headers may be always included.
> > Instead, include explicitly what we are direct user of.
> >
> > While at it, sort headers alphabetically.
> >
> > Signed-off-by: Andy Shevchenko <[email protected]>
>
> Reviewed-by: Linus Walleij <[email protected]>
>
> Yours,
> Linus Walleij
Andy: are you going to send it together with the corresponding pinctrl
changes in a separate PR?
Bart
On Mon, Oct 17, 2022 at 11:27 AM Andy Shevchenko
<[email protected]> wrote:
> On Mon, Oct 17, 2022 at 11:02:09AM +0200, Linus Walleij wrote:
> > On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
> > <[email protected]> wrote:
> >
> > > Currently the header inclusion inside the pinctrl headers seems more arbitrary
> > > than logical. This series is basically out of two parts:
> > > - add missed headers to the pin control drivers / users
> > > - clean up the headers of pin control subsystem
> > >
> > > The idea is to have this series to be pulled after -rc1 by the GPIO and
> > > pin control subsystems, so all new drivers will utilize cleaned up headers
> > > of the pin control.
> >
> > Aha I see you want to send a pull request so I backed out the applied patches
> > from the series for now.
>
> Can I consider all that you answered to as Rb tag?
Acked-by: Linus Walleij <[email protected]>
I haven't reviewed in detail but I fully trust you to do the right thing
and fix any fallout so will happily pull this.
Yours,
Linus Walleij
On Mon, Oct 17, 2022 at 11:58:03AM +0200, Linus Walleij wrote:
> On Mon, Oct 17, 2022 at 11:27 AM Andy Shevchenko
> <[email protected]> wrote:
> > On Mon, Oct 17, 2022 at 11:02:09AM +0200, Linus Walleij wrote:
> > > On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
> > > <[email protected]> wrote:
> > >
> > > > Currently the header inclusion inside the pinctrl headers seems more arbitrary
> > > > than logical. This series is basically out of two parts:
> > > > - add missed headers to the pin control drivers / users
> > > > - clean up the headers of pin control subsystem
> > > >
> > > > The idea is to have this series to be pulled after -rc1 by the GPIO and
> > > > pin control subsystems, so all new drivers will utilize cleaned up headers
> > > > of the pin control.
> > >
> > > Aha I see you want to send a pull request so I backed out the applied patches
> > > from the series for now.
> >
> > Can I consider all that you answered to as Rb tag?
>
> Acked-by: Linus Walleij <[email protected]>
Thank you!
> I haven't reviewed in detail but I fully trust you to do the right thing
> and fix any fallout so will happily pull this.
The plan is to push this to Linux Next for a couple of days and then I'll send
PR to you and Bart.
--
With Best Regards,
Andy Shevchenko
On Mon, Oct 17, 2022 at 12:35 PM Bartosz Golaszewski <[email protected]> wrote:
> On Mon, Oct 17, 2022 at 10:52 AM Linus Walleij <[email protected]> wrote:
>>·On Mon, Oct 10, 2022 at 10:15 PM Andy Shevchenko
> > <[email protected]> wrote:
> >
> > > Do not imply that some of the generic headers may be always included.
> > > Instead, include explicitly what we are direct user of.
> > >
> > > While at it, sort headers alphabetically.
> > >
> > > Signed-off-by: Andy Shevchenko <[email protected]>
> >
> > Reviewed-by: Linus Walleij <[email protected]>
> Andy: are you going to send it together with the corresponding pinctrl
> changes in a separate PR?
Yes, this is the plan, but I want first to push it to Linux Next (via
my tree) for a couple of days, so we will be sure there are no
compilation issues.
--
With Best Regards,
Andy Shevchenko
On Tue, Oct 18, 2022 at 03:04:44PM +0200, Geert Uytterhoeven wrote:
> On Tue, Oct 11, 2022 at 11:07 AM Andy Shevchenko
> <[email protected]> wrote:
> > On Tue, Oct 11, 2022 at 10:46:30AM +0200, Geert Uytterhoeven wrote:
> > > On Tue, Oct 11, 2022 at 9:31 AM Basavaraj Natikar <[email protected]> wrote:
...
> > > I can confirm adding
> > >
> > > #include <linux/pinctrl/pinconf.h>
> > >
> > > to drivers/pinctrl/renesas/pinctrl-rzn1.c and drivers/pinctrl/pinctrl-single.c
> > > fixes the issues I was seeing with shmobile_defconfig and (out-of-tree)
> > > renesas_defconfig.
> >
> > I will add this, thank you for reporting.
>
> Same for drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c.
Thanks!
Not only. I have updated all of them (but missed zynq (it is in today's Linux
Next).
--
With Best Regards,
Andy Shevchenko
Hi Andy,
On Tue, Oct 11, 2022 at 11:07 AM Andy Shevchenko
<[email protected]> wrote:
> On Tue, Oct 11, 2022 at 10:46:30AM +0200, Geert Uytterhoeven wrote:
> > On Tue, Oct 11, 2022 at 9:31 AM Basavaraj Natikar <[email protected]> wrote:
> > > On 10/11/2022 1:44 AM, Andy Shevchenko wrote:
>
> > > > +++ b/drivers/pinctrl/core.h
>
> > > > -#include <linux/pinctrl/pinconf.h>
> > >
> > > Removing pinconf.h from the core.h may cause build failure in other files
> > > because where-ever core.h is included to use “struct pinconf_ops”, there
> > > is a need to include pinconf.h.
> >
> > I can confirm adding
> >
> > #include <linux/pinctrl/pinconf.h>
> >
> > to drivers/pinctrl/renesas/pinctrl-rzn1.c and drivers/pinctrl/pinctrl-single.c
> > fixes the issues I was seeing with shmobile_defconfig and (out-of-tree)
> > renesas_defconfig.
>
> I will add this, thank you for reporting.
Same for drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds