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)
committerAmit Pundir <amit.pundir@linaro.org>
Mon, 10 Apr 2017 07:42:16 +0000 (13:12 +0530)
commitf118138a6c78fe21ae46f68063a0799ef16b17e5
tree8c5afecf29e3df73bb4731042a9e6d9be9560e8e
parent7ff27b01370c4901258140ccfc2e6464ab69a82c
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