pinctrl: intel: Add Intel Merrifield pin controller support
PATCH v4 1/1 pinctrl: intel: Add Intel Merrifield pin controller support
This driver adds pinctrl support for Intel Merrifield. The IP block which is called Family-Level Interface Shim is a separate entity in SoC. The GPIO driver (gpio-intel-mid.c) will be updated accordingly to support pinctrl interface.
---
In v4:
- make style consistent
- name driver "pinctrl-merrifield"
- add tag
drivers/pinctrl/intel/Kconfig | 11 + drivers/pinctrl/intel/Makefile | 1 + drivers/pinctrl/intel/pinctrl-merrifield.c | 911 +++++++++++++++++++++++++++++ 3 files changed, 923 insertions(+) create mode 100644 drivers/pinctrl/intel/pinctrl-merrifield.c
drivers/pinctrl/intel/Kconfig +11 -0
@@ -29,6 +29,17 @@ config PINCTRL_CHERRYVIEW Cherryview/Braswell pinctrl driver provides an interface that allows configuring of SoC pins and using them as GPIOs. +config PINCTRL_MERRIFIELD + tristate "Intel Merrifield pinctrl driver" + depends on X86_INTEL_MID + select PINMUX + select PINCONF + select GENERIC_PINCONF + help + Merrifield Family-Level Interface Shim (FLIS) driver provides an + interface that allows configuring of SoC pins and using them as + GPIOs. + config PINCTRL_INTEL tristate select PINMUX
drivers/pinctrl/intel/Makefile +1 -0
@@ -2,6 +2,7 @@ obj-$(CONFIG_PINCTRL_BAYTRAIL) += pinctrl-baytrail.o obj-$(CONFIG_PINCTRL_CHERRYVIEW) += pinctrl-cherryview.o +obj-$(CONFIG_PINCTRL_MERRIFIELD) += pinctrl-merrifield.o obj-$(CONFIG_PINCTRL_INTEL) += pinctrl-intel.o obj-$(CONFIG_PINCTRL_BROXTON) += pinctrl-broxton.o obj-$(CONFIG_PINCTRL_SUNRISEPOINT) += pinctrl-sunrisepoint.o
drivers/pinctrl/intel/pinctrl-merrifield.c new file +911 -0
911 lines not on this page · raw message
Signature · 1 line
2.8.1
Quoted 6 lines · Andy Shevchenko
This driver adds pinctrl support for Intel Merrifield. The IP block which is called Family-Level Interface Shim is a separate entity in SoC. The GPIO driver (
gpio-intel-mid.c) will be updated accordingly to support pinctrl interface.Reviewed-by Mika Westerberg <[email protected]>Signed-off-by Andy Shevchenko <[email protected]>
That's a nice driver.
Patch applied!
Yours,
Linus Walleij
PATCH 1/1 pinctrl: intel: merrifield: fix dup size in probe
In reply to Andy ShevchenkoIn function mrfld_pinctrl_probe(), when duplicating the mrfld_families array the requested memory region length is multiplied once too many by the number of elements in the original array. Fix this to spare some memory.
--- drivers/pinctrl/intel/pinctrl-merrifield.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/intel/pinctrl-merrifield.c +1 -1
@@ -854,7 +854,7 @@ static int mrfld_pinctrl_probe(struct platform_device *pdev)*/ nfamilies =ARRAY_SIZE (mrfld_families), families =devm_kmemdup (&pdev->dev, mrfld_families, - nfamilies *sizeof (mrfld_families), +sizeof (mrfld_families),GFP_KERNEL );if (!families)return -ENOMEM ;
Signature · 1 line
2.9.3
Re: [PATCH] pinctrl: intel: merrifield: fix dup size in probe
Quoted 5 lines · Vincent Stehlé
In function
mrfld_pinctrl_probe(), when duplicating themrfld_familiesarray the requested memory region length is multiplied once too many by the
number of elements in the original array. Fix this to spare some memory.
Good catch!
P.S. Linus, perhaps this is material for -rc5.
Quoted 26 lines
Fixes 4e80c8f505741cbd ("pinctrl: intel: Add Intel Merrifield pincontroller support")
Signed-off-by Vincent Stehlé <[email protected]>Cc Andy Shevchenko <[email protected]>Cc Linus Walleij <[email protected]>---
drivers/pinctrl/intel/pinctrl-merrifield.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/pinctrl/intel/pinctrl-merrifield.c +1
-1@@ -854,7 +854,7 @@ static int mrfld_pinctrl_probe(structplatform_device *pdev) */ nfamilies = ARRAY_SIZE(mrfld_families), families = devm_kmemdup(&pdev->dev, mrfld_families, - nfamilies *sizeof (mrfld_families), + sizeof(mrfld_families), GFP_KERNEL);if (!families)
return-ENOMEM;
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Re: [PATCH] pinctrl: intel: merrifield: fix dup size in probe
In reply to Vincent StehléQuoted 8 lines · Vincent Stehlé
In function
mrfld_pinctrl_probe(), when duplicating themrfld_familiesarray the requested memory region length is multiplied once too many by the number of elements in the original array. Fix this to spare some memory.Fixes 4e80c8f505741cbd ("pinctrl: intel: Add Intel Merrifield pin controller support")Signed-off-by Vincent Stehlé <[email protected]>Cc Andy Shevchenko <[email protected]>Cc Linus Walleij <[email protected]>
Patch applied for fixes with Andy's ACK.
Yours,
Linus Walleij