BACKPORT: mmc: core: Export device lifetime information through sysfs
authorJungseung Lee <js07.lee@samsung.com>
Thu, 22 Dec 2016 03:37:34 +0000 (12:37 +0900)
committerJin Qian <jinqian@google.com>
Mon, 20 Mar 2017 22:23:20 +0000 (22:23 +0000)
commitbc5b6dd5dfd838f7338e8d1ae42f670adc1a4d03
treec0ff663c0777507ca52df52586a9af267d7b3be9
parentb631d8c06f64f744f272bedbe8839f8d687db6da
BACKPORT: mmc: core: Export device lifetime information through sysfs

In the eMMC 5.0 version of the spec, several EXT_CSD fields about
device lifetime are added.

 - Two types of estimated indications reflected by averaged wear out of memory
 - An indication reflected by average reserved blocks

Export the information through sysfs.

Signed-off-by: Jungseung Lee <js07.lee@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/mmc.c
include/linux/mmc/card.h
include/linux/mmc/mmc.h