From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Greg KH <gregkh@suse.de>
Cc: Frederick van der Wyck <fvanderwyck@gmail.com>,
mjg@redhat.com, platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Platform: Samsung Q10 backlight driver
Date: Wed, 16 Feb 2011 17:05:12 -0800 [thread overview]
Message-ID: <20110217010511.GB16004@core.coreip.homeip.net> (raw)
In-Reply-To: <20110216235807.GA6210@suse.de>
On Wed, Feb 16, 2011 at 03:58:07PM -0800, Greg KH wrote:
> On Wed, Feb 16, 2011 at 11:30:29PM +0000, Frederick van der Wyck wrote:
> > +
> > +static void samsungq10_bl_send_intensity(struct backlight_device *bd)
> > +{
> > + int brightness = bd->props.brightness;
> > +
> > + if (!samsungq10_suspended) {
> > + while (inb(0x64)&2)
> > + ;
> > + outb_p(0xbe, 0x64);
> > + while (inb(0x64)&2)
> > + ;
> > + outb_p(0x89, 0x60);
> > + while (inb(0x64)&2)
> > + ;
> > + outb_p(0x91, 0x60);
> > + while (inb(0x64)&2)
> > + ;
>
> Potentially endless loops are not good, please timeout if you don't get
> the proper value over a time.
Double not good since it is i8042 registers. Use
i8042_lock_chip()/i8042_command()/i8042_unlock_chip().
--
Dmitry
next prev parent reply other threads:[~2011-02-17 1:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-16 23:30 [PATCH] Platform: Samsung Q10 backlight driver Frederick van der Wyck
2011-02-16 23:58 ` Greg KH
2011-02-17 1:05 ` Dmitry Torokhov [this message]
2011-02-17 7:42 ` Dmitry Torokhov
2011-02-17 19:30 ` Frederick van der Wyck
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=20110217010511.GB16004@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=fvanderwyck@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox