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


Groups > linux.kernel > #1612923 > unrolled thread

[PATCH 00/11] fujitsu-laptop: backlight cleanup

Started byMichał Kępień <kernel@kempniu.pl>
First post2017-03-30 12:40 +0200
Last post2017-04-04 03:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/11] fujitsu-laptop: backlight cleanup Michał Kępień <kernel@kempniu.pl> - 2017-03-30 12:40 +0200
    [PATCH 01/11] platform/x86: fujitsu-laptop: only handle backlight when appropriate Michał Kępień <kernel@kempniu.pl> - 2017-03-30 12:40 +0200
    Re: [PATCH 00/11] fujitsu-laptop: backlight cleanup Darren Hart <dvhart@infradead.org> - 2017-04-04 03:20 +0200

#1612923 — [PATCH 00/11] fujitsu-laptop: backlight cleanup

FromMichał Kępień <kernel@kempniu.pl>
Date2017-03-30 12:40 +0200
Subject[PATCH 00/11] fujitsu-laptop: backlight cleanup
Message-ID<tqFEK-4YK-7@gated-at.bofh.it>
This series introduces further changes to the way LCD backlight is
handled by fujitsu-laptop.  These changes include fixing a bug in code
responsible for generating brightness-related input events, cleaning up
handling of module parameters, reducing code duplication, removing
superfluous debug messages and other fixes.

This series was tested on a Lifebook S7020 and a Lifebook E744.

This series is based on the testing branch as it requires earlier patch
series I submitted in order to apply cleanly.

 drivers/platform/x86/fujitsu-laptop.c | 156 ++++++++++------------------------
 1 file changed, 45 insertions(+), 111 deletions(-)

-- 
2.12.1

[toc] | [next] | [standalone]


#1612927 — [PATCH 01/11] platform/x86: fujitsu-laptop: only handle backlight when appropriate

FromMichał Kępień <kernel@kempniu.pl>
Date2017-03-30 12:40 +0200
Subject[PATCH 01/11] platform/x86: fujitsu-laptop: only handle backlight when appropriate
Message-ID<tqFEM-4YK-55@gated-at.bofh.it>
In reply to#1612923
The backlight part of fujitsu-laptop is only used by laptops which are
incapable of using the standard ACPI video interface for handling
brightness changes.  Conversely, on laptops which are capable of using
the latter, no vendor-specific ACPI calls should be made unless
explicitly requested by the user.  Bail out immediately from
acpi_fujitsu_bl_add() unless using the vendor-specific interface was
either explicitly requested by the user or automatically selected by the
kernel.

Signed-off-by: Michał Kępień <kernel@kempniu.pl>
---
 drivers/platform/x86/fujitsu-laptop.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 52d6d2105f99..a428da3b591d 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -589,6 +589,9 @@ static int acpi_fujitsu_bl_add(struct acpi_device *device)
 	int state = 0;
 	int error;
 
+	if (acpi_video_get_backlight_type() != acpi_backlight_vendor)
+		return -ENODEV;
+
 	if (!device)
 		return -EINVAL;
 
@@ -641,11 +644,9 @@ static int acpi_fujitsu_bl_add(struct acpi_device *device)
 		fujitsu_bl->max_brightness = FUJITSU_LCD_N_LEVELS;
 	get_lcd_level();
 
-	if (acpi_video_get_backlight_type() == acpi_backlight_vendor) {
-		error = fujitsu_backlight_register();
-		if (error)
-			return error;
-	}
+	error = fujitsu_backlight_register();
+	if (error)
+		return error;
 
 	return 0;
 }
-- 
2.12.1

[toc] | [prev] | [next] | [standalone]


#1615644

FromDarren Hart <dvhart@infradead.org>
Date2017-04-04 03:20 +0200
Message-ID<tslix-6h9-5@gated-at.bofh.it>
In reply to#1612923
On Thu, Mar 30, 2017 at 12:34:58PM +0200, Michał Kępień wrote:
> This series introduces further changes to the way LCD backlight is
> handled by fujitsu-laptop.  These changes include fixing a bug in code
> responsible for generating brightness-related input events, cleaning up
> handling of module parameters, reducing code duplication, removing
> superfluous debug messages and other fixes.
> 
> This series was tested on a Lifebook S7020 and a Lifebook E744.
> 
> This series is based on the testing branch as it requires earlier patch
> series I submitted in order to apply cleanly.

Other than the rather minor nit to 4/11, I've reviewed this series and feel it's
ready to go. If you would like to resend 4/11 in response to that specific
patch, I can just pick it up and get it queued and tested while we await a
review from Jonathan.

Again, nice work.

-- 
Darren Hart
VMware Open Source Technology Center

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web