linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Michael Auchter <michael.auchter@ni.com>
Cc: Khouloud Touil <ktouil@baylibre.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nvmem: ensure sysfs writes handle write-protect pin
Date: Tue, 28 Apr 2020 12:55:06 +0100	[thread overview]
Message-ID: <4fa69067-8993-1819-abb5-3ce718e17d36@linaro.org> (raw)
In-Reply-To: <20200427183914.333587-1-michael.auchter@ni.com>



On 27/04/2020 19:39, Michael Auchter wrote:
> Commit 2a127da461a9d8d97782d6e82b227041393eb4d2 added support for
> handling write-protect pins to the nvmem core, and commit
> 1c89074bf85068d1b86f2e0f0c2110fdd9b83c9f 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.
> 
> Signed-off-by: Michael Auchter <michael.auchter@ni.com>
> ---
>   drivers/nvmem/core.c | 52 ++++++++++++++++++++++----------------------
>   1 file changed, 26 insertions(+), 26 deletions(-)
> 

Applied fixes tag:
  Fixes: 2a127da461a9 ("nvmem: add support for the write-protect pin")


--srini

      reply	other threads:[~2020-04-28 11:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27 18:39 [PATCH] nvmem: ensure sysfs writes handle write-protect pin Michael Auchter
2020-04-28 11:55 ` Srinivas Kandagatla [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4fa69067-8993-1819-abb5-3ce718e17d36@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=ktouil@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.auchter@ni.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).