From: Vasily Khoruzhick <anarsoul@gmail.com>
To: Ben Dooks <ben@simtec.co.uk>
Cc: Ben Dooks <ben-linux@fluff.org>,
"Arnaud Patard (Rtp)" <arnaud.patard@rtp-net.org>,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH RFC] h1940: use gpiolib for latch access
Date: Thu, 19 Aug 2010 16:56:27 +0300 [thread overview]
Message-ID: <201008191656.36727.anarsoul@gmail.com> (raw)
In-Reply-To: <4C5986AB.40103@simtec.co.uk>
[-- Attachment #1: Type: Text/Plain, Size: 1536 bytes --]
В сообщении от 4 августа 2010 18:26:35 автор Ben Dooks написал:
> > /* Configures BT serial port GPIOs */
> > s3c_gpio_cfgpin(S3C2410_GPH(0), S3C2410_GPH0_nCTS0);
> >
> > - s3c_gpio_cfgpull(S3C2410_GPH(0), S3C_GPIO_PULL_NONE);
> > + s3c_gpio_setpull(S3C2410_GPH(0), S3C_GPIO_PULL_NONE);
> >
> > s3c_gpio_cfgpin(S3C2410_GPH(1), S3C2410_GPIO_OUTPUT);
> >
> > - s3c_gpio_cfgpull(S3C2410_GPH(1), S3C_GPIO_PULL_NONE);
> > + s3c_gpio_setpull(S3C2410_GPH(1), S3C_GPIO_PULL_NONE);
> >
> > s3c_gpio_cfgpin(S3C2410_GPH(2), S3C2410_GPH2_TXD0);
> >
> > - s3c_gpio_cfgpull(S3C2410_GPH(2), S3C_GPIO_PULL_NONE);
> > + s3c_gpio_setpull(S3C2410_GPH(2), S3C_GPIO_PULL_NONE);
> >
> > s3c_gpio_cfgpin(S3C2410_GPH(3), S3C2410_GPH3_RXD0);
> >
> > - s3c_gpio_cfgpull(S3C2410_GPH(3), S3C_GPIO_PULL_NONE);
> > + s3c_gpio_setpull(S3C2410_GPH(3), S3C_GPIO_PULL_NONE);
>
> Is this an error, or have you merged a part of a different patch
> into this one?
Will move into separate patch
> > +#define H1940_PA_LATCH (S3C2410_CS2)
> > +
> > +#define H1940_LATCH_GPIO(x) (S3C_GPIO_END + x)
> > +
> > +#define H1940_LATCH_BIT(x) (1 << (x + 16 - S3C_GPIO_END))
>
> you probably want an () around the 'x's in the above defines.
Yep
> computing the bit seperately to the call to h1940_latch_control
> would have made the code easier to read.
>
> > + h1940_latch_control(value ? 0 : (1 << (offset + 16)),
> > + value ? (1 << (offset + 16)) : 0);
Ok
Regards
Vasily
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: anarsoul@gmail.com (Vasily Khoruzhick)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC] h1940: use gpiolib for latch access
Date: Thu, 19 Aug 2010 16:56:27 +0300 [thread overview]
Message-ID: <201008191656.36727.anarsoul@gmail.com> (raw)
In-Reply-To: <4C5986AB.40103@simtec.co.uk>
? ????????? ?? 4 ??????? 2010 18:26:35 ????? Ben Dooks ???????:
> > /* Configures BT serial port GPIOs */
> > s3c_gpio_cfgpin(S3C2410_GPH(0), S3C2410_GPH0_nCTS0);
> >
> > - s3c_gpio_cfgpull(S3C2410_GPH(0), S3C_GPIO_PULL_NONE);
> > + s3c_gpio_setpull(S3C2410_GPH(0), S3C_GPIO_PULL_NONE);
> >
> > s3c_gpio_cfgpin(S3C2410_GPH(1), S3C2410_GPIO_OUTPUT);
> >
> > - s3c_gpio_cfgpull(S3C2410_GPH(1), S3C_GPIO_PULL_NONE);
> > + s3c_gpio_setpull(S3C2410_GPH(1), S3C_GPIO_PULL_NONE);
> >
> > s3c_gpio_cfgpin(S3C2410_GPH(2), S3C2410_GPH2_TXD0);
> >
> > - s3c_gpio_cfgpull(S3C2410_GPH(2), S3C_GPIO_PULL_NONE);
> > + s3c_gpio_setpull(S3C2410_GPH(2), S3C_GPIO_PULL_NONE);
> >
> > s3c_gpio_cfgpin(S3C2410_GPH(3), S3C2410_GPH3_RXD0);
> >
> > - s3c_gpio_cfgpull(S3C2410_GPH(3), S3C_GPIO_PULL_NONE);
> > + s3c_gpio_setpull(S3C2410_GPH(3), S3C_GPIO_PULL_NONE);
>
> Is this an error, or have you merged a part of a different patch
> into this one?
Will move into separate patch
> > +#define H1940_PA_LATCH (S3C2410_CS2)
> > +
> > +#define H1940_LATCH_GPIO(x) (S3C_GPIO_END + x)
> > +
> > +#define H1940_LATCH_BIT(x) (1 << (x + 16 - S3C_GPIO_END))
>
> you probably want an () around the 'x's in the above defines.
Yep
> computing the bit seperately to the call to h1940_latch_control
> would have made the code easier to read.
>
> > + h1940_latch_control(value ? 0 : (1 << (offset + 16)),
> > + value ? (1 << (offset + 16)) : 0);
Ok
Regards
Vasily
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100819/9c1b9448/attachment.sig>
next prev parent reply other threads:[~2010-08-19 13:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-25 16:41 [PATCH RFC] h1940: use gpiolib for latch access Vasily Khoruzhick
2010-07-25 16:41 ` Vasily Khoruzhick
2010-07-25 22:35 ` Russell King - ARM Linux
2010-07-25 22:35 ` Russell King - ARM Linux
2010-07-26 5:40 ` Vasily Khoruzhick
2010-07-26 5:40 ` Vasily Khoruzhick
2010-08-04 15:26 ` Ben Dooks
2010-08-04 15:26 ` Ben Dooks
2010-08-19 13:56 ` Vasily Khoruzhick [this message]
2010-08-19 13:56 ` Vasily Khoruzhick
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=201008191656.36727.anarsoul@gmail.com \
--to=anarsoul@gmail.com \
--cc=arnaud.patard@rtp-net.org \
--cc=ben-linux@fluff.org \
--cc=ben@simtec.co.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.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 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.