firmware: Google VPD sysfs driver
authorWei-Ning Huang <wnhuang@google.com>
Wed, 12 Apr 2017 16:56:19 +0000 (18:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Apr 2017 16:05:23 +0000 (18:05 +0200)
commit049a59db34eb4c41a0231f983f180053db8f80d4
tree7ea69c30732d0825bb6a744949af6a8fe8a26551
parentad2ac9d5c5e0e5fa7e21575d3cd9d0227803ea99
firmware: Google VPD sysfs driver

This patch introduces the Google Vital Product Data driver.

This driver reads Vital Product Data from coreboot tables and then
creates the corresponding sysfs entries under /sys/firmware/vpd to
provide easy access for userspace programs (does not require flashrom).

The sysfs is structured as follow:

 /sys/firmware/vpd
 |-- ro
 |   |-- key1
 |   `-- key2
 |-- ro_raw
 |-- rw
 |   `-- key1
 `-- rw_raw

Where ro_raw and rw_raw contain the raw VPD partition. The files under
ro and rw correspond to the key name in the VPD and the the file content
is the value for the key.

Signed-off-by: Wei-Ning Huang <wnhuang@google.com>
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/google/Kconfig
drivers/firmware/google/Makefile
drivers/firmware/google/vpd.c [new file with mode: 0644]