pinctrl: cherryview: Extend the DMI quirk to Intel_Strago systems
Subsystems (4)
Mika Westerberg
maintainerPATCH 1/3 firmware: dmi: Add DMI_PRODUCT_FAMILY identification string
In reply to Mika WesterbergSometimes it is more convenient to be able to match a whole family of products, like in case of bunch of Chromebooks based on Intel_Strago to apply a driver quirk instead of quirking each machine one-by-one.
This adds support for DMI_PRODUCT_FAMILY identification string and also exports it to the userspace through sysfs attribute just like the existing ones.
--- drivers/firmware/dmi-id.c | 2 ++ drivers/firmware/dmi_scan.c | 1 + include/linux/mod_devicetable.h | 1 + 3 files changed, 4 insertions(+)
drivers/firmware/dmi-id.c +2 -0
@@ -47,6 +47,7 @@ DEFINE_DMI_ATTR_WITH_SHOW(product_name, 0444, DMI_PRODUCT_NAME);DEFINE_DMI_ATTR_WITH_SHOW (product_version,0444 ,DMI_PRODUCT_VERSION );DEFINE_DMI_ATTR_WITH_SHOW (product_serial,0400 ,DMI_PRODUCT_SERIAL );DEFINE_DMI_ATTR_WITH_SHOW (product_uuid,0400 ,DMI_PRODUCT_UUID ); +DEFINE_DMI_ATTR_WITH_SHOW (product_family,0400 ,DMI_PRODUCT_FAMILY );DEFINE_DMI_ATTR_WITH_SHOW (board_vendor,0444 ,DMI_BOARD_VENDOR );DEFINE_DMI_ATTR_WITH_SHOW (board_name,0444 ,DMI_BOARD_NAME );DEFINE_DMI_ATTR_WITH_SHOW (board_version,0444 ,DMI_BOARD_VERSION );
@@ -191,6 +192,7 @@ static void __init dmi_id_init_attr_table(void)ADD_DMI_ATTR (product_version,DMI_PRODUCT_VERSION );ADD_DMI_ATTR (product_serial,DMI_PRODUCT_SERIAL );ADD_DMI_ATTR (product_uuid,DMI_PRODUCT_UUID ); +ADD_DMI_ATTR (product_family,DMI_PRODUCT_FAMILY );ADD_DMI_ATTR (board_vendor,DMI_BOARD_VENDOR );ADD_DMI_ATTR (board_name,DMI_BOARD_NAME );ADD_DMI_ATTR (board_version,DMI_BOARD_VERSION );
drivers/firmware/dmi_scan.c +1 -0
@@ -430,6 +430,7 @@ static void __init dmi_decode(const struct dmi_header *dm, void *dummy)dmi_save_ident (dm,DMI_PRODUCT_VERSION ,6 );dmi_save_ident (dm,DMI_PRODUCT_SERIAL ,7 );dmi_save_uuid (dm,DMI_PRODUCT_UUID ,8 ); +dmi_save_ident (dm,DMI_PRODUCT_FAMILY ,26 );break ;case 2 :/* Base Board Information */ dmi_save_ident (dm,DMI_BOARD_VENDOR ,4 );
include/linux/mod_devicetable.h +1 -0
@@ -467,6 +467,7 @@ enum dmi_field {DMI_PRODUCT_VERSION ,DMI_PRODUCT_SERIAL ,DMI_PRODUCT_UUID , +DMI_PRODUCT_FAMILY ,DMI_BOARD_VENDOR ,DMI_BOARD_NAME , DMI_BOARD_VERSION,
Signature · 1 line
2.11.0
Mika Westerberg
maintainerPATCH 2/3 pinctrl: cherryview: Add terminate entry for dmi_system_id tables
In reply to Mika WesterbergFrom: Wei Yongjun <[email protected]>
Make sure dmi_system_id tables are NULL terminated.
--- drivers/pinctrl/intel/pinctrl-cherryview.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pinctrl/intel/pinctrl-cherryview.c +2 -1
@@ -1547,7 +1547,8 @@ static const struct dmi_system_id chv_no_valid_mask[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Edgar"), DMI_MATCH(DMI_BIOS_DATE, "05/21/2016"), }, - } + }, + {} };static int chv_gpio_probe (struct chv_pinctrl *pctrl,int irq)
Signature · 1 line
2.11.0
Mika Westerberg
maintainerPATCH 3/3 pinctrl: cherryview: Extend the Chromebook DMI quirk to Intel_Strago systems
In reply to Mika WesterbergIt turns out there are quite many Chromebooks out there that have the same keyboard issue than Acer Chromebook. All of them are based on Intel_Strago reference and report their DMI_PRODUCT_FAMILY as "Intel_Strago" (Samsung Chromebook 3 and Cyan Chromebooks are exceptions for which we add separate entries).
Instead of adding each machine to the quirk table, we use DMI_PRODUCT_FAMILY of "Intel_Strago" that hopefully covers most of the machines out there currently.
Suggested: Dmitry Torokhov <[email protected]>
--- drivers/pinctrl/intel/pinctrl-cherryview.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-)
drivers/pinctrl/intel/pinctrl-cherryview.c +19 -4
@@ -1539,13 +1539,28 @@ static void chv_gpio_irq_handler(struct irq_desc *desc)* is not listed below. */ static const struct dmi_system_id chv_no_valid_mask[] = { +/* See https://bugzilla.kernel.org/show_bug.cgi?id=194945 */ { -/* See https://bugzilla.kernel.org/show_bug.cgi?id=194945 */ - .ident ="Acer Chromebook (CYAN)" , + .ident ="Intel_Strago based Chromebooks" , .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"GOOGLE" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"Edgar" ), -DMI_MATCH (DMI_BIOS_DATE ,"05/21/2016" ), +DMI_MATCH (DMI_PRODUCT_FAMILY ,"Intel_Strago" ), + }, + }, + { + .ident ="Cyan Chromebook" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"GOOGLE" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"Cyan" ), +DMI_MATCH (DMI_BIOS_DATE ,"05/20/2016" ), + }, + }, + { + .ident ="Samsung Chromebook 3" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"GOOGLE" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"Celes" ), +DMI_MATCH (DMI_BIOS_DATE ,"01/19/2017" ), }, }, {}
Signature · 1 line
2.11.0
Mika Westerberg
maintainercover pinctrl: cherryview: Extend the DMI quirk to Intel_Strago systems
Hi,
It turned out that there are bunch of other Chromebooks that need the DMI quirk as well. Most of these are based on Intel_Strago reference design so we can identify them by using DMI_PRODUCT_FAMILY introduced in this series. The systems without the family string we add them separately.
Related bugzilla entry:
https://bugzilla.kernel.org/show_bug.cgi?id=194945
I'm including fix from Yongjun as well because I did not find it in v4.12-rc1 possibly because it just was forgotten.
Mika Westerberg (2):
firmware: dmi: Add DMI_PRODUCT_FAMILY identification string
pinctrl: cherryview: Extend the Chromebook DMI quirk to Intel_Strago systems
Wei Yongjun (1):
pinctrl: cherryview: Add terminate entry for dmi_system_id tables
drivers/firmware/dmi-id.c | 2 ++ drivers/firmware/dmi_scan.c | 1 + drivers/pinctrl/intel/pinctrl-cherryview.c | 26 +++++++++++++++++++++----- include/linux/mod_devicetable.h | 1 + 4 files changed, 25 insertions(+), 5 deletions(-)
Signature · 1 line
2.11.0
Re: [PATCH 3/3] pinctrl: cherryview: Extend the Chromebook DMI quirk to Intel_Strago systems
In reply to Mika WesterbergQuoted 13 lines · Mika Westerberg
It turns out there are quite many Chromebooks out there that have the same keyboard issue than Acer Chromebook. All of them are based on
Intel_Stragoreference and report theirDMI_PRODUCT_FAMILYas "Intel_Strago" (Samsung Chromebook 3 and Cyan Chromebooks are exceptions
for which we add separate entries).Instead of adding each machine to the quirk table, we use
DMI_PRODUCT_FAMILYof "Intel_Strago" that hopefully covers most of the machines out there currently.
drivers/pinctrl/intel/pinctrl-cherryview.c static void chv_gpio_irq_handler(struct irq_desc *desc) · line 1559
Quoted 5 lines
drivers/pinctrl/intel/pinctrl-cherryview.c +3
-0+ .ident = "Intel_Strago based Chromebooks", + .ident = "Cyan Chromebook", + .ident = "Samsung Chromebook 3",
I would do something like below (though I'm fine with current as well).
.ident = "Intel_Strago based Chromebooks (All models)", .ident = "Intel_Strago based Chromebooks (Cyan)", .ident = "Samsung Chromebook 3 (Celes)",
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Mika Westerberg
maintainerRe: [PATCH 3/3] pinctrl: cherryview: Extend the Chromebook DMI quirk to Intel_Strago systems
Quoted 18 lines · Andy Shevchenko
Quoted 16 lines · Mika Westerberg
It turns out there are quite many Chromebooks out there that have the same keyboard issue than Acer Chromebook. All of them are based on
Intel_Stragoreference and report theirDMI_PRODUCT_FAMILYas "Intel_Strago" (Samsung Chromebook 3 and Cyan Chromebooks are exceptions
for which we add separate entries).Instead of adding each machine to the quirk table, we use
DMI_PRODUCT_FAMILYof "Intel_Strago" that hopefully covers most of the machines out there currently.drivers/pinctrl/intel/pinctrl-cherryview.c +2
-0+ .ident = "Intel_Strago based Chromebooks", + .ident = "Cyan Chromebook",
Quoted 7 lines
drivers/pinctrl/intel/pinctrl-cherryview.c static void chv_gpio_irq_handler(struct irq_desc *desc) · line 1559
Quoted 1 line
drivers/pinctrl/intel/pinctrl-cherryview.c +1
-0+ .ident = "Samsung Chromebook 3",I would do something like below (though I'm fine with current as well).
.ident = "
Intel_Stragobased Chromebooks (All models)", .ident = "Intel_Stragobased Chromebooks (Cyan)", .ident = "Samsung Chromebook 3 (Celes)",
Works for me :)
I will change this in v2 accordinly. Thanks.
Re: [PATCH 3/3] pinctrl: cherryview: Extend the Chromebook DMI quirk to Intel_Strago systems
In reply to Andy ShevchenkoQuoted 16 lines · Andy Shevchenko
Quoted 14 lines · Mika Westerberg
It turns out there are quite many Chromebooks out there that have the same keyboard issue than Acer Chromebook. All of them are based on
Intel_Stragoreference and report theirDMI_PRODUCT_FAMILYas "Intel_Strago" (Samsung Chromebook 3 and Cyan Chromebooks are exceptions
for which we add separate entries).Instead of adding each machine to the quirk table, we use
DMI_PRODUCT_FAMILYof "Intel_Strago" that hopefully covers most of the machines out there currently.+ .ident = "
Intel_Stragobased Chromebooks",
Quoted 8 lines
drivers/pinctrl/intel/pinctrl-cherryview.c static void chv_gpio_irq_handler(struct irq_desc *desc) · line 1559
Quoted 3 lines
drivers/pinctrl/intel/pinctrl-cherryview.c +2
-0+ .ident = "Cyan Chromebook", + .ident = "Samsung Chromebook 3",I would do something like below (though I'm fine with current as well).
.ident = "
Intel_Stragobased Chromebooks (All models)", .ident = "Intel_Stragobased Chromebooks (Cyan)",
I think this one should be "Acer Chromebook R11 (Cyan)"
Thanks.
Signature · 1 line
Dmitry
Quoted 4 lines · Mika Westerberg
It turned out that there are bunch of other Chromebooks that need the DMI quirk as well. Most of these are based on
Intel_Stragoreference design so we can identify them by usingDMI_PRODUCT_FAMILYintroduced in this series. The systems without the family string we add them separately.
I guess this is fixes material.
Who can ACK the firmware patch?
That subsystem seems to be weirdly floating between maintainers...
Andy generally seems to know what is going on with Intel firmwares, so Andy can you ACK this patch set?
Jean Delvare's review would also be appreciated.
Yours,
Linus Walleij