linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: David Daney <ddaney@caviumnetworks.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	William Breathitt Gray <vilhelm.gray@gmail.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Phil Reid <preid@electromag.com.au>,
	David Daney <david.daney@cavium.com>,
	Iban Rodriguez <irodriguez@cemitec.com>,
	Mathias Duckeck <m.duckeck@kunbus.de>,
	Phil Elwell <phil@raspberrypi.org>,
	linux-gpio@vger.kernel.org
Subject: Re: [PATCH v2 5/5] gpio: Add driver for Maxim MAX3191x industrial serializer
Date: Sat, 14 Oct 2017 13:24:46 +0200	[thread overview]
Message-ID: <20171014112446.GA23429@wunner.de> (raw)
In-Reply-To: <86333441-4c2b-3e3d-853f-eddadf446956@caviumnetworks.com>

On Fri, Oct 13, 2017 at 03:12:41PM -0700, David Daney wrote:
> There are a maximum of two banks.
> 
> For some thunderx SoCs there is only a single bank, so my code has exactly
> one iteration.  For the SoCs with two banks, my code has exactly two
> iterations.  There are no function calls in the loop.

Fair enough.  So as you've pointed out, if the number of GPIOs per bank
is identical to the number of bits in an unsigned long, the iteration
count is the same with both algorithms and just iterating over the
banks results in simpler and less code.  Doubly so if there's just
one or two banks.  Those are good points.

The situation is different with e.g. gpio-max3191x.c and gpio-74x164.c
where each bank has only 8 GPIOs.


> I can't believe I have spent so much time on this issue, for which no matter
> what you do, will not impact system performance in any measurable way.

The use case that I'm referring to in the cover letter of this series
are PLCs which poll all inputs and write all outputs in cycles of e.g.
every 500 us to 10 ms, so optimizations pay off.

Thanks,

Lukas

  reply	other threads:[~2017-10-14 11:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 10:40 [PATCH v2 0/5] GPIO driver for Maxim MAX3191x Lukas Wunner
     [not found] ` <cover.1507797496.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-10-12 10:40   ` [PATCH v2 4/5] dt-bindings: gpio: max3191x: Document new driver Lukas Wunner
2017-10-17 20:30     ` Rob Herring
     [not found]     ` <57660f421f2080914940806394a9365ac959f5a8.1507797496.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-10-19 20:36       ` Linus Walleij
2017-10-12 10:40   ` [PATCH v2 5/5] gpio: Add driver for Maxim MAX3191x industrial serializer Lukas Wunner
2017-10-13 11:11     ` Lukas Wunner
2017-10-13 16:53       ` David Daney
2017-10-13 21:29         ` Lukas Wunner
2017-10-13 22:12           ` David Daney
2017-10-14 11:24             ` Lukas Wunner [this message]
2017-10-19 20:41     ` Linus Walleij
2017-10-12 10:40 ` [PATCH v2 3/5] dt-bindings: Document common property for daisy-chained devices Lukas Wunner
     [not found]   ` <f0c3b0c5514f74717c5783360b60062dfe9b8c0f.1507797496.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-10-15 11:30     ` Jonathan Cameron
2017-10-17 20:32     ` Rob Herring
2017-10-19 20:35     ` Linus Walleij
2017-10-12 10:40 ` [PATCH v2 1/5] bitops: Introduce assign_bit() Lukas Wunner
2017-10-12 18:30   ` Andrew Morton
2017-10-13 12:44   ` Linus Walleij
2017-10-12 10:40 ` [PATCH v2 2/5] gpio: Introduce ->get_multiple callback Lukas Wunner
2017-10-13 12:46   ` Linus Walleij
2017-10-13 12:48 ` [PATCH v2 0/5] GPIO driver for Maxim MAX3191x Linus Walleij

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=20171014112446.GA23429@wunner.de \
    --to=lukas@wunner.de \
    --cc=david.daney@cavium.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=geert+renesas@glider.be \
    --cc=irodriguez@cemitec.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=m.duckeck@kunbus.de \
    --cc=phil@raspberrypi.org \
    --cc=preid@electromag.com.au \
    --cc=vilhelm.gray@gmail.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).