pinctrl: sprd: Modification of UNIOC Platform pinctrl Driver
Subsystems (3)
v3 cover pinctrl: sprd: Modification of UNIOC Platform pinctrl Driver
From: Linhua Xu <[email protected]>
Recently, some bugs have been discovered during use, and patch1 and patch2 are bug fixes. Also, this patchset add new features: patch3 is for compatibility with more platforms, patch4 Increase the range of register values, patch5 add pinctrl support for UMS512, patch6 add pinctrl support for UMS9621.
change in V3
-Add platform structure
-Add the mask definition
-Modify register definition format
-Improve code readability
-Add fixes tag
Linhua Xu (6):
pinctrl: sprd: Modify pull-up parameters
pinctrl: sprd: Fix the incorrect mask and shift definition
pinctrl: sprd: Move common and misc offset parameters to private data
pinctrl: sprd: Increase the range of register values
pinctrl: sprd: Add pinctrl support for UMS512
pinctrl: sprd: Add pinctrl support for UMS9621
drivers/pinctrl/sprd/Kconfig | 22 + drivers/pinctrl/sprd/Makefile | 2 + drivers/pinctrl/sprd/pinctrl-sprd-sc9860.c | 12 +- drivers/pinctrl/sprd/pinctrl-sprd-ums512.c | 881 +++++++++++++++ drivers/pinctrl/sprd/pinctrl-sprd-ums9621.c | 1120 +++++++++++++++++++ drivers/pinctrl/sprd/pinctrl-sprd.c | 35 +- drivers/pinctrl/sprd/pinctrl-sprd.h | 49 +- 7 files changed, 2087 insertions(+), 34 deletions(-) create mode 100644 drivers/pinctrl/sprd/pinctrl-sprd-ums512.c create mode 100644 drivers/pinctrl/sprd/pinctrl-sprd-ums9621.c
Signature · 1 line
2.17.1
PATCH v3 1/6 pinctrl: sprd: Modify pull-up parameters
From: Linhua Xu <[email protected]>
For UNISOC pin controller, there are three different configurations of pull-up drive current. Modify the 20K pull-up resistor configuration and add the 1.8K pull-up resistor configuration.
--- drivers/pinctrl/sprd/pinctrl-sprd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/pinctrl/sprd/pinctrl-sprd.c +6 -3
@@ -71,7 +71,8 @@#define SLEEP_PULL_UP_MASK 0x1#define SLEEP_PULL_UP_SHIFT 3 -#define PULL_UP_4_7K (BIT(12) | BIT(7)) +#define PULL_UP_1_8K (BIT(12) | BIT(7)) +#define PULL_UP_4_7K BIT(12)#define PULL_UP_20K BIT(7)#define PULL_UP_MASK 0x21#define PULL_UP_SHIFT 7
@@ -497,7 +498,7 @@ static int sprd_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin_id,break ;case PIN_CONFIG_BIAS_DISABLE :if ((reg & (SLEEP_PULL_DOWN |SLEEP_PULL_UP )) || - (reg & (PULL_DOWN |PULL_UP_4_7K |PULL_UP_20K ))) + (reg & (PULL_DOWN |PULL_UP_4_7K |PULL_UP_20K |PULL_UP_1_8K )))return -EINVAL ; arg =1 ;
@@ -699,6 +700,8 @@ static int sprd_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin_id, val |=PULL_UP_20K ; else if (arg == 4700) val |= PULL_UP_4_7K; + else if (arg == 1800) + val |= PULL_UP_1_8K; mask = PULL_UP_MASK; shift = PULL_UP_SHIFT;
@@ -711,7 +714,7 @@ static int sprd_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin_id, }else { val = shift =0 ; mask =PULL_DOWN |PULL_UP_20K | -PULL_UP_4_7K ; +PULL_UP_4_7K |PULL_UP_1_8K ; }break ;case PIN_CONFIG_SLEEP_HARDWARE_STATE :
Signature · 1 line
2.17.1
Re: [PATCH V3 1/6] pinctrl: sprd: Modify pull-up parameters
Quoted 9 lines · Linhua Xu
From: Linhua Xu <[email protected]>
For UNISOC pin controller, there are three different configurations of pull-up drive current. Modify the 20K pull-up resistor configuration and add the 1.8K pull-up resistor configuration.
Fixes <1fb4b907e808> ("pinctrl: sprd: Add Spreadtrum pin control driver")Signed-off-by Linhua Xu <[email protected]>
I guess I already pointed out that there must not be blank lines in the tag block, besides that read "Submitting Patches" document to see how properly format the Fixes: tag.
...
drivers/pinctrl/sprd/pinctrl-sprd.c line 78
Quoted 7 lines
drivers/pinctrl/sprd/pinctrl-sprd.c +2
-1-#define PULL_UP_4_7K (BIT(12) | BIT(7)) +#define PULL_UP_1_8K (BIT(12) | BIT(7)) +#define PULL_UP_4_7K BIT(12)#define PULL_UP_20K BIT(7)#define PULL_UP_MASK 0x21#define PULL_UP_SHIFT 7
Basically these two repeat the above 1.8K case.
But I see that you try to take care in the next patch about them. Still, the better is to use those _MASKs and _SHIFTs in the code. See below.
...
drivers/pinctrl/sprd/pinctrl-sprd.c static int sprd_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin_id, · line 501
Quoted 3 lines
drivers/pinctrl/sprd/pinctrl-sprd.c +1
-1if ((reg & (SLEEP_PULL_DOWN |SLEEP_PULL_UP )) || - (reg & (PULL_DOWN |PULL_UP_4_7K |PULL_UP_20K ))) + (reg & (PULL_DOWN |PULL_UP_4_7K |PULL_UP_20K |PULL_UP_1_8K )))
if ((reg & (SLEEP_PULL_DOWN | SLEEP_PULL_UP)) || (reg & (PULL_DOWN | (PULL_UP_MASK << PULL_UP_SHIFT))))
Quoted 1 line
return
-EINVAL;
...
drivers/pinctrl/sprd/pinctrl-sprd.c static int sprd_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin_id, · line 717
Quoted 3 lines
drivers/pinctrl/sprd/pinctrl-sprd.c +1
-1mask =PULL_DOWN |PULL_UP_20K | -PULL_UP_4_7K ; +PULL_UP_4_7K |PULL_UP_1_8K ;
mask = PULL_DOWN | (PULL_UP_MASK << PULL_UP_SHIFT);
Ditto.
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH v3 2/6 pinctrl: sprd: Fix the incorrect mask and shift definition
In reply to Linhua XuFrom: Linhua Xu <[email protected]>
Pull-up and pull-down are mutually exclusive. When setting one of them, the bit of the other needs to be clear. Now, there are cases where pull-up and pull-down are set at the same time in the code, thus fix them.
--- drivers/pinctrl/sprd/pinctrl-sprd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/pinctrl/sprd/pinctrl-sprd.c +6 -6
@@ -60,22 +60,22 @@#define DRIVE_STRENGTH_SHIFT 19#define SLEEP_PULL_DOWN BIT(2) -#define SLEEP_PULL_DOWN_MASK 0x1 +#define SLEEP_PULL_DOWN_MASK GENMASK(1, 0)#define SLEEP_PULL_DOWN_SHIFT 2#define PULL_DOWN BIT(6) -#define PULL_DOWN_MASK 0x1 +#define PULL_DOWN_MASK (GENMASK(1, 0) | BIT(6))#define PULL_DOWN_SHIFT 6#define SLEEP_PULL_UP BIT(3) -#define SLEEP_PULL_UP_MASK 0x1 -#define SLEEP_PULL_UP_SHIFT 3 +#define SLEEP_PULL_UP_MASK GENMASK(1, 0) +#define SLEEP_PULL_UP_SHIFT 2#define PULL_UP_1_8K (BIT(12) | BIT(7))#define PULL_UP_4_7K BIT(12)#define PULL_UP_20K BIT(7) -#define PULL_UP_MASK 0x21 -#define PULL_UP_SHIFT 7 +#define PULL_UP_MASK (GENMASK(1, 0) | BIT(6)) +#define PULL_UP_SHIFT 6#define INPUT_SCHMITT BIT(11)#define INPUT_SCHMITT_MASK 0x1
Signature · 1 line
2.17.1
Re: [PATCH V3 2/6] pinctrl: sprd: Fix the incorrect mask and shift definition
Quoted 5 lines · Linhua Xu
From: Linhua Xu <[email protected]>
Pull-up and pull-down are mutually exclusive. When setting one of them, the bit of the other needs to be clear. Now, there are cases where pull-up and pull-down are set at the same time in the code, thus fix them.
...
Quoted 3 lines
Fixes <1fb4b907e808> ("pinctrl: sprd: Add Spreadtrum pin control driver")Signed-off-by Linhua Xu <[email protected]>
Same comment about the Fixes: tag.
...
drivers/pinctrl/sprd/pinctrl-sprd.c line 64
Quoted 3 lines
drivers/pinctrl/sprd/pinctrl-sprd.c +1
-1-#define SLEEP_PULL_DOWN_MASK 0x1 +#define SLEEP_PULL_DOWN_MASK GENMASK(1, 0)#define SLEEP_PULL_DOWN_SHIFT 2
No, this is an incorrect (prone to errors and confusion) change. You need to introduce new mask for both of them and use in the code.
#define SLEEP_PULL_UP_DOWN_MASK GENMASK(1, 0)
#define SLEEP_PULL_UP_DOWN_SHIFT 2
...
drivers/pinctrl/sprd/pinctrl-sprd.c line 68
Quoted 3 lines
drivers/pinctrl/sprd/pinctrl-sprd.c +1
-1-#define PULL_DOWN_MASK 0x1 +#define PULL_DOWN_MASK (GENMASK(1, 0) | BIT(6))#define PULL_DOWN_SHIFT 6
Ditto.
#define PULL_UP_DOWN_MASK (GENMASK(1, 0) | BIT(6))
#define PULL_UP_DOWN_SHIFT 6
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH v3 3/6 pinctrl: sprd: Move common and misc offset parameters to private data
In reply to Linhua XuFrom: Linhua Xu <[email protected]>
For UNISOC pin controller, the offset values of the common register and misc register will be different. So add SoC structure in sprd_pinctrl_of_match() and parse it in sprd-pinctrl_core.
--- drivers/pinctrl/sprd/pinctrl-sprd-sc9860.c | 12 +++++++++--- drivers/pinctrl/sprd/pinctrl-sprd.c | 14 ++++++++++---- drivers/pinctrl/sprd/pinctrl-sprd.h | 5 +++++ 3 files changed, 24 insertions(+), 7 deletions(-)
drivers/pinctrl/sprd/pinctrl-sprd-sc9860.c +9 -3
@@ -10,6 +10,9 @@#include "pinctrl-sprd.h" +#define PINCTRL_REG_OFFSET 0x0020 +#define PINCTRL_REG_MISC_OFFSET 0x4020 +enum sprd_sc9860_pins {/* pin global control register 0 */ SC9860_VIO28_0_IRTE =SPRD_PIN_INFO (0 ,GLOBAL_CTRL_PIN ,11 ,1 ,0 ),
@@ -923,6 +926,11 @@ static struct sprd_pins_info sprd_sc9860_pins_info[] = { SPRD_PINCTRL_PIN(SC9860_RFCTL39_MISC), }; +static const struct sprd_pinctrl_priv_data sc9860_data = { + .common_offset =PINCTRL_REG_OFFSET , + .misc_offset =PINCTRL_REG_MISC_OFFSET , +}; +static int sprd_pinctrl_probe (struct platform_device *pdev) { return sprd_pinctrl_core_probe(pdev, sprd_sc9860_pins_info,
@@ -930,9 +938,7 @@ static int sprd_pinctrl_probe(struct platform_device *pdev) }static const struct of_device_id sprd_pinctrl_of_match[] = { - { - .compatible ="sprd,sc9860-pinctrl" , - }, + { .compatible ="sprd,sc9860-pinctrl" , .data = &sc9860_data}, { }, };MODULE_DEVICE_TABLE (of, sprd_pinctrl_of_match);
drivers/pinctrl/sprd/pinctrl-sprd.c +10 -4
@@ -30,8 +30,6 @@#include "pinctrl-sprd.h" #define PINCTRL_BIT_MASK (width) (~(~0UL << (width))) -#define PINCTRL_REG_OFFSET 0x20 -#define PINCTRL_REG_MISC_OFFSET 0x4020#define PINCTRL_REG_LEN 0x4#define PIN_FUNC_MASK (BIT(4) | BIT(5))
@@ -149,12 +147,14 @@ struct sprd_pinctrl_soc_info {* @pctl: pointer to the pinctrl handle * @base: base address of the controller * @info: pointer to SoC's pins description information +* @pdata: pointer SoC's private data structure */ struct sprd_pinctrl {struct device *dev;struct pinctrl_dev *pctl;void __iomem *base;struct sprd_pinctrl_soc_info *info; +const struct sprd_pinctrl_priv_data *pdata; };#define SPRD_PIN_CONFIG_CONTROL (PIN_CONFIG_END + 1)
@@ -1026,12 +1026,12 @@ static int sprd_pinctrl_add_pins(struct sprd_pinctrl *sprd_pctl, ctrl_pin++; }else if (pin->type ==COMMON_PIN ) { pin->reg = (unsigned long )sprd_pctl->base + -PINCTRL_REG_OFFSET +PINCTRL_REG_LEN * + sprd_pctl->pdata->common_offset +PINCTRL_REG_LEN * (i - ctrl_pin); com_pin++; }else if (pin->type ==MISC_PIN ) { pin->reg = (unsigned long )sprd_pctl->base + -PINCTRL_REG_MISC_OFFSET +PINCTRL_REG_LEN * + sprd_pctl->pdata->misc_offset +PINCTRL_REG_LEN * (i - ctrl_pin - com_pin); } }
@@ -1053,6 +1053,7 @@ int sprd_pinctrl_core_probe(struct platform_device *pdev,struct sprd_pinctrl *sprd_pctl;struct sprd_pinctrl_soc_info *pinctrl_info;struct pinctrl_pin_desc *pin_desc; +const struct sprd_pinctrl_priv_data *priv_data;int ret, i; sprd_pctl = devm_kzalloc(&pdev->dev, sizeof(struct sprd_pinctrl),
@@ -1070,6 +1071,11 @@ int sprd_pinctrl_core_probe(struct platform_device *pdev,if (!pinctrl_info)return -ENOMEM ; + priv_data =of_device_get_match_data (&pdev->dev); +if (!priv_data) +return -EINVAL ; + + sprd_pctl->pdata = priv_data; sprd_pctl->info = pinctrl_info; sprd_pctl->dev = &pdev->dev;platform_set_drvdata (pdev, sprd_pctl);
drivers/pinctrl/sprd/pinctrl-sprd.h +5 -0
@@ -50,6 +50,11 @@ struct sprd_pins_info {unsigned int reg; }; +struct sprd_pinctrl_priv_data { +unsigned long common_offset; +unsigned long misc_offset; +}; +int sprd_pinctrl_core_probe (struct platform_device *pdev,struct sprd_pins_info *sprd_soc_pin_info,int pins_cnt);
Signature · 1 line
2.17.1
Re: [PATCH V3 3/6] pinctrl: sprd: Move common and misc offset parameters to private data
Quoted 5 lines · Linhua Xu
From: Linhua Xu <[email protected]>
For UNISOC pin controller, the offset values of the common register and misc register will be different. So add SoC structure in
sprd_pinctrl_of_match()and parse it in sprd-pinctrl_core.
...
drivers/pinctrl/sprd/pinctrl-sprd.c int sprd_pinctrl_core_probe(struct platform_device *pdev, · line 1076
Quoted 3 lines
drivers/pinctrl/sprd/pinctrl-sprd.c +3
-0+ priv_data =of_device_get_match_data (&pdev->dev); +if (!priv_data) +return -EINVAL ;
I believe there is the idea to make that API local to the device property core, so use device_get_match_data() instead.
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH v3 4/6 pinctrl: sprd: Increase the range of register values
In reply to Linhua XuFrom: Linhua Xu <[email protected]>
As the UNISOC pin controller version iterates, more registers are required to meet new functional requirements. Thus modify them.
--- drivers/pinctrl/sprd/pinctrl-sprd.h | 44 +++++++++++++++++------------ 1 file changed, 26 insertions(+), 18 deletions(-)
drivers/pinctrl/sprd/pinctrl-sprd.h +26 -18
@@ -7,30 +7,38 @@#ifndef __PINCTRL_SPRD_H__#define __PINCTRL_SPRD_H__ +#include <linux/bits.h> +struct platform_device ; -#define NUM_OFFSET (20) -#define TYPE_OFFSET (16) -#define BIT_OFFSET (8) -#define WIDTH_OFFSET (4) +#define NUM_OFFSET 22 +#define TYPE_OFFSET 18 +#define BIT_OFFSET 10 +#define WIDTH_OFFSET 6 + +#define NUM_MASK GENMASK(10, 0) +#define TYPE_MASK GENMASK(3, 0) +#define BIT_MASK GENMASK(7, 0) +#define WIDTH_MASK GENMASK(3, 0) +#define REG_MASK GENMASK(5, 0) -#define SPRD_PIN_INFO (num, type, offset, width, reg) \ - (((num) & 0xFFF) << NUM_OFFSET | \ - ((type) & 0xF) << TYPE_OFFSET | \ - ((offset) & 0xFF) << BIT_OFFSET | \ - ((width) & 0xF) << WIDTH_OFFSET | \ - ((reg) & 0xF)) +#define SPRD_PIN_INFO (num, type, offset, width, reg) \ + (((num) & NUM_MASK) << NUM_OFFSET | \ + ((type) & TYPE_MASK) << TYPE_OFFSET | \ + ((offset) & BIT_MASK) << BIT_OFFSET | \ + ((width) & WIDTH_MASK) << WIDTH_OFFSET | \ + ((reg) & REG_MASK))#define SPRD_PINCTRL_PIN (pin) SPRD_PINCTRL_PIN_DATA(pin, #pin) -#define SPRD_PINCTRL_PIN_DATA (a, b) \ - { \ - .name = b, \ - .num = (((a) >> NUM_OFFSET) & 0xfff), \ - .type = (((a) >> TYPE_OFFSET) & 0xf), \ - .bit_offset = (((a) >> BIT_OFFSET) & 0xff), \ - .bit_width = ((a) >> WIDTH_OFFSET & 0xf), \ - .reg = ((a) & 0xf) \ +#define SPRD_PINCTRL_PIN_DATA (a, b) \ + { \ + .name = b, \ + .num = (((a) >> NUM_OFFSET) & NUM_MASK), \ + .type = (((a) >> TYPE_OFFSET) & TYPE_MASK), \ + .bit_offset = (((a) & BIT_OFFSET) & BIT_MASK), \ + .bit_width = (((a) & WIDTH_OFFSET) & WIDTH_MASK), \ + .reg = ((a) & REG_MASK) \ } enum pin_type {
Signature · 1 line
2.17.1
kernel test robot
build botRe: [PATCH V3 4/6] pinctrl: sprd: Increase the range of register values
kernel test robot noticed the following build warnings:
Hi Linhua,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linusw-pinctrl/devel]
[also build test WARNING on linusw-pinctrl/for-next linus/master v6.6-rc7 next-20231026] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Linhua-Xu/pinctrl-sprd-Modify-pull-up-parameters/20231027-151737 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel patch link: https://lore.kernel.org/r/20231027071426.17724-5-Linhua.xu%40unisoc.com patch subject: [PATCH V3 4/6] pinctrl: sprd: Increase the range of register values config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20231027/[email protected]/config) compiler: m68k-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231027/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
In file included from drivers/pinctrl/sprd/pinctrl-sprd.c:29:
>> drivers/pinctrl/sprd/pinctrl-sprd.h:21: warning: "BIT_MASK" redefined
21 | #define BIT_MASK GENMASK(7, 0)
|
In file included from include/linux/ratelimit_types.h:5,
from include/linux/printk.h:9,
from include/asm-generic/bug.h:22,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:79,
from include/linux/spinlock.h:56,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/debugfs.h:15,
from drivers/pinctrl/sprd/pinctrl-sprd.c:7:
include/linux/bits.h:9: note: this is the location of the previous definition
9 | #define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG))
| vim +/BIT_MASK +21 drivers/pinctrl/sprd/pinctrl-sprd.h
18
19 #define NUM_MASK GENMASK(10, 0)
20 #define TYPE_MASK GENMASK(3, 0)
> 21 #define BIT_MASK GENMASK(7, 0)
22 #define WIDTH_MASK GENMASK(3, 0)
23 #define REG_MASK GENMASK(5, 0)
24 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
PATCH v3 5/6 pinctrl: sprd: Add pinctrl support for UMS512
In reply to Linhua XuFrom: Linhua Xu <[email protected]>
Add the pin control driver for UNISOC UMS512 platform.
--- drivers/pinctrl/sprd/Kconfig | 11 + drivers/pinctrl/sprd/Makefile | 1 + drivers/pinctrl/sprd/pinctrl-sprd-ums512.c | 881 +++++++++++++++++++++ 3 files changed, 893 insertions(+) create mode 100644 drivers/pinctrl/sprd/pinctrl-sprd-ums512.c
drivers/pinctrl/sprd/Kconfig +11 -0
@@ -19,3 +19,14 @@ config PINCTRL_SPRD_SC9860 select PINCTRL_SPRD help Say Y here to enable Spreadtrum SC9860 pinctrl driver + +config PINCTRL_SPRD_UMS512 + tristate "Spreadtrum ums512 pinctrl driver" + depends on ARCH_SPRD || COMPILE_TEST + select PINCTRL_SPRD + help + Say Y here to enable Spreadtrum ums512 pinctrl driver + Support pin function switching + Support pin drive capability configuration + Support pin pull-up and pull-down configuration + Support pin pull-up and pull-down configuration during sleep
drivers/pinctrl/sprd/Makefile +1 -0
@@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only obj-$(CONFIG_PINCTRL_SPRD) += pinctrl-sprd.o obj-$(CONFIG_PINCTRL_SPRD_SC9860) += pinctrl-sprd-sc9860.o +obj-$(CONFIG_PINCTRL_SPRD_UMS512) += pinctrl-sprd-ums512.o
drivers/pinctrl/sprd/pinctrl-sprd-ums512.c new file +881 -0
881 lines not on this page · raw message
Signature · 1 line
2.17.1
Re: [PATCH V3 5/6] pinctrl: sprd: Add pinctrl support for UMS512
Quoted 3 lines · Linhua Xu
From: Linhua Xu <[email protected]>
Add the pin control driver for UNISOC UMS512 platform.
...
Quoted 1 line
+#include <
linux/kernel.h>
array_size.h is pending for v6.7-rc1.
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH v3 6/6 pinctrl: sprd: Add pinctrl support for UMS9621
In reply to Linhua XuFrom: Linhua Xu <[email protected]>
Add the pin control driver for UNISOC UMS9621 platform.
--- drivers/pinctrl/sprd/Kconfig | 11 + drivers/pinctrl/sprd/Makefile | 1 + drivers/pinctrl/sprd/pinctrl-sprd-ums9621.c | 1120 +++++++++++++++++++ 3 files changed, 1132 insertions(+) create mode 100644 drivers/pinctrl/sprd/pinctrl-sprd-ums9621.c
drivers/pinctrl/sprd/Kconfig +11 -0
@@ -30,3 +30,14 @@ config PINCTRL_SPRD_UMS512 Support pin drive capability configuration Support pin pull-up and pull-down configuration Support pin pull-up and pull-down configuration during sleep + +config PINCTRL_SPRD_UMS9621 + tristate "Spreadtrum ums9621 pinctrl driver" + depends on ARCH_SPRD || COMPILE_TEST + select PINCTRL_SPRD + help + Say Y here to enable Spreadtrum ums512 pinctrl driver + Support pin function switching + Support pin drive capability configuration + Support pin pull-up and pull-down configuration + Support pin pull-up and pull-down configuration during sleep
drivers/pinctrl/sprd/Makefile +1 -0
@@ -2,3 +2,4 @@ obj-$(CONFIG_PINCTRL_SPRD) += pinctrl-sprd.o obj-$(CONFIG_PINCTRL_SPRD_SC9860) += pinctrl-sprd-sc9860.o obj-$(CONFIG_PINCTRL_SPRD_UMS512) += pinctrl-sprd-ums512.o +obj-$(CONFIG_PINCTRL_SPRD_UMS9621) += pinctrl-sprd-ums9621.o
drivers/pinctrl/sprd/pinctrl-sprd-ums9621.c new file +1120 -0
1,120 lines not on this page · raw message
Signature · 1 line
2.17.1
Re: [PATCH V3 6/6] pinctrl: sprd: Add pinctrl support for UMS9621
Quoted 3 lines · Linhua Xu
From: Linhua Xu <[email protected]>
Add the pin control driver for UNISOC UMS9621 platform.
...
Quoted 1 line
+#include <
linux/kernel.h>
array_size.h
Signature · 2 lines
With Best Regards, Andy Shevchenko