linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/5] nvmem: Add support for write-only instances
Date: Tue, 24 Mar 2020 14:24:21 +0000	[thread overview]
Message-ID: <PSXP216MB04387C07F1E4C827245DE98380F10@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <300e8095-3af4-15a2-069f-87ac7cbb83bb@linaro.org>

On Tue, Mar 24, 2020 at 01:25:46PM +0000, Srinivas Kandagatla wrote:
> 
> 
> On 24/03/2020 12:29, Greg KH wrote:
> > > But the Idea here is :
> > > We ended up with providing different options like read-only,root-only to
> > > nvmem providers combined with read/write callbacks.
> > > With that, there are some cases which are totally invalid, existing code
> > > does very minimal check to ensure that before populating with correct
> > > attributes to sysfs file. One of such case is with thunderbolt provider
> > > which supports only write callback.
> > > 
> > > With this new checks in place these flags and callbacks are correctly
> > > validated, would result in correct file attributes.
> > Why this crazy set of different groups?  You can set the mode of a sysfs
> > file in the callback for when the file is about to be created, that's so
> > much simpler and is what it is for.  This feels really hacky and almost
> > impossible to follow:(
> Thanks for the inputs, That definitely sounds much simpler to deal with.
> 
> Am guessing you are referring to is_bin_visible callback?
> 
> I will try to clean this up!
I am still onboard and willing do the work, but we may need to discuss
to be on the same page with new plans. How do you wish to do this?

Does this new approach still allow us to abort if we receive an invalid
configuration? Or do we still need to have something in nvmem_register()
to abort in invalid case?

The documentation of is_bin_visible says only read/write permissions are 
accepted. Does this mean that it will not take read-only or write-only? 
That is one way of interpreting it.

I am further studying up on what was said in this email chain.

Regards,
Nicholas

> 
> thanks,
> srini
> > 
> > thanks,
> > 
> > greg k-h

  parent reply	other threads:[~2020-03-24 14:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23 15:00 [PATCH 0/5] nvmem: patches (set 2) for 5.7 Srinivas Kandagatla
2020-03-23 15:00 ` [PATCH 1/5] nvmem: sprd: Fix the block lock operation Srinivas Kandagatla
2020-03-23 19:02   ` Greg KH
2020-03-23 15:00 ` [PATCH 2/5] nvmem: sprd: Optimize " Srinivas Kandagatla
2020-03-23 15:00 ` [PATCH 3/5] nvmem: sprd: Determine double data programming from device data Srinivas Kandagatla
2020-03-23 15:00 ` [PATCH 4/5] nvmem: mxs-ocotp: Use devm_add_action_or_reset() for cleanup Srinivas Kandagatla
2020-03-23 15:00 ` [PATCH 5/5] nvmem: Add support for write-only instances Srinivas Kandagatla
2020-03-23 19:05   ` Greg KH
2020-03-24  3:25     ` Nicholas Johnson
2020-03-24 12:24     ` Srinivas Kandagatla
2020-03-24 12:29       ` Greg KH
2020-03-24 13:25         ` Srinivas Kandagatla
2020-03-24 13:33           ` Greg KH
2020-03-24 14:24           ` Nicholas Johnson [this message]
2020-03-24 15:18             ` Greg KH
2020-03-24 15:59               ` Nicholas Johnson
2020-03-24 16:58             ` Srinivas Kandagatla
2020-03-23 19:06 ` [PATCH 0/5] nvmem: patches (set 2) for 5.7 Greg KH
2020-03-24 12:11   ` Srinivas Kandagatla

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=PSXP216MB04387C07F1E4C827245DE98380F10@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM \
    --to=nicholas.johnson-opensource@outlook.com.au \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    /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).