Enable 800MHz Operating Power Point.

Just having "mpurate=800" in kernel command line doesn't do any good
when cpufreq is enabled.  We need to explicitly enable the higher
operating power points.

So copy the opp_init code from board-omap3beagle.c.  Once cpufreq is
enabled, cpu-bound code can now operate 33% faster.

Signed-off-by: NeilBrown <neilb@suse.de>

Conflicts:
	arch/arm/mach-omap2/board-omap3gta04.c
BMP085: Clean up and enable use of interrupt for completion.

- discard init_platform_hw and exit_platform_hw as they aren't
  used
- pass GPIO or IRQ to driver and have it initialise the GPIO and
  the IRQ
- finish waiting early if interrupt fires
- clean up GPIO and IRQ on exit.

Signed-off-by: NeilBrown <neilb@suse.de>

Conflicts:
	arch/arm/configs/gta04_debug_defconfig
	arch/arm/configs/gta04_defconfig
	drivers/misc/bmp085.c
Fix hmc5883 to be auto-detect.

Also fix bug when writing to meas_conf
and arrange for it to be compiled as a module.

Signed-off-by: NeilBrown <neilb@suse.de>

Conflicts:
	arch/arm/configs/gta04_debug_defconfig
	arch/arm/configs/gta04_defconfig
IIO: add iio driver for ITG3200 3-axis gyroscope.

Each axis can be individually disabled to save power.
Sample rate can be set.
Appropriate clock is set automatically.

No triggers implemented yet, so no streaming of data.  Just read
it from sysfs.

Signed-off-by: NeilBrown <neilb@suse.de>
Fix some compiler warnings.

Mostly about __initdata section mismatches.

Signed-off-by: NeilBrown <neilb@suse.de>
GTA04: use ONDEMAND as default cpufreq governor.

This is more appropriate than 'powersave' which always uses lowest
speed.

Reported-by: Radek Polak <psonek2@seznam.cz>
Signed-off-by: NeilBrown <neilb@suse.de>
GTA04: Enable mdac hwmon

Useful for testing.

  /sys/class/hwmon/hwmon0/device/in7_input

show the reading for MICSENSE which detects a jack plugged in.

You need HSMIC_BIAS enabled which is forced by the next patch
or can be achieved with alsamixer by
  "Analog Left Headset Mic"  set to capture, and so loopback enabled,
  e.g.
    HeadsetL Mixer AudioL1  not muted
    Left1 Analog Loopback   not muted

Signed-off-by: NeilBrown <neilb@suse.de>
GTA04: add simple headset-jack detection support.

As headset-insert doesn't generate an interrupt we need to
poll the MICSENSE line to see if a headset is present.
We do this every 500ms.  It takes nearly that long to physically
insert a jack, so much faster wouldn't help and would impact
power drain more.

As detection is done by polling, a jack-insert or removal event cannot
wake the device from suspend.  Events are only detected while device
is awake.

We keep the HSMIC bias enabled whenever the 'input' device is open,
except during suspend so that we can poll reliably.  Turning it off
and on seems to interfere with reliable measurements.

Currently a reading below 100 is 'nothing plugged in' while a reading
above that is 'mic and headphone plugged in'.
I measure between 19 and 26 when nothing is plugged in, and between
804 and 811 when a headset is plugged in.

Input device will appear as
    /dev/input/jack
if the udev rules file in GTA04/udev-rules/input.rules
is installed.

Signed-off-by: NeilBrown <neilb@suse.de>
GTA04 audio headset jack detect.

Enhance jack detection to differentiate with and without a microphone,
and to report a button-press when the microphone is shorted.

Signed-off-by: NeilBrown <neilb@suse.de>
arm/dts: Add basic support for gta04 (Openmoko next generation) board.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>