Revert "Revert "nvmem: core: Fix a conflict between MTD and NVMEM on wp-gpios property""

This reverts commit 165953b352.

It is no longer needed as we can modify the KABI at this point in time.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9470b62f88f1099b028c3ac24c25eb5ac3fa0ba4
This commit is contained in:
Greg Kroah-Hartman
2022-03-16 15:52:13 +01:00
committed by Todd Kjos
parent acd0c09fbb
commit a6abedbff6
2 changed files with 4 additions and 2 deletions

View File

@@ -768,7 +768,7 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)
if (config->wp_gpio)
nvmem->wp_gpio = config->wp_gpio;
else
else if (!config->ignore_wp)
nvmem->wp_gpio = gpiod_get_optional(config->dev, "wp",
GPIOD_OUT_HIGH);
if (IS_ERR(nvmem->wp_gpio)) {

View File

@@ -66,7 +66,8 @@ struct nvmem_keepout {
* @word_size: Minimum read/write access granularity.
* @stride: Minimum read/write access stride.
* @priv: User context passed to read/write callbacks.
* @wp-gpio: Write protect pin
* @wp-gpio: Write protect pin
* @ignore_wp: Write Protect pin is managed by the provider.
*
* Note: A default "nvmem<id>" name will be assigned to the device if
* no name is specified in its configuration. In such case "<id>" is
@@ -88,6 +89,7 @@ struct nvmem_config {
enum nvmem_type type;
bool read_only;
bool root_only;
bool ignore_wp;
struct device_node *of_node;
bool no_of_node;
nvmem_reg_read_t reg_read;