Files
linux/drivers
Michael Auchter b96fc5416b nvmem: ensure sysfs writes handle write-protect pin
Commit 2a127da461 ("nvmem: add support for the write-protect pin")
added support for handling write-protect pins to the nvmem core, and
Commit 1c89074bf8 ("eeprom: at24: remove the write-protect pin support")
retrofitted the at24 driver to use this support.

These changes broke write() on the nvmem sysfs attribute for eeproms
which utilize a write-protect pin, as the write callback invokes the
nvmem device's reg_write callback directly which no longer handles
changing the state of the write-protect pin.

Change the read and write callbacks for the sysfs attribute to invoke
nvmme_reg_read/nvmem_reg_write helpers which handle this, rather than
calling reg_read/reg_write directly.

Fixes: 2a127da461 ("nvmem: add support for the write-protect pin")
Signed-off-by: Michael Auchter <michael.auchter@ni.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200511145042.31223-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-15 16:20:02 +02:00
..
2020-05-11 09:17:15 +02:00
2020-04-27 09:34:02 +02:00
2020-04-10 11:32:22 +02:00
2020-05-11 09:17:15 +02:00
2020-04-04 18:07:59 -07:00
2020-04-16 13:52:31 -07:00
2020-03-19 23:04:32 -05:00
2020-05-11 09:17:15 +02:00
2020-04-23 17:05:40 +02:00
2020-04-17 06:05:29 -04:00
2020-04-20 10:19:22 -04:00
2020-03-19 07:41:03 +01:00