diff --git a/.kernel.metadata b/.kernel.metadata index 9c34010..02f44f3 100644 --- a/.kernel.metadata +++ b/.kernel.metadata @@ -1,2 +1,2 @@ 40f3e72192d59c0b7a4638cebd0ea55d35a782bb SOURCES/linux-4.19.tar.xz -fb34003dd692474c184651618b963a1aeaa0a708 SOURCES/patch-4.19.34.xz +730a5d6adafe46d72bb798d172e395d1a43ebe42 SOURCES/patch-4.19.38.xz diff --git a/SOURCES/0001-HID-i2c-hid-override-HID-descriptors-for-certain-dev.patch b/SOURCES/0001-HID-i2c-hid-override-HID-descriptors-for-certain-dev.patch deleted file mode 100644 index 68801cc..0000000 --- a/SOURCES/0001-HID-i2c-hid-override-HID-descriptors-for-certain-dev.patch +++ /dev/null @@ -1,564 +0,0 @@ -From 9ee3e06610fdb8a601cde59c92089fb6c1deb4aa Mon Sep 17 00:00:00 2001 -From: Julian Sax -Date: Wed, 19 Sep 2018 11:46:23 +0200 -Subject: [PATCH] HID: i2c-hid: override HID descriptors for certain devices - -A particular touchpad (SIPODEV SP1064) refuses to supply the HID -descriptors. This patch provides the framework for overriding these -descriptors based on DMI data. It also includes the descriptors for -said touchpad, which were extracted by listening to the traffic of the -windows filter driver, as well as the DMI data for the laptops known -to use this device. - -Relevant Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1526312 - -Cc: Hans de Goede -Reported-and-tested-by: ahormann@gmx.net -Reported-and-tested-by: Bruno Jesus -Reported-and-tested-by: Dietrich -Reported-and-tested-by: kloxdami@yahoo.com -Signed-off-by: Julian Sax -Reviewed-by: Benjamin Tissoires -Signed-off-by: Jiri Kosina ---- - drivers/hid/i2c-hid/Makefile | 3 + - .../hid/i2c-hid/{i2c-hid.c => i2c-hid-core.c} | 60 ++- - drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c | 376 ++++++++++++++++++ - drivers/hid/i2c-hid/i2c-hid.h | 20 + - 4 files changed, 439 insertions(+), 20 deletions(-) - rename drivers/hid/i2c-hid/{i2c-hid.c => i2c-hid-core.c} (96%) - create mode 100644 drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c - create mode 100644 drivers/hid/i2c-hid/i2c-hid.h - -diff --git a/drivers/hid/i2c-hid/Makefile b/drivers/hid/i2c-hid/Makefile -index 832d8f9aaba2..099e1ce2f234 100644 ---- a/drivers/hid/i2c-hid/Makefile -+++ b/drivers/hid/i2c-hid/Makefile -@@ -3,3 +3,6 @@ - # - - obj-$(CONFIG_I2C_HID) += i2c-hid.o -+ -+i2c-hid-objs = i2c-hid-core.o -+i2c-hid-$(CONFIG_DMI) += i2c-hid-dmi-quirks.o -diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid-core.c -similarity index 96% -rename from drivers/hid/i2c-hid/i2c-hid.c -rename to drivers/hid/i2c-hid/i2c-hid-core.c -index f3076659361a..823c63ad08b1 100644 ---- a/drivers/hid/i2c-hid/i2c-hid.c -+++ b/drivers/hid/i2c-hid/i2c-hid-core.c -@@ -43,6 +43,7 @@ - #include - - #include "../hid-ids.h" -+#include "i2c-hid.h" - - /* quirks to control the device */ - #define I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV BIT(0) -@@ -669,6 +670,7 @@ static int i2c_hid_parse(struct hid_device *hid) - char *rdesc; - int ret; - int tries = 3; -+ char *use_override; - - i2c_hid_dbg(ihid, "entering %s\n", __func__); - -@@ -687,26 +689,37 @@ static int i2c_hid_parse(struct hid_device *hid) - if (ret) - return ret; - -- rdesc = kzalloc(rsize, GFP_KERNEL); -+ use_override = i2c_hid_get_dmi_hid_report_desc_override(client->name, -+ &rsize); - -- if (!rdesc) { -- dbg_hid("couldn't allocate rdesc memory\n"); -- return -ENOMEM; -- } -- -- i2c_hid_dbg(ihid, "asking HID report descriptor\n"); -- -- ret = i2c_hid_command(client, &hid_report_descr_cmd, rdesc, rsize); -- if (ret) { -- hid_err(hid, "reading report descriptor failed\n"); -- kfree(rdesc); -- return -EIO; -+ if (use_override) { -+ rdesc = use_override; -+ i2c_hid_dbg(ihid, "Using a HID report descriptor override\n"); -+ } else { -+ rdesc = kzalloc(rsize, GFP_KERNEL); -+ -+ if (!rdesc) { -+ dbg_hid("couldn't allocate rdesc memory\n"); -+ return -ENOMEM; -+ } -+ -+ i2c_hid_dbg(ihid, "asking HID report descriptor\n"); -+ -+ ret = i2c_hid_command(client, &hid_report_descr_cmd, -+ rdesc, rsize); -+ if (ret) { -+ hid_err(hid, "reading report descriptor failed\n"); -+ kfree(rdesc); -+ return -EIO; -+ } - } - - i2c_hid_dbg(ihid, "Report Descriptor: %*ph\n", rsize, rdesc); - - ret = hid_parse_report(hid, rdesc, rsize); -- kfree(rdesc); -+ if (!use_override) -+ kfree(rdesc); -+ - if (ret) { - dbg_hid("parsing report descriptor failed\n"); - return ret; -@@ -833,12 +846,19 @@ static int i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid) - int ret; - - /* i2c hid fetch using a fixed descriptor size (30 bytes) */ -- i2c_hid_dbg(ihid, "Fetching the HID descriptor\n"); -- ret = i2c_hid_command(client, &hid_descr_cmd, ihid->hdesc_buffer, -- sizeof(struct i2c_hid_desc)); -- if (ret) { -- dev_err(&client->dev, "hid_descr_cmd failed\n"); -- return -ENODEV; -+ if (i2c_hid_get_dmi_i2c_hid_desc_override(client->name)) { -+ i2c_hid_dbg(ihid, "Using a HID descriptor override\n"); -+ ihid->hdesc = -+ *i2c_hid_get_dmi_i2c_hid_desc_override(client->name); -+ } else { -+ i2c_hid_dbg(ihid, "Fetching the HID descriptor\n"); -+ ret = i2c_hid_command(client, &hid_descr_cmd, -+ ihid->hdesc_buffer, -+ sizeof(struct i2c_hid_desc)); -+ if (ret) { -+ dev_err(&client->dev, "hid_descr_cmd failed\n"); -+ return -ENODEV; -+ } - } - - /* Validate the length of HID descriptor, the 4 first bytes: -diff --git a/drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c b/drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c -new file mode 100644 -index 000000000000..1d645c9ab417 ---- /dev/null -+++ b/drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c -@@ -0,0 +1,385 @@ -+// SPDX-License-Identifier: GPL-2.0+ -+ -+/* -+ * Quirks for I2C-HID devices that do not supply proper descriptors -+ * -+ * Copyright (c) 2018 Julian Sax -+ * -+ */ -+ -+#include -+#include -+#include -+ -+#include "i2c-hid.h" -+ -+ -+struct i2c_hid_desc_override { -+ union { -+ struct i2c_hid_desc *i2c_hid_desc; -+ uint8_t *i2c_hid_desc_buffer; -+ }; -+ uint8_t *hid_report_desc; -+ unsigned int hid_report_desc_size; -+ uint8_t *i2c_name; -+}; -+ -+ -+/* -+ * descriptors for the SIPODEV SP1064 touchpad -+ * -+ * This device does not supply any descriptors and on windows a filter -+ * driver operates between the i2c-hid layer and the device and injects -+ * these descriptors when the device is prompted. The descriptors were -+ * extracted by listening to the i2c-hid traffic that occurs between the -+ * windows filter driver and the windows i2c-hid driver. -+ */ -+ -+static const struct i2c_hid_desc_override sipodev_desc = { -+ .i2c_hid_desc_buffer = (uint8_t []) -+ {0x1e, 0x00, /* Length of descriptor */ -+ 0x00, 0x01, /* Version of descriptor */ -+ 0xdb, 0x01, /* Length of report descriptor */ -+ 0x21, 0x00, /* Location of report descriptor */ -+ 0x24, 0x00, /* Location of input report */ -+ 0x1b, 0x00, /* Max input report length */ -+ 0x25, 0x00, /* Location of output report */ -+ 0x11, 0x00, /* Max output report length */ -+ 0x22, 0x00, /* Location of command register */ -+ 0x23, 0x00, /* Location of data register */ -+ 0x11, 0x09, /* Vendor ID */ -+ 0x88, 0x52, /* Product ID */ -+ 0x06, 0x00, /* Version ID */ -+ 0x00, 0x00, 0x00, 0x00 /* Reserved */ -+ }, -+ -+ .hid_report_desc = (uint8_t []) -+ {0x05, 0x01, /* Usage Page (Desktop), */ -+ 0x09, 0x02, /* Usage (Mouse), */ -+ 0xA1, 0x01, /* Collection (Application), */ -+ 0x85, 0x01, /* Report ID (1), */ -+ 0x09, 0x01, /* Usage (Pointer), */ -+ 0xA1, 0x00, /* Collection (Physical), */ -+ 0x05, 0x09, /* Usage Page (Button), */ -+ 0x19, 0x01, /* Usage Minimum (01h), */ -+ 0x29, 0x02, /* Usage Maximum (02h), */ -+ 0x25, 0x01, /* Logical Maximum (1), */ -+ 0x75, 0x01, /* Report Size (1), */ -+ 0x95, 0x02, /* Report Count (2), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x95, 0x06, /* Report Count (6), */ -+ 0x81, 0x01, /* Input (Constant), */ -+ 0x05, 0x01, /* Usage Page (Desktop), */ -+ 0x09, 0x30, /* Usage (X), */ -+ 0x09, 0x31, /* Usage (Y), */ -+ 0x15, 0x81, /* Logical Minimum (-127), */ -+ 0x25, 0x7F, /* Logical Maximum (127), */ -+ 0x75, 0x08, /* Report Size (8), */ -+ 0x95, 0x02, /* Report Count (2), */ -+ 0x81, 0x06, /* Input (Variable, Relative), */ -+ 0xC0, /* End Collection, */ -+ 0xC0, /* End Collection, */ -+ 0x05, 0x0D, /* Usage Page (Digitizer), */ -+ 0x09, 0x05, /* Usage (Touchpad), */ -+ 0xA1, 0x01, /* Collection (Application), */ -+ 0x85, 0x04, /* Report ID (4), */ -+ 0x05, 0x0D, /* Usage Page (Digitizer), */ -+ 0x09, 0x22, /* Usage (Finger), */ -+ 0xA1, 0x02, /* Collection (Logical), */ -+ 0x15, 0x00, /* Logical Minimum (0), */ -+ 0x25, 0x01, /* Logical Maximum (1), */ -+ 0x09, 0x47, /* Usage (Touch Valid), */ -+ 0x09, 0x42, /* Usage (Tip Switch), */ -+ 0x95, 0x02, /* Report Count (2), */ -+ 0x75, 0x01, /* Report Size (1), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x95, 0x01, /* Report Count (1), */ -+ 0x75, 0x03, /* Report Size (3), */ -+ 0x25, 0x05, /* Logical Maximum (5), */ -+ 0x09, 0x51, /* Usage (Contact Identifier), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x75, 0x01, /* Report Size (1), */ -+ 0x95, 0x03, /* Report Count (3), */ -+ 0x81, 0x03, /* Input (Constant, Variable), */ -+ 0x05, 0x01, /* Usage Page (Desktop), */ -+ 0x26, 0x44, 0x0A, /* Logical Maximum (2628), */ -+ 0x75, 0x10, /* Report Size (16), */ -+ 0x55, 0x0E, /* Unit Exponent (14), */ -+ 0x65, 0x11, /* Unit (Centimeter), */ -+ 0x09, 0x30, /* Usage (X), */ -+ 0x46, 0x1A, 0x04, /* Physical Maximum (1050), */ -+ 0x95, 0x01, /* Report Count (1), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x46, 0xBC, 0x02, /* Physical Maximum (700), */ -+ 0x26, 0x34, 0x05, /* Logical Maximum (1332), */ -+ 0x09, 0x31, /* Usage (Y), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0xC0, /* End Collection, */ -+ 0x05, 0x0D, /* Usage Page (Digitizer), */ -+ 0x09, 0x22, /* Usage (Finger), */ -+ 0xA1, 0x02, /* Collection (Logical), */ -+ 0x25, 0x01, /* Logical Maximum (1), */ -+ 0x09, 0x47, /* Usage (Touch Valid), */ -+ 0x09, 0x42, /* Usage (Tip Switch), */ -+ 0x95, 0x02, /* Report Count (2), */ -+ 0x75, 0x01, /* Report Size (1), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x95, 0x01, /* Report Count (1), */ -+ 0x75, 0x03, /* Report Size (3), */ -+ 0x25, 0x05, /* Logical Maximum (5), */ -+ 0x09, 0x51, /* Usage (Contact Identifier), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x75, 0x01, /* Report Size (1), */ -+ 0x95, 0x03, /* Report Count (3), */ -+ 0x81, 0x03, /* Input (Constant, Variable), */ -+ 0x05, 0x01, /* Usage Page (Desktop), */ -+ 0x26, 0x44, 0x0A, /* Logical Maximum (2628), */ -+ 0x75, 0x10, /* Report Size (16), */ -+ 0x09, 0x30, /* Usage (X), */ -+ 0x46, 0x1A, 0x04, /* Physical Maximum (1050), */ -+ 0x95, 0x01, /* Report Count (1), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x46, 0xBC, 0x02, /* Physical Maximum (700), */ -+ 0x26, 0x34, 0x05, /* Logical Maximum (1332), */ -+ 0x09, 0x31, /* Usage (Y), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0xC0, /* End Collection, */ -+ 0x05, 0x0D, /* Usage Page (Digitizer), */ -+ 0x09, 0x22, /* Usage (Finger), */ -+ 0xA1, 0x02, /* Collection (Logical), */ -+ 0x25, 0x01, /* Logical Maximum (1), */ -+ 0x09, 0x47, /* Usage (Touch Valid), */ -+ 0x09, 0x42, /* Usage (Tip Switch), */ -+ 0x95, 0x02, /* Report Count (2), */ -+ 0x75, 0x01, /* Report Size (1), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x95, 0x01, /* Report Count (1), */ -+ 0x75, 0x03, /* Report Size (3), */ -+ 0x25, 0x05, /* Logical Maximum (5), */ -+ 0x09, 0x51, /* Usage (Contact Identifier), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x75, 0x01, /* Report Size (1), */ -+ 0x95, 0x03, /* Report Count (3), */ -+ 0x81, 0x03, /* Input (Constant, Variable), */ -+ 0x05, 0x01, /* Usage Page (Desktop), */ -+ 0x26, 0x44, 0x0A, /* Logical Maximum (2628), */ -+ 0x75, 0x10, /* Report Size (16), */ -+ 0x09, 0x30, /* Usage (X), */ -+ 0x46, 0x1A, 0x04, /* Physical Maximum (1050), */ -+ 0x95, 0x01, /* Report Count (1), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x46, 0xBC, 0x02, /* Physical Maximum (700), */ -+ 0x26, 0x34, 0x05, /* Logical Maximum (1332), */ -+ 0x09, 0x31, /* Usage (Y), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0xC0, /* End Collection, */ -+ 0x05, 0x0D, /* Usage Page (Digitizer), */ -+ 0x09, 0x22, /* Usage (Finger), */ -+ 0xA1, 0x02, /* Collection (Logical), */ -+ 0x25, 0x01, /* Logical Maximum (1), */ -+ 0x09, 0x47, /* Usage (Touch Valid), */ -+ 0x09, 0x42, /* Usage (Tip Switch), */ -+ 0x95, 0x02, /* Report Count (2), */ -+ 0x75, 0x01, /* Report Size (1), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x95, 0x01, /* Report Count (1), */ -+ 0x75, 0x03, /* Report Size (3), */ -+ 0x25, 0x05, /* Logical Maximum (5), */ -+ 0x09, 0x51, /* Usage (Contact Identifier), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x75, 0x01, /* Report Size (1), */ -+ 0x95, 0x03, /* Report Count (3), */ -+ 0x81, 0x03, /* Input (Constant, Variable), */ -+ 0x05, 0x01, /* Usage Page (Desktop), */ -+ 0x26, 0x44, 0x0A, /* Logical Maximum (2628), */ -+ 0x75, 0x10, /* Report Size (16), */ -+ 0x09, 0x30, /* Usage (X), */ -+ 0x46, 0x1A, 0x04, /* Physical Maximum (1050), */ -+ 0x95, 0x01, /* Report Count (1), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x46, 0xBC, 0x02, /* Physical Maximum (700), */ -+ 0x26, 0x34, 0x05, /* Logical Maximum (1332), */ -+ 0x09, 0x31, /* Usage (Y), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0xC0, /* End Collection, */ -+ 0x05, 0x0D, /* Usage Page (Digitizer), */ -+ 0x55, 0x0C, /* Unit Exponent (12), */ -+ 0x66, 0x01, 0x10, /* Unit (Seconds), */ -+ 0x47, 0xFF, 0xFF, 0x00, 0x00,/* Physical Maximum (65535), */ -+ 0x27, 0xFF, 0xFF, 0x00, 0x00,/* Logical Maximum (65535), */ -+ 0x75, 0x10, /* Report Size (16), */ -+ 0x95, 0x01, /* Report Count (1), */ -+ 0x09, 0x56, /* Usage (Scan Time), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x09, 0x54, /* Usage (Contact Count), */ -+ 0x25, 0x7F, /* Logical Maximum (127), */ -+ 0x75, 0x08, /* Report Size (8), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x05, 0x09, /* Usage Page (Button), */ -+ 0x09, 0x01, /* Usage (01h), */ -+ 0x25, 0x01, /* Logical Maximum (1), */ -+ 0x75, 0x01, /* Report Size (1), */ -+ 0x95, 0x01, /* Report Count (1), */ -+ 0x81, 0x02, /* Input (Variable), */ -+ 0x95, 0x07, /* Report Count (7), */ -+ 0x81, 0x03, /* Input (Constant, Variable), */ -+ 0x05, 0x0D, /* Usage Page (Digitizer), */ -+ 0x85, 0x02, /* Report ID (2), */ -+ 0x09, 0x55, /* Usage (Contact Count Maximum), */ -+ 0x09, 0x59, /* Usage (59h), */ -+ 0x75, 0x04, /* Report Size (4), */ -+ 0x95, 0x02, /* Report Count (2), */ -+ 0x25, 0x0F, /* Logical Maximum (15), */ -+ 0xB1, 0x02, /* Feature (Variable), */ -+ 0x05, 0x0D, /* Usage Page (Digitizer), */ -+ 0x85, 0x07, /* Report ID (7), */ -+ 0x09, 0x60, /* Usage (60h), */ -+ 0x75, 0x01, /* Report Size (1), */ -+ 0x95, 0x01, /* Report Count (1), */ -+ 0x25, 0x01, /* Logical Maximum (1), */ -+ 0xB1, 0x02, /* Feature (Variable), */ -+ 0x95, 0x07, /* Report Count (7), */ -+ 0xB1, 0x03, /* Feature (Constant, Variable), */ -+ 0x85, 0x06, /* Report ID (6), */ -+ 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */ -+ 0x09, 0xC5, /* Usage (C5h), */ -+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */ -+ 0x75, 0x08, /* Report Size (8), */ -+ 0x96, 0x00, 0x01, /* Report Count (256), */ -+ 0xB1, 0x02, /* Feature (Variable), */ -+ 0xC0, /* End Collection, */ -+ 0x06, 0x00, 0xFF, /* Usage Page (FF00h), */ -+ 0x09, 0x01, /* Usage (01h), */ -+ 0xA1, 0x01, /* Collection (Application), */ -+ 0x85, 0x0D, /* Report ID (13), */ -+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */ -+ 0x19, 0x01, /* Usage Minimum (01h), */ -+ 0x29, 0x02, /* Usage Maximum (02h), */ -+ 0x75, 0x08, /* Report Size (8), */ -+ 0x95, 0x02, /* Report Count (2), */ -+ 0xB1, 0x02, /* Feature (Variable), */ -+ 0xC0, /* End Collection, */ -+ 0x05, 0x0D, /* Usage Page (Digitizer), */ -+ 0x09, 0x0E, /* Usage (Configuration), */ -+ 0xA1, 0x01, /* Collection (Application), */ -+ 0x85, 0x03, /* Report ID (3), */ -+ 0x09, 0x22, /* Usage (Finger), */ -+ 0xA1, 0x02, /* Collection (Logical), */ -+ 0x09, 0x52, /* Usage (Device Mode), */ -+ 0x25, 0x0A, /* Logical Maximum (10), */ -+ 0x95, 0x01, /* Report Count (1), */ -+ 0xB1, 0x02, /* Feature (Variable), */ -+ 0xC0, /* End Collection, */ -+ 0x09, 0x22, /* Usage (Finger), */ -+ 0xA1, 0x00, /* Collection (Physical), */ -+ 0x85, 0x05, /* Report ID (5), */ -+ 0x09, 0x57, /* Usage (57h), */ -+ 0x09, 0x58, /* Usage (58h), */ -+ 0x75, 0x01, /* Report Size (1), */ -+ 0x95, 0x02, /* Report Count (2), */ -+ 0x25, 0x01, /* Logical Maximum (1), */ -+ 0xB1, 0x02, /* Feature (Variable), */ -+ 0x95, 0x06, /* Report Count (6), */ -+ 0xB1, 0x03, /* Feature (Constant, Variable),*/ -+ 0xC0, /* End Collection, */ -+ 0xC0 /* End Collection */ -+ }, -+ .hid_report_desc_size = 475, -+ .i2c_name = "SYNA3602:00" -+}; -+ -+ -+static const struct dmi_system_id i2c_hid_dmi_desc_override_table[] = { -+ { -+ .ident = "Teclast F6 Pro", -+ .matches = { -+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "TECLAST"), -+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "F6 Pro"), -+ }, -+ .driver_data = (void *)&sipodev_desc -+ }, -+ { -+ .ident = "Teclast F7", -+ .matches = { -+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "TECLAST"), -+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "F7"), -+ }, -+ .driver_data = (void *)&sipodev_desc -+ }, -+ { -+ .ident = "Trekstor Primebook C13", -+ .matches = { -+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "TREKSTOR"), -+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Primebook C13"), -+ }, -+ .driver_data = (void *)&sipodev_desc -+ }, -+ { -+ .ident = "Trekstor Primebook C11", -+ .matches = { -+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "TREKSTOR"), -+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Primebook C11"), -+ }, -+ .driver_data = (void *)&sipodev_desc -+ }, -+ { -+ .ident = "Direkt-Tek DTLAPY116-2", -+ .matches = { -+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Direkt-Tek"), -+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "DTLAPY116-2"), -+ }, -+ .driver_data = (void *)&sipodev_desc -+ }, -+ { -+ .ident = "Direkt-Tek DTLAPY133-1", -+ .matches = { -+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Direkt-Tek"), -+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "DTLAPY133-1"), -+ }, -+ .driver_data = (void *)&sipodev_desc -+ }, -+ { -+ .ident = "Mediacom Flexbook Edge 11", -+ .matches = { -+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "MEDIACOM"), -+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"), -+ }, -+ .driver_data = (void *)&sipodev_desc -+ }, -+ { } /* Terminate list */ -+}; -+ -+ -+struct i2c_hid_desc *i2c_hid_get_dmi_i2c_hid_desc_override(uint8_t *i2c_name) -+{ -+ struct i2c_hid_desc_override *override; -+ const struct dmi_system_id *system_id; -+ -+ system_id = dmi_first_match(i2c_hid_dmi_desc_override_table); -+ if (!system_id) -+ return NULL; -+ -+ override = system_id->driver_data; -+ if (strcmp(override->i2c_name, i2c_name)) -+ return NULL; -+ -+ return override->i2c_hid_desc; -+} -+ -+char *i2c_hid_get_dmi_hid_report_desc_override(uint8_t *i2c_name, -+ unsigned int *size) -+{ -+ struct i2c_hid_desc_override *override; -+ const struct dmi_system_id *system_id; -+ -+ system_id = dmi_first_match(i2c_hid_dmi_desc_override_table); -+ if (!system_id) -+ return NULL; -+ -+ override = system_id->driver_data; -+ if (strcmp(override->i2c_name, i2c_name)) -+ return NULL; -+ -+ *size = override->hid_report_desc_size; -+ return override->hid_report_desc; -+} -diff --git a/drivers/hid/i2c-hid/i2c-hid.h b/drivers/hid/i2c-hid/i2c-hid.h -new file mode 100644 -index 000000000000..a8c19aef5824 ---- /dev/null -+++ b/drivers/hid/i2c-hid/i2c-hid.h -@@ -0,0 +1,20 @@ -+/* SPDX-License-Identifier: GPL-2.0+ */ -+ -+#ifndef I2C_HID_H -+#define I2C_HID_H -+ -+ -+#ifdef CONFIG_DMI -+struct i2c_hid_desc *i2c_hid_get_dmi_i2c_hid_desc_override(uint8_t *i2c_name); -+char *i2c_hid_get_dmi_hid_report_desc_override(uint8_t *i2c_name, -+ unsigned int *size); -+#else -+static inline struct i2c_hid_desc -+ *i2c_hid_get_dmi_i2c_hid_desc_override(uint8_t *i2c_name) -+{ return NULL; } -+static inline char *i2c_hid_get_dmi_hid_report_desc_override(uint8_t *i2c_name, -+ unsigned int *size) -+{ return NULL; } -+#endif -+ -+#endif --- -2.19.1 - diff --git a/SOURCES/9999-centos-r40-v40-dts-update.patch b/SOURCES/9999-centos-r40-v40-dts-update.patch index a4a753c..3406235 100644 --- a/SOURCES/9999-centos-r40-v40-dts-update.patch +++ b/SOURCES/9999-centos-r40-v40-dts-update.patch @@ -90,6 +90,132 @@ index 438b7b44dab3..1a6794e63b90 100644 -- cgit 1.2-0.3.lf.el7 +From 1e5f1db4ccd8348a21da55bff82f4263000879ef Mon Sep 17 00:00:00 2001 +From: Chen-Yu Tsai +Date: Wed, 9 Jan 2019 23:02:56 +0800 +Subject: ARM: dts: sun8i: r40: bananapi-m2-ultra: Add Bluetooth device node + +The AP6212 is based on the Broadcom BCM43430 or BCM43438. The WiFi side +identifies as BCM43430, while the Bluetooth side identifies as BCM43438. + +The Bluetooth side is connected to UART3 in a 4 wire configuration. Same +as the WiFi side, due to being the same chip and package, DLDO1 and +DLDO2 regulator outputs from the PMIC provide overall power via VBAT and +I/O power via VDDIO. The CLK_OUT_A clock output from the SoC provides +the LPO low power clock at 32.768 kHz. + +This patch enables Bluetooth on this board, and also adds the missing +LPO clock on the WiFi side. There is also a PCM connection for +Bluetooth, but this is not covered here. + +The LPO clock is fed from CLK_OUT_A, which needs to be muxed on pin +PI12. This can be represented in multiple ways. This patch puts the +pinctrl property in the pin controller node. This is due to limitations +in Linux, where pinmux settings, even the same one, can not be shared +by multiple devices. Thus we cannot put it in both the WiFi and +Bluetooth device nodes. Putting it the CCU node is another option, but +Linux's CCU driver does not handle pinctrl. Also the pin controller is +guaranteed to be initialized after the CCU, when clocks are available. +And any other devices that use muxed pins are guaranteed to be +initialized after the pin controller. Thus having the CLK_OUT_A pinmux +reference be in the pin controller node is a good choice without having +to deal with implementation issues. + +Signed-off-by: Chen-Yu Tsai +Signed-off-by: Maxime Ripard +--- + arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 26 +++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts +index 1a6794e63b90..c488aaacbd68 100644 +--- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts ++++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts +@@ -102,6 +102,8 @@ + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 WIFI_EN */ ++ clocks = <&ccu CLK_OUTA>; ++ clock-names = "ext_clock"; + }; + }; + +@@ -196,6 +198,11 @@ + status = "okay"; + }; + ++&pio { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&clk_out_a_pin>; ++}; ++ + ®_aldo2 { + regulator-always-on; + regulator-min-microvolt = <2500000>; +@@ -293,6 +300,25 @@ + status = "okay"; + }; + ++&uart3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart3_pg_pins>, <&uart3_rts_cts_pg_pins>; ++ uart-has-rtscts; ++ status = "okay"; ++ ++ bluetooth { ++ compatible = "brcm,bcm43438-bt"; ++ clocks = <&ccu CLK_OUTA>; ++ clock-names = "lpo"; ++ vbat-supply = <®_dldo2>; ++ vddio-supply = <®_dldo1>; ++ device-wakeup-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */ ++ /* TODO host wake line connected to PMIC GPIO pins */ ++ shutdown-gpios = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */ ++ max-speed = <1500000>; ++ }; ++}; ++ + &usbphy { + usb1_vbus-supply = <®_vcc5v0>; + usb2_vbus-supply = <®_vcc5v0>; +-- +cgit 1.2-0.3.lf.el7 + +From 0e363c61307062cd18c48e889b419fb37afb1c31 Mon Sep 17 00:00:00 2001 +From: Pablo Greco +Date: Tue, 16 Apr 2019 18:23:45 -0300 +Subject: [PATCH v5 1/7] ARM: dts: sun8i: r40: bananapi-m2-ultra: Add GPIO + pin-bank regulator supplies + +The bananapi-m2-ultra has the PMIC providing voltage to all the pin-bank +supply rails from its various regulator outputs, tie them to the pio +node. + +Signed-off-by: Pablo Greco +--- + arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts +index c488aaa..699579d 100644 +--- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts ++++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts +@@ -201,6 +201,12 @@ + &pio { + pinctrl-names = "default"; + pinctrl-0 = <&clk_out_a_pin>; ++ vcc-pa-supply = <®_aldo2>; ++ vcc-pc-supply = <®_dcdc1>; ++ vcc-pd-supply = <®_dcdc1>; ++ vcc-pe-supply = <®_eldo1>; ++ vcc-pf-supply = <®_dcdc1>; ++ vcc-pg-supply = <®_dldo1>; + }; + + ®_aldo2 { +-- +1.8.3.1 + From 0729b4af5753b65aa031f58c435da53dbbf56d19 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 13 Sep 2018 13:12:32 -0500 @@ -207,10 +333,54 @@ index bf97f62..f05cabd 100644 -- 1.8.3.1 -From 745c1a105e34553caf247215cdcefa30db95092a Mon Sep 17 00:00:00 2001 +From 8aaf8c380ea622a324de435fef9acc0491c98854 Mon Sep 17 00:00:00 2001 +From: Pablo Greco +Date: Wed, 17 Apr 2019 19:34:25 -0300 +Subject: [PATCH v6 1/5] ARM: dts: sun8i: v40: bananapi-m2-berry: Add GPIO + pin-bank regulator supplies + +The bananapi-m2-berry has the PMIC providing voltage to all the pin-bank +supply rails from its various regulator outputs, tie them to the pio +node. + +Signed-off-by: Pablo Greco +--- + arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts +index f05cabd..27297f4 100644 +--- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts ++++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts +@@ -123,6 +123,21 @@ + status = "okay"; + }; + ++&pio { ++ vcc-pa-supply = <®_aldo2>; ++ vcc-pc-supply = <®_dcdc1>; ++ vcc-pd-supply = <®_dcdc1>; ++ vcc-pe-supply = <®_eldo1>; ++ vcc-pf-supply = <®_dcdc1>; ++ vcc-pg-supply = <®_dldo1>; ++}; ++ ++®_aldo2 { ++ regulator-min-microvolt = <2500000>; ++ regulator-max-microvolt = <2500000>; ++ regulator-name = "vcc-pa"; ++}; ++ + ®_aldo3 { + regulator-always-on; + regulator-min-microvolt = <2700000>; +-- +1.8.3.1 + +From 8f708af45073e971ac75a43863382ece8bb4ce79 Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Thu, 11 Apr 2019 13:58:49 -0300 -Subject: [PATCH v2 2/6] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable GMAC +Subject: [PATCH v6 2/5] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable GMAC ethernet controller Just like the Bananapi M2 Ultra, the Bananapi M2 Berry has a Realtek @@ -220,11 +390,11 @@ output provides I/O voltages on both sides. Signed-off-by: Pablo Greco --- - arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 30 +++++++++++++++++++++++ - 1 file changed, 30 insertions(+) + arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts -index f05cabd..0d79e91 100644 +index 27297f4..0dfde58 100644 --- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts +++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts @@ -50,6 +50,7 @@ @@ -258,21 +428,7 @@ index f05cabd..0d79e91 100644 &i2c0 { status = "okay"; -@@ -123,6 +140,13 @@ - status = "okay"; - }; - -+®_aldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <2500000>; -+ regulator-max-microvolt = <2500000>; -+ regulator-name = "vcc-pa"; -+}; -+ - ®_aldo3 { - regulator-always-on; - regulator-min-microvolt = <2700000>; -@@ -130,6 +154,12 @@ +@@ -145,6 +162,12 @@ regulator-name = "avcc"; }; @@ -288,10 +444,10 @@ index f05cabd..0d79e91 100644 -- 1.8.3.1 -From 274ba1411bac61fcecdf021a13d645891e7b723c Mon Sep 17 00:00:00 2001 +From 1d4425d5ee921a8ec63000b9544b5098a80c94fe Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Thu, 11 Apr 2019 14:00:05 -0300 -Subject: [PATCH v2 3/6] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable HDMI +Subject: [PATCH v6 3/5] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable HDMI output This patch adds the hdmi nodes to the Bananapi M2 Berry, the same way it @@ -303,7 +459,7 @@ Signed-off-by: Pablo Greco 1 file changed, 29 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts -index 0d79e91..2a5b80b 100644 +index 0dfde58..1f4f51f9 100644 --- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts +++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts @@ -58,6 +58,17 @@ @@ -352,7 +508,7 @@ index 0d79e91..2a5b80b 100644 &i2c0 { status = "okay"; -@@ -200,6 +225,10 @@ +@@ -208,6 +233,10 @@ regulator-name = "vcc-wifi"; }; @@ -366,21 +522,22 @@ index 0d79e91..2a5b80b 100644 -- 1.8.3.1 -From e91ec82e21aaf29f1453053175050b8230c2b495 Mon Sep 17 00:00:00 2001 +From 6191156685f9b94b87a370d82e642671104f504c Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Thu, 11 Apr 2019 14:03:54 -0300 -Subject: [PATCH v2 4/6] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable AHCI +Subject: [PATCH v6 4/5] ARM: dts: sun8i: v40: bananapi-m2-berry: Enable AHCI Just like the Bananapi M2 Ultra, enable the ahci controller and the two regulators needed to activate it. +Reviewed-by: Jagan Teki Signed-off-by: Pablo Greco --- arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts -index 2a5b80b..c37c7ab 100644 +index 1f4f51f9..461683c 100644 --- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts +++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts @@ -99,6 +99,12 @@ @@ -396,7 +553,7 @@ index 2a5b80b..c37c7ab 100644 &de { status = "okay"; }; -@@ -225,6 +231,18 @@ +@@ -233,6 +239,18 @@ regulator-name = "vcc-wifi"; }; @@ -418,25 +575,66 @@ index 2a5b80b..c37c7ab 100644 -- 1.8.3.1 -From df95d67e4385275586d3f91ee145f8d13885a560 Mon Sep 17 00:00:00 2001 +From c8fbe63299222c29c721816939a8bb12eb77c2ac Mon Sep 17 00:00:00 2001 From: Pablo Greco -Date: Thu, 11 Apr 2019 14:04:35 -0300 -Subject: [PATCH v2 5/6] ARM: dts: sun8i: v40: bananapi-m2-berry: Fix WiFi - regulator definitions - -Just like was done for the bananapi-m2-ultra, add the second wifi/bt -regulator and mark both as always-on. +Date: Thu, 11 Apr 2019 14:05:06 -0300 +Subject: [PATCH v6 5/5] ARM: dts: sun8i: v40: bananapi-m2-berry: Add Bluetooth + device node + +The AP6212 is based on the Broadcom BCM43430 or BCM43438. The WiFi side +identifies as BCM43430, while the Bluetooth side identifies as BCM43438. + +The Bluetooth side is connected to UART3 in a 4 wire configuration. Same +as the WiFi side, due to being the same chip and package, DLDO1 and +DLDO2 regulator outputs from the PMIC provide overall power via VBAT and +I/O power via VDDIO. The CLK_OUT_A clock output from the SoC provides +the LPO low power clock at 32.768 kHz. + +This patch enables Bluetooth on this board, and also adds the missing +LPO clock on the WiFi side. There is also a PCM connection for +Bluetooth, but this is not covered here. + +The LPO clock is fed from CLK_OUT_A, which needs to be muxed on pin +PI12. This can be represented in multiple ways. This patch puts the +pinctrl property in the pin controller node. This is due to limitations +in Linux, where pinmux settings, even the same one, can not be shared +by multiple devices. Thus we cannot put it in both the WiFi and +Bluetooth device nodes. Putting it the CCU node is another option, but +Linux's CCU driver does not handle pinctrl. Also the pin controller is +guaranteed to be initialized after the CCU, when clocks are available. +And any other devices that use muxed pins are guaranteed to be +initialized after the pin controller. Thus having the CLK_OUT_A pinmux +reference be in the pin controller node is a good choice without having +to deal with implementation issues. Signed-off-by: Pablo Greco --- - arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) + arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 38 +++++++++++++++++++++++ + 1 file changed, 38 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts -index c37c7ab..78f4a1a 100644 +index 461683c..15c22b0 100644 --- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts +++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts -@@ -225,12 +225,27 @@ +@@ -96,6 +96,8 @@ + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 WIFI_EN */ ++ clocks = <&ccu CLK_OUTA>; ++ clock-names = "ext_clock"; + }; + }; + +@@ -172,6 +174,8 @@ + }; + + &pio { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&clk_out_a_pin>; + vcc-pa-supply = <®_aldo2>; + vcc-pc-supply = <®_dcdc1>; + vcc-pd-supply = <®_dcdc1>; +@@ -233,12 +237,27 @@ regulator-name = "vcc-wifi-io"; }; @@ -464,6 +662,32 @@ index c37c7ab..78f4a1a 100644 ®_dldo4 { regulator-min-microvolt = <2500000>; regulator-max-microvolt = <2500000>; +@@ -261,6 +280,25 @@ + status = "okay"; + }; + ++&uart3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart3_pg_pins>, <&uart3_rts_cts_pg_pins>; ++ uart-has-rtscts; ++ status = "okay"; ++ ++ bluetooth { ++ compatible = "brcm,bcm43438-bt"; ++ clocks = <&ccu CLK_OUTA>; ++ clock-names = "lpo"; ++ vbat-supply = <®_dldo2>; ++ vddio-supply = <®_dldo1>; ++ device-wakeup-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */ ++ /* TODO host wake line connected to PMIC GPIO pins */ ++ shutdown-gpios = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */ ++ max-speed = <1500000>; ++ }; ++}; ++ + &usbphy { + usb1_vbus-supply = <®_vcc5v0>; + status = "okay"; -- 1.8.3.1 diff --git a/SOURCES/gpio-pxa-handle-corner-case-of-unprobed-device.patch b/SOURCES/gpio-pxa-handle-corner-case-of-unprobed-device.patch deleted file mode 100644 index f42af91..0000000 --- a/SOURCES/gpio-pxa-handle-corner-case-of-unprobed-device.patch +++ /dev/null @@ -1,56 +0,0 @@ -From patchwork Sat Aug 25 08:44:17 2018 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: gpio: pxa: handle corner case of unprobed device -X-Patchwork-Submitter: Robert Jarzmik -X-Patchwork-Id: 962145 -Message-Id: <20180825084417.13526-1-robert.jarzmik@free.fr> -To: Robert Jarzmik , - Linus Walleij -Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org -Date: Sat, 25 Aug 2018 10:44:17 +0200 -From: Robert Jarzmik -List-Id: - -In the corner case where the gpio driver probe fails, for whatever -reason, the suspend and resume handlers will still be called as they -have to be registered as syscore operations. This applies as well when -no probe was called while the driver has been built in the kernel. - -Nicolas tracked this in : -https://bugzilla.kernel.org/show_bug.cgi?id=200905 - -Therefore, add a failsafe in these function, and test if a proper probe -succeeded and the driver is functional. - -Signed-off-by: Robert Jarzmik -Reported-by: Nicolas Chauvet ---- - drivers/gpio/gpio-pxa.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c -index c18712dabf93..bfe4c5c9f41c 100644 ---- a/drivers/gpio/gpio-pxa.c -+++ b/drivers/gpio/gpio-pxa.c -@@ -776,6 +776,9 @@ static int pxa_gpio_suspend(void) - struct pxa_gpio_bank *c; - int gpio; - -+ if (!pchip) -+ return 0; -+ - for_each_gpio_bank(gpio, c, pchip) { - c->saved_gplr = readl_relaxed(c->regbase + GPLR_OFFSET); - c->saved_gpdr = readl_relaxed(c->regbase + GPDR_OFFSET); -@@ -794,6 +797,9 @@ static void pxa_gpio_resume(void) - struct pxa_gpio_bank *c; - int gpio; - -+ if (!pchip) -+ return; -+ - for_each_gpio_bank(gpio, c, pchip) { - /* restore level with set/clear */ - writel_relaxed(c->saved_gplr, c->regbase + GPSR_OFFSET); diff --git a/SPECS/kernel.spec b/SPECS/kernel.spec index a4fb681..b9b5139 100644 --- a/SPECS/kernel.spec +++ b/SPECS/kernel.spec @@ -54,7 +54,7 @@ Summary: The Linux kernel %if 0%{?released_kernel} # Do we have a -stable update to apply? -%define stable_update 34 +%define stable_update 38 # Set rpm version accordingly %if 0%{?stable_update} %define stablerev %{stable_update} @@ -610,8 +610,6 @@ Patch308: arm64-96boards-Rock960-CE-board-support.patch Patch309: arm64-rockchip-add-initial-Rockpro64.patch Patch310: arm64-rk3399-add-idle-states.patch -Patch311: gpio-pxa-handle-corner-case-of-unprobed-device.patch - Patch330: bcm2835-cpufreq-add-CPU-frequency-control-driver.patch # https://patchwork.kernel.org/patch/10686407/ @@ -637,9 +635,6 @@ Patch502: input-rmi4-remove-the-need-for-artifical-IRQ.patch # Ena fixes from 4.20 Patch503: ena-fixes.patch -# rhbz 1526312, patch is in 4.20, can be dropped on rebase -Patch507: 0001-HID-i2c-hid-override-HID-descriptors-for-certain-dev.patch - # Patches from 4.20 fixing black screen on CHT devices with i915.fastboot=1 Patch508: cherrytrail-pwm-lpss-fixes.patch @@ -2214,6 +2209,11 @@ fi # # %changelog +* Fri May 3 2019 Pablo Greco - 4.19.38-300 +- Linux v4.19.38 +- Update BananaPi M2 Berry/Ultra patches +- Remove upstreamed patches + * Sat Apr 13 2019 Pablo Greco - 4.19.34-300 - Linux v4.19.34 - Update device tree for BananaPi M2 Berry