Okay, think I've got it right now.  Have merged some stuff from tabpro-common.

Change-Id: Ie6e3a1d65abac1a8788fb0ac8a3bb11d27e2754a