[UPSTREAM 0/2] pcf50633 changes

Andy Green andy at openmoko.com
Mon Dec 8 00:18:22 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Somebody in the thread at some point said:
| Mike (mwester) wrote:
|> Werner Almesberger wrote:
|>> Balaji Rao wrote:
|>>> 4. Emergency 8s shutdown has been temporarily removed from the driver
|>>> as it certainly does not belong there.
|>> What's the plan for this one ? Lots of people seem to feel a strong
|>> emotionally attachment to having the equivalent of ctrl-alt-del :)
|> I'm rather concerned; it's all too easy to have this functionality get
|> lost in the shuffle if it's not implemented up front.
|
| What's the status of this -- has this missing functionality been returned?

	/* Some revisions of the chip don't have a 8s standby mode on
	 * ONKEY1S press. We try to manually do it in such cases. */

	if ((pcf_int[0] & PCF50633_INT1_SECOND) && pcf->onkey1s_held) {
		dev_info(pcf->dev, "ONKEY1S held for %d secs\n",
							pcf->onkey1s_held);
		if (pcf->onkey1s_held++ == PCF50633_ONKEY1S_TIMEOUT)
			if (pcf->pdata->force_shutdown)
				pcf->pdata->force_shutdown(pcf);
	}

You could have just tried it :-)

|>>> 5. 'Suppress onkey events on resume' - must be a better way to handle
|>>> this. Can't it be done from userspace ?
|>> It seems that whoever has initiated the suspend should also take care
|>> of the consequences, yes. This is only about user space, not the
|>> hang-on-resume Matt has fixed recently, right ?
|> This is the use-case where something initiated a suspend, and the user
|> depressed the power key to awaken the device.  In order to do this in
|> user-space, someone will need to devise a fool-proof algorithm for
|> user-space that can ensure that whatever process reads the power key
|> event can distinguish between a power-key event that is real versus a
|> power key event that is to be ignored, because it was just the remnants
|> of the wake event.
|
| Same question for this one.  I know everyone on this list would like to
| see userspace adopt the new kernel; this will be a very visible
| regression for the users.

What are you actually asking about there, because what you quoted is a
big discussion about on key swallowing in userspace.  Assuming you're
actually asking does it swallow it in the driver:

	/* Have we just resumed ? */
	if (pcf->is_suspended) {

		pcf->is_suspended = 0;

		/* Set the resume reason filtering out non resumers */
		for (i = 0; i < ARRAY_SIZE(pcf_int); i++)
			pcf->resume_reason[i] = pcf_int[i] &
						pcf->pdata->resumers[i];

		/* Make sure we don't pass on any ONKEY events to
		 * userspace now */
		pcf_int[1] &= ~ (PCF50633_INT2_ONKEYR | PCF50633_INT2_ONKEYF);
	}

Again, you could have just tried it.

So... you're all perfectly happy now, right?

- -Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkk8Wb4ACgkQOjLpvpq7dMq2JgCfadqIycQQOnu9htF77AMSQG+B
1YcAoInf6SnMWmu5j06r7ODY7kh2oqSN
=qBso
-----END PGP SIGNATURE-----



More information about the openmoko-kernel mailing list