CHROMIUM: chromeos_acpi: support for MLST and new NVRAM interface
authorVadim Bendebury <vbendeb@chromium.org>
Tue, 29 Mar 2011 21:39:49 +0000 (14:39 -0700)
committerGrant Grundler <grundler@google.com>
Thu, 24 May 2012 22:14:33 +0000 (15:14 -0700)
commitad1885e3070528fed1fe98730586ab72bff58d30
tree96320e8060cef87dd0e2e013f803b043aba8cb13
parent0e6b46d74510fe01d53cd586659760b72e81022a
CHROMIUM: chromeos_acpi: support for MLST and new NVRAM interface

This is a lump change integrating the following three CLs
from 2.6.32. It is done in one shot because there were
changes which sneaked in in between, and some of these CLs
cancel each other (enabling/disabling the ability to
modularize chromeos_acpi.c):

http://codereview.chromium.org/6576021
http://codereview.chromium.org/6673050
http://codereview.chromium.org/6732045

After applying the three patches the differences between
this and the 2.6.32 trees looked as follows:

kernel-next 98 > for f in drivers/platform/x86/chromeos.c \
 drivers/platform/x86/chromeos_acpi.c \
 drivers/platform/x86/chromeos_acpi.h \
 include/linux/chromeos_platform.h \
do
  echo "**** $f ***************";
  diff ../kernel/files/$f $f;
done
**** drivers/platform/x86/chromeos.c ***************
**** drivers/platform/x86/chromeos_acpi.c ***************
197d196
<       paa->dev_attr.attr.owner = THIS_MODULE;
584,585c583,584
<                       copy_size = min(element->string.length,
<                                       (u32)ACPI_NAME_SIZE);
---
>                       copy_size = min((int)element->string.length,
>                                       ACPI_NAME_SIZE);
**** drivers/platform/x86/chromeos_acpi.h ***************
**** include/linux/chromeos_platform.h ***************
13,15d12
< /* Checks whether ChromeOS platform was detected and initialized */
< extern bool chromeos_initialized(void);
<
28,32d24
< static inline bool chromeos_initialized(void)
< {
<       return false;
< }
<

The diff in chromeos_acpi.c is due to a different way of
fixing a compilation warning in different branches, this CL
consolidates the both branches to do the same.

The diff in chromeos_platform.h is in fact something which
should be removed in 2.6.32, it is not essential, just a
clean up leftover.

So, as submitted for review, the only source code file
different bewteen 2.6.32 and 2.6.37 is chromeos_platform.h
as shown above.

Change-Id: If0eab62ace389b26556506e32c427cff8ce37f15
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
BUG=chromium-os:13513
TEST=manual, see below.

. build an image using the changed code
. run the following commands:

localhost ~ # dmesg | grep chromeos_acpi
[    0.370261] chromeos_acpi: truncating buffer from 3750 to 1336
[    0.371307] chromeos_acpi: installed
localhost ~ # cat /sys/devices/platform/chromeos_acpi/VDAT |wc
     84    1336    4092
localhost ~ #

Review URL: http://codereview.chromium.org/6750013
drivers/platform/x86/Kconfig
drivers/platform/x86/chromeos.c
drivers/platform/x86/chromeos_acpi.c
drivers/platform/x86/chromeos_acpi.h
include/linux/chromeos_platform.h