From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Magnus Damm <magnus.damm@gmail.com>,
"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Subject: Re: [PATCH 1/4] pinctrl: sh-pfc: r8a7790: add pin definitions for the I2C3 interface
Date: Tue, 17 Sep 2013 19:10:58 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.1309171907220.25596@axis700.grange> (raw)
In-Reply-To: <CACRpkdbDa5Smpfyneq-SAPYvbxB-ju7-X8kkZ7RFpNcYrcBggg@mail.gmail.com>
Hi Linus
On Tue, 17 Sep 2013, Linus Walleij wrote:
> On Mon, Sep 9, 2013 at 6:03 PM, Guennadi Liakhovetski
> <g.liakhovetski@gmx.de> wrote:
>
> > There are four I2C interfaces on r8a7790, each of them can be connected to
> > one of the two respective I2C controllers, e.g. interface #0 can be
> > configured to work with I2C0 or with IIC0. Additionally some of those
> > interfaces can also use one of several pin sets. Interface #3 is special,
> > because it can be used in automatic mode for DVFS. It only has one set
> > of pins available and those pins cannot be used for anything else, they
> > also lack the GPIO function.
> >
> > This patch uses the sh-pfc ability to configure pins, not associated with
> > GPIOs and adds support for I2C3 to the r8a7790 PFC set up.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
>
> Pls CC Laurent who is main reviewer on all sh-pfc stuff.
Sure, sorry, thanks for adding him.
> > +/* R8A7790 has 6 banks with 32 GPIOs in each = 192 GPIOs */
> > +#define ROW_GROUP_A(r) ('Z' - 'A' + 1 + (r))
> > +#define PIN_NUMBER(r, c) (((r) - 'A') * 16 + (c) + 200)
> > +#define PIN_A_NUMBER(r, c) PIN_NUMBER(ROW_GROUP_A(r), c)
>
> You add these #defines but do not use them.
ehm, actually I do:
+/* - I2C3 ------------------------------------------------------------------- */
+static const unsigned int i2c3_pins[] = {
+ /* SCL, SDA */
+ PIN_A_NUMBER('J', 15), PIN_A_NUMBER('H', 15),
+};
Besides, the PIN_NUMBER() macro is used in sh_pfc.h in the definition of
SH_PFC_PIN_NAMED(), and that macro is also used in this patch:
+ /* Pins not associated with a GPIO port */
+ SH_PFC_PIN_NAMED(ROW_GROUP_A('J'), 15, AJ15),
+ SH_PFC_PIN_NAMED(ROW_GROUP_A('H'), 15, AH15),
> Yours,
> Linus Walleij
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
next prev parent reply other threads:[~2013-09-17 17:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 16:03 [PATCH 0/4] ARM: shmobile: CPUFreq support on Lager Guennadi Liakhovetski
2013-09-09 16:03 ` [PATCH 1/4] pinctrl: sh-pfc: r8a7790: add pin definitions for the I2C3 interface Guennadi Liakhovetski
2013-09-17 12:20 ` Linus Walleij
2013-09-17 17:10 ` Guennadi Liakhovetski [this message]
2013-09-23 8:50 ` Linus Walleij
2013-09-25 4:51 ` Simon Horman
2013-09-25 8:46 ` Laurent Pinchart
2013-09-26 9:24 ` Guennadi Liakhovetski
2013-09-26 9:30 ` Laurent Pinchart
2013-09-09 16:03 ` [PATCH 2/4] ARM: shmobile: r8a7790: add I2C support in Device Tree mode Guennadi Liakhovetski
2013-09-25 8:52 ` Laurent Pinchart
2013-09-25 22:10 ` Guennadi Liakhovetski
2013-09-26 4:05 ` Magnus Damm
2013-09-26 7:07 ` Guennadi Liakhovetski
2013-09-26 9:32 ` Magnus Damm
2013-09-26 1:49 ` Simon Horman
2013-09-09 16:03 ` [PATCH 3/4] ARM: shmobile: r8a7790: add CPUFreq clock support Guennadi Liakhovetski
2013-09-25 4:58 ` Simon Horman
2013-09-09 16:03 ` [PATCH/RFC 4/4] ARM: shmobile: lager: add CPUFreq support Guennadi Liakhovetski
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=Pine.LNX.4.64.1309171907220.25596@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=g.liakhovetski+renesas@gmail.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@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
all inboxes | Powered by JetHome®