mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@infradead.org>
To: Azael Avalos <coproscefalo@gmail.com>
Cc: "platform-driver-x86@vger.kernel.org" 
	<platform-driver-x86@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] toshiba_acpi: Fix keyboard backight sysfs entries not being updated
Date: Fri, 20 Nov 2015 16:46:47 -0800	[thread overview]
Message-ID: <20151121004647.GM7413@malice.jf.intel.com> (raw)
In-Reply-To: <CAGdLNWF66_R1DB3mQDqTMQMxUMLv9zidOc+upa-AabFQBzkqGA@mail.gmail.com>

On Fri, Nov 20, 2015 at 04:55:06PM -0700, Azael Avalos wrote:
> Hi Darren,
> 
> 2015-11-20 16:39 GMT-07:00 Darren Hart <dvhart@infradead.org>:
> > On Mon, Nov 16, 2015 at 12:59:31PM -0700, Azael Avalos wrote:
> >> Certain Toshiba models with the second generation keyboard backlight
> >> (type 2) do not generate the keyboard backlight changed event (0x92),
> >> and thus, the sysfs entries are never being updated.
> >>
> >> This patch adds a workquee and a global boolean variable to address
> >> the issue.
> >>
> >> For those models that do generate the event, the sysfs entries are
> >> being updated via the *notify function and the boolean is set to
> >> true to avoid a second call to update the entries.
> >>
> >> For those models that do not generate the event, the workquee is
> >> used to update the sysfs entries and also to emulate the event via
> >> netlink, to make userspace aware of such change.
> >
> > Thanks Azael,
> >
> > Rather than ask you to wait while I research workqueues and their use more, what
> > is it about this task that requires a workqueue? Why can we not call what's in
> > the workqueue below directly from the kbd_backlight_mode_store sysfs write
> > callback?
> 
> I used the workquee to let the sysfs *store function to finish w/o affecting
> the "refresh" of the sysfs entries.
> 
> Previously the sysfs_update_group resided inside the *store function,
> but caused a lock everytime the keyboard mode was changed, and the
> sysfs entries were never updated, this was fixed by moving such function
> to the *notify function, but turns out that some models do not fire such
> event.

OK, got it - thanks. Now:

drivers/platform/x86/toshiba_acpi.c: In function ‘toshiba_acpi_kbd_bl_work’:
drivers/platform/x86/toshiba_acpi.c:1547:12: error: ‘toshiba_attr_group’
undeclared (first use in this function)
           &toshiba_attr_group))
	               ^
Looks like your static global declaration just comes too late, but... how did
this compile for you?

-- 
Darren Hart
Intel Open Source Technology Center

      reply	other threads:[~2015-11-21  0:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16 19:59 Azael Avalos
2015-11-20 23:39 ` Darren Hart
2015-11-20 23:55   ` Azael Avalos
2015-11-21  0:46     ` Darren Hart [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=20151121004647.GM7413@malice.jf.intel.com \
    --to=dvhart@infradead.org \
    --cc=coproscefalo@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

Powered by JetHome