Revert "Revert "nvmem: core: Fix a conflict between MTD and NVMEM on wp-gpios property""
This reverts commit b34e092097
.
It needs to come back to handle the 5.10.169 merge properly, it will be
reverted again afterward to resolve the abi issues.
Bug: 161946584
Change-Id: I8ff6a57edb206a515edd856341e0a916cc4d9c08
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
b34e092097
commit
bb0ae42d0b
@ -629,7 +629,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)) {
|
||||
|
@ -49,7 +49,8 @@ enum nvmem_type {
|
||||
* @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
|
||||
@ -69,6 +70,7 @@ struct nvmem_config {
|
||||
enum nvmem_type type;
|
||||
bool read_only;
|
||||
bool root_only;
|
||||
bool ignore_wp;
|
||||
bool no_of_node;
|
||||
nvmem_reg_read_t reg_read;
|
||||
nvmem_reg_write_t reg_write;
|
||||
|
Loading…
Reference in New Issue
Block a user