linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Darren Hart <dvhart@infradead.org>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>,
	Richard Purdie <rpurdie@rpsys.net>,
	Jacek Anaszewski <j.anaszewski@samsung.com>,
	ibm-acpi-devel@lists.sourceforge.net,
	platform-driver-x86@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH v3 5/5] platform: x86: dell-*: Simplify dell-rbtn integration with dell-laptop [untested]
Date: Thu, 27 Oct 2016 12:38:45 +0200	[thread overview]
Message-ID: <20161027103845.GT12154@pali> (raw)
In-Reply-To: <20161026174118.3431-5-hdegoede@redhat.com>

On Wednesday 26 October 2016 19:41:18 Hans de Goede wrote:
> Use dell_smbios*notifier for dell-laptop to listen to dell-rbtn slider
> events, replace dell_rbtn_notifier_register() /
> dell_rbtn_notifier_unregister() with a single dell_rbtn_has_rfkill() used
> by dell-laptop to decide whether or not to use the i8042 filter and used
> by dell-rbtn to auto-remove its rfkill interface when called.
> 
> This results in a nice cleanup, downside is that the rfkill interface
> of dell-rbtn is not automatically re-enabled on rmmod dell-laptop, this
> now requires rmmod + insmod of dell-rbtn. But people who do not want
> dell-laptop for some reason will have it blacklisted anyways, so this
> is not an issue and there is a work-around.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> Changes in v2:
> -This is a new patch in v2 of my platform/x86/dell-* notifier set intended
>  to show how dell_smbios*notifier can be used to improve the dell-rbtn
>  integration too
> Changes in v3:
> -Call dell_rbtn_has_rfkill_func instead of dell_rbtn_has_rfkill, so that the
>  dynamic symbol dance we do to allow loading without dell-rbtn actually works.
> ---
>  drivers/platform/x86/Kconfig       |  1 +
>  drivers/platform/x86/dell-laptop.c | 53 +++++++-------------------------
>  drivers/platform/x86/dell-rbtn.c   | 63 +++++++++-----------------------------
>  drivers/platform/x86/dell-rbtn.h   |  5 +--
>  drivers/platform/x86/dell-smbios.h |  1 +
>  5 files changed, 29 insertions(+), 94 deletions(-)

Looks like that for preventing sending event that rfkill switch was
changed by hardware slider we must always drop atk i8042 keycode...

Needs to check if key is really send by both dell-rbtn and also by atk
i8042 keyboard driver and if yes then i8042_install_filter() is always
needed (if rbtn is there or not)...

-- 
Pali Rohár
pali.rohar@gmail.com

  reply	other threads:[~2016-10-27 14:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 17:41 [PATCH v3 1/5] leds: core: Add support for poll()ing the sysfs brightness attr for changes Hans de Goede
2016-10-26 17:41 ` [PATCH v3 2/5] platform: x86: thinkpad: Call led_notify_brightness_change on kbd brightness change Hans de Goede
2016-10-26 17:51   ` Pali Rohár
2016-10-26 17:41 ` [PATCH v3 3/5] platform: x86: dell-smbios: Add a generic dell-smbios notifier chain Hans de Goede
2016-10-26 17:41 ` [PATCH v3 4/5] platform: x86: dell-*: Call led_notify_brightness_change on kbd brightness change Hans de Goede
2016-10-26 17:41 ` [PATCH v3 5/5] platform: x86: dell-*: Simplify dell-rbtn integration with dell-laptop [untested] Hans de Goede
2016-10-27 10:38   ` Pali Rohár [this message]
2016-10-27 11:46     ` Hans de Goede
2016-10-27 11:59       ` Pali Rohár
2016-10-27 12:42         ` Hans de Goede
2017-01-10 20:23           ` Darren Hart

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=20161027103845.GT12154@pali \
    --to=pali.rohar@gmail.com \
    --cc=dvhart@infradead.org \
    --cc=hdegoede@redhat.com \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=ibm-acpi@hmh.eng.br \
    --cc=j.anaszewski@samsung.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rpurdie@rpsys.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).