compal-laptop: add JHL90, battery & hwmon interface
compal-laptop: add JHL90, battery & hwmon interface

The driver now supports the Compal JHL90 (which I use) and it has some
added features.  The biggest novelties are a battery interface
(power_supply) and a temperature and fan control interface (hmwon).  It
also adds a power-off feature to the backlight subsystem and it exports a
few files that can enable/disable wake_on_XXX events.

Much of the original code of the old features is still there, but I've
changed some names to keep the naming more coherent with the added
functionalities.  (Sorry for the huge patch)

Some technical stuff about the new driver:

First of all, I'm not sure if the extra features also work on the other
Compal boards.  Currently they only get enabled if the DMI data indicates
you are on a JHL90 board.

Secondly, I've noticed a quirk in my fan controller.  I have to re-send
the wanted pwm-level to the controller every so often.  If I don't do
this, the fanspeed will slowly rise until after a couple of minutes it's
at full speed.  (Note that every normal userland application will probably
update the pwm-level every so often anyway, based on temperature readings,
so this might not be an issue in practice) If this turns out to be a
problem with all the controllers, maybe we should implement a kernel timer
and have the driver re-send the pwm level every XX seconds to make this
transparent to userspace?  (However, I couldn't immediately find a way to
do this cleanly.)

Additional information can be found in the source comments.

[5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org: coding-style fixes]
[5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org: add missing semicolon]
Signed-off-by: Roald Frederickx <467992b476c83eec0c733376c72cc0864a8e618f@gmail.com>
Cc: Matthew Garrett <10ea1ff373631291cadf45b163e9fbaf27d1200e@srcf.ucam.org>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Matthew Garrett <4cf8d479716eba9bc68e0146d95320fcb138b96b@redhat.com>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs