From: Lee Jones <lee.jones@linaro.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] mfd: intel_quark_i2c_gpio: enable MSI interrupt
Date: Wed, 24 Mar 2021 15:10:35 +0000 [thread overview]
Message-ID: <20210324151035.GO2916463@dell> (raw)
In-Reply-To: <YFtKo4IrOGWoX6O3@smile.fi.intel.com>
On Wed, 24 Mar 2021, Andy Shevchenko wrote:
> On Wed, Mar 24, 2021 at 01:07:23PM +0000, Lee Jones wrote:
> > On Wed, 24 Mar 2021, Andy Shevchenko wrote:
> >
> > > On Wed, Mar 24, 2021 at 11:50:33AM +0000, Lee Jones wrote:
> > > > On Wed, 24 Mar 2021, Andy Shevchenko wrote:
> > > >
> > > > > On Wed, Mar 24, 2021 at 10:47:29AM +0000, Lee Jones wrote:
> > > > > > On Wed, 24 Mar 2021, Andy Shevchenko wrote:
> > > > > > > On Wed, Mar 24, 2021 at 10:29:31AM +0000, Lee Jones wrote:
> > > > > > > > On Tue, 23 Mar 2021, Andy Shevchenko wrote:
> > > > >
> > > > > ...
> > > > >
> > > > > > Also, past acceptance does not guarantee ideal/correct usage.
> > > > >
> > > > > In this case it's hardly can be misused. But I heard you.
> > > > >
> > > > > ...
> > > > >
> > > > > > > The semantic is min-max range and having two defines (*) here for these seems
> > > > > > > to me as an utter overkill.
> > > > > > >
> > > > > > > Of course, if you insist I may do it.
> > > > > > >
> > > > > > > *) since value is the same, we might have one definition, but it will be even
> > > > > > > more confusion to have it as a min and max at the same time.
> > > > > >
> > > > > > It's just tricky to decypher for people who do not know the API, which
> > > > > > is most people, myself included. For APIs like usleep_range() et al.,
> > > > > > obviously this makes no sense at all.
> > > > >
> > > > > Seem like you are insisting. Okay, I will define them. What do you prefer one
> > > > > or two definitions?
> > > >
> > > > Actually I'm not. I'm just trying to get my head around where the
> > > > data comes from and what the values actually mean.
> > > >
> > > > > ...
> > > > >
> > > > > > What defines a vector?
> > > > >
> > > > > The combination is solely of the driver-hardware. Driver explicitly tells that
> > > > > how many vectors it may consume (taking into account the range asked) and API
> > > > > returns amount given or an error.
> > > >
> > > > So, where does the information actually come from?
> > > >
> > > > Information that comes from a datasheet is usually defined.
> > > >
> > > > Information that comes from the F/W is usually read and popped into a
> > > > variable.
> > >
> > > It's a two way road:
> > > a) driver states that it needs only 1 vector and it's enough to it
> > > b) hardware must provide at least 1 vector to be served by this driver.
> > >
> > > Look again into grepped output. Most of drivers that define it as an variable
> > > may dynamically adapt to the different amount of IRQ vectors. When it's static,
> > > usually drivers just hard code those values.
> > >
> > > I'm really don't see a point to define them _in this driver_.
> >
> > That's fine. I just felt like I had to ask.
> >
> > Would you consider a comment that lets people unfamiliar with the API
> > what the values mean?
> >
> > Something to the tune of:
> >
> > "This driver requests 1 (and only 1) IRQ vector"
>
>
> Rather
>
> "This driver requests only 1 (and it's enough) IRQ vector"
"This driver only requires 1 IRQ vector"
> or something like this.
>
> Should I send a patch with the comment included? If so, please suggest if it's
> good from English grammar/style perspective.
>
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2021-03-24 15:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-23 12:34 [PATCH v2 1/2] mfd: intel_quark_i2c_gpio: Reuse BAR definitions for MFD cell indexing Andy Shevchenko
2021-03-23 12:34 ` [PATCH v2 2/2] mfd: intel_quark_i2c_gpio: enable MSI interrupt Andy Shevchenko
2021-03-24 10:29 ` Lee Jones
2021-03-24 10:39 ` Andy Shevchenko
2021-03-24 10:47 ` Lee Jones
2021-03-24 11:20 ` Andy Shevchenko
2021-03-24 11:50 ` Lee Jones
2021-03-24 12:26 ` Andy Shevchenko
2021-03-24 13:07 ` Lee Jones
2021-03-24 14:20 ` Andy Shevchenko
2021-03-24 15:10 ` Lee Jones [this message]
2021-03-24 15:20 ` Andy Shevchenko
2021-03-24 10:29 ` [PATCH v2 1/2] mfd: intel_quark_i2c_gpio: Reuse BAR definitions for MFD cell indexing Lee Jones
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=20210324151035.GO2916463@dell \
--to=lee.jones@linaro.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.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).