public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: robert.jarzmik@free.fr (Robert Jarzmik)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: pxa: let PXA27x select PINCTRL
Date: Sun, 24 Jan 2016 21:39:11 +0100	[thread overview]
Message-ID: <87zivuaf0w.fsf@belgarion.home> (raw)
In-Reply-To: 1495788.v3fMfHFcmP@wuerfel

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));

  reply	other threads:[~2016-01-24 20:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2016-01-24 21:33       ` Arnd Bergmann
2016-01-25  2:07         ` Masahiro Yamada
2016-01-26 20:11           ` Robert Jarzmik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zivuaf0w.fsf@belgarion.home \
    --to=robert.jarzmik@free.fr \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox