nvmem: Add backwards compatibility support for older EEPROM drivers.

Older drivers made an 'eeprom' file available in the /sys device
directory. Have the NVMEM core provide this to retain backwards
compatibility.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Andrew Lunn
2016-02-26 20:59:19 +01:00
committed by Greg Kroah-Hartman
parent 811b0d6538
commit b6c217ab9b
2 changed files with 79 additions and 9 deletions

View File

@@ -24,6 +24,9 @@ struct nvmem_config {
int ncells;
bool read_only;
bool root_only;
/* To be only used by old driver/misc/eeprom drivers */
bool compat;
struct device *base_dev;
};
#if IS_ENABLED(CONFIG_NVMEM)
@@ -44,5 +47,4 @@ static inline int nvmem_unregister(struct nvmem_device *nvmem)
}
#endif /* CONFIG_NVMEM */
#endif /* ifndef _LINUX_NVMEM_PROVIDER_H */