Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1274550

Re: [PATCH] toshiba_acpi: Fix keyboard backight sysfs entries not being updated

From Azael Avalos <coproscefalo@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] toshiba_acpi: Fix keyboard backight sysfs entries not being updated
Date 2015-11-21 01:00 +0100
Message-ID <qx3KX-5Ka-15@gated-at.bofh.it> (permalink)
References <qvy6v-3b3-27@gated-at.bofh.it> <qx3Bh-5Gz-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.


Cheers
Azael


-- 
-- El mundo apesta y vosotros apestais tambien --
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] toshiba_acpi: Fix keyboard backight sysfs entries not being updated Azael Avalos <coproscefalo@gmail.com> - 2015-11-16 21:00 +0100
  Re: [PATCH] toshiba_acpi: Fix keyboard backight sysfs entries not  being updated Darren Hart <dvhart@infradead.org> - 2015-11-21 00:50 +0100
    Re: [PATCH] toshiba_acpi: Fix keyboard backight sysfs entries not  being updated Azael Avalos <coproscefalo@gmail.com> - 2015-11-21 01:00 +0100
      Re: [PATCH] toshiba_acpi: Fix keyboard backight sysfs entries not  being updated Darren Hart <dvhart@infradead.org> - 2015-11-21 01:50 +0100

csiph-web