All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro
@ 2022-12-19 12:42 Andy Shevchenko
  2022-12-19 12:42 ` [PATCH v1 2/8] pinctrl: intel: Make use of struct pinfunction and PINCTRL_PINFUNCTION() Andy Shevchenko
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-12-19 12:42 UTC (permalink / raw)
  To: Andy Shevchenko, Mika Westerberg, linux-gpio, linux-kernel
  Cc: Andy Shevchenko, Linus Walleij

There are many pin control drivers define their own data type for
pin function representation which is the same or embed the same data
as newly introduced one. Provide the data type and convenient macro
for all pin control drivers.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/pinctrl/pinctrl.h | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h
index a0d39b303431..4d252ea00ed1 100644
--- a/include/linux/pinctrl/pinctrl.h
+++ b/include/linux/pinctrl/pinctrl.h
@@ -206,6 +206,26 @@ extern int pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
 				const char *pin_group, const unsigned **pins,
 				unsigned *num_pins);
 
+/**
+ * struct pinfunction - Description about a function
+ * @name: Name of the function
+ * @groups: An array of groups for this function
+ * @ngroups: Number of groups in @groups
+ */
+struct pinfunction {
+	const char *name;
+	const char * const *groups;
+	size_t ngroups;
+};
+
+/* Convenience macro to define a single named pinfunction */
+#define PINCTRL_PINFUNCTION(_name, _groups, _ngroups)	\
+(struct pinfunction) {					\
+		.name = (_name),			\
+		.groups = (_groups),			\
+		.ngroups = (_ngroups),			\
+	}
+
 #if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_PINCTRL)
 extern struct pinctrl_dev *of_pinctrl_get(struct device_node *np);
 #else
-- 
2.35.1


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

* [PATCH v1 2/8] pinctrl: intel: Make use of struct pinfunction and PINCTRL_PINFUNCTION()
  2022-12-19 12:42 [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro Andy Shevchenko
@ 2022-12-19 12:42 ` Andy Shevchenko
  2022-12-19 12:42 ` [PATCH v1 3/8] pinctrl: baytrail: Convert to use new memeber in struct intel_function Andy Shevchenko
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-12-19 12:42 UTC (permalink / raw)
  To: Andy Shevchenko, Mika Westerberg, linux-gpio, linux-kernel
  Cc: Andy Shevchenko, Linus Walleij

Since pin control provides a generic data type and a macro for
the pin function definition, use them in the Intel driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---

I went with the embedding a generic structure into intel_function
instead of replacing the latter in order to keep symmetry with
intel_pingroup. In the case we will need the additional memeber
in the future there will be less churn, otherwise from the code
generation perspective it's the same.

 drivers/pinctrl/intel/pinctrl-intel.c |  6 +++---
 drivers/pinctrl/intel/pinctrl-intel.h | 13 ++++++++-----
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index 2f7931d9602c..682fd902009f 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -372,7 +372,7 @@ static const char *intel_get_function_name(struct pinctrl_dev *pctldev,
 {
 	struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
 
-	return pctrl->soc->functions[function].name;
+	return pctrl->soc->functions[function].func.name;
 }
 
 static int intel_get_function_groups(struct pinctrl_dev *pctldev,
@@ -382,8 +382,8 @@ static int intel_get_function_groups(struct pinctrl_dev *pctldev,
 {
 	struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
 
-	*groups = pctrl->soc->functions[function].groups;
-	*ngroups = pctrl->soc->functions[function].ngroups;
+	*groups = pctrl->soc->functions[function].func.groups;
+	*ngroups = pctrl->soc->functions[function].func.ngroups;
 	return 0;
 }
 
diff --git a/drivers/pinctrl/intel/pinctrl-intel.h b/drivers/pinctrl/intel/pinctrl-intel.h
index 3b0e2d3f15d5..91e5bedba00b 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.h
+++ b/drivers/pinctrl/intel/pinctrl-intel.h
@@ -36,11 +36,13 @@ struct intel_pingroup {
 
 /**
  * struct intel_function - Description about a function
+ * @func: Generic data of the pin function (name and groups of pins)
  * @name: Name of the function
  * @groups: An array of groups for this function
  * @ngroups: Number of groups in @groups
  */
 struct intel_function {
+	struct pinfunction func;
 	const char *name;
 	const char * const *groups;
 	size_t ngroups;
@@ -183,11 +185,12 @@ struct intel_community {
 		.modes = __builtin_choose_expr(__builtin_constant_p((m)), NULL, (m)),	\
 	}
 
-#define FUNCTION(n, g)				\
-	{					\
-		.name = (n),			\
-		.groups = (g),			\
-		.ngroups = ARRAY_SIZE((g)),	\
+#define FUNCTION(n, g)							\
+	{								\
+		.func = PINCTRL_PINFUNCTION((n), (g), ARRAY_SIZE(g)),	\
+		.name = (n),						\
+		.groups = (g),						\
+		.ngroups = ARRAY_SIZE((g)),				\
 	}
 
 /**
-- 
2.35.1


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

* [PATCH v1 3/8] pinctrl: baytrail: Convert to use new memeber in struct intel_function
  2022-12-19 12:42 [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro Andy Shevchenko
  2022-12-19 12:42 ` [PATCH v1 2/8] pinctrl: intel: Make use of struct pinfunction and PINCTRL_PINFUNCTION() Andy Shevchenko
@ 2022-12-19 12:42 ` Andy Shevchenko
  2022-12-19 12:42 ` [PATCH v1 4/8] pinctrl: cherryview: " Andy Shevchenko
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-12-19 12:42 UTC (permalink / raw)
  To: Andy Shevchenko, Mika Westerberg, linux-gpio, linux-kernel
  Cc: Andy Shevchenko, Linus Walleij

Convert driver to use generic data type and hence a new member in
the struct intel_function. No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/intel/pinctrl-baytrail.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c
index 67db79f38051..770a2723ef81 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -637,18 +637,18 @@ static const char *byt_get_function_name(struct pinctrl_dev *pctldev,
 {
 	struct intel_pinctrl *vg = pinctrl_dev_get_drvdata(pctldev);
 
-	return vg->soc->functions[selector].name;
+	return vg->soc->functions[selector].func.name;
 }
 
 static int byt_get_function_groups(struct pinctrl_dev *pctldev,
 				   unsigned int selector,
 				   const char * const **groups,
-				   unsigned int *num_groups)
+				   unsigned int *ngroups)
 {
 	struct intel_pinctrl *vg = pinctrl_dev_get_drvdata(pctldev);
 
-	*groups		= vg->soc->functions[selector].groups;
-	*num_groups	= vg->soc->functions[selector].ngroups;
+	*groups		= vg->soc->functions[selector].func.groups;
+	*ngroups	= vg->soc->functions[selector].func.ngroups;
 
 	return 0;
 }
@@ -722,7 +722,7 @@ static int byt_set_mux(struct pinctrl_dev *pctldev, unsigned int func_selector,
 
 	if (group.modes)
 		byt_set_group_mixed_mux(vg, group, group.modes);
-	else if (!strcmp(func.name, "gpio"))
+	else if (!strcmp(func.func.name, "gpio"))
 		byt_set_group_simple_mux(vg, group, BYT_DEFAULT_GPIO_MUX);
 	else
 		byt_set_group_simple_mux(vg, group, group.mode);
-- 
2.35.1


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

* [PATCH v1 4/8] pinctrl: cherryview: Convert to use new memeber in struct intel_function
  2022-12-19 12:42 [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro Andy Shevchenko
  2022-12-19 12:42 ` [PATCH v1 2/8] pinctrl: intel: Make use of struct pinfunction and PINCTRL_PINFUNCTION() Andy Shevchenko
  2022-12-19 12:42 ` [PATCH v1 3/8] pinctrl: baytrail: Convert to use new memeber in struct intel_function Andy Shevchenko
@ 2022-12-19 12:42 ` Andy Shevchenko
  2022-12-19 12:42 ` [PATCH v1 5/8] pinctrl: lynxpoint: " Andy Shevchenko
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-12-19 12:42 UTC (permalink / raw)
  To: Andy Shevchenko, Mika Westerberg, linux-gpio, linux-kernel
  Cc: Andy Shevchenko, Linus Walleij

Convert driver to use generic data type and hence a new member in
the struct intel_function. No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/intel/pinctrl-cherryview.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
index 11b81213922d..722990e27836 100644
--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
@@ -694,7 +694,7 @@ static const char *chv_get_function_name(struct pinctrl_dev *pctldev,
 {
 	struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
 
-	return pctrl->soc->functions[function].name;
+	return pctrl->soc->functions[function].func.name;
 }
 
 static int chv_get_function_groups(struct pinctrl_dev *pctldev,
@@ -704,8 +704,8 @@ static int chv_get_function_groups(struct pinctrl_dev *pctldev,
 {
 	struct intel_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
 
-	*groups = pctrl->soc->functions[function].groups;
-	*ngroups = pctrl->soc->functions[function].ngroups;
+	*groups = pctrl->soc->functions[function].func.groups;
+	*ngroups = pctrl->soc->functions[function].func.ngroups;
 	return 0;
 }
 
-- 
2.35.1


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

* [PATCH v1 5/8] pinctrl: lynxpoint: Convert to use new memeber in struct intel_function
  2022-12-19 12:42 [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro Andy Shevchenko
                   ` (2 preceding siblings ...)
  2022-12-19 12:42 ` [PATCH v1 4/8] pinctrl: cherryview: " Andy Shevchenko
@ 2022-12-19 12:42 ` Andy Shevchenko
  2022-12-19 12:42 ` [PATCH v1 6/8] pinctrl: merrifield: " Andy Shevchenko
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-12-19 12:42 UTC (permalink / raw)
  To: Andy Shevchenko, Mika Westerberg, linux-gpio, linux-kernel
  Cc: Andy Shevchenko, Linus Walleij

Convert driver to use generic data type and hence a new member in
the struct intel_function. No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/intel/pinctrl-lynxpoint.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/intel/pinctrl-lynxpoint.c
index 8d05dad38556..cdace55aaeac 100644
--- a/drivers/pinctrl/intel/pinctrl-lynxpoint.c
+++ b/drivers/pinctrl/intel/pinctrl-lynxpoint.c
@@ -341,18 +341,18 @@ static const char *lp_get_function_name(struct pinctrl_dev *pctldev,
 {
 	struct intel_pinctrl *lg = pinctrl_dev_get_drvdata(pctldev);
 
-	return lg->soc->functions[selector].name;
+	return lg->soc->functions[selector].func.name;
 }
 
 static int lp_get_function_groups(struct pinctrl_dev *pctldev,
 				  unsigned int selector,
 				  const char * const **groups,
-				  unsigned int *num_groups)
+				  unsigned int *ngroups)
 {
 	struct intel_pinctrl *lg = pinctrl_dev_get_drvdata(pctldev);
 
-	*groups		= lg->soc->functions[selector].groups;
-	*num_groups	= lg->soc->functions[selector].ngroups;
+	*groups		= lg->soc->functions[selector].func.groups;
+	*ngroups	= lg->soc->functions[selector].func.ngroups;
 
 	return 0;
 }
-- 
2.35.1


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

* [PATCH v1 6/8] pinctrl: merrifield: Convert to use new memeber in struct intel_function
  2022-12-19 12:42 [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro Andy Shevchenko
                   ` (3 preceding siblings ...)
  2022-12-19 12:42 ` [PATCH v1 5/8] pinctrl: lynxpoint: " Andy Shevchenko
@ 2022-12-19 12:42 ` Andy Shevchenko
  2022-12-19 12:42 ` [PATCH v1 7/8] pinctrl: moorefield: " Andy Shevchenko
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-12-19 12:42 UTC (permalink / raw)
  To: Andy Shevchenko, Mika Westerberg, linux-gpio, linux-kernel
  Cc: Andy Shevchenko, Linus Walleij

Convert driver to use generic data type and hence a new member in
the struct intel_function. No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/intel/pinctrl-merrifield.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/intel/pinctrl-merrifield.c b/drivers/pinctrl/intel/pinctrl-merrifield.c
index c0845bb1e9e3..365c391c97a3 100644
--- a/drivers/pinctrl/intel/pinctrl-merrifield.c
+++ b/drivers/pinctrl/intel/pinctrl-merrifield.c
@@ -576,7 +576,7 @@ static const char *mrfld_get_function_name(struct pinctrl_dev *pctldev,
 {
 	struct mrfld_pinctrl *mp = pinctrl_dev_get_drvdata(pctldev);
 
-	return mp->functions[function].name;
+	return mp->functions[function].func.name;
 }
 
 static int mrfld_get_function_groups(struct pinctrl_dev *pctldev,
@@ -586,8 +586,8 @@ static int mrfld_get_function_groups(struct pinctrl_dev *pctldev,
 {
 	struct mrfld_pinctrl *mp = pinctrl_dev_get_drvdata(pctldev);
 
-	*groups = mp->functions[function].groups;
-	*ngroups = mp->functions[function].ngroups;
+	*groups = mp->functions[function].func.groups;
+	*ngroups = mp->functions[function].func.ngroups;
 	return 0;
 }
 
-- 
2.35.1


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

* [PATCH v1 7/8] pinctrl: moorefield: Convert to use new memeber in struct intel_function
  2022-12-19 12:42 [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro Andy Shevchenko
                   ` (4 preceding siblings ...)
  2022-12-19 12:42 ` [PATCH v1 6/8] pinctrl: merrifield: " Andy Shevchenko
@ 2022-12-19 12:42 ` Andy Shevchenko
  2022-12-19 12:42 ` [PATCH v1 8/8] pinctrl: intel: Get rid of unused members " Andy Shevchenko
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-12-19 12:42 UTC (permalink / raw)
  To: Andy Shevchenko, Mika Westerberg, linux-gpio, linux-kernel
  Cc: Andy Shevchenko, Linus Walleij

Convert driver to use generic data type and hence a new member in
the struct intel_function. No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/intel/pinctrl-moorefield.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/intel/pinctrl-moorefield.c b/drivers/pinctrl/intel/pinctrl-moorefield.c
index e3eec671e15d..3c9a8484b442 100644
--- a/drivers/pinctrl/intel/pinctrl-moorefield.c
+++ b/drivers/pinctrl/intel/pinctrl-moorefield.c
@@ -530,7 +530,7 @@ static const char *mofld_get_function_name(struct pinctrl_dev *pctldev, unsigned
 {
 	struct mofld_pinctrl *mp = pinctrl_dev_get_drvdata(pctldev);
 
-	return mp->functions[function].name;
+	return mp->functions[function].func.name;
 }
 
 static int mofld_get_function_groups(struct pinctrl_dev *pctldev, unsigned int function,
@@ -538,8 +538,8 @@ static int mofld_get_function_groups(struct pinctrl_dev *pctldev, unsigned int f
 {
 	struct mofld_pinctrl *mp = pinctrl_dev_get_drvdata(pctldev);
 
-	*groups = mp->functions[function].groups;
-	*ngroups = mp->functions[function].ngroups;
+	*groups = mp->functions[function].func.groups;
+	*ngroups = mp->functions[function].func.ngroups;
 	return 0;
 }
 
-- 
2.35.1


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

* [PATCH v1 8/8] pinctrl: intel: Get rid of unused members in struct intel_function
  2022-12-19 12:42 [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro Andy Shevchenko
                   ` (5 preceding siblings ...)
  2022-12-19 12:42 ` [PATCH v1 7/8] pinctrl: moorefield: " Andy Shevchenko
@ 2022-12-19 12:42 ` Andy Shevchenko
  2022-12-19 14:42 ` [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro Andy Shevchenko
  2022-12-29 21:17 ` Linus Walleij
  8 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-12-19 12:42 UTC (permalink / raw)
  To: Andy Shevchenko, Mika Westerberg, linux-gpio, linux-kernel
  Cc: Andy Shevchenko, Linus Walleij

The driver has been converted to a generic data type and macro for
the pin function definition, hence get rid of not used members in
the struct intel_function.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/intel/pinctrl-intel.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/pinctrl/intel/pinctrl-intel.h b/drivers/pinctrl/intel/pinctrl-intel.h
index 91e5bedba00b..1faf2ada480a 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.h
+++ b/drivers/pinctrl/intel/pinctrl-intel.h
@@ -37,15 +37,9 @@ struct intel_pingroup {
 /**
  * struct intel_function - Description about a function
  * @func: Generic data of the pin function (name and groups of pins)
- * @name: Name of the function
- * @groups: An array of groups for this function
- * @ngroups: Number of groups in @groups
  */
 struct intel_function {
 	struct pinfunction func;
-	const char *name;
-	const char * const *groups;
-	size_t ngroups;
 };
 
 #define INTEL_PINCTRL_MAX_GPP_SIZE	32
@@ -188,9 +182,6 @@ struct intel_community {
 #define FUNCTION(n, g)							\
 	{								\
 		.func = PINCTRL_PINFUNCTION((n), (g), ARRAY_SIZE(g)),	\
-		.name = (n),						\
-		.groups = (g),						\
-		.ngroups = ARRAY_SIZE((g)),				\
 	}
 
 /**
-- 
2.35.1


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

* Re: [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro
  2022-12-19 12:42 [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro Andy Shevchenko
                   ` (6 preceding siblings ...)
  2022-12-19 12:42 ` [PATCH v1 8/8] pinctrl: intel: Get rid of unused members " Andy Shevchenko
@ 2022-12-19 14:42 ` Andy Shevchenko
  2022-12-20  6:20   ` Mika Westerberg
  2022-12-29 21:17 ` Linus Walleij
  8 siblings, 1 reply; 12+ messages in thread
From: Andy Shevchenko @ 2022-12-19 14:42 UTC (permalink / raw)
  To: Mika Westerberg, linux-gpio, linux-kernel; +Cc: Linus Walleij

On Mon, Dec 19, 2022 at 02:42:33PM +0200, Andy Shevchenko wrote:
> There are many pin control drivers define their own data type for
> pin function representation which is the same or embed the same data
> as newly introduced one. Provide the data type and convenient macro
> for all pin control drivers.

The stats for the entire series:

drivers/pinctrl/intel/pinctrl-baytrail.c   | 10 +++++-----
drivers/pinctrl/intel/pinctrl-cherryview.c |  6 +++---
drivers/pinctrl/intel/pinctrl-intel.c      |  6 +++---
drivers/pinctrl/intel/pinctrl-intel.h      | 16 +++++-----------
drivers/pinctrl/intel/pinctrl-lynxpoint.c  |  8 ++++----
drivers/pinctrl/intel/pinctrl-merrifield.c |  6 +++---
drivers/pinctrl/intel/pinctrl-moorefield.c |  6 +++---
include/linux/pinctrl/pinctrl.h            | 20 ++++++++++++++++++++
8 files changed, 46 insertions(+), 32 deletions(-)

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro
  2022-12-19 14:42 ` [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro Andy Shevchenko
@ 2022-12-20  6:20   ` Mika Westerberg
  2022-12-27 21:46     ` Andy Shevchenko
  0 siblings, 1 reply; 12+ messages in thread
From: Mika Westerberg @ 2022-12-20  6:20 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-gpio, linux-kernel, Linus Walleij

On Mon, Dec 19, 2022 at 04:42:41PM +0200, Andy Shevchenko wrote:
> On Mon, Dec 19, 2022 at 02:42:33PM +0200, Andy Shevchenko wrote:
> > There are many pin control drivers define their own data type for
> > pin function representation which is the same or embed the same data
> > as newly introduced one. Provide the data type and convenient macro
> > for all pin control drivers.
> 
> The stats for the entire series:
> 
> drivers/pinctrl/intel/pinctrl-baytrail.c   | 10 +++++-----
> drivers/pinctrl/intel/pinctrl-cherryview.c |  6 +++---
> drivers/pinctrl/intel/pinctrl-intel.c      |  6 +++---
> drivers/pinctrl/intel/pinctrl-intel.h      | 16 +++++-----------
> drivers/pinctrl/intel/pinctrl-lynxpoint.c  |  8 ++++----
> drivers/pinctrl/intel/pinctrl-merrifield.c |  6 +++---
> drivers/pinctrl/intel/pinctrl-moorefield.c |  6 +++---
> include/linux/pinctrl/pinctrl.h            | 20 ++++++++++++++++++++
> 8 files changed, 46 insertions(+), 32 deletions(-)

Thanks!

For the series,

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

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

* Re: [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro
  2022-12-20  6:20   ` Mika Westerberg
@ 2022-12-27 21:46     ` Andy Shevchenko
  0 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2022-12-27 21:46 UTC (permalink / raw)
  To: Mika Westerberg; +Cc: linux-gpio, linux-kernel, Linus Walleij

On Tue, Dec 20, 2022 at 08:20:31AM +0200, Mika Westerberg wrote:
> On Mon, Dec 19, 2022 at 04:42:41PM +0200, Andy Shevchenko wrote:
> > On Mon, Dec 19, 2022 at 02:42:33PM +0200, Andy Shevchenko wrote:
> > > There are many pin control drivers define their own data type for
> > > pin function representation which is the same or embed the same data
> > > as newly introduced one. Provide the data type and convenient macro
> > > for all pin control drivers.
> > 
> > The stats for the entire series:
> > 
> > drivers/pinctrl/intel/pinctrl-baytrail.c   | 10 +++++-----
> > drivers/pinctrl/intel/pinctrl-cherryview.c |  6 +++---
> > drivers/pinctrl/intel/pinctrl-intel.c      |  6 +++---
> > drivers/pinctrl/intel/pinctrl-intel.h      | 16 +++++-----------
> > drivers/pinctrl/intel/pinctrl-lynxpoint.c  |  8 ++++----
> > drivers/pinctrl/intel/pinctrl-merrifield.c |  6 +++---
> > drivers/pinctrl/intel/pinctrl-moorefield.c |  6 +++---
> > include/linux/pinctrl/pinctrl.h            | 20 ++++++++++++++++++++
> > 8 files changed, 46 insertions(+), 32 deletions(-)
> 
> Thanks!
> 
> For the series,
> 
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Pushed to my review and testing queue, thanks!

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro
  2022-12-19 12:42 [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro Andy Shevchenko
                   ` (7 preceding siblings ...)
  2022-12-19 14:42 ` [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro Andy Shevchenko
@ 2022-12-29 21:17 ` Linus Walleij
  8 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2022-12-29 21:17 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Mika Westerberg, linux-gpio, linux-kernel, Andy Shevchenko

On Mon, Dec 19, 2022 at 1:42 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> There are many pin control drivers define their own data type for
> pin function representation which is the same or embed the same data
> as newly introduced one. Provide the data type and convenient macro
> for all pin control drivers.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Very nice and helpful!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

end of thread, other threads:[~2022-12-29 21:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-19 12:42 [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro Andy Shevchenko
2022-12-19 12:42 ` [PATCH v1 2/8] pinctrl: intel: Make use of struct pinfunction and PINCTRL_PINFUNCTION() Andy Shevchenko
2022-12-19 12:42 ` [PATCH v1 3/8] pinctrl: baytrail: Convert to use new memeber in struct intel_function Andy Shevchenko
2022-12-19 12:42 ` [PATCH v1 4/8] pinctrl: cherryview: " Andy Shevchenko
2022-12-19 12:42 ` [PATCH v1 5/8] pinctrl: lynxpoint: " Andy Shevchenko
2022-12-19 12:42 ` [PATCH v1 6/8] pinctrl: merrifield: " Andy Shevchenko
2022-12-19 12:42 ` [PATCH v1 7/8] pinctrl: moorefield: " Andy Shevchenko
2022-12-19 12:42 ` [PATCH v1 8/8] pinctrl: intel: Get rid of unused members " Andy Shevchenko
2022-12-19 14:42 ` [PATCH v1 1/8] pinctrl: Introduce struct pinfunction and PINCTRL_PINFUNCTION() macro Andy Shevchenko
2022-12-20  6:20   ` Mika Westerberg
2022-12-27 21:46     ` Andy Shevchenko
2022-12-29 21:17 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.