From: Stephen Warren <swarren@nvidia.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Linus Walleij" <linus.walleij@linaro.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>
Subject: RE: [PATCH] Documentation/pinctrl: various minor fixes
Date: Thu, 8 Dec 2011 14:24:46 -0800 [thread overview]
Message-ID: <74CDBE0F657A3D45AFBB94109FB122FF1750B77B9F@HQMAIL01.nvidia.com> (raw)
In-Reply-To: <1323382892-28298-1-git-send-email-u.kleine-koenig@pengutronix.de>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1221 bytes --]
Uwe Kleine-König wrote at Thursday, December 08, 2011 3:22 PM:
> - add some consts
> - don't use the group index alone to determine the value to write to
> foo's mux register. For spi and i2c the group index is always 0.
> Additionally using the function index makes much more sense as it
> generates a different value for each function/group pair.
> - fix a few syntax errors
> @@ -600,7 +600,7 @@ static int foo_get_groups(struct pinctrl_dev *pctldev, unsigned selector,
> int foo_enable(struct pinctrl_dev *pctldev, unsigned selector,
> unsigned group)
> {
> - u8 regbit = (1 << group);
> + u8 regbit = (1 << selector + group);
>
> writeb((readb(MUX)|regbit), MUX)
> return 0;
> @@ -609,7 +609,7 @@ int foo_enable(struct pinctrl_dev *pctldev, unsigned selector,
> int foo_disable(struct pinctrl_dev *pctldev, unsigned selector,
> unsigned group)
> {
> - u8 regbit = (1 << group);
> + u8 regbit = (1 << selector);
>
> writeb((readb(MUX) & ~(regbit)), MUX)
> return 0;
Shouldn't those two regbit calculations match?
--
nvpublic
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2011-12-08 22:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-08 22:21 [PATCH] Documentation/pinctrl: various minor fixes Uwe Kleine-König
2011-12-08 22:24 ` Stephen Warren [this message]
2011-12-08 22:31 ` Uwe Kleine-König
2011-12-08 22:36 ` [PATCH v2] " Uwe Kleine-König
2011-12-08 22:41 ` Stephen Warren
2011-12-09 11:02 ` Linus Walleij
2012-01-19 21:35 ` [PATCH] Documentation/pinctrl: fix a few syntax errors in code examples Uwe Kleine-König
2012-01-24 21:45 ` 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=74CDBE0F657A3D45AFBB94109FB122FF1750B77B9F@HQMAIL01.nvidia.com \
--to=swarren@nvidia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=u.kleine-koenig@pengutronix.de \
/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).