Thread (43 messages) 43 messages, 6 authors, 2012-12-04
STALE4933d

[PATCH 2/5] ARM: PXA: Zipit Z2: Add USB host and device support

From: anarsoul@gmail.com (Vasily Khoruzhick)
Date: 2012-11-02 21:29:24

On Wed, Oct 31, 2012 at 6:31 PM, Haojian Zhuang
[off-list ref] wrote:
On Wed, Oct 31, 2012 at 4:05 AM, Daniel Mack [off-list ref] wrote:
quoted
On 30.10.2012 21:01, Vasily Khoruzhick wrote:
quoted
On Mon, Oct 29, 2012 at 2:14 PM, Daniel Mack [off-list ref] wrote:
quoted
On 29.10.2012 12:12, Vasily Khoruzhick wrote:
quoted
On Mon, Oct 29, 2012 at 2:00 PM, Daniel Mack [off-list ref] wrote:
quoted
quoted
Well, there's an issue - Z2 does not preserve memory contents in deep sleep
(but it does in sleep), so userspace can't be fixed here unfortunatelly.
There's no another possibility to turn Z2 off, and plain sleep is too
power hungry.
So the only way to keep Z2 in low-power mode is fake power off, which just puts
Z2 in deep sleep.
Why can't the userspace trigger a deep sleep then instead of powering
off? Which details do I lack?
How? echo mem >/sys/power/state puts system into non-deep sleep. Anyway, kernel
is not ready for fake power off instead of suspend (we can't resume
from deep sleep,
memory content is not preserved), so there can be some data loss.
Adding some sysfs file to control sleep type does not look like a good
idea to me.

Btw, how other DT-capable boards handle power off?
No idea. I never actually used that kind of power state.
Hi Daniel,

One more question: what should I use instead of pxa2xx_mfp_config in
DT board to configure pin modes?
Haojian was working on the PXA pinctrl drivers, but I don't know how far
that is yet.

If that's not yet there, have a look at the pinctrl-single driver. It's
admittedly not as nice to use as the constants in the board file as DT
lacks defines for numerical constants, but's at least a workaround.

On a more general note, it's arguable whether this kind of setup should
be done in the bootloader after all.


Daniel
I prefer to use pinctrl-single driver instead. I'm updating mmp
pinctrol driver to
pinctrl-single driver framework. You can find them in mailist. I'm submitting
a third round in these days.

Regards
Haojian
OK, one more question:

On PXA2xx GPIO and PINMUX are not separate blocks. Each pin can be
either input or output and have 4 modes (gpio + 3 alternate functions)
== 8 states , so we have: gpio in, gpio out, 3 alt in, 3 alt out.
To control pin mode one should write to GPDR (direction register) and
GAFR (alternate function register). pxa-gpio driver controls both of
those registers, so does pxa2xx-mfp.

I'm not sure what to do in this case. Should I move code controlling
GPDR and GAFR into some pinctrl-pxa2xx driver, and modify pxa-gpio
driver to use it?

Regards
Vasily
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help