ACPICA: Add acpi_get_properties() public interface

In order to support extracting Device Tree style properties from ACPI
devices a new method _PRP was introduced. This method, when present, is
expected to return a package containing packages with name-value pairs
analogous to their Device Tree counterparts.

A sample _PRP method migh look like this:

  Method (_PRP, 0, NotSerialized)
  {
	  Return (Package () {
		  Package () { "integer-property", 10 },
		  Package () { "string-property", "mystring" },
	  })
  }

Calling acpi_get_properties() will evaluate the _PRP method, validate the
result and return it to the caller if everything went fine.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
ACPI: Add support for device specific properties

Device Tree is used in many embedded systems to describe the system
configuration to the OS. It supports attaching properties or name-value
pairs to the devices it describe. With these properties one can pass
additional information to the drivers that would not be available
otherwise.

ACPI is another configuration mechanism (among other things) typically
seen on but not limited to x86 machines. ACPI allows passing arbitrary
data from methods but there is nothing like Device Tree properties in
the ACPI specification.

In order to facilitate ACPI usage in systems where Device Tree is
typically used, it would be beneficial to standardize a way to retrieve
Device Tree style properties from ACPI devices, which is what we do in
this patch.

If a given device described in ACPI namespace wants to export properties
it must implement _PRP method that returns the properties in a package
of packages. For example:

	Method (_PRP, 0, NotSerialized)
	{
		Return (Package () {
			Package () { "name1", <VALUE1> },
			Package () { "name2", <VALUE2> },
			...
		})
	}

Name must be string but there are no limitations for the value itself.

We add several helper functions that can be used to extract these
properties and convert them to different Linux data types.

The ultimate goal is that we only have one device property API that
retrieves the requested properties from Device Tree or from ACPI
transparent to the caller.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
ACPI: Document ACPI device specific properties

This document describes the data format and interfaces of ACPI device
specific properties.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
mfd: add ACPI support

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
gpio_keys_polled: Add ACPI enumeration and MinnowBoard GPIO button support

Add support for the MinnowBoard GPIO buttons described by the ACPI _HID
MNW0002.

This is an experimental mechanism to extract GPIO pins and keycodes from
a custom SSDT. It extracts the pins/buttons from the first GpioIO
resource pin_table. It extracts keycodes from the vendor_data, which
must contain a matching number of keycodes.

There are a number of platform data fields for the gpio_keys* driver
that are not readily implemented with ACPI 5, for these, default values
are assigned.

This mechanism is not idea as it defines how the vendor data must look
for any device looking to use gpio_keys_polled. It also encodes
Linux-specific keycode values into an OS agnostic firmware construct.

A better approach might be to move the pdata generation from ACPI into
its own drivers/platform/x86/ driver which then loads the platform
driver, thus leaving the gpio_keys_polled driver independent from the
ACPI description method. This doesn't scale well, but it would allow
time for the ACPI specification to mature in terms of generic hardware
description before a generic format is defined in the gpio_keys*
drivers.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
leds-gpio: Add ACPI enumeration and platform data generation

Add support for platform data description via ACPI properties.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
acpi_platform.c: Add MinnowBoard HIDs

Add the MinnowBoard HIDs in support of the gpio-keys-polled and leds-gpio
drivers.  This patch was borrowed from Minnowboard and redone so it could
be used in a Linaro git tree.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Al Stone <al.stone@linaro.org>
ACPI: GUFI: add kernel config options for GUFI

Introduce the kernel config options to enable the Grand Unified Firmware
Interface (GUFI).  Give the user the option of using only ACPI, only DT,
or searching both with either ACPI or DT being searched first.

Signed-off-by: Al Stone <al.stone@linaro.org>
ACPI: GUFI: add build commands for drivers/gufi

Add in the Makefiles needed for building the GUFI.

Signed-off-by: Al Stone <al.stone@linaro.org>
ACPI: GUFI: add in early prototype code for some GUFI functions

This patch introduces the basic structure and content for just a couple
of example GUFI functions.  Each function is designed so that one can
continue to use FDT and with minimal change, convert to using functions
that will retrieve configuration data from either DT or ACPI, whichever
has info available.  In essence, these functions act as a translation
layer.

Signed-off-by: Al Stone <al.stone@linaro.org>
ACPI: GUFI: add in simple test driver placeholders

This patch adds in some essentially null drivers (for now) as placeholders.
The intent is to eventually provide a sysfs interface that would allow the
kernel developer to interact with GUFI and test out the various aspects of
the interface.

Signed-off-by: Al Stone <al.stone@linaro.org>
ACPI: GUFI: start modifying the vexpress-sysreg driver to use the GUFI

As a way to test out the concepts and implementation, start converting the
existing vexpress-sysreg driver so that it uses the GUFI.  The intent is to
(a) act as a test for the idea, and (b) be very clear on how extensive (or
not) the changes actually are.  The goal is to make it so the changes can
be done almost entirely with a sed script.

Signed-off-by: Al Stone <al.stone@linaro.org>
Merge branch 'gufi' of github.com:ahs3/leg-kernel into gufi

Conflicts:
	drivers/gufi/gufi.c
	include/linux/gufi.h