linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: pxa: let PXA27x select PINCTRL
@ 2016-01-23 19:23 Masahiro Yamada
  2016-01-23 22:07 ` Robert Jarzmik
  0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2016-01-23 19:23 UTC (permalink / raw)
  To: arm
  Cc: Masahiro Yamada, Robert Jarzmik, Haojian Zhuang, linux-kernel,
	Russell King, Daniel Mack, linux-arm-kernel

To use the newly added PXA27x pinctrl driver, this commit is needed
as well as commit 4b15ec9d42b2 ("pinctrl: activate pxa architecture").

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 arch/arm/mach-pxa/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index f096836..35bc0fe 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -618,6 +618,7 @@ config PXA25x
 config PXA27x
 	bool
 	select CPU_XSCALE
+	select PINCTRL
 	help
 	  Select code specific to PXA27x variants
 
-- 
1.9.1

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

* Re: [PATCH] ARM: pxa: let PXA27x select PINCTRL
  2016-01-23 19:23 [PATCH] ARM: pxa: let PXA27x select PINCTRL Masahiro Yamada
@ 2016-01-23 22:07 ` Robert Jarzmik
  2016-01-23 23:02   ` Arnd Bergmann
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Jarzmik @ 2016-01-23 22:07 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: arm, Haojian Zhuang, linux-kernel, Russell King, Daniel Mack,
	linux-arm-kernel

Masahiro Yamada <yamada.masahiro@socionext.com> writes:

> To use the newly added PXA27x pinctrl driver, this commit is needed
> as well as commit 4b15ec9d42b2 ("pinctrl: activate pxa architecture").
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
No, that's a bit to narrow selecting pinctrl for only pxa27x architecture.

I have this patch in my local tree for 2 monthes (see [1]). This is the patch
I'd rather have. I had not posted it as I didn't think the pinctrl work was over
yet. I know at least that pxa3xx is ready (as pinctrl-single should be used),
and I had not the time to create the map for pxa25x.

Cheers.

--
Robert

---8<---
>From 8e0da8ff579bd38a7923f15a905133814153ebdb Mon Sep 17 00:00:00 2001
From: Robert Jarzmik <robert.jarzmik@free.fr>
Date: Sun, 1 Nov 2015 20:07:31 +0100
Subject: [PATCH] ARM: pxa: use pinctrl

Select pinctrl for all PXA architectures.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
 arch/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 34e1569a11ee..e876e86f5b0a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -618,6 +618,7 @@ config ARCH_PXA
 	select HAVE_IDE
 	select IRQ_DOMAIN
 	select MULTI_IRQ_HANDLER
+	select PINCTRL
 	select PLAT_PXA
 	select SPARSE_IRQ
 	help
-- 
2.1.4

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

* Re: [PATCH] ARM: pxa: let PXA27x select PINCTRL
  2016-01-23 22:07 ` Robert Jarzmik
@ 2016-01-23 23:02   ` Arnd Bergmann
  2016-01-24 20:39     ` Robert Jarzmik
  0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2016-01-23 23:02 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Masahiro Yamada, arm, Haojian Zhuang, linux-kernel, Russell King,
	Daniel Mack, linux-arm-kernel

On Saturday 23 January 2016 23:07:44 Robert Jarzmik wrote:
> I have this patch in my local tree for 2 monthes (see [1]). This is the patch
> I'd rather have. I had not posted it as I didn't think the pinctrl work was over
> yet. I know at least that pxa3xx is ready (as pinctrl-single should be used),
> and I had not the time to create the map for pxa25x.

Once you are done, does that mean the plat-pxa/mfp.c stuff becomes
completely unused on pxa, or will it coexist with pinctrl?

I'm asking because it seems that at that point, the entire plat-pxa
directory can be removed, with the dma.c and ssp.c files getting
moved to mach-pxa, and mfp.c moved to mach-mmp. :-)

	Arnd

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

* Re: [PATCH] ARM: pxa: let PXA27x select PINCTRL
  2016-01-23 23:02   ` Arnd Bergmann
@ 2016-01-24 20:39     ` Robert Jarzmik
  2016-01-24 21:33       ` Arnd Bergmann
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Jarzmik @ 2016-01-24 20:39 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Masahiro Yamada, arm, Haojian Zhuang, linux-kernel, Russell King,
	Daniel Mack, linux-arm-kernel

Arnd Bergmann <arnd@arndb.de> writes:

> On Saturday 23 January 2016 23:07:44 Robert Jarzmik wrote:
>> I have this patch in my local tree for 2 monthes (see [1]). This is the patch
>> I'd rather have. I had not posted it as I didn't think the pinctrl work was over
>> yet. I know at least that pxa3xx is ready (as pinctrl-single should be used),
>> and I had not the time to create the map for pxa25x.
>
> Once you are done, does that mean the plat-pxa/mfp.c stuff becomes
> completely unused on pxa, or will it coexist with pinctrl?
At first it will coexist.
The main blocker so far I have are :
 - the pinconf in platform_data platform to define sleep state pin levels
   (aka. MFPR_LPM_DRIVE_LOW and MFPR_LPM_DRIVE_HIGH)
   I have [1], but it's not working yet, ie. upon entering suspend to RAM, the
   GPIO sleep registers are not programmed as expected.
 - all the pxa machine code have to be migrated from MFP to pinctrl

So it will take time.

> I'm asking because it seems that at that point, the entire plat-pxa
> directory can be removed, with the dma.c and ssp.c files getting
> moved to mach-pxa, and mfp.c moved to mach-mmp. :-)
dma.c will die soon enough anyway, ssp.c will move to mach-pxa indeed, and as
for mfp.c it requires a bit of work.

Cheers.

-- 
Robert

[1] Extract of my samples in mioa701.c :
#define PMGROUP(pin) #pin
#define PMMUX(dev, pin, func)							\
	PIN_MAP_MUX_GROUP(#dev, PINCTRL_STATE_DEFAULT, "pxa27x-pinctrl",	\
			  "P" PMGROUP(pin), #func)
#define PMCONF_SLEEP(dev, pin, mode)						\
	PIN_MAP_CONFIGS_PIN(#dev, PINCTRL_STATE_SLEEP, "pxa27x-pinctrl",	\
			  "P" PMGROUP(pin), gpio_ ## mode ## _sleep_mode)

static unsigned long gpio_pull_sleep_mode[] = {
	PIN_CONF_PACKED(PIN_CONFIG_OUTPUT, 0),
};

static unsigned long gpio_push_sleep_mode[] = {
	PIN_CONF_PACKED(PIN_CONFIG_OUTPUT, 1),
};

static struct pinctrl_map pinmap[] __initdata = {
	/* USB */
	PMMUX(pxa27x-udc, GPIO13_nUSB_DETECT, gpio_in),
	PMMUX(pxa27x-udc, GPIO22_USB_ENABLE, gpio_in),
	PMCONF_SLEEP(pxa27x-udc, GPIO22_USB_ENABLE, pull),
};
...
	/* pxa2xx_mfp_config(ARRAY_AND_SIZE(mioa701_pin_config)); */
	pinctrl_register_mappings(pinmap, ARRAY_SIZE(pinmap));

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

* Re: [PATCH] ARM: pxa: let PXA27x select PINCTRL
  2016-01-24 20:39     ` Robert Jarzmik
@ 2016-01-24 21:33       ` Arnd Bergmann
  2016-01-25  2:07         ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2016-01-24 21:33 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Masahiro Yamada, arm, Haojian Zhuang, linux-kernel, Russell King,
	Daniel Mack, linux-arm-kernel

On Sunday 24 January 2016 21:39:11 Robert Jarzmik wrote:
> Arnd Bergmann <arnd@arndb.de> writes:
> 
> > On Saturday 23 January 2016 23:07:44 Robert Jarzmik wrote:
> >> I have this patch in my local tree for 2 monthes (see [1]). This is the patch
> >> I'd rather have. I had not posted it as I didn't think the pinctrl work was over
> >> yet. I know at least that pxa3xx is ready (as pinctrl-single should be used),
> >> and I had not the time to create the map for pxa25x.
> >
> > Once you are done, does that mean the plat-pxa/mfp.c stuff becomes
> > completely unused on pxa, or will it coexist with pinctrl?
> At first it will coexist.
> The main blocker so far I have are :
>  - the pinconf in platform_data platform to define sleep state pin levels
>    (aka. MFPR_LPM_DRIVE_LOW and MFPR_LPM_DRIVE_HIGH)
>    I have [1], but it's not working yet, ie. upon entering suspend to RAM, the
>    GPIO sleep registers are not programmed as expected.
>  - all the pxa machine code have to be migrated from MFP to pinctrl
> 
> So it will take time.

Ok.

> > I'm asking because it seems that at that point, the entire plat-pxa
> > directory can be removed, with the dma.c and ssp.c files getting
> > moved to mach-pxa, and mfp.c moved to mach-mmp. :-)
> dma.c will die soon enough anyway, ssp.c will move to mach-pxa indeed, and as
> for mfp.c it requires a bit of work.

Sounds good.

	Arnd

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

* Re: [PATCH] ARM: pxa: let PXA27x select PINCTRL
  2016-01-24 21:33       ` Arnd Bergmann
@ 2016-01-25  2:07         ` Masahiro Yamada
  2016-01-26 20:11           ` Robert Jarzmik
  0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2016-01-25  2:07 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Robert Jarzmik, Russell King, Linux Kernel Mailing List,
	Haojian Zhuang, arm, linux-arm-kernel, Daniel Mack

Hi Robert,

2016-01-25 6:33 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
> On Sunday 24 January 2016 21:39:11 Robert Jarzmik wrote:
>> Arnd Bergmann <arnd@arndb.de> writes:
>>
>> > On Saturday 23 January 2016 23:07:44 Robert Jarzmik wrote:
>> >> I have this patch in my local tree for 2 monthes (see [1]). This is the patch
>> >> I'd rather have. I had not posted it as I didn't think the pinctrl work was over
>> >> yet. I know at least that pxa3xx is ready (as pinctrl-single should be used),
>> >> and I had not the time to create the map for pxa25x.
>> >
>> > Once you are done, does that mean the plat-pxa/mfp.c stuff becomes
>> > completely unused on pxa, or will it coexist with pinctrl?
>> At first it will coexist.
>> The main blocker so far I have are :
>>  - the pinconf in platform_data platform to define sleep state pin levels
>>    (aka. MFPR_LPM_DRIVE_LOW and MFPR_LPM_DRIVE_HIGH)
>>    I have [1], but it's not working yet, ie. upon entering suspend to RAM, the
>>    GPIO sleep registers are not programmed as expected.
>>  - all the pxa machine code have to be migrated from MFP to pinctrl
>>
>> So it will take time.
>
> Ok.
>
>> > I'm asking because it seems that at that point, the entire plat-pxa
>> > directory can be removed, with the dma.c and ssp.c files getting
>> > moved to mach-pxa, and mfp.c moved to mach-mmp. :-)
>> dma.c will die soon enough anyway, ssp.c will move to mach-pxa indeed, and as
>> for mfp.c it requires a bit of work.
>
> Sounds good.
>


It's OK if you will this later.
Just disregard mine.




-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] ARM: pxa: let PXA27x select PINCTRL
  2016-01-25  2:07         ` Masahiro Yamada
@ 2016-01-26 20:11           ` Robert Jarzmik
  0 siblings, 0 replies; 7+ messages in thread
From: Robert Jarzmik @ 2016-01-26 20:11 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Arnd Bergmann, Russell King, Linux Kernel Mailing List,
	Haojian Zhuang, arm, linux-arm-kernel, Daniel Mack

Masahiro Yamada <yamada.masahiro@socionext.com> writes:

> Hi Robert,
>
> It's OK if you will this later.
> Just disregard mine.
Ok, great.
I'll submit in the next 4 weeks I think.

Cheers.

-- 
Robert

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

end of thread, other threads:[~2016-01-26 20:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-23 19:23 [PATCH] ARM: pxa: let PXA27x select PINCTRL Masahiro Yamada
2016-01-23 22:07 ` Robert Jarzmik
2016-01-23 23:02   ` Arnd Bergmann
2016-01-24 20:39     ` Robert Jarzmik
2016-01-24 21:33       ` Arnd Bergmann
2016-01-25  2:07         ` Masahiro Yamada
2016-01-26 20:11           ` Robert Jarzmik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).