From: Andrew Jeffery <andrew@aj.id.au>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Joel Stanley <joel@jms.id.au>,
Alexandre Courbot <gnurou@gmail.com>,
Mark Rutland <mark.rutland@arm.com>,
Rob Herring <robh+dt@kernel.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Jeremy Kerr <jk@ozlabs.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 5/8] pinctrl: Add core support for Aspeed SoCs
Date: Tue, 23 Aug 2016 12:00:51 +0930 [thread overview]
Message-ID: <1471919451.5707.89.camel@aj.id.au> (raw)
In-Reply-To: <CACRpkdaBuwqGPbfLK8bR5A4NSefifw8VqPyUbgtAtweqoEnD7g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2275 bytes --]
On Mon, 2016-08-22 at 15:45 +0200, Linus Walleij wrote:
> On Fri, Aug 19, 2016 at 2:44 PM, Andrew Jeffery <andrew@aj.id.au> wrote:
>
> >
> > +++ b/drivers/pinctrl/aspeed/Kconfig
> > @@ -0,0 +1,8 @@
> > +config PINCTRL_ASPEED
> > + bool
> > + depends on (ARCH_ASPEED || COMPILE_TEST) && OF
> > + select PINMUX
> > + select PINCONF
> > + select GENERIC_PINCONF
> > + select MFD_SYSCON
> > + select REGMAP_MMIO
> Since this device is spawn from the syscon, should it not be
> "depends on MFD_SYSCON"?
>
> (No big deal, if you think this is right then go with it.)
I think that's a fair point, I will look at rearranging it.
>
> >
> > +#include
> What is this include for?
Cruft from past iterations. Will remove.
>
> >
> > +#include
> > +#include
> > +#include
> > +#include
> > +#include "../core.h"
> > +#include "pinctrl-aspeed.h"
> No #include ?
>
> Maybe some #includes are centralized to pinctrl-aspeed.h
> I don't know, just make sure you don't have implicit includes.
linux/regmap.h is included in pinctrl-aspeed.h
>
> >
> > + if (regmap_read(map, desc->reg, &val) < 0)
> > + return false;
> > +
> > + val &= ~desc->mask;
> > + val |= pattern << __ffs(desc->mask);
> > +
> > + if (regmap_write(map, desc->reg, val) < 0)
> > + return false;
> Use:
>
> regmap_update_bits(map,
> desc->reg,
> desc->mask,
> pattern << __ffs->desc->mask);
>
> Or something like that instead of reimplementing
> mask-and-set. Regmap already knows how to do the
> business.
>
> (Applied everywhere in the driver where you have a
> mask-and-set like this).
Right, I will clean that up.
>
> The expression core engine is still a complete mystery
> for me, I will just trust you that it works as intended.
Gah! However, thanks!
I will clean up the issues above and re-send.
Cheers,
Andrew
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-08-23 2:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-19 12:44 [PATCH v2 0/8] aspeed: Add pinctrl and gpio drivers Andrew Jeffery
2016-08-19 12:44 ` [PATCH v2 1/8] MAINTAINERS: Add glob for Aspeed devicetree bindings Andrew Jeffery
2016-08-30 6:04 ` Joel Stanley
2016-08-19 12:44 ` [PATCH v2 2/8] syscon: dt-bindings: Add documentation for Aspeed system control units Andrew Jeffery
2016-08-23 17:19 ` Rob Herring
2016-08-30 6:04 ` Joel Stanley
2016-08-19 12:44 ` [PATCH v2 3/8] pinctrl: dt-bindings: Add documentation for Aspeed pin controllers Andrew Jeffery
2016-08-23 17:23 ` Rob Herring
2016-08-24 0:06 ` Andrew Jeffery
2016-08-30 6:05 ` Joel Stanley
2016-08-19 12:44 ` [PATCH v2 4/8] gpio: dt-bindings: Add documentation for Aspeed GPIO controllers Andrew Jeffery
2016-08-19 14:36 ` Rob Herring
2016-08-22 0:16 ` Andrew Jeffery
2016-08-30 6:04 ` Joel Stanley
2016-08-19 12:44 ` [PATCH v2 5/8] pinctrl: Add core support for Aspeed SoCs Andrew Jeffery
2016-08-22 13:45 ` Linus Walleij
2016-08-23 2:30 ` Andrew Jeffery [this message]
2016-08-30 6:04 ` Joel Stanley
2016-08-19 12:44 ` [PATCH v2 6/8] pinctrl: Add pinctrl-aspeed-g4 driver Andrew Jeffery
2016-08-30 6:04 ` Joel Stanley
2016-08-19 12:44 ` [PATCH v2 7/8] pinctrl: Add pinctrl-aspeed-g5 driver Andrew Jeffery
2016-08-30 6:04 ` Joel Stanley
2016-08-19 12:44 ` [PATCH v2 8/8] gpio: Add Aspeed driver Andrew Jeffery
2016-08-22 13:48 ` 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=1471919451.5707.89.camel@aj.id.au \
--to=andrew@aj.id.au \
--cc=benh@kernel.crashing.org \
--cc=devicetree@vger.kernel.org \
--cc=gnurou@gmail.com \
--cc=jk@ozlabs.org \
--cc=joel@jms.id.au \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@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