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

This reverts commit 34ec4c7831 which is
commit f6c052afe6f802d87c74153b7a57c43b2e9faf07 upstream.

It breaks the Android kernel api, and isn't even really needed in the
5.10.y kernel tree yet, as there are no users of the new field.  So
revert it for now.  If it is needed, it can be brought back in an
abi-safe way in the future.

Bug: 161946584
Change-Id: I85af757d31cf1d9ef5b0ac3c36d8c2ee67f9bc7f
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2023-02-18 09:12:29 +00:00
parent 570621d64f
commit b34e092097
2 changed files with 2 additions and 4 deletions

View File

@@ -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 if (!config->ignore_wp)
else
nvmem->wp_gpio = gpiod_get_optional(config->dev, "wp",
GPIOD_OUT_HIGH);
if (IS_ERR(nvmem->wp_gpio)) {

View File

@@ -49,8 +49,7 @@ 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
* @ignore_wp: Write Protect pin is managed by the provider.
* @wp-gpio: Write protect pin
*
* 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
@@ -70,7 +69,6 @@ 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;