From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: Jaya Kumar <jayakumar.lkml@gmail.com>
Cc: Eric Miao <eric.miao@marvell.com>,
linux-fbdev-devel@lists.sourceforge.net,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-arm-kernel@lists.arm.linux.org.uk
Subject: Re: [RFC 2.6.27 1/2] fbdev: add E-Ink Broadsheet controller support v2
Date: Thu, 25 Dec 2008 15:17:25 +0100 [thread overview]
Message-ID: <18771.38389.730967.119264@ipc1.ka-ro> (raw)
In-Reply-To: <1230209500424-git-send-email-jayakumar.lkml@gmail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]
Jaya Kumar writes:
> +static void broadsheet_send_cmdargs(struct broadsheetfb_par *par, u16 cmd,
> + int argc, u16 *argv)
> +{
> + int i;
> +
> + par->board->wait_for_rdy(par);
> +
You should probably check the return value of wait_for_rdy() and
distinguish between:
== 0 => the GPIO was not found asserted within the timeout period
< 0 => the wait was interrupted due to a signal
> 0 => OK
Only in the last case the RDY_GPIO_PIN actually signalled a READY
condition. In the other two cases you might not expect the hardware to
do what you actually want it to do.
Otherwise you should probably better use the plain wait_event()
instead of wait_event_interruptible_timeout() in the wait_for_rdy()
function which only returns when the expected condition has been
found (but may block indefinitely when the condition never occurs).
Lothar Wa���mann
--
___________________________________________________________
Ka-Ro electronics GmbH | Pascalstra���e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch���ftsf���hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
www.karo-electronics.de | info@karo-electronics.de
___________________________________________________________
[-- Attachment #2: Type: text/plain, Size: 79 bytes --]
------------------------------------------------------------------------------
[-- Attachment #3: Type: text/plain, Size: 182 bytes --]
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
prev parent reply other threads:[~2008-12-25 14:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-25 12:51 [RFC 2.6.27 1/2] fbdev: add E-Ink Broadsheet controller support v2 Jaya Kumar
2008-12-25 12:51 ` [RFC 2.6.27 2/2] mach-pxa: add AM300 platform driver Jaya Kumar
2008-12-25 14:17 ` Lothar Waßmann [this message]
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=18771.38389.730967.119264@ipc1.ka-ro \
--to=lw@karo-electronics.de \
--cc=eric.miao@marvell.com \
--cc=geert@linux-m68k.org \
--cc=jayakumar.lkml@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/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).