forked from rpms/kernel
		
	Fix the LCD panel an Asus EeePC 1025C not lighting up (rhbz#1697069)
Add small bugfix for new Logitech wireless keyboard support
This commit is contained in:
		
							parent
							
								
									c46dbbae2e
								
							
						
					
					
						commit
						b5f5548ebd
					
				| @ -0,0 +1,46 @@ | ||||
| From 3b6df7e8130719b6bd83be241eb455f2aa862e9f Mon Sep 17 00:00:00 2001 | ||||
| From: Hans de Goede <hdegoede@redhat.com> | ||||
| Date: Fri, 14 Jun 2019 09:28:32 +0200 | ||||
| Subject: [PATCH] HID: logitech-dj: Fix forwarding of very long HID++ reports | ||||
| 
 | ||||
| The HID++ spec also defines very long HID++ reports, with a reportid of | ||||
| 0x12. The MX5000 and MX5500 keyboards use 0x12 output reports for sending | ||||
| messages to display on their buildin LCD. | ||||
| 
 | ||||
| Userspace (libmx5000) supports this, in order for this to work when talking | ||||
| to the HID devices instantiated for the keyboard by hid-logitech-dj, | ||||
| we need to properly forward these reports to the device. | ||||
| 
 | ||||
| This commit fixes logi_dj_ll_raw_request not forwarding these reports. | ||||
| 
 | ||||
| Fixes: f2113c3020ef ("HID: logitech-dj: add support for Logitech Bluetooth Mini-Receiver") | ||||
| Signed-off-by: Hans de Goede <hdegoede@redhat.com> | ||||
| ---
 | ||||
|  drivers/hid/hid-logitech-dj.c | 4 +++- | ||||
|  1 file changed, 3 insertions(+), 1 deletion(-) | ||||
| 
 | ||||
| diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
 | ||||
| index 865b179d0a62..aedbe18182db 100644
 | ||||
| --- a/drivers/hid/hid-logitech-dj.c
 | ||||
| +++ b/drivers/hid/hid-logitech-dj.c
 | ||||
| @@ -30,6 +30,7 @@
 | ||||
|   | ||||
|  #define REPORT_ID_HIDPP_SHORT			0x10 | ||||
|  #define REPORT_ID_HIDPP_LONG			0x11 | ||||
| +#define REPORT_ID_HIDPP_VERY_LONG		0x12
 | ||||
|   | ||||
|  #define HIDPP_REPORT_SHORT_LENGTH		7 | ||||
|  #define HIDPP_REPORT_LONG_LENGTH		20 | ||||
| @@ -1242,7 +1243,8 @@ static int logi_dj_ll_raw_request(struct hid_device *hid,
 | ||||
|  	int ret; | ||||
|   | ||||
|  	if ((buf[0] == REPORT_ID_HIDPP_SHORT) || | ||||
| -	    (buf[0] == REPORT_ID_HIDPP_LONG)) {
 | ||||
| +	    (buf[0] == REPORT_ID_HIDPP_LONG) ||
 | ||||
| +	    (buf[0] == REPORT_ID_HIDPP_VERY_LONG)) {
 | ||||
|  		if (count < 2) | ||||
|  			return -EINVAL; | ||||
|   | ||||
| -- 
 | ||||
| 2.21.0 | ||||
| 
 | ||||
							
								
								
									
										106
									
								
								0001-platform-x86-asus-wmi-Only-Tell-EC-the-OS-will-handl.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										106
									
								
								0001-platform-x86-asus-wmi-Only-Tell-EC-the-OS-will-handl.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,106 @@ | ||||
| From d004ab4e282082ddb645ff48d3f62a28fc5d69ef Mon Sep 17 00:00:00 2001 | ||||
| From: Hans de Goede <hdegoede@redhat.com> | ||||
| Date: Wed, 15 May 2019 12:27:23 +0200 | ||||
| Subject: [PATCH] platform/x86: asus-wmi: Only Tell EC the OS will handle | ||||
|  display hotkeys from asus_nb_wmi | ||||
| MIME-Version: 1.0 | ||||
| Content-Type: text/plain; charset=UTF-8 | ||||
| Content-Transfer-Encoding: 8bit | ||||
| 
 | ||||
| Commit 78f3ac76d9e5 ("platform/x86: asus-wmi: Tell the EC the OS will | ||||
| handle the display off hotkey") causes the backlight to be permanently off | ||||
| on various EeePC laptop models using the eeepc-wmi driver (Asus EeePC | ||||
| 1015BX, Asus EeePC 1025C). | ||||
| 
 | ||||
| The asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL) call added | ||||
| by that commit is made conditional in this commit and only enabled in | ||||
| the quirk_entry structs in the asus-nb-wmi driver fixing the broken | ||||
| display / backlight on various EeePC laptop models. | ||||
| 
 | ||||
| Cc: João Paulo Rechi Vita <jprvita@endlessm.com> | ||||
| Fixes: 78f3ac76d9e5 ("platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey") | ||||
| Signed-off-by: Hans de Goede <hdegoede@redhat.com> | ||||
| ---
 | ||||
|  drivers/platform/x86/asus-nb-wmi.c | 8 ++++++++ | ||||
|  drivers/platform/x86/asus-wmi.c    | 2 +- | ||||
|  drivers/platform/x86/asus-wmi.h    | 1 + | ||||
|  3 files changed, 10 insertions(+), 1 deletion(-) | ||||
| 
 | ||||
| diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
 | ||||
| index 81642102bf65..8d9e30dbb5af 100644
 | ||||
| --- a/drivers/platform/x86/asus-nb-wmi.c
 | ||||
| +++ b/drivers/platform/x86/asus-nb-wmi.c
 | ||||
| @@ -65,10 +65,12 @@ static bool asus_q500a_i8042_filter(unsigned char data, unsigned char str,
 | ||||
|   | ||||
|  static struct quirk_entry quirk_asus_unknown = { | ||||
|  	.wapf = 0, | ||||
| +	.wmi_backlight_set_devstate = true,
 | ||||
|  }; | ||||
|   | ||||
|  static struct quirk_entry quirk_asus_q500a = { | ||||
|  	.i8042_filter = asus_q500a_i8042_filter, | ||||
| +	.wmi_backlight_set_devstate = true,
 | ||||
|  }; | ||||
|   | ||||
|  /* | ||||
| @@ -79,26 +81,32 @@ static struct quirk_entry quirk_asus_q500a = {
 | ||||
|  static struct quirk_entry quirk_asus_x55u = { | ||||
|  	.wapf = 4, | ||||
|  	.wmi_backlight_power = true, | ||||
| +	.wmi_backlight_set_devstate = true,
 | ||||
|  	.no_display_toggle = true, | ||||
|  }; | ||||
|   | ||||
|  static struct quirk_entry quirk_asus_wapf4 = { | ||||
|  	.wapf = 4, | ||||
| +	.wmi_backlight_set_devstate = true,
 | ||||
|  }; | ||||
|   | ||||
|  static struct quirk_entry quirk_asus_x200ca = { | ||||
|  	.wapf = 2, | ||||
| +	.wmi_backlight_set_devstate = true,
 | ||||
|  }; | ||||
|   | ||||
|  static struct quirk_entry quirk_asus_ux303ub = { | ||||
|  	.wmi_backlight_native = true, | ||||
| +	.wmi_backlight_set_devstate = true,
 | ||||
|  }; | ||||
|   | ||||
|  static struct quirk_entry quirk_asus_x550lb = { | ||||
| +	.wmi_backlight_set_devstate = true,
 | ||||
|  	.xusb2pr = 0x01D9, | ||||
|  }; | ||||
|   | ||||
|  static struct quirk_entry quirk_asus_forceals = { | ||||
| +	.wmi_backlight_set_devstate = true,
 | ||||
|  	.wmi_force_als_set = true, | ||||
|  }; | ||||
|   | ||||
| diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
 | ||||
| index 3e4336025e8f..9b18a184e0aa 100644
 | ||||
| --- a/drivers/platform/x86/asus-wmi.c
 | ||||
| +++ b/drivers/platform/x86/asus-wmi.c
 | ||||
| @@ -2146,7 +2146,7 @@ static int asus_wmi_add(struct platform_device *pdev)
 | ||||
|  		err = asus_wmi_backlight_init(asus); | ||||
|  		if (err && err != -ENODEV) | ||||
|  			goto fail_backlight; | ||||
| -	} else
 | ||||
| +	} else if (asus->driver->quirks->wmi_backlight_set_devstate)
 | ||||
|  		err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL); | ||||
|   | ||||
|  	if (asus_wmi_has_fnlock_key(asus)) { | ||||
| diff --git a/drivers/platform/x86/asus-wmi.h b/drivers/platform/x86/asus-wmi.h
 | ||||
| index 0930be770688..4f31b68642a0 100644
 | ||||
| --- a/drivers/platform/x86/asus-wmi.h
 | ||||
| +++ b/drivers/platform/x86/asus-wmi.h
 | ||||
| @@ -31,6 +31,7 @@ struct quirk_entry {
 | ||||
|  	bool store_backlight_power; | ||||
|  	bool wmi_backlight_power; | ||||
|  	bool wmi_backlight_native; | ||||
| +	bool wmi_backlight_set_devstate;
 | ||||
|  	bool wmi_force_als_set; | ||||
|  	int wapf; | ||||
|  	/* | ||||
| -- 
 | ||||
| 2.21.0 | ||||
| 
 | ||||
							
								
								
									
										10
									
								
								kernel.spec
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								kernel.spec
									
									
									
									
									
								
							| @ -583,6 +583,12 @@ Patch530: crypto-ghash-fix-unaligned-memory-access-in-ghash_setkey.patch | ||||
| # https://patchwork.kernel.org/patch/10817377/ | ||||
| Patch532: usb-dwc2-Fix-DMA-cache-alignment-issues.patch | ||||
| 
 | ||||
| # 1697069 LCD panel an Asus EeePC 1025C not lighting up, submitted upstream | ||||
| Patch533: 0001-platform-x86-asus-wmi-Only-Tell-EC-the-OS-will-handl.patch | ||||
| 
 | ||||
| # Fix for new Logitech wireless keyboard support in 5.2, submitted upstream | ||||
| Patch534: 0001-HID-logitech-dj-Fix-forwarding-of-very-long-HID-repo.patch | ||||
| 
 | ||||
| # END OF PATCH DEFINITIONS | ||||
| 
 | ||||
| %endif | ||||
| @ -1821,6 +1827,10 @@ fi | ||||
| # | ||||
| # | ||||
| %changelog | ||||
| * Fri Jun 14 2019 Hans de Goede <hdegoede@redhat.com> | ||||
| - Fix the LCD panel an Asus EeePC 1025C not lighting up (rhbz#1697069) | ||||
| - Add small bugfix for new Logitech wireless keyboard support | ||||
| 
 | ||||
| * Thu Jun 13 2019 Justin M. Forbes <jforbes@fedoraproject.org> - 5.2.0-0.rc4.git2.1 | ||||
| - Linux v5.2-rc4-45-gc11fb13a117e | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user