diff --git a/patches/5.4/0001-surface3-power.patch b/patches/5.4/0001-surface3-power.patch index 47ab0e894..c407bbc7c 100644 --- a/patches/5.4/0001-surface3-power.patch +++ b/patches/5.4/0001-surface3-power.patch @@ -1,4 +1,4 @@ -From 8c2eb0ef101caf114c4a597c6b2a0c5dfc06db38 Mon Sep 17 00:00:00 2001 +From 0d51533624bd156df8d97aa4280040c7c7e362b4 Mon Sep 17 00:00:00 2001 From: qzed Date: Tue, 17 Sep 2019 17:17:56 +0200 Subject: [PATCH 1/7] surface3-power @@ -11,7 +11,7 @@ Subject: [PATCH 1/7] surface3-power create mode 100644 drivers/platform/x86/surface3_power.c diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig -index 1cab993205142..348c795019fa4 100644 +index 1cab99320514..348c795019fa 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -1209,6 +1209,13 @@ config SURFACE_3_BUTTON @@ -29,7 +29,7 @@ index 1cab993205142..348c795019fa4 100644 tristate "Intel P-Unit IPC Driver" ---help--- diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile -index 4151040330601..6dd955ad9bf18 100644 +index 415104033060..6dd955ad9bf1 100644 --- a/drivers/platform/x86/Makefile +++ b/drivers/platform/x86/Makefile @@ -85,6 +85,7 @@ obj-$(CONFIG_INTEL_PMC_IPC) += intel_pmc_ipc.o @@ -42,7 +42,7 @@ index 4151040330601..6dd955ad9bf18 100644 obj-$(CONFIG_INTEL_TELEMETRY) += intel_telemetry_core.o \ diff --git a/drivers/platform/x86/surface3_power.c b/drivers/platform/x86/surface3_power.c new file mode 100644 -index 0000000000000..e0af01a603025 +index 000000000000..e0af01a60302 --- /dev/null +++ b/drivers/platform/x86/surface3_power.c @@ -0,0 +1,604 @@ diff --git a/patches/5.4/0002-surface3-oemb.patch b/patches/5.4/0002-surface3-oemb.patch index a54fbc83e..addbd59e4 100644 --- a/patches/5.4/0002-surface3-oemb.patch +++ b/patches/5.4/0002-surface3-oemb.patch @@ -1,4 +1,4 @@ -From b8d406e8ad8bdf4e3c8d0293f880dd227626b348 Mon Sep 17 00:00:00 2001 +From 644f7558884abc017463703239a02ba1b2255e04 Mon Sep 17 00:00:00 2001 From: Chih-Wei Huang Date: Tue, 18 Sep 2018 11:01:37 +0800 Subject: [PATCH 2/7] surface3-oemb @@ -10,7 +10,7 @@ Subject: [PATCH 2/7] surface3-oemb 3 files changed, 24 insertions(+) diff --git a/drivers/platform/x86/surface3-wmi.c b/drivers/platform/x86/surface3-wmi.c -index 130b6f52a6001..801083aa56d6d 100644 +index 130b6f52a600..801083aa56d6 100644 --- a/drivers/platform/x86/surface3-wmi.c +++ b/drivers/platform/x86/surface3-wmi.c @@ -37,6 +37,13 @@ static const struct dmi_system_id surface3_dmi_table[] = { @@ -28,7 +28,7 @@ index 130b6f52a6001..801083aa56d6d 100644 { } }; diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c -index c83f7f5da96b7..e6bfe684d6be8 100644 +index c83f7f5da96b..e6bfe684d6be 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -3681,6 +3681,15 @@ static const struct dmi_system_id dmi_platform_data[] = { @@ -48,7 +48,7 @@ index c83f7f5da96b7..e6bfe684d6be8 100644 /* * Match for the GPDwin which unfortunately uses somewhat diff --git a/sound/soc/intel/common/soc-acpi-intel-cht-match.c b/sound/soc/intel/common/soc-acpi-intel-cht-match.c -index d0fb43c2b9f68..0e938713cb133 100644 +index d0fb43c2b9f6..0e938713cb13 100644 --- a/sound/soc/intel/common/soc-acpi-intel-cht-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-cht-match.c @@ -27,6 +27,14 @@ static const struct dmi_system_id cht_table[] = { diff --git a/patches/5.4/0003-wifi.patch b/patches/5.4/0003-wifi.patch index 275bc254f..6e9c8e650 100644 --- a/patches/5.4/0003-wifi.patch +++ b/patches/5.4/0003-wifi.patch @@ -1,4 +1,4 @@ -From 8285a0720a8c80b9b387cea679833cc966443126 Mon Sep 17 00:00:00 2001 +From 830c1239c7459f608d566b142f426b67805814ca Mon Sep 17 00:00:00 2001 From: kitakar5525 <34676735+kitakar5525@users.noreply.github.com> Date: Thu, 20 Feb 2020 16:51:11 +0900 Subject: [PATCH 3/7] wifi @@ -12,7 +12,7 @@ Subject: [PATCH 3/7] wifi 5 files changed, 87 insertions(+), 60 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c -index 9e6dc289ec3e8..00b4bc4469892 100644 +index 9e6dc289ec3e..00b4bc446989 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -25,6 +25,11 @@ @@ -56,7 +56,7 @@ index 9e6dc289ec3e8..00b4bc4469892 100644 } diff --git a/drivers/net/wireless/marvell/mwifiex/fw.h b/drivers/net/wireless/marvell/mwifiex/fw.h -index 1fb76d2f5d3fd..8b9d0809daf62 100644 +index 1fb76d2f5d3f..8b9d0809daf6 100644 --- a/drivers/net/wireless/marvell/mwifiex/fw.h +++ b/drivers/net/wireless/marvell/mwifiex/fw.h @@ -953,7 +953,7 @@ struct mwifiex_tkip_param { @@ -69,7 +69,7 @@ index 1fb76d2f5d3fd..8b9d0809daf62 100644 struct mwifiex_wapi_param { diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c -index fc1706d0647d7..b51c5e3571426 100644 +index fc1706d0647d..b51c5e357142 100644 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c @@ -146,38 +146,45 @@ static bool mwifiex_pcie_ok_to_access_hw(struct mwifiex_adapter *adapter) @@ -203,7 +203,7 @@ index fc1706d0647d7..b51c5e3571426 100644 pdev->vendor, pdev->device, pdev->revision); diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c -index 4ed10cf82f9a4..410bef3d6a6eb 100644 +index 4ed10cf82f9a..410bef3d6a6e 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c @@ -2254,7 +2254,6 @@ int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no, @@ -266,7 +266,7 @@ index 4ed10cf82f9a4..410bef3d6a6eb 100644 if (priv->bss_type != MWIFIEX_BSS_TYPE_UAP) { /* Send cmd to FW to enable/disable 11D function */ diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c -index 7ae2c34f65db2..4eaa493e33253 100644 +index 7ae2c34f65db..4eaa493e3325 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c @@ -619,7 +619,7 @@ static int mwifiex_ret_802_11_key_material_v2(struct mwifiex_private *priv, diff --git a/patches/5.4/0004-ipts.patch b/patches/5.4/0004-ipts.patch index 61240dc91..828582741 100644 --- a/patches/5.4/0004-ipts.patch +++ b/patches/5.4/0004-ipts.patch @@ -1,4 +1,4 @@ -From 08e03f4b002bed526c1414dcb85eab0b85e764e9 Mon Sep 17 00:00:00 2001 +From 79bbcb2e3777ae6c824cacdbf03898e0a8301a69 Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Mon, 27 Jan 2020 21:16:20 +0100 Subject: [PATCH 4/7] ipts @@ -76,7 +76,7 @@ Subject: [PATCH 4/7] ipts create mode 100644 drivers/input/touchscreen/ipts/stylus.h diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig -index 46ad9090493bb..c476a153b2f80 100644 +index 46ad9090493b..c476a153b2f8 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -1314,4 +1314,6 @@ config TOUCHSCREEN_IQS5XX @@ -87,7 +87,7 @@ index 46ad9090493bb..c476a153b2f80 100644 + endif diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile -index 94c6162409b37..864f0e092ab67 100644 +index 94c6162409b3..864f0e092ab6 100644 --- a/drivers/input/touchscreen/Makefile +++ b/drivers/input/touchscreen/Makefile @@ -45,6 +45,7 @@ obj-$(CONFIG_TOUCHSCREEN_EXC3000) += exc3000.o @@ -100,7 +100,7 @@ index 94c6162409b37..864f0e092ab67 100644 obj-$(CONFIG_TOUCHSCREEN_INEXIO) += inexio.o diff --git a/drivers/input/touchscreen/ipts/Kconfig b/drivers/input/touchscreen/ipts/Kconfig new file mode 100644 -index 0000000000000..d3c530dafa948 +index 000000000000..d3c530dafa94 --- /dev/null +++ b/drivers/input/touchscreen/ipts/Kconfig @@ -0,0 +1,16 @@ @@ -122,7 +122,7 @@ index 0000000000000..d3c530dafa948 + module will be called ipts. diff --git a/drivers/input/touchscreen/ipts/Makefile b/drivers/input/touchscreen/ipts/Makefile new file mode 100644 -index 0000000000000..0f7c904e73171 +index 000000000000..0f7c904e7317 --- /dev/null +++ b/drivers/input/touchscreen/ipts/Makefile @@ -0,0 +1,17 @@ @@ -145,7 +145,7 @@ index 0000000000000..0f7c904e73171 +ipts-objs += stylus.o diff --git a/drivers/input/touchscreen/ipts/context.h b/drivers/input/touchscreen/ipts/context.h new file mode 100644 -index 0000000000000..ab26552579a5c +index 000000000000..ab26552579a5 --- /dev/null +++ b/drivers/input/touchscreen/ipts/context.h @@ -0,0 +1,60 @@ @@ -211,7 +211,7 @@ index 0000000000000..ab26552579a5c +#endif /* _IPTS_CONTEXT_H_ */ diff --git a/drivers/input/touchscreen/ipts/control.c b/drivers/input/touchscreen/ipts/control.c new file mode 100644 -index 0000000000000..9179eca665585 +index 000000000000..9179eca66558 --- /dev/null +++ b/drivers/input/touchscreen/ipts/control.c @@ -0,0 +1,94 @@ @@ -311,7 +311,7 @@ index 0000000000000..9179eca665585 +} diff --git a/drivers/input/touchscreen/ipts/control.h b/drivers/input/touchscreen/ipts/control.h new file mode 100644 -index 0000000000000..e57609c85d62a +index 000000000000..e57609c85d62 --- /dev/null +++ b/drivers/input/touchscreen/ipts/control.h @@ -0,0 +1,18 @@ @@ -335,7 +335,7 @@ index 0000000000000..e57609c85d62a +#endif /* _IPTS_CONTROL_H_ */ diff --git a/drivers/input/touchscreen/ipts/data.c b/drivers/input/touchscreen/ipts/data.c new file mode 100644 -index 0000000000000..568bf04f7ea6e +index 000000000000..568bf04f7ea6 --- /dev/null +++ b/drivers/input/touchscreen/ipts/data.c @@ -0,0 +1,107 @@ @@ -448,7 +448,7 @@ index 0000000000000..568bf04f7ea6e +} diff --git a/drivers/input/touchscreen/ipts/data.h b/drivers/input/touchscreen/ipts/data.h new file mode 100644 -index 0000000000000..fa72c1be09451 +index 000000000000..fa72c1be0945 --- /dev/null +++ b/drivers/input/touchscreen/ipts/data.h @@ -0,0 +1,12 @@ @@ -466,7 +466,7 @@ index 0000000000000..fa72c1be09451 +#endif /* _IPTS_DATA_H_ */ diff --git a/drivers/input/touchscreen/ipts/hid.c b/drivers/input/touchscreen/ipts/hid.c new file mode 100644 -index 0000000000000..2642990b8c420 +index 000000000000..2642990b8c42 --- /dev/null +++ b/drivers/input/touchscreen/ipts/hid.c @@ -0,0 +1,38 @@ @@ -510,7 +510,7 @@ index 0000000000000..2642990b8c420 +} diff --git a/drivers/input/touchscreen/ipts/hid.h b/drivers/input/touchscreen/ipts/hid.h new file mode 100644 -index 0000000000000..e6cf38fce4541 +index 000000000000..e6cf38fce454 --- /dev/null +++ b/drivers/input/touchscreen/ipts/hid.h @@ -0,0 +1,13 @@ @@ -529,7 +529,7 @@ index 0000000000000..e6cf38fce4541 +#endif /* _IPTS_HID_H_ */ diff --git a/drivers/input/touchscreen/ipts/init.c b/drivers/input/touchscreen/ipts/init.c new file mode 100644 -index 0000000000000..fb70d55542af7 +index 000000000000..fb70d55542af --- /dev/null +++ b/drivers/input/touchscreen/ipts/init.c @@ -0,0 +1,93 @@ @@ -628,7 +628,7 @@ index 0000000000000..fb70d55542af7 +MODULE_LICENSE("GPL"); diff --git a/drivers/input/touchscreen/ipts/math.c b/drivers/input/touchscreen/ipts/math.c new file mode 100644 -index 0000000000000..df956e5447e03 +index 000000000000..df956e5447e0 --- /dev/null +++ b/drivers/input/touchscreen/ipts/math.c @@ -0,0 +1,103 @@ @@ -737,7 +737,7 @@ index 0000000000000..df956e5447e03 +} diff --git a/drivers/input/touchscreen/ipts/math.h b/drivers/input/touchscreen/ipts/math.h new file mode 100644 -index 0000000000000..8e831074ab60b +index 000000000000..8e831074ab60 --- /dev/null +++ b/drivers/input/touchscreen/ipts/math.h @@ -0,0 +1,21 @@ @@ -764,7 +764,7 @@ index 0000000000000..8e831074ab60b +#endif /* _IPTS_MATH_H_ */ diff --git a/drivers/input/touchscreen/ipts/params.c b/drivers/input/touchscreen/ipts/params.c new file mode 100644 -index 0000000000000..6aa3f5cf1d762 +index 000000000000..6aa3f5cf1d76 --- /dev/null +++ b/drivers/input/touchscreen/ipts/params.c @@ -0,0 +1,27 @@ @@ -797,7 +797,7 @@ index 0000000000000..6aa3f5cf1d762 +); diff --git a/drivers/input/touchscreen/ipts/params.h b/drivers/input/touchscreen/ipts/params.h new file mode 100644 -index 0000000000000..1f992a3bc21b9 +index 000000000000..1f992a3bc21b --- /dev/null +++ b/drivers/input/touchscreen/ipts/params.h @@ -0,0 +1,15 @@ @@ -818,7 +818,7 @@ index 0000000000000..1f992a3bc21b9 +#endif /* _IPTS_PARAMS_H_ */ diff --git a/drivers/input/touchscreen/ipts/payload.c b/drivers/input/touchscreen/ipts/payload.c new file mode 100644 -index 0000000000000..3572ddc0f2fb0 +index 000000000000..3572ddc0f2fb --- /dev/null +++ b/drivers/input/touchscreen/ipts/payload.c @@ -0,0 +1,52 @@ @@ -876,7 +876,7 @@ index 0000000000000..3572ddc0f2fb0 +} diff --git a/drivers/input/touchscreen/ipts/payload.h b/drivers/input/touchscreen/ipts/payload.h new file mode 100644 -index 0000000000000..6603714bb6fd0 +index 000000000000..6603714bb6fd --- /dev/null +++ b/drivers/input/touchscreen/ipts/payload.h @@ -0,0 +1,14 @@ @@ -896,7 +896,7 @@ index 0000000000000..6603714bb6fd0 +#endif /* _IPTS_PAYLOAD_H_ */ diff --git a/drivers/input/touchscreen/ipts/protocol/commands.h b/drivers/input/touchscreen/ipts/protocol/commands.h new file mode 100644 -index 0000000000000..2533dfb13584a +index 000000000000..2533dfb13584 --- /dev/null +++ b/drivers/input/touchscreen/ipts/protocol/commands.h @@ -0,0 +1,61 @@ @@ -963,7 +963,7 @@ index 0000000000000..2533dfb13584a +#endif /* _IPTS_PROTOCOL_COMMANDS_H_ */ diff --git a/drivers/input/touchscreen/ipts/protocol/data.h b/drivers/input/touchscreen/ipts/protocol/data.h new file mode 100644 -index 0000000000000..148e0545b2e4e +index 000000000000..148e0545b2e4 --- /dev/null +++ b/drivers/input/touchscreen/ipts/protocol/data.h @@ -0,0 +1,30 @@ @@ -999,7 +999,7 @@ index 0000000000000..148e0545b2e4e +#endif /* _IPTS_PROTOCOL_DATA_H_ */ diff --git a/drivers/input/touchscreen/ipts/protocol/events.h b/drivers/input/touchscreen/ipts/protocol/events.h new file mode 100644 -index 0000000000000..f8b771f90bd2b +index 000000000000..f8b771f90bd2 --- /dev/null +++ b/drivers/input/touchscreen/ipts/protocol/events.h @@ -0,0 +1,29 @@ @@ -1034,7 +1034,7 @@ index 0000000000000..f8b771f90bd2b +#endif /* _IPTS_PROTOCOL_EVENTS_H_ */ diff --git a/drivers/input/touchscreen/ipts/protocol/feedback.h b/drivers/input/touchscreen/ipts/protocol/feedback.h new file mode 100644 -index 0000000000000..8b3d8b689ee83 +index 000000000000..8b3d8b689ee8 --- /dev/null +++ b/drivers/input/touchscreen/ipts/protocol/feedback.h @@ -0,0 +1,30 @@ @@ -1070,7 +1070,7 @@ index 0000000000000..8b3d8b689ee83 +#endif /* _IPTS_PROTOCOL_FEEDBACK_H_ */ diff --git a/drivers/input/touchscreen/ipts/protocol/payload.h b/drivers/input/touchscreen/ipts/protocol/payload.h new file mode 100644 -index 0000000000000..f46da4ea81f25 +index 000000000000..f46da4ea81f2 --- /dev/null +++ b/drivers/input/touchscreen/ipts/protocol/payload.h @@ -0,0 +1,47 @@ @@ -1123,7 +1123,7 @@ index 0000000000000..f46da4ea81f25 +#endif /* _IPTS_PROTOCOL_PAYLOAD_H_ */ diff --git a/drivers/input/touchscreen/ipts/protocol/responses.h b/drivers/input/touchscreen/ipts/protocol/responses.h new file mode 100644 -index 0000000000000..27153d82a5d67 +index 000000000000..27153d82a5d6 --- /dev/null +++ b/drivers/input/touchscreen/ipts/protocol/responses.h @@ -0,0 +1,62 @@ @@ -1191,7 +1191,7 @@ index 0000000000000..27153d82a5d67 +#endif /* _IPTS_PROTOCOL_RESPONSES_H_ */ diff --git a/drivers/input/touchscreen/ipts/protocol/singletouch.h b/drivers/input/touchscreen/ipts/protocol/singletouch.h new file mode 100644 -index 0000000000000..bf9912ee2af4c +index 000000000000..bf9912ee2af4 --- /dev/null +++ b/drivers/input/touchscreen/ipts/protocol/singletouch.h @@ -0,0 +1,17 @@ @@ -1214,7 +1214,7 @@ index 0000000000000..bf9912ee2af4c +#endif /* _IPTS_PROTOCOL_SINGLETOUCH_H_ */ diff --git a/drivers/input/touchscreen/ipts/protocol/stylus.h b/drivers/input/touchscreen/ipts/protocol/stylus.h new file mode 100644 -index 0000000000000..950850b365dfb +index 000000000000..950850b365df --- /dev/null +++ b/drivers/input/touchscreen/ipts/protocol/stylus.h @@ -0,0 +1,52 @@ @@ -1272,7 +1272,7 @@ index 0000000000000..950850b365dfb +#endif /* _IPTS_PAYLOAD_STYLUS_H_ */ diff --git a/drivers/input/touchscreen/ipts/receiver.c b/drivers/input/touchscreen/ipts/receiver.c new file mode 100644 -index 0000000000000..ab283994c3e5f +index 000000000000..ab283994c3e5 --- /dev/null +++ b/drivers/input/touchscreen/ipts/receiver.c @@ -0,0 +1,265 @@ @@ -1543,7 +1543,7 @@ index 0000000000000..ab283994c3e5f +} diff --git a/drivers/input/touchscreen/ipts/receiver.h b/drivers/input/touchscreen/ipts/receiver.h new file mode 100644 -index 0000000000000..4d413a0abd4c5 +index 000000000000..4d413a0abd4c --- /dev/null +++ b/drivers/input/touchscreen/ipts/receiver.h @@ -0,0 +1,8 @@ @@ -1557,7 +1557,7 @@ index 0000000000000..4d413a0abd4c5 +#endif /* _IPTS_RECEIVER_H_ */ diff --git a/drivers/input/touchscreen/ipts/resources.c b/drivers/input/touchscreen/ipts/resources.c new file mode 100644 -index 0000000000000..704db9fdd3fd4 +index 000000000000..704db9fdd3fd --- /dev/null +++ b/drivers/input/touchscreen/ipts/resources.c @@ -0,0 +1,131 @@ @@ -1694,7 +1694,7 @@ index 0000000000000..704db9fdd3fd4 +} diff --git a/drivers/input/touchscreen/ipts/resources.h b/drivers/input/touchscreen/ipts/resources.h new file mode 100644 -index 0000000000000..cf9807b0dbe62 +index 000000000000..cf9807b0dbe6 --- /dev/null +++ b/drivers/input/touchscreen/ipts/resources.h @@ -0,0 +1,11 @@ @@ -1711,7 +1711,7 @@ index 0000000000000..cf9807b0dbe62 +#endif /* _IPTS_RESOURCES_H_ */ diff --git a/drivers/input/touchscreen/ipts/singletouch.c b/drivers/input/touchscreen/ipts/singletouch.c new file mode 100644 -index 0000000000000..ed70444f649c4 +index 000000000000..ed70444f649c --- /dev/null +++ b/drivers/input/touchscreen/ipts/singletouch.c @@ -0,0 +1,64 @@ @@ -1781,7 +1781,7 @@ index 0000000000000..ed70444f649c4 +} diff --git a/drivers/input/touchscreen/ipts/singletouch.h b/drivers/input/touchscreen/ipts/singletouch.h new file mode 100644 -index 0000000000000..53207497a4628 +index 000000000000..53207497a462 --- /dev/null +++ b/drivers/input/touchscreen/ipts/singletouch.h @@ -0,0 +1,14 @@ @@ -1801,7 +1801,7 @@ index 0000000000000..53207497a4628 +#endif /* _IPTS_SINGLETOUCH_H_ */ diff --git a/drivers/input/touchscreen/ipts/stylus.c b/drivers/input/touchscreen/ipts/stylus.c new file mode 100644 -index 0000000000000..987fa756fec33 +index 000000000000..987fa756fec3 --- /dev/null +++ b/drivers/input/touchscreen/ipts/stylus.c @@ -0,0 +1,179 @@ @@ -1986,7 +1986,7 @@ index 0000000000000..987fa756fec33 +} diff --git a/drivers/input/touchscreen/ipts/stylus.h b/drivers/input/touchscreen/ipts/stylus.h new file mode 100644 -index 0000000000000..5b93add1eac2d +index 000000000000..5b93add1eac2 --- /dev/null +++ b/drivers/input/touchscreen/ipts/stylus.h @@ -0,0 +1,14 @@ @@ -2005,7 +2005,7 @@ index 0000000000000..5b93add1eac2d + +#endif /* _IPTS_STYLUS_H_ */ diff --git a/drivers/misc/mei/hw-me-regs.h b/drivers/misc/mei/hw-me-regs.h -index e56dc47540646..a55c61c89238a 100644 +index e56dc4754064..a55c61c89238 100644 --- a/drivers/misc/mei/hw-me-regs.h +++ b/drivers/misc/mei/hw-me-regs.h @@ -59,6 +59,7 @@ @@ -2025,7 +2025,7 @@ index e56dc47540646..a55c61c89238a 100644 #define MEI_DEV_ID_TGP_LP 0xA0E0 /* Tiger Lake Point LP */ diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c -index 75ab2ffbf235f..78790904d77cb 100644 +index 75ab2ffbf235..78790904d77c 100644 --- a/drivers/misc/mei/pci-me.c +++ b/drivers/misc/mei/pci-me.c @@ -77,6 +77,7 @@ static const struct pci_device_id mei_me_pci_tbl[] = { @@ -2045,7 +2045,7 @@ index 75ab2ffbf235f..78790904d77cb 100644 {MEI_PCI_DEVICE(MEI_DEV_ID_TGP_LP, MEI_ME_PCH12_CFG)}, diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h -index 9a61c28ed3ae4..47fc20975245d 100644 +index 9a61c28ed3ae..47fc20975245 100644 --- a/include/uapi/linux/input.h +++ b/include/uapi/linux/input.h @@ -271,6 +271,7 @@ struct input_mask { diff --git a/patches/5.4/0005-surface-sam.patch b/patches/5.4/0005-surface-sam.patch index b2121864e..99bb53e31 100644 --- a/patches/5.4/0005-surface-sam.patch +++ b/patches/5.4/0005-surface-sam.patch @@ -1,4 +1,4 @@ -From 70f01d628089fdbe333ef228c6ac1c1d0f8d126f Mon Sep 17 00:00:00 2001 +From 6196060ec0cacf88b487d5880b3ba70c2cc5d8ae Mon Sep 17 00:00:00 2001 From: qzed Date: Mon, 26 Aug 2019 01:11:08 +0200 Subject: [PATCH 5/7] surface-sam @@ -7,11 +7,14 @@ Subject: [PATCH 5/7] surface-sam Documentation/driver-api/index.rst | 1 + Documentation/driver-api/ssam/client-api.rst | 19 + Documentation/driver-api/ssam/client.rst | 381 +++ - Documentation/driver-api/ssam/index.rst | 20 + + .../driver-api/ssam/clients/dbgdev.rst | 128 + + .../driver-api/ssam/clients/index.rst | 21 + + Documentation/driver-api/ssam/clients/san.rst | 44 + + Documentation/driver-api/ssam/index.rst | 21 + .../driver-api/ssam/internal-api.rst | 70 + Documentation/driver-api/ssam/internal.rst | 50 + Documentation/driver-api/ssam/overview.rst | 76 + - Documentation/driver-api/ssam/ssh.rst | 297 ++ + Documentation/driver-api/ssam/ssh.rst | 343 +++ drivers/acpi/acpica/dsopcode.c | 2 +- drivers/acpi/acpica/exfield.c | 12 +- drivers/misc/Kconfig | 1 + @@ -22,11 +25,11 @@ Subject: [PATCH 5/7] surface-sam drivers/misc/surface_sam/bus.h | 14 + drivers/misc/surface_sam/clients/Kconfig | 121 + drivers/misc/surface_sam/clients/Makefile | 11 + - .../surface_sam/clients/surface_sam_debugfs.c | 265 ++ + .../surface_sam/clients/surface_sam_debugfs.c | 282 ++ .../clients/surface_sam_device_hub.c | 583 ++++ .../surface_sam/clients/surface_sam_dtx.c | 583 ++++ .../surface_sam/clients/surface_sam_hps.c | 1296 +++++++++ - .../surface_sam/clients/surface_sam_san.c | 813 ++++++ + .../surface_sam/clients/surface_sam_san.c | 841 ++++++ .../clients/surface_sam_sid_perfmode.c | 190 ++ .../clients/surface_sam_sid_power.c | 1114 ++++++++ .../surface_sam/clients/surface_sam_sid_vhf.c | 498 ++++ @@ -45,13 +48,16 @@ Subject: [PATCH 5/7] surface-sam drivers/misc/surface_sam/ssh_request_layer.h | 136 + drivers/tty/serdev/core.c | 111 +- include/linux/mod_devicetable.h | 17 + - include/linux/surface_acpi_notify.h | 30 + + include/linux/surface_acpi_notify.h | 39 + include/linux/surface_aggregator_module.h | 1744 ++++++++++++ scripts/mod/devicetable-offsets.c | 7 + scripts/mod/file2alias.c | 22 + - 45 files changed, 17474 insertions(+), 16 deletions(-) + 48 files changed, 17768 insertions(+), 16 deletions(-) create mode 100644 Documentation/driver-api/ssam/client-api.rst create mode 100644 Documentation/driver-api/ssam/client.rst + create mode 100644 Documentation/driver-api/ssam/clients/dbgdev.rst + create mode 100644 Documentation/driver-api/ssam/clients/index.rst + create mode 100644 Documentation/driver-api/ssam/clients/san.rst create mode 100644 Documentation/driver-api/ssam/index.rst create mode 100644 Documentation/driver-api/ssam/internal-api.rst create mode 100644 Documentation/driver-api/ssam/internal.rst @@ -88,7 +94,7 @@ Subject: [PATCH 5/7] surface-sam create mode 100644 include/linux/surface_aggregator_module.h diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/index.rst -index 38e638abe3ebc..c6fcff170774e 100644 +index 38e638abe3eb..c6fcff170774 100644 --- a/Documentation/driver-api/index.rst +++ b/Documentation/driver-api/index.rst @@ -96,6 +96,7 @@ available subsections can be seen below. @@ -101,7 +107,7 @@ index 38e638abe3ebc..c6fcff170774e 100644 vfio-mediated-device diff --git a/Documentation/driver-api/ssam/client-api.rst b/Documentation/driver-api/ssam/client-api.rst new file mode 100644 -index 0000000000000..3d5fc6a4dc953 +index 000000000000..3d5fc6a4dc95 --- /dev/null +++ b/Documentation/driver-api/ssam/client-api.rst @@ -0,0 +1,19 @@ @@ -126,7 +132,7 @@ index 0000000000000..3d5fc6a4dc953 + :export: diff --git a/Documentation/driver-api/ssam/client.rst b/Documentation/driver-api/ssam/client.rst new file mode 100644 -index 0000000000000..fa0aa032a9488 +index 000000000000..fa0aa032a948 --- /dev/null +++ b/Documentation/driver-api/ssam/client.rst @@ -0,0 +1,381 @@ @@ -511,12 +517,223 @@ index 0000000000000..fa0aa032a9488 +flags are therefore only used on the first registered notifier, however, one +should take care that notifiers for a specific event are always registered +with the same flag and it is considered a bug to do otherwise. +diff --git a/Documentation/driver-api/ssam/clients/dbgdev.rst b/Documentation/driver-api/ssam/clients/dbgdev.rst +new file mode 100644 +index 000000000000..d4d42634f516 +--- /dev/null ++++ b/Documentation/driver-api/ssam/clients/dbgdev.rst +@@ -0,0 +1,128 @@ ++.. SPDX-License-Identifier: GPL-2.0 ++ ++.. |u8| replace:: :c:type:`u8 ` ++.. |u16| replace:: :c:type:`u16 ` ++.. |ssam_dbgdev_request| replace:: :c:type:`struct ssam_dbgdev_request ` ++.. |ssam_request_flags| replace:: :c:type:`enum ssam_request_flags ` ++ ++======================================= ++SSAM Debug Device and DebugFS Interface ++======================================= ++ ++The ``surface_sam_debugfs`` module provides a DebugFS interface for the SSAM ++controller to allow for a (more or less) direct connection from userspace to ++the SAM EC. It is intended to be used for development and debugging, and ++therefore should not be used or relied upon in any other way. Note that this ++module is not loaded automatically, but instead must be loaded manually. ++ ++The provided interface is accessible through the ``ssam/controller`` ++device-file in debugfs, so, if the conventional mount path is being used, ++``/sys/kernel/debug/ssam/controller``. All functionality of this interface ++is provided via IOCTLs. ++ ++ ++Controller IOCTLs ++================= ++ ++The following IOCTLs are provided: ++ ++.. flat-table:: Controller IOCTLs ++ :widths: 1 1 1 1 4 ++ :header-rows: 1 ++ ++ * - Type ++ - Number ++ - Direction ++ - Name ++ - Description ++ ++ * - ``0xA5`` ++ - ``0`` ++ - ``R`` ++ - ``GETVERSION`` ++ - Get DebugFS controller interface version. ++ ++ * - ``0xA5`` ++ - ``1`` ++ - ``WR`` ++ - ``REQUEST`` ++ - Perform synchronous SAM request. ++ ++ ++``GETVERSION`` ++-------------- ++ ++Defined as ``_IOR(0xA5, 0, __u32)``. ++ ++Gets the current interface version. This should be used to check for changes ++in the interface and determine if certain functionality is available. While ++the interface should under normal circumstances kept backward compatible, as ++this is a debug interface, backwards compatibility is not guaranteed. ++ ++The version number follows the semantic versioning scheme, roughly meaning ++that an increment in the highest non-zero version number signals a breaking ++change. It can be decomposed as follows: ++ ++.. flat-table:: Version Number Format ++ :widths: 2 1 3 ++ :header-rows: 1 ++ ++ * - Offset (bytes) ++ - Type ++ - Description ++ ++ * - ``0`` ++ - |u8| ++ - Major ++ ++ * - ``1`` ++ - |u8| ++ - Minor ++ ++ * - ``2`` ++ - |u16| ++ - Patch ++ ++The interface version is currently ``0.1.0``, i.e. ``0x00010000``. ++ ++ ++``REQUEST`` ++----------- ++ ++Defined as ``_IOWR(0xA5, 1, struct ssam_dbgdev_request)``. ++ ++Executes a synchronous SAM request. The request specification is passed in ++as argument of type |ssam_dbgdev_request|, which is then written to/modified ++by the IOCTL to return status and result of the request. ++ ++Request payload data must be allocated separately and is passed in via the ++``payload.data`` and ``payload.length`` members. If a response is required, ++the response buffer must be allocated by the caller and passed in via the ++``response.data`` member. The ``response.length`` member must be set to the ++capacity of this buffer, or if no response is required, zero. Upon ++completion of the request, the call will write the response to the response ++buffer (if its capacity allows it) and overwrite the length field with the ++actual size of the response, in bytes. ++ ++Additionally, if the request has a response, this should be indicated via ++the request flags, as is done with in-kernel requests. Request flags can be ++set via the ``flags`` member and the values correspond to the values found ++in |ssam_request_flags|. ++ ++Finally, the status of the request itself is returned in the ``status`` ++member (a negative value indicating failure). Note that failure indication ++of the IOCTL is separated from failure indication of the request: The IOCTL ++returns a negative status code if anything failed during setup of the ++request (``-EFAULT``) or if the provided argument or any of its fields are ++invalid (``-EINVAL``). In this case, the status value of the request ++argument may be set, providing more detail on what went wrong (e.g. ++``-ENOMEM`` for out-of-memory), but this value may also be zero. The IOCTL ++will return with a zero status code in case the request has been set up, ++submitted, and completed (i.e. handed back to user-space) successfully from ++inside the IOCTL, but the request ``status`` member may still be negative in ++case the actual execution of the request failed after it has been submitted. ++ ++A full definition of the argument struct is provided below: ++ ++.. kernel-doc:: drivers/misc/surface_sam/clients/surface_sam_debugfs.c ++ :functions: ssam_dbgdev_request +diff --git a/Documentation/driver-api/ssam/clients/index.rst b/Documentation/driver-api/ssam/clients/index.rst +new file mode 100644 +index 000000000000..7cd91fc75e91 +--- /dev/null ++++ b/Documentation/driver-api/ssam/clients/index.rst +@@ -0,0 +1,21 @@ ++.. SPDX-License-Identifier: GPL-2.0 ++ ++=========================== ++Client Driver Documentation ++=========================== ++ ++This is the documentation for client drivers themselves. Refer to ++:doc:`../client` for documentation on how to write client drivers. ++ ++.. toctree:: ++ :maxdepth: 1 ++ ++ dbgdev ++ san ++ ++.. only:: subproject and html ++ ++ Indices ++ ======= ++ ++ * :ref:`genindex` +diff --git a/Documentation/driver-api/ssam/clients/san.rst b/Documentation/driver-api/ssam/clients/san.rst +new file mode 100644 +index 000000000000..380b89e61955 +--- /dev/null ++++ b/Documentation/driver-api/ssam/clients/san.rst +@@ -0,0 +1,44 @@ ++.. SPDX-License-Identifier: GPL-2.0 ++ ++.. |san_client_link| replace:: :c:func:`san_client_link` ++.. |san_dgpu_notifier_register| replace:: :c:func:`san_dgpu_notifier_register` ++.. |san_dgpu_notifier_unregister| replace:: :c:func:`san_dgpu_notifier_unregister` ++ ++=================== ++Surface ACPI Notify ++=================== ++ ++The Surface ACPI Notify (SAN) device provides the bridge between ACPI and ++SAM controller. Specifically, ACPI code can execute requests and handle ++battery and thermal events via this interface. In addition to this, events ++relating to the discrete GPU (dGPU) of the Surface Book 2 can be sent from ++ACPI code (note: the Surface Book 3 uses a different method for this). The ++only currently known event sent via this interface is a dGPU power-on ++notification. While this driver handles the former part internally, it only ++relays the dGPU events to any other driver interested via its public API and ++does not handle them. ++ ++The public interface of this driver is split into two parts: Client ++registration and notifier-block registration. ++ ++A client to the SAN interface can be linked as consumer to the SAN device ++via |san_client_link|. This can be used to ensure that the a client ++receiving dGPU events does not miss any events due to the SAN interface not ++being set up as this forces the client driver to unbind once the SAN driver ++is unbound. ++ ++Notifier-blocks can be registered by any device for as long as the module is ++loaded, regardless of being linked as client or not. Registration is done ++with |san_dgpu_notifier_register|. If the notifier is not needed any more, it ++should be unregistered via |san_dgpu_notifier_unregister|. ++ ++Consult the API documentation below for more details. ++ ++ ++API Documentation ++================= ++ ++.. kernel-doc:: include/linux/surface_acpi_notify.h ++ ++.. kernel-doc:: drivers/misc/surface_sam/clients/surface_sam_san.c ++ :export: diff --git a/Documentation/driver-api/ssam/index.rst b/Documentation/driver-api/ssam/index.rst new file mode 100644 -index 0000000000000..e1274d64db0d2 +index 000000000000..5eff57c1836d --- /dev/null +++ b/Documentation/driver-api/ssam/index.rst -@@ -0,0 +1,20 @@ +@@ -0,0 +1,21 @@ +.. SPDX-License-Identifier: GPL-2.0 + +======================================= @@ -530,6 +747,7 @@ index 0000000000000..e1274d64db0d2 + ssh + client + internal ++ clients/index + +.. only:: subproject and html + @@ -539,7 +757,7 @@ index 0000000000000..e1274d64db0d2 + * :ref:`genindex` diff --git a/Documentation/driver-api/ssam/internal-api.rst b/Documentation/driver-api/ssam/internal-api.rst new file mode 100644 -index 0000000000000..cd55b6b206e45 +index 000000000000..cd55b6b206e4 --- /dev/null +++ b/Documentation/driver-api/ssam/internal-api.rst @@ -0,0 +1,70 @@ @@ -615,7 +833,7 @@ index 0000000000000..cd55b6b206e45 +.. kernel-doc:: drivers/misc/surface_sam/ssam_trace.h diff --git a/Documentation/driver-api/ssam/internal.rst b/Documentation/driver-api/ssam/internal.rst new file mode 100644 -index 0000000000000..0504247d87862 +index 000000000000..0504247d8786 --- /dev/null +++ b/Documentation/driver-api/ssam/internal.rst @@ -0,0 +1,50 @@ @@ -671,7 +889,7 @@ index 0000000000000..0504247d87862 +API and interface options for other kernel drivers. diff --git a/Documentation/driver-api/ssam/overview.rst b/Documentation/driver-api/ssam/overview.rst new file mode 100644 -index 0000000000000..7b7a6d9e8e22b +index 000000000000..7b7a6d9e8e22 --- /dev/null +++ b/Documentation/driver-api/ssam/overview.rst @@ -0,0 +1,76 @@ @@ -753,10 +971,10 @@ index 0000000000000..7b7a6d9e8e22b +See :doc:`ssh` for a more technical protocol documentation. diff --git a/Documentation/driver-api/ssam/ssh.rst b/Documentation/driver-api/ssam/ssh.rst new file mode 100644 -index 0000000000000..2a8a10e219ac5 +index 000000000000..35c903009cf3 --- /dev/null +++ b/Documentation/driver-api/ssam/ssh.rst -@@ -0,0 +1,297 @@ +@@ -0,0 +1,343 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. |u8| replace:: :c:type:`u8 ` @@ -809,15 +1027,25 @@ index 0000000000000..2a8a10e219ac5 +(:c:type:`struct ssh_frame `). A frame consists of the following +fields, packed together and in order: + -+ +--------+-------+--------------------------------------------------+ -+ | Field | Type | Description | -+ +========+=======+==================================================+ -+ | |TYPE| | |u8| | Type identifier of the frame. | -+ +--------+-------+--------------------------------------------------+ -+ | |LEN| | |u16| | Length of the payload associated with the frame. | -+ +--------+-------+--------------------------------------------------+ -+ | |SEQ| | |u8| | Sequence ID (see explanation below). | -+ +--------+-------+--------------------------------------------------+ ++.. flat-table:: SSH Frame ++ :widths: 1 1 4 ++ :header-rows: 1 ++ ++ * - Field ++ - Type ++ - Description ++ ++ * - |TYPE| ++ - |u8| ++ - Type identifier of the frame. ++ ++ * - |LEN| ++ - |u16| ++ - Length of the payload associated with the frame. ++ ++ * - |SEQ| ++ - |u8| ++ - Sequence ID (see explanation below). + +Each frame structure is followed by a CRC over this structure. The CRC over +the frame structure (|TYPE|, |LEN|, and |SEQ| fields) is placed directly @@ -830,11 +1058,17 @@ index 0000000000000..2a8a10e219ac5 + +Additionally, the following fixed two-byte sequences are used: + -+ +-------+------------------+------------------------+ -+ | Name | Value | Description | -+ +=======+==================+========================+ -+ | |SYN| | ``[0xAA, 0x55]`` | Synchronization bytes. | -+ +-------+------------------+------------------------+ ++.. flat-table:: SSH Byte Sequences ++ :widths: 1 1 4 ++ :header-rows: 1 ++ ++ * - Name ++ - Value ++ - Description ++ ++ * - |SYN| ++ - ``[0xAA, 0x55]`` ++ - Synchronization bytes. + +A message consists of |SYN|, followed by the frame (|TYPE|, |LEN|, |SEQ| and +CRC) and, if specified in the frame (i.e. ``LEN > 0``), payload bytes, @@ -846,17 +1080,29 @@ index 0000000000000..2a8a10e219ac5 +A frame can have the following types +(:c:type:`enum ssh_frame_type `): + -+ +------------+----------+----------------------------------------------------+ -+ | Name | Value | Short Description | -+ +============+==========+====================================================+ -+ | |NAK| | ``0x04`` | Sent on error in previously received message. | -+ +------------+----------+----------------------------------------------------+ -+ | |ACK| | ``0x40`` | Sent to acknowledge receival of |DATA| frame. | -+ +------------+----------+----------------------------------------------------+ -+ | |DATA_SEQ| | ``0x80`` | Sent to transfer data. Sequenced. | -+ +------------+----------+----------------------------------------------------+ -+ | |DATA_NSQ| | ``0x00`` | Same as |DATA_SEQ|, but does not need to be ACKed. | -+ +------------+----------+----------------------------------------------------+ ++.. flat-table:: SSH Frame Types ++ :widths: 1 1 4 ++ :header-rows: 1 ++ ++ * - Name ++ - Value ++ - Short Description ++ ++ * - |NAK| ++ - ``0x04`` ++ - Sent on error in previously received message. ++ ++ * - |ACK| ++ - ``0x40`` ++ - Sent to acknowledge receival of |DATA| frame. ++ ++ * - |DATA_SEQ| ++ - ``0x80`` ++ - Sent to transfer data. Sequenced. ++ ++ * - |DATA_NSQ| ++ - ``0x00`` ++ - Same as |DATA_SEQ|, but does not need to be ACKed. + +Both |NAK|- and |ACK|-type frames are used to control flow of messages and +thus do not carry a payload. |DATA_SEQ|- and |DATA_NSQ|-type frames on the @@ -933,23 +1179,41 @@ index 0000000000000..2a8a10e219ac5 +``frame.len - sizeof(struct ssh_command)``. The command struct contains the +following fields, packed together and in order: + -+ +-------------+-------+----------------------------------------------------+ -+ | Field | Type | Description | -+ +=============+=======+====================================================+ -+ | |TYPE| | |u8| | Type of the payload. For commands always ``0x80``. | -+ +-------------+-------+----------------------------------------------------+ -+ | |TC| | |u8| | Target category. | -+ +-------------+-------+----------------------------------------------------+ -+ | |TID| (out) | |u8| | Target ID for outgoing (host to EC) commands. | -+ +-------------+-------+----------------------------------------------------+ -+ | |TID| (in) | |u8| | Target ID for incoming (EC to host) commands. | -+ +-------------+-------+----------------------------------------------------+ -+ | |IID| | |u8| | Instance ID. | -+ +-------------+-------+----------------------------------------------------+ -+ | |RQID| | |u16| | Request ID. | -+ +-------------+-------+----------------------------------------------------+ -+ | |CID| | |u8| | Command ID. | -+ +-------------+-------+----------------------------------------------------+ ++.. flat-table:: SSH Command ++ :widths: 1 1 4 ++ :header-rows: 1 ++ ++ * - Field ++ - Type ++ - Description ++ ++ * - |TYPE| ++ - |u8| ++ - Type of the payload. For commands always ``0x80``. ++ ++ * - |TC| ++ - |u8| ++ - Target category. ++ ++ * - |TID| (out) ++ - |u8| ++ - Target ID for outgoing (host to EC) commands. ++ ++ * - |TID| (in) ++ - |u8| ++ - Target ID for incoming (EC to host) commands. ++ ++ * - |IID| ++ - |u8| ++ - Instance ID. ++ ++ * - |RQID| ++ - |u16| ++ - Request ID. ++ ++ * - |CID| ++ - |u8| ++ - Command ID. + +The command struct and data, in general, does not contain any failure +detection mechanism (e.g. CRCs), this is solely done on the frame level. @@ -1000,9 +1264,9 @@ index 0000000000000..2a8a10e219ac5 +Furthermore, requests, responses, and events have an associated target ID +(``TID``). This target ID is split into output (host to EC) and input (EC to +host) fields, with the respecting other field (e.g. output field on incoming -+messages) set to zero. Two ``TID`` values are known: Primary (0x01) and -+secondary (0x02). In general, the response to a request should have the same -+``TID`` value, however, the field (output vs. input) should be used in ++messages) set to zero. Two ``TID`` values are known: Primary (``0x01``) and ++secondary (``0x02``). In general, the response to a request should have the ++same ``TID`` value, however, the field (output vs. input) should be used in +accordance to the direction in which the response is sent (i.e. on the input +field, as responses are generally sent from the EC to the host). + @@ -1055,7 +1319,7 @@ index 0000000000000..2a8a10e219ac5 +frames) and at most three pending commands. The limit to synchronous frame +transfers seems to be consistent with behavior observed on Windows. diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c -index 10f32b62608ee..7b2a4987f0507 100644 +index 10f32b62608e..7b2a4987f050 100644 --- a/drivers/acpi/acpica/dsopcode.c +++ b/drivers/acpi/acpica/dsopcode.c @@ -123,7 +123,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode, @@ -1068,7 +1332,7 @@ index 10f32b62608ee..7b2a4987f0507 100644 bit_count = (u32) length_desc->integer.value; diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c -index d3d2dbfba680c..0b7f617a6e9b1 100644 +index d3d2dbfba680..0b7f617a6e9b 100644 --- a/drivers/acpi/acpica/exfield.c +++ b/drivers/acpi/acpica/exfield.c @@ -109,6 +109,7 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state, @@ -1100,7 +1364,7 @@ index d3d2dbfba680c..0b7f617a6e9b1 100644 buffer_desc = acpi_ut_create_buffer_object(buffer_length); if (!buffer_desc) { diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig -index c55b63750757d..ff65acb97b182 100644 +index c55b63750757..ff65acb97b18 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -481,4 +481,5 @@ source "drivers/misc/cxl/Kconfig" @@ -1110,7 +1374,7 @@ index c55b63750757d..ff65acb97b182 100644 +source "drivers/misc/surface_sam/Kconfig" endmenu diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile -index c1860d35dc7e2..8086661758597 100644 +index c1860d35dc7e..808666175859 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -57,3 +57,4 @@ obj-y += cardreader/ @@ -1120,7 +1384,7 @@ index c1860d35dc7e2..8086661758597 100644 +obj-$(CONFIG_SURFACE_SAM) += surface_sam/ diff --git a/drivers/misc/surface_sam/Kconfig b/drivers/misc/surface_sam/Kconfig new file mode 100644 -index 0000000000000..ca560d91e2291 +index 000000000000..ca560d91e229 --- /dev/null +++ b/drivers/misc/surface_sam/Kconfig @@ -0,0 +1,46 @@ @@ -1172,7 +1436,7 @@ index 0000000000000..ca560d91e2291 +source "drivers/misc/surface_sam/clients/Kconfig" diff --git a/drivers/misc/surface_sam/Makefile b/drivers/misc/surface_sam/Makefile new file mode 100644 -index 0000000000000..0a07dd2297874 +index 000000000000..0a07dd229787 --- /dev/null +++ b/drivers/misc/surface_sam/Makefile @@ -0,0 +1,14 @@ @@ -1192,7 +1456,7 @@ index 0000000000000..0a07dd2297874 +surface_sam_ssh-objs += bus.o diff --git a/drivers/misc/surface_sam/bus.c b/drivers/misc/surface_sam/bus.c new file mode 100644 -index 0000000000000..6089e7b74f462 +index 000000000000..6089e7b74f46 --- /dev/null +++ b/drivers/misc/surface_sam/bus.c @@ -0,0 +1,414 @@ @@ -1612,7 +1876,7 @@ index 0000000000000..6089e7b74f462 +} diff --git a/drivers/misc/surface_sam/bus.h b/drivers/misc/surface_sam/bus.h new file mode 100644 -index 0000000000000..8b3ddf2100870 +index 000000000000..8b3ddf210087 --- /dev/null +++ b/drivers/misc/surface_sam/bus.h @@ -0,0 +1,14 @@ @@ -1632,7 +1896,7 @@ index 0000000000000..8b3ddf2100870 +#endif /* _SSAM_BUS_H */ diff --git a/drivers/misc/surface_sam/clients/Kconfig b/drivers/misc/surface_sam/clients/Kconfig new file mode 100644 -index 0000000000000..189bf02e280d7 +index 000000000000..189bf02e280d --- /dev/null +++ b/drivers/misc/surface_sam/clients/Kconfig @@ -0,0 +1,121 @@ @@ -1759,7 +2023,7 @@ index 0000000000000..189bf02e280d7 + If you are not sure, say M here. diff --git a/drivers/misc/surface_sam/clients/Makefile b/drivers/misc/surface_sam/clients/Makefile new file mode 100644 -index 0000000000000..1db9db2f86252 +index 000000000000..1db9db2f8625 --- /dev/null +++ b/drivers/misc/surface_sam/clients/Makefile @@ -0,0 +1,11 @@ @@ -1776,10 +2040,10 @@ index 0000000000000..1db9db2f86252 +obj-$(CONFIG_SURFACE_SAM_DEVICE_HUB) += surface_sam_device_hub.o diff --git a/drivers/misc/surface_sam/clients/surface_sam_debugfs.c b/drivers/misc/surface_sam/clients/surface_sam_debugfs.c new file mode 100644 -index 0000000000000..191ae7eb9f996 +index 000000000000..cd1fd24b0582 --- /dev/null +++ b/drivers/misc/surface_sam/clients/surface_sam_debugfs.c -@@ -0,0 +1,265 @@ +@@ -0,0 +1,282 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include @@ -1793,9 +2057,26 @@ index 0000000000000..191ae7eb9f996 +#include + +#define SSAM_DBGDEV_NAME "surface_sam_dbgdev" -+#define SSAM_DBGDEV_VERS 0x0100 ++#define SSAM_DBGDEV_VERS 0x010000 + + ++/** ++ * struct ssam_dbgdev_request - Controller request IOCTL argument. ++ * @target_category: Target category of the SAM request. ++ * @target_id: Target ID of the SAM request. ++ * @command_id: Command ID of the SAM request. ++ * @instance_id: Instance ID of the SAM request. ++ * @flags: SAM Request flags. ++ * @status: Request status (output). ++ * @payload: Request payload (input data). ++ * @payload.data: Pointer to request payload data. ++ * @payload.length: Length of request payload data (in bytes). ++ * @response: Request response (output data). ++ * @response.data: Pointer to response buffer. ++ * @response.length: On input: Capacity of response buffer (in bytes). ++ * On output: Length of request response (number of bytes ++ * in the buffer that are actually used). ++ */ +struct ssam_dbgdev_request { + __u8 target_category; + __u8 target_id; @@ -1972,7 +2253,7 @@ index 0000000000000..191ae7eb9f996 + + ddev->ctrl = ctrl; + -+ ddev->dentry_dir = debugfs_create_dir("surface_sam", NULL); ++ ddev->dentry_dir = debugfs_create_dir("ssam", NULL); + if (IS_ERR(ddev->dentry_dir)) + return PTR_ERR(ddev->dentry_dir); + @@ -2047,7 +2328,7 @@ index 0000000000000..191ae7eb9f996 +MODULE_LICENSE("GPL"); diff --git a/drivers/misc/surface_sam/clients/surface_sam_device_hub.c b/drivers/misc/surface_sam/clients/surface_sam_device_hub.c new file mode 100644 -index 0000000000000..7b56d5e6ca1e5 +index 000000000000..7b56d5e6ca1e --- /dev/null +++ b/drivers/misc/surface_sam/clients/surface_sam_device_hub.c @@ -0,0 +1,583 @@ @@ -2636,7 +2917,7 @@ index 0000000000000..7b56d5e6ca1e5 +MODULE_LICENSE("GPL"); diff --git a/drivers/misc/surface_sam/clients/surface_sam_dtx.c b/drivers/misc/surface_sam/clients/surface_sam_dtx.c new file mode 100644 -index 0000000000000..ff73f54328069 +index 000000000000..ff73f5432806 --- /dev/null +++ b/drivers/misc/surface_sam/clients/surface_sam_dtx.c @@ -0,0 +1,583 @@ @@ -3225,7 +3506,7 @@ index 0000000000000..ff73f54328069 +MODULE_LICENSE("GPL"); diff --git a/drivers/misc/surface_sam/clients/surface_sam_hps.c b/drivers/misc/surface_sam/clients/surface_sam_hps.c new file mode 100644 -index 0000000000000..3a72642d13da5 +index 000000000000..b2232043552a --- /dev/null +++ b/drivers/misc/surface_sam/clients/surface_sam_hps.c @@ -0,0 +1,1296 @@ @@ -4089,7 +4370,7 @@ index 0000000000000..3a72642d13da5 +{ + struct shps_driver_data *drvdata = container_of(nb, struct shps_driver_data, dgpu_nf); + struct platform_device *pdev = drvdata->pdev; -+ struct ssam_anf_dgpu_event *evt = data; ++ struct san_dgpu_event *evt = data; + + if (evt->category == SAM_DGPU_TC && evt->command == SAM_DGPU_CID_POWERON) + return shps_dgpu_powered_on(pdev); @@ -4342,7 +4623,7 @@ index 0000000000000..3a72642d13da5 + + if (detected_traits.notification_method == SHPS_NOTIFICATION_METHOD_SAN) { + // link to SAN -+ status = ssam_anf_client_link(&pdev->dev); ++ status = san_client_link(&pdev->dev); + if (status) { + dev_err(&pdev->dev, "failed to register as SAN client: %d\n", status); + return status == -ENXIO ? -EPROBE_DEFER : status; @@ -4399,7 +4680,7 @@ index 0000000000000..3a72642d13da5 + drvdata->dgpu_nf.priority = 1; + drvdata->dgpu_nf.notifier_call = shps_dgpu_handle_rqsg; + -+ status = ssam_anf_dgpu_notifier_register(&drvdata->dgpu_nf); ++ status = san_dgpu_notifier_register(&drvdata->dgpu_nf); + if (status) { + dev_err(&pdev->dev, "unable to register SAN notification handler (%d)\n", status); + goto err_devlink; @@ -4447,7 +4728,7 @@ index 0000000000000..3a72642d13da5 + if (detected_traits.notification_method == SHPS_NOTIFICATION_METHOD_SGCP) { + shps_remove_sgcp_notification(pdev); + } else if (detected_traits.notification_method == SHPS_NOTIFICATION_METHOD_SAN) { -+ ssam_anf_dgpu_notifier_unregister(&drvdata->dgpu_nf); ++ san_dgpu_notifier_unregister(&drvdata->dgpu_nf); + } +err_devlink: + device_remove_groups(&pdev->dev, shps_power_groups); @@ -4482,7 +4763,7 @@ index 0000000000000..3a72642d13da5 + if (drvdata->hardware_traits.notification_method == SHPS_NOTIFICATION_METHOD_SGCP) { + shps_remove_sgcp_notification(pdev); + } else if (drvdata->hardware_traits.notification_method == SHPS_NOTIFICATION_METHOD_SAN) { -+ ssam_anf_dgpu_notifier_unregister(&drvdata->dgpu_nf); ++ san_dgpu_notifier_unregister(&drvdata->dgpu_nf); + } + device_remove_groups(&pdev->dev, shps_power_groups); + shps_gpios_remove_irq(pdev); @@ -4527,10 +4808,10 @@ index 0000000000000..3a72642d13da5 +MODULE_LICENSE("GPL"); diff --git a/drivers/misc/surface_sam/clients/surface_sam_san.c b/drivers/misc/surface_sam/clients/surface_sam_san.c new file mode 100644 -index 0000000000000..ff3b59bcae554 +index 000000000000..59f2370be8c5 --- /dev/null +++ b/drivers/misc/surface_sam/clients/surface_sam_san.c -@@ -0,0 +1,813 @@ +@@ -0,0 +1,841 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Surface ACPI Notify (SAN) and ACPI integration driver for SAM. @@ -4592,7 +4873,23 @@ index 0000000000000..ff3b59bcae554 + return status; +} + -+int ssam_anf_client_link(struct device *client) ++/** ++ * san_client_link() - Link client as consumer to SAN device. ++ * @client: The client to link. ++ * ++ * Sets up a device link between the provided client device as consumer and ++ * the SAN device as provider. This function can be used to ensure that the ++ * SAN interface has been set up and will be set up for as long as the driver ++ * of the client device is bound. This guarantees that, during that time, all ++ * dGPU events will be received by any registered notifier. ++ * ++ * The link will be automatically removed once the client device's driver is ++ * unbound. ++ * ++ * Return: Returns zero on succes, %-ENXIO if the SAN interface has not been ++ * set up yet, and %-ENOMEM if device link creation failed. ++ */ ++int san_client_link(struct device *client) +{ + const u32 flags = DL_FLAG_PM_RUNTIME | DL_FLAG_AUTOREMOVE_CONSUMER; + struct device_link *link; @@ -4618,21 +4915,33 @@ index 0000000000000..ff3b59bcae554 + up_read(&san_rqsg_if.lock); + return 0; +} -+EXPORT_SYMBOL_GPL(ssam_anf_client_link); ++EXPORT_SYMBOL_GPL(san_client_link); + -+int ssam_anf_dgpu_notifier_register(struct notifier_block *nb) ++/** ++ * san_dgpu_notifier_register() - Register a SAN dGPU notifier. ++ * @nb: The notifier-block to register. ++ * ++ * Registers a SAN dGPU notifier, receiving any new SAN dGPU events sent from ++ * ACPI. The registered notifier will be called with &struct san_dgpu_event ++ * as notifier data and the command ID of that event as notifier action. ++ */ ++int san_dgpu_notifier_register(struct notifier_block *nb) +{ + return blocking_notifier_chain_register(&san_rqsg_if.nh, nb); +} -+EXPORT_SYMBOL_GPL(ssam_anf_dgpu_notifier_register); ++EXPORT_SYMBOL_GPL(san_dgpu_notifier_register); + -+int ssam_anf_dgpu_notifier_unregister(struct notifier_block *nb) ++/** ++ * san_dgpu_notifier_unregister() - Unregister a SAN dGPU notifier. ++ * @nb: The notifier-block to unregister. ++ */ ++int san_dgpu_notifier_unregister(struct notifier_block *nb) +{ + return blocking_notifier_chain_unregister(&san_rqsg_if.nh, nb); +} -+EXPORT_SYMBOL_GPL(ssam_anf_dgpu_notifier_unregister); ++EXPORT_SYMBOL_GPL(san_dgpu_notifier_unregister); + -+static int san_dgpu_notifier_call(struct ssam_anf_dgpu_event *evt) ++static int san_dgpu_notifier_call(struct san_dgpu_event *evt) +{ + int ret; + @@ -5096,7 +5405,7 @@ index 0000000000000..ff3b59bcae554 +static acpi_status san_rqsg(struct san_data *d, struct gsb_buffer *buffer) +{ + struct gsb_data_rqsx *gsb_rqsg; -+ struct ssam_anf_dgpu_event evt; ++ struct san_dgpu_event evt; + int status; + + gsb_rqsg = san_validate_rqsx(d->dev, "RQSG", buffer); @@ -5346,7 +5655,7 @@ index 0000000000000..ff3b59bcae554 +MODULE_LICENSE("GPL"); diff --git a/drivers/misc/surface_sam/clients/surface_sam_sid_perfmode.c b/drivers/misc/surface_sam/clients/surface_sam_sid_perfmode.c new file mode 100644 -index 0000000000000..44f5d31709b22 +index 000000000000..44f5d31709b2 --- /dev/null +++ b/drivers/misc/surface_sam/clients/surface_sam_sid_perfmode.c @@ -0,0 +1,190 @@ @@ -5542,7 +5851,7 @@ index 0000000000000..44f5d31709b22 +MODULE_LICENSE("GPL"); diff --git a/drivers/misc/surface_sam/clients/surface_sam_sid_power.c b/drivers/misc/surface_sam/clients/surface_sam_sid_power.c new file mode 100644 -index 0000000000000..da8dd1e914b70 +index 000000000000..da8dd1e914b7 --- /dev/null +++ b/drivers/misc/surface_sam/clients/surface_sam_sid_power.c @@ -0,0 +1,1114 @@ @@ -6662,7 +6971,7 @@ index 0000000000000..da8dd1e914b70 +MODULE_LICENSE("GPL"); diff --git a/drivers/misc/surface_sam/clients/surface_sam_sid_vhf.c b/drivers/misc/surface_sam/clients/surface_sam_sid_vhf.c new file mode 100644 -index 0000000000000..e995c03f4b733 +index 000000000000..e995c03f4b73 --- /dev/null +++ b/drivers/misc/surface_sam/clients/surface_sam_sid_vhf.c @@ -0,0 +1,498 @@ @@ -7166,7 +7475,7 @@ index 0000000000000..e995c03f4b733 +MODULE_LICENSE("GPL"); diff --git a/drivers/misc/surface_sam/clients/surface_sam_vhf.c b/drivers/misc/surface_sam/clients/surface_sam_vhf.c new file mode 100644 -index 0000000000000..8f24e7a7bfea9 +index 000000000000..8f24e7a7bfea --- /dev/null +++ b/drivers/misc/surface_sam/clients/surface_sam_vhf.c @@ -0,0 +1,334 @@ @@ -7506,7 +7815,7 @@ index 0000000000000..8f24e7a7bfea9 +MODULE_LICENSE("GPL"); diff --git a/drivers/misc/surface_sam/controller.c b/drivers/misc/surface_sam/controller.c new file mode 100644 -index 0000000000000..c279159e3aabc +index 000000000000..c279159e3aab --- /dev/null +++ b/drivers/misc/surface_sam/controller.c @@ -0,0 +1,2441 @@ @@ -9953,7 +10262,7 @@ index 0000000000000..c279159e3aabc +} diff --git a/drivers/misc/surface_sam/controller.h b/drivers/misc/surface_sam/controller.h new file mode 100644 -index 0000000000000..2c328e21df68d +index 000000000000..2c328e21df68 --- /dev/null +++ b/drivers/misc/surface_sam/controller.h @@ -0,0 +1,275 @@ @@ -10234,7 +10543,7 @@ index 0000000000000..2c328e21df68d +#endif /* _SSAM_CONTROLLER_H */ diff --git a/drivers/misc/surface_sam/core.c b/drivers/misc/surface_sam/core.c new file mode 100644 -index 0000000000000..5164d13e52f8d +index 000000000000..5164d13e52f8 --- /dev/null +++ b/drivers/misc/surface_sam/core.c @@ -0,0 +1,771 @@ @@ -11011,7 +11320,7 @@ index 0000000000000..5164d13e52f8d +MODULE_LICENSE("GPL"); diff --git a/drivers/misc/surface_sam/ssam_trace.h b/drivers/misc/surface_sam/ssam_trace.h new file mode 100644 -index 0000000000000..ad1ce1cdd474f +index 000000000000..ad1ce1cdd474 --- /dev/null +++ b/drivers/misc/surface_sam/ssam_trace.h @@ -0,0 +1,619 @@ @@ -11636,7 +11945,7 @@ index 0000000000000..ad1ce1cdd474f +#include diff --git a/drivers/misc/surface_sam/ssh_msgb.h b/drivers/misc/surface_sam/ssh_msgb.h new file mode 100644 -index 0000000000000..4b37c5577897c +index 000000000000..4b37c5577897 --- /dev/null +++ b/drivers/misc/surface_sam/ssh_msgb.h @@ -0,0 +1,196 @@ @@ -11838,7 +12147,7 @@ index 0000000000000..4b37c5577897c +#endif /* _SSAM_SSH_MSGB_H */ diff --git a/drivers/misc/surface_sam/ssh_packet_layer.c b/drivers/misc/surface_sam/ssh_packet_layer.c new file mode 100644 -index 0000000000000..21a8f7e4473b4 +index 000000000000..21a8f7e4473b --- /dev/null +++ b/drivers/misc/surface_sam/ssh_packet_layer.c @@ -0,0 +1,2001 @@ @@ -13845,7 +14154,7 @@ index 0000000000000..21a8f7e4473b4 +} diff --git a/drivers/misc/surface_sam/ssh_packet_layer.h b/drivers/misc/surface_sam/ssh_packet_layer.h new file mode 100644 -index 0000000000000..2e2d961c5c046 +index 000000000000..2e2d961c5c04 --- /dev/null +++ b/drivers/misc/surface_sam/ssh_packet_layer.h @@ -0,0 +1,173 @@ @@ -14024,7 +14333,7 @@ index 0000000000000..2e2d961c5c046 +#endif /* _SSAM_SSH_PACKET_LAYER_H */ diff --git a/drivers/misc/surface_sam/ssh_parser.c b/drivers/misc/surface_sam/ssh_parser.c new file mode 100644 -index 0000000000000..3e28d502d5eb2 +index 000000000000..3e28d502d5eb --- /dev/null +++ b/drivers/misc/surface_sam/ssh_parser.c @@ -0,0 +1,221 @@ @@ -14251,7 +14560,7 @@ index 0000000000000..3e28d502d5eb2 +} diff --git a/drivers/misc/surface_sam/ssh_parser.h b/drivers/misc/surface_sam/ssh_parser.h new file mode 100644 -index 0000000000000..1ee455de7898a +index 000000000000..1ee455de7898 --- /dev/null +++ b/drivers/misc/surface_sam/ssh_parser.h @@ -0,0 +1,151 @@ @@ -14408,7 +14717,7 @@ index 0000000000000..1ee455de7898a +#endif /* _SURFACE_SAM_SSH_PARSER_h */ diff --git a/drivers/misc/surface_sam/ssh_protocol.h b/drivers/misc/surface_sam/ssh_protocol.h new file mode 100644 -index 0000000000000..4f35ce93f02e2 +index 000000000000..4f35ce93f02e --- /dev/null +++ b/drivers/misc/surface_sam/ssh_protocol.h @@ -0,0 +1,103 @@ @@ -14517,7 +14826,7 @@ index 0000000000000..4f35ce93f02e2 +#endif /* _SSAM_SSH_PROTOCOL_H */ diff --git a/drivers/misc/surface_sam/ssh_request_layer.c b/drivers/misc/surface_sam/ssh_request_layer.c new file mode 100644 -index 0000000000000..24aaf6da5b545 +index 000000000000..24aaf6da5b54 --- /dev/null +++ b/drivers/misc/surface_sam/ssh_request_layer.c @@ -0,0 +1,1246 @@ @@ -15769,7 +16078,7 @@ index 0000000000000..24aaf6da5b545 +} diff --git a/drivers/misc/surface_sam/ssh_request_layer.h b/drivers/misc/surface_sam/ssh_request_layer.h new file mode 100644 -index 0000000000000..954f571862a69 +index 000000000000..954f571862a6 --- /dev/null +++ b/drivers/misc/surface_sam/ssh_request_layer.h @@ -0,0 +1,136 @@ @@ -15910,7 +16219,7 @@ index 0000000000000..954f571862a69 + +#endif /* _SSAM_SSH_REQUEST_LAYER_H */ diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c -index a9719858c950b..ce5309d002805 100644 +index a9719858c950..ce5309d00280 100644 --- a/drivers/tty/serdev/core.c +++ b/drivers/tty/serdev/core.c @@ -552,16 +552,97 @@ static int of_serdev_register_devices(struct serdev_controller *ctrl) @@ -16065,7 +16374,7 @@ index a9719858c950b..ce5309d002805 100644 if (!ctrl->serdev) return -ENODEV; diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h -index 4c56404e53a76..1ef76f488a580 100644 +index 4c56404e53a7..1ef76f488a58 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -827,4 +827,21 @@ struct wmi_device_id { @@ -16092,10 +16401,10 @@ index 4c56404e53a76..1ef76f488a580 100644 #endif /* LINUX_MOD_DEVICETABLE_H */ diff --git a/include/linux/surface_acpi_notify.h b/include/linux/surface_acpi_notify.h new file mode 100644 -index 0000000000000..37be101afdd95 +index 000000000000..aa69fa508140 --- /dev/null +++ b/include/linux/surface_acpi_notify.h -@@ -0,0 +1,30 @@ +@@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Interface for Surface ACPI/Notify (SAN). @@ -16110,25 +16419,34 @@ index 0000000000000..37be101afdd95 +#define _SURFACE_SAM_SAN_H + +#include ++#include + -+ -+struct ssam_anf_dgpu_event { -+ u8 category; // target category -+ u8 target; // target ID -+ u8 command; // command ID -+ u8 instance; // instance ID -+ u16 length; // command data length (length of payload) -+ u8 *payload; // pointer to payload of length cdl ++/** ++ * struct san_dgpu_event - Discrete GPU ACPI event. ++ * @category: Category of the event. ++ * @target: Target ID of the event source. ++ * @command: Command ID of the event. ++ * @instance: Instance ID of the event source. ++ * @length: Length of the event's payload data (in bytes). ++ * @payload: Pointer to the event's payload data. ++ */ ++struct san_dgpu_event { ++ u8 category; ++ u8 target; ++ u8 command; ++ u8 instance; ++ u16 length; ++ u8 *payload; +}; + -+int ssam_anf_client_link(struct device *client); -+int ssam_anf_dgpu_notifier_register(struct notifier_block *nb); -+int ssam_anf_dgpu_notifier_unregister(struct notifier_block *nb); ++int san_client_link(struct device *client); ++int san_dgpu_notifier_register(struct notifier_block *nb); ++int san_dgpu_notifier_unregister(struct notifier_block *nb); + +#endif /* _SURFACE_SAM_SAN_H */ diff --git a/include/linux/surface_aggregator_module.h b/include/linux/surface_aggregator_module.h new file mode 100644 -index 0000000000000..2763805c283ad +index 000000000000..2763805c283a --- /dev/null +++ b/include/linux/surface_aggregator_module.h @@ -0,0 +1,1744 @@ @@ -17877,7 +18195,7 @@ index 0000000000000..2763805c283ad + +#endif /* _SURFACE_AGGREGATOR_MODULE_H */ diff --git a/scripts/mod/devicetable-offsets.c b/scripts/mod/devicetable-offsets.c -index 054405b90ba42..74d6395bbe919 100644 +index 054405b90ba4..74d6395bbe91 100644 --- a/scripts/mod/devicetable-offsets.c +++ b/scripts/mod/devicetable-offsets.c @@ -231,5 +231,12 @@ int main(void) @@ -17894,7 +18212,7 @@ index 054405b90ba42..74d6395bbe919 100644 return 0; } diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c -index c91eba751804b..5406ad2f4fabd 100644 +index c91eba751804..5406ad2f4fab 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -1335,6 +1335,27 @@ static int do_wmi_entry(const char *filename, void *symval, char *alias) diff --git a/patches/5.4/0006-surface-sam-over-hid.patch b/patches/5.4/0006-surface-sam-over-hid.patch index c018e352f..d373ee948 100644 --- a/patches/5.4/0006-surface-sam-over-hid.patch +++ b/patches/5.4/0006-surface-sam-over-hid.patch @@ -1,4 +1,4 @@ -From bedf1357df41869f99c7c7eda88248fde87f669c Mon Sep 17 00:00:00 2001 +From 09acd33442aaf0bafa6b2cefeb9c2b1d170c9888 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 25 Jul 2020 17:19:53 +0200 Subject: [PATCH 6/7] surface-sam-over-hid @@ -12,7 +12,7 @@ Subject: [PATCH 6/7] surface-sam-over-hid create mode 100644 drivers/platform/x86/sb1_dgpu_sw.c diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c -index ce70b5288472c..5df647c4d9a51 100644 +index ce70b5288472..5df647c4d9a5 100644 --- a/drivers/i2c/i2c-core-acpi.c +++ b/drivers/i2c/i2c-core-acpi.c @@ -582,6 +582,28 @@ static int acpi_gsb_i2c_write_bytes(struct i2c_client *client, @@ -65,7 +65,7 @@ index ce70b5288472c..5df647c4d9a51 100644 dev_warn(&adapter->dev, "protocol 0x%02x not supported for client 0x%02x\n", accessor_type, client->addr); diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig -index 348c795019fa4..5495e3702f656 100644 +index 348c795019fa..5495e3702f65 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -1216,6 +1216,13 @@ config SURFACE_3_POWER_OPREGION @@ -83,7 +83,7 @@ index 348c795019fa4..5495e3702f656 100644 tristate "Intel P-Unit IPC Driver" ---help--- diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile -index 6dd955ad9bf18..b3e0a2c6924b6 100644 +index 6dd955ad9bf1..b3e0a2c6924b 100644 --- a/drivers/platform/x86/Makefile +++ b/drivers/platform/x86/Makefile @@ -86,6 +86,7 @@ obj-$(CONFIG_TOUCHSCREEN_DMI) += touchscreen_dmi.o @@ -96,7 +96,7 @@ index 6dd955ad9bf18..b3e0a2c6924b6 100644 obj-$(CONFIG_INTEL_TELEMETRY) += intel_telemetry_core.o \ diff --git a/drivers/platform/x86/sb1_dgpu_sw.c b/drivers/platform/x86/sb1_dgpu_sw.c new file mode 100644 -index 0000000000000..8c66ed5110fda +index 000000000000..8c66ed5110fd --- /dev/null +++ b/drivers/platform/x86/sb1_dgpu_sw.c @@ -0,0 +1,162 @@ diff --git a/patches/5.4/0007-surface-gpe.patch b/patches/5.4/0007-surface-gpe.patch index 60f7d1190..47f69ff22 100644 --- a/patches/5.4/0007-surface-gpe.patch +++ b/patches/5.4/0007-surface-gpe.patch @@ -1,4 +1,4 @@ -From faa0d0a918fb4acbfedf80c2b68cb5cd92c9d521 Mon Sep 17 00:00:00 2001 +From 19330628c39dba2105c59ca2d3c2b427283ea917 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sun, 16 Aug 2020 23:39:56 +0200 Subject: [PATCH 7/7] surface-gpe @@ -11,7 +11,7 @@ Subject: [PATCH 7/7] surface-gpe create mode 100644 drivers/platform/x86/surface_gpe.c diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig -index 5495e3702f656..e0af35fed2d50 100644 +index 5495e3702f65..e0af35fed2d5 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -1223,6 +1223,15 @@ config SURFACE_BOOK1_DGPU_SWITCH @@ -31,7 +31,7 @@ index 5495e3702f656..e0af35fed2d50 100644 tristate "Intel P-Unit IPC Driver" ---help--- diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile -index b3e0a2c6924b6..c6e934a73a8d1 100644 +index b3e0a2c6924b..c6e934a73a8d 100644 --- a/drivers/platform/x86/Makefile +++ b/drivers/platform/x86/Makefile @@ -87,6 +87,7 @@ obj-$(CONFIG_SURFACE_PRO3_BUTTON) += surfacepro3_button.o @@ -44,7 +44,7 @@ index b3e0a2c6924b6..c6e934a73a8d1 100644 obj-$(CONFIG_INTEL_TELEMETRY) += intel_telemetry_core.o \ diff --git a/drivers/platform/x86/surface_gpe.c b/drivers/platform/x86/surface_gpe.c new file mode 100644 -index 0000000000000..10e563f253b9e +index 000000000000..10e563f253b9 --- /dev/null +++ b/drivers/platform/x86/surface_gpe.c @@ -0,0 +1,303 @@