All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Gregory Fong <gregory.0xf0@gmail.com>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Doug Berger <opendmb@gmail.com>
Subject: Re: [PATCH] gpio: brcmstb: Do not use gc->pin2mask()
Date: Fri, 20 Oct 2017 18:39:47 +0200	[thread overview]
Message-ID: <CACRpkdaHx+=B=0xigumJieOOm99O=vuDQ-ZxFKjh7DGLxtjBtA@mail.gmail.com> (raw)
In-Reply-To: <CADtm3G71v3J9V==bAJBr-xxR2c3iWL32eh0dSg7o2v2C0oAQ2w@mail.gmail.com>

On Fri, Oct 20, 2017 at 5:51 PM, Gregory Fong <gregory.0xf0@gmail.com> wrote:
> Hi Linus,
>
> On Fri, Oct 20, 2017 at 6:48 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
>> The pin2mask() accessor only shuffles BIT ORDER in big endian systems,
>> i.e. the bitstuffing is swizzled big endian so "bit 0" is bit 7 or
>> bit 15 or bit 31 or so.
>>
>> The brcmstb only uses big endian BYTE ORDER which will be taken car of
>> by the ->write_reg() callback.
>>
>> Just use BIT(offset) to assign the bit.
>
> I believe the patches that Doug is putting together already take care
> of this, would you be OK with it being handled in there instead?

I would prefer that those changes base on top of this instead.

I need to get rid of ->pin2mask() for other GPIO improvements in
the core, like supporting .get_multiple() in gpio-mmio.

I can apply this to the devel branch per immediately so Doug can base
his work on top of it.

Yours,
Linus Walleij

  reply	other threads:[~2017-10-20 16:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-20 13:48 [PATCH] gpio: brcmstb: Do not use gc->pin2mask() Linus Walleij
2017-10-20 15:51 ` Gregory Fong
2017-10-20 16:39   ` Linus Walleij [this message]
2017-10-21  0:42     ` Gregory Fong
2017-10-22 18:26 ` Florian Fainelli

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='CACRpkdaHx+=B=0xigumJieOOm99O=vuDQ-ZxFKjh7DGLxtjBtA@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=f.fainelli@gmail.com \
    --cc=gregory.0xf0@gmail.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=opendmb@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.