Compare commits
No commits in common. "master" and "no-nx" have entirely different histories.
|
@ -1,13 +1,13 @@
|
|||
name: Fedora 40
|
||||
name: Fedora 37
|
||||
|
||||
env:
|
||||
FEDORA: 40
|
||||
FEDORA: 37
|
||||
GPG_KEY_ID: 56C464BAAC421453
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'fedora-40-*'
|
||||
- 'fedora-37-*'
|
||||
|
||||
repository_dispatch:
|
||||
workflow_dispatch:
|
||||
|
@ -122,4 +122,4 @@ jobs:
|
|||
-e BRANCH_STAGING \
|
||||
-e GITHUB_REPOSITORY \
|
||||
-- \
|
||||
bash ./.github/scripts/repository/fedora.sh ${{ env.FEDORA }}
|
||||
bash ./.github/scripts/repository/fedora.sh ${{ env.FEDORA }}
|
|
@ -96,6 +96,7 @@ If you have questions or need support, please join our [Matrix Space][matrix-spa
|
|||
This space contains
|
||||
- a [support channel][matrix-support] for general support and
|
||||
- a [development channel][matrix-development] for all development related questions and discussions.
|
||||
If you prefer IRC, you can also join in via our channel at [`libera.chat/#linux-surface`][liberachat], to which the matrix room is bridged to.
|
||||
|
||||
## License
|
||||
This repository contains patches, which are either derivative work targeting a specific already licensed source, i.e. parts of the Linux kernel, or introduce new parts to the Linux kernel.
|
||||
|
@ -111,6 +112,7 @@ License texts can be obtained at https://github.com/torvalds/linux/tree/master/L
|
|||
[matrix-space]: https://matrix.to/#/#linux-surface:matrix.org
|
||||
[matrix-support]: https://matrix.to/#/#linux-surface-support:matrix.org
|
||||
[matrix-development]: https://matrix.to/#/#linux-surface-development:matrix.org
|
||||
[liberachat]: https://web.libera.chat/#linux-surface
|
||||
|
||||
[hibernate-setup]: https://fitzcarraldoblog.wordpress.com/2018/07/14/configuring-lubuntu-18-04-to-enable-hibernation-using-a-swap-file
|
||||
[releases]: https://github.com/linux-surface/linux-surface/releases
|
||||
|
|
|
@ -19,9 +19,6 @@ CONFIG_SURFACE_KBD=m
|
|||
CONFIG_BATTERY_SURFACE=m
|
||||
CONFIG_CHARGER_SURFACE=m
|
||||
|
||||
CONFIG_SENSORS_SURFACE_TEMP=m
|
||||
CONFIG_SENSORS_SURFACE_FAN=m
|
||||
|
||||
##
|
||||
## Surface Hotplug
|
||||
##
|
||||
|
@ -42,11 +39,10 @@ CONFIG_HID_ITHC=m
|
|||
CONFIG_VIDEO_DW9719=m
|
||||
CONFIG_VIDEO_IPU3_IMGU=m
|
||||
CONFIG_VIDEO_IPU3_CIO2=m
|
||||
CONFIG_IPU_BRIDGE=m
|
||||
CONFIG_CIO2_BRIDGE=y
|
||||
CONFIG_INTEL_SKL_INT3472=m
|
||||
CONFIG_REGULATOR_TPS68470=m
|
||||
CONFIG_COMMON_CLK_TPS68470=m
|
||||
CONFIG_LEDS_TPS68470=m
|
||||
|
||||
##
|
||||
## Cameras: Sensor drivers
|
|
@ -19,9 +19,6 @@ CONFIG_SURFACE_KBD=m
|
|||
CONFIG_BATTERY_SURFACE=m
|
||||
CONFIG_CHARGER_SURFACE=m
|
||||
|
||||
CONFIG_SENSORS_SURFACE_TEMP=m
|
||||
CONFIG_SENSORS_SURFACE_FAN=m
|
||||
|
||||
##
|
||||
## Surface Hotplug
|
||||
##
|
||||
|
@ -42,7 +39,7 @@ CONFIG_HID_ITHC=m
|
|||
CONFIG_VIDEO_DW9719=m
|
||||
CONFIG_VIDEO_IPU3_IMGU=m
|
||||
CONFIG_VIDEO_IPU3_CIO2=m
|
||||
CONFIG_IPU_BRIDGE=m
|
||||
CONFIG_CIO2_BRIDGE=y
|
||||
CONFIG_INTEL_SKL_INT3472=m
|
||||
CONFIG_REGULATOR_TPS68470=m
|
||||
CONFIG_COMMON_CLK_TPS68470=m
|
|
@ -1,6 +1,6 @@
|
|||
# One-shot automatic screen rotation
|
||||
|
||||
There are many scripts around (you can find some [here](https://gist.github.com/mildmojo/48e9025070a2ba40795c), where this script was published first), which rotate the screen automatically. Many desktop environment have this feature built in, but if you like a one-shot automatic rotation facility, this is for you.
|
||||
There are many scripts around (you can find some [here](https://gist.github.com/mildmojo/48e9025070a2ba40795c, where this script was published first)), which rotate the screen automatically. Many desktop environment have this feature built in, but if you like a one-shot automatic rotation facility, this is for you.
|
||||
|
||||
|
||||
## Motivation
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ThermalConfiguration>
|
||||
<Platform>
|
||||
<Name>Intel Powered Laptop</Name>
|
||||
<ProductName>*</ProductName>
|
||||
<Preference>QUIET</Preference>
|
||||
<ThermalZones>
|
||||
<ThermalZone>
|
||||
<Type>cpu</Type>
|
||||
<TripPoints>
|
||||
<TripPoint>
|
||||
<SensorType>x86_pkg_temp</SensorType>
|
||||
<Temperature>65000</Temperature>
|
||||
<type>passive</type>
|
||||
<ControlType>SEQUENTIAL</ControlType>
|
||||
<CoolingDevice>
|
||||
<index>1</index>
|
||||
<type>intel_pstate</type>
|
||||
<influence>100</influence>
|
||||
<SamplingPeriod>10</SamplingPeriod>
|
||||
</CoolingDevice>
|
||||
</TripPoint>
|
||||
</TripPoints>
|
||||
</ThermalZone>
|
||||
</ThermalZones>
|
||||
</Platform>
|
||||
</ThermalConfiguration>
|
|
@ -1,4 +1,4 @@
|
|||
From d82f678f3ab57bc30a52237389693b1084ac1e49 Mon Sep 17 00:00:00 2001
|
||||
From bd7e0932b8be47411b5fa9a4ff62f8ea34f95019 Mon Sep 17 00:00:00 2001
|
||||
From: Tsuchiya Yuto <kitakar@gmail.com>
|
||||
Date: Sun, 18 Oct 2020 16:42:44 +0900
|
||||
Subject: [PATCH] (surface3-oemb) add DMI matches for Surface 3 with broken DMI
|
||||
|
@ -58,10 +58,10 @@ index ca4602bcc7de..490b9731068a 100644
|
|||
{ }
|
||||
};
|
||||
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
|
||||
index 7938b52d741d..2d5f83b0cdb0 100644
|
||||
index 620ecbfa4a7a..b07d06d2971a 100644
|
||||
--- a/sound/soc/codecs/rt5645.c
|
||||
+++ b/sound/soc/codecs/rt5645.c
|
||||
@@ -3746,6 +3746,15 @@ static const struct dmi_system_id dmi_platform_data[] = {
|
||||
@@ -3717,6 +3717,15 @@ static const struct dmi_system_id dmi_platform_data[] = {
|
||||
},
|
||||
.driver_data = (void *)&intel_braswell_platform_data,
|
||||
},
|
||||
|
@ -78,7 +78,7 @@ index 7938b52d741d..2d5f83b0cdb0 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 5e2ec60e2954..207868c699f2 100644
|
||||
index cdcbf04b8832..958305779b12 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[] = {
|
||||
|
@ -97,5 +97,5 @@ index 5e2ec60e2954..207868c699f2 100644
|
|||
};
|
||||
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 2c7ff35a85341dcd8fa2ea575088881df9dea874 Mon Sep 17 00:00:00 2001
|
||||
From 855d10ee3bbba143a44386d51494677664ac240e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
||||
Date: Tue, 3 Nov 2020 13:28:04 +0100
|
||||
Subject: [PATCH] mwifiex: Add quirk resetting the PCI bridge on MS Surface
|
||||
|
@ -32,11 +32,11 @@ Patchset: mwifiex
|
|||
3 files changed, 31 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
index 5f997becdbaa..9a9929424513 100644
|
||||
index 6697132ecc97..f06b4ebc5bd8 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
@@ -1702,9 +1702,21 @@ mwifiex_pcie_send_boot_cmd(struct mwifiex_adapter *adapter, struct sk_buff *skb)
|
||||
static void mwifiex_pcie_init_fw_port(struct mwifiex_adapter *adapter)
|
||||
@@ -1771,9 +1771,21 @@ mwifiex_pcie_send_boot_cmd(struct mwifiex_adapter *adapter, struct sk_buff *skb)
|
||||
static int mwifiex_pcie_init_fw_port(struct mwifiex_adapter *adapter)
|
||||
{
|
||||
struct pcie_service_card *card = adapter->card;
|
||||
+ struct pci_dev *pdev = card->dev;
|
||||
|
@ -55,8 +55,8 @@ index 5f997becdbaa..9a9929424513 100644
|
|||
+ pci_reset_function(parent_pdev);
|
||||
+
|
||||
/* Write the RX ring read pointer in to reg->rx_rdptr */
|
||||
mwifiex_write_reg(adapter, reg->rx_rdptr, card->rxbd_rdptr | tx_wrap);
|
||||
}
|
||||
if (mwifiex_write_reg(adapter, reg->rx_rdptr, card->rxbd_rdptr |
|
||||
tx_wrap)) {
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie_quirks.c b/drivers/net/wireless/marvell/mwifiex/pcie_quirks.c
|
||||
index dd6d21f1dbfd..f46b06f8d643 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/pcie_quirks.c
|
||||
|
@ -163,9 +163,9 @@ index d6ff964aec5b..5d30ae39d65e 100644
|
|||
void mwifiex_initialize_quirks(struct pcie_service_card *card);
|
||||
int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From 4a326d9e87d1dc4945903560d3d22fbd69a8962c Mon Sep 17 00:00:00 2001
|
||||
From 196a57e2d3e59937692ca38c4a9ab5fc6902cbce Mon Sep 17 00:00:00 2001
|
||||
From: Tsuchiya Yuto <kitakar@gmail.com>
|
||||
Date: Sun, 4 Oct 2020 00:11:49 +0900
|
||||
Subject: [PATCH] mwifiex: pcie: disable bridge_d3 for Surface gen4+
|
||||
|
@ -187,10 +187,10 @@ Patchset: mwifiex
|
|||
3 files changed, 27 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
index 9a9929424513..2273e3029776 100644
|
||||
index f06b4ebc5bd8..07f13b52ddb9 100644
|
||||
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||
@@ -377,6 +377,7 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
|
||||
@@ -370,6 +370,7 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *ent)
|
||||
{
|
||||
struct pcie_service_card *card;
|
||||
|
@ -198,7 +198,7 @@ index 9a9929424513..2273e3029776 100644
|
|||
int ret;
|
||||
|
||||
pr_debug("info: vendor=0x%4.04X device=0x%4.04X rev=%d\n",
|
||||
@@ -418,6 +419,12 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
|
||||
@@ -411,6 +412,12 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -318,9 +318,9 @@ index 5d30ae39d65e..c14eb56eb911 100644
|
|||
void mwifiex_initialize_quirks(struct pcie_service_card *card);
|
||||
int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From dddda6f9c25716dea1265f71b8286936afa192b5 Mon Sep 17 00:00:00 2001
|
||||
From 2a962e6d73c3b1fed3a23485088ddab44f789504 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
||||
Date: Thu, 25 Mar 2021 11:33:02 +0100
|
||||
Subject: [PATCH] Bluetooth: btusb: Lower passive lescan interval on Marvell
|
||||
|
@ -356,10 +356,10 @@ Patchset: mwifiex
|
|||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
|
||||
index d31edad7a056..fc08e0c51c87 100644
|
||||
index f2062c2a28da..6c55e59790ae 100644
|
||||
--- a/drivers/bluetooth/btusb.c
|
||||
+++ b/drivers/bluetooth/btusb.c
|
||||
@@ -65,6 +65,7 @@ static struct usb_driver btusb_driver;
|
||||
@@ -64,6 +64,7 @@ static struct usb_driver btusb_driver;
|
||||
#define BTUSB_INTEL_BROKEN_INITIAL_NCMD BIT(25)
|
||||
#define BTUSB_INTEL_NO_WBS_SUPPORT BIT(26)
|
||||
#define BTUSB_ACTIONS_SEMI BIT(27)
|
||||
|
@ -367,7 +367,7 @@ index d31edad7a056..fc08e0c51c87 100644
|
|||
|
||||
static const struct usb_device_id btusb_table[] = {
|
||||
/* Generic Bluetooth USB device */
|
||||
@@ -468,6 +469,7 @@ static const struct usb_device_id quirks_table[] = {
|
||||
@@ -467,6 +468,7 @@ static const struct usb_device_id blacklist_table[] = {
|
||||
{ USB_DEVICE(0x1286, 0x2044), .driver_info = BTUSB_MARVELL },
|
||||
{ USB_DEVICE(0x1286, 0x2046), .driver_info = BTUSB_MARVELL },
|
||||
{ USB_DEVICE(0x1286, 0x204e), .driver_info = BTUSB_MARVELL },
|
||||
|
@ -375,7 +375,7 @@ index d31edad7a056..fc08e0c51c87 100644
|
|||
|
||||
/* Intel Bluetooth devices */
|
||||
{ USB_DEVICE(0x8087, 0x0025), .driver_info = BTUSB_INTEL_COMBINED },
|
||||
@@ -4401,6 +4403,19 @@ static int btusb_probe(struct usb_interface *intf,
|
||||
@@ -3953,6 +3955,19 @@ static int btusb_probe(struct usb_interface *intf,
|
||||
if (id->driver_info & BTUSB_MARVELL)
|
||||
hdev->set_bdaddr = btusb_set_bdaddr_marvell;
|
||||
|
||||
|
@ -396,5 +396,5 @@ index d31edad7a056..fc08e0c51c87 100644
|
|||
(id->driver_info & BTUSB_MEDIATEK)) {
|
||||
hdev->setup = btusb_mtk_setup;
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From d1f0488a3591ea31a8f493ad8cd3feb79e2338b8 Mon Sep 17 00:00:00 2001
|
||||
From 8f31def28bcfb641ef1f0e026c6b77dc08775b7e Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Sat, 27 Feb 2021 00:45:52 +0100
|
||||
Subject: [PATCH] ath10k: Add module parameters to override board files
|
||||
|
@ -117,5 +117,5 @@ index 6cdb225b7eac..19c036751fb1 100644
|
|||
ret = firmware_request_nowarn(&fw, filename, ar->dev);
|
||||
ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
2152
patches/6.1/0006-surface-sam.patch
Normal file
2152
patches/6.1/0006-surface-sam.patch
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
|||
From ed9c386e94b695909ed806887188e127e99e7140 Mon Sep 17 00:00:00 2001
|
||||
From 09df94d2f7ff01d5fef9a69008fcae6e97350628 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Sat, 25 Jul 2020 17:19:53 +0200
|
||||
Subject: [PATCH] i2c: acpi: Implement RawBytes read access
|
||||
|
@ -55,10 +55,10 @@ Patchset: surface-sam-over-hid
|
|||
1 file changed, 35 insertions(+)
|
||||
|
||||
diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
|
||||
index d6037a328669..a290ebc77aea 100644
|
||||
index 4dd777cc0c89..b2338618163a 100644
|
||||
--- a/drivers/i2c/i2c-core-acpi.c
|
||||
+++ b/drivers/i2c/i2c-core-acpi.c
|
||||
@@ -628,6 +628,28 @@ static int acpi_gsb_i2c_write_bytes(struct i2c_client *client,
|
||||
@@ -639,6 +639,28 @@ static int acpi_gsb_i2c_write_bytes(struct i2c_client *client,
|
||||
return (ret == 1) ? 0 : -EIO;
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ index d6037a328669..a290ebc77aea 100644
|
|||
static acpi_status
|
||||
i2c_acpi_space_handler(u32 function, acpi_physical_address command,
|
||||
u32 bits, u64 *value64,
|
||||
@@ -729,6 +751,19 @@ i2c_acpi_space_handler(u32 function, acpi_physical_address command,
|
||||
@@ -740,6 +762,19 @@ i2c_acpi_space_handler(u32 function, acpi_physical_address command,
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -108,9 +108,9 @@ index d6037a328669..a290ebc77aea 100644
|
|||
dev_warn(&adapter->dev, "protocol 0x%02x not supported for client 0x%02x\n",
|
||||
accessor_type, client->addr);
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From 09df61b1ed72eb879aeb7b8091606299bc61fdd6 Mon Sep 17 00:00:00 2001
|
||||
From 5ef2051244e47117ef10b8494c91dd5a27ba01ef Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Sat, 13 Feb 2021 16:41:18 +0100
|
||||
Subject: [PATCH] platform/surface: Add driver for Surface Book 1 dGPU switch
|
||||
|
@ -331,5 +331,5 @@ index 000000000000..8b816ed8f35c
|
|||
+MODULE_DESCRIPTION("Discrete GPU Power-Switch for Surface Book 1");
|
||||
+MODULE_LICENSE("GPL");
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 3584a6c1791dc9c9b9c3ee846621571cbfabe37e Mon Sep 17 00:00:00 2001
|
||||
From 4e8c3bb082ce7a86c0e075ec1328e50837074c91 Mon Sep 17 00:00:00 2001
|
||||
From: Sachi King <nakato@nakato.io>
|
||||
Date: Tue, 5 Oct 2021 00:05:09 +1100
|
||||
Subject: [PATCH] Input: soc_button_array - support AMD variant Surface devices
|
||||
|
@ -20,10 +20,10 @@ Patchset: surface-button
|
|||
1 file changed, 8 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
|
||||
index f6d060377d18..b8603f74eb28 100644
|
||||
index e79f5497948b..2bddbe6e9ea4 100644
|
||||
--- a/drivers/input/misc/soc_button_array.c
|
||||
+++ b/drivers/input/misc/soc_button_array.c
|
||||
@@ -540,8 +540,8 @@ static const struct soc_device_data soc_device_MSHW0028 = {
|
||||
@@ -537,8 +537,8 @@ static const struct soc_device_data soc_device_MSHW0028 = {
|
||||
* Both, the Surface Pro 4 (surfacepro3_button.c) and the above mentioned
|
||||
* devices use MSHW0040 for power and volume buttons, however the way they
|
||||
* have to be addressed differs. Make sure that we only load this drivers
|
||||
|
@ -34,7 +34,7 @@ index f6d060377d18..b8603f74eb28 100644
|
|||
*/
|
||||
#define MSHW0040_DSM_REVISION 0x01
|
||||
#define MSHW0040_DSM_GET_OMPR 0x02 // get OEM Platform Revision
|
||||
@@ -552,31 +552,14 @@ static const guid_t MSHW0040_DSM_UUID =
|
||||
@@ -549,31 +549,14 @@ static const guid_t MSHW0040_DSM_UUID =
|
||||
static int soc_device_check_MSHW0040(struct device *dev)
|
||||
{
|
||||
acpi_handle handle = ACPI_HANDLE(dev);
|
||||
|
@ -73,9 +73,9 @@ index f6d060377d18..b8603f74eb28 100644
|
|||
|
||||
/*
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From c26bb1d0af0fe40be270d203d6aaeab28dd04a10 Mon Sep 17 00:00:00 2001
|
||||
From 519c892e7fcb3660829da97c6bc0dd0ea835a897 Mon Sep 17 00:00:00 2001
|
||||
From: Sachi King <nakato@nakato.io>
|
||||
Date: Tue, 5 Oct 2021 00:22:57 +1100
|
||||
Subject: [PATCH] platform/surface: surfacepro3_button: don't load on amd
|
||||
|
@ -96,7 +96,7 @@ Patchset: surface-button
|
|||
1 file changed, 6 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/drivers/platform/surface/surfacepro3_button.c b/drivers/platform/surface/surfacepro3_button.c
|
||||
index 2755601f979c..4240c98ca226 100644
|
||||
index 242fb690dcaf..30eea54dbb47 100644
|
||||
--- a/drivers/platform/surface/surfacepro3_button.c
|
||||
+++ b/drivers/platform/surface/surfacepro3_button.c
|
||||
@@ -149,7 +149,8 @@ static int surface_button_resume(struct device *dev)
|
||||
|
@ -145,5 +145,5 @@ index 2755601f979c..4240c98ca226 100644
|
|||
|
||||
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 278a4a551b60ef874cde389c7b83a07655f5cda6 Mon Sep 17 00:00:00 2001
|
||||
From c9aed26b8f46ee570b5b76912c288c6340ee7121 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Sat, 18 Feb 2023 01:02:49 +0100
|
||||
Subject: [PATCH] USB: quirks: Add USB_QUIRK_DELAY_INIT for Surface Go 3
|
||||
|
@ -37,9 +37,9 @@ index 15e9bd180a1d..0d70461d01e1 100644
|
|||
{ USB_DEVICE(0x046a, 0x0023), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From 350edff5f5c90d811ff0686f95dd7f5222ee3d8d Mon Sep 17 00:00:00 2001
|
||||
From bde20e67508ff86d50f53918e90e58642acb5fc1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
||||
Date: Thu, 5 Nov 2020 13:09:45 +0100
|
||||
Subject: [PATCH] hid/multitouch: Turn off Type Cover keyboard backlight when
|
||||
|
@ -75,7 +75,7 @@ Patchset: surface-typecover
|
|||
1 file changed, 98 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
|
||||
index 5ec1f174127a..a7a12b56f79c 100644
|
||||
index 521b2ffb4244..c8f3d05c8866 100644
|
||||
--- a/drivers/hid/hid-multitouch.c
|
||||
+++ b/drivers/hid/hid-multitouch.c
|
||||
@@ -34,7 +34,10 @@
|
||||
|
@ -257,7 +257,7 @@ index 5ec1f174127a..a7a12b56f79c 100644
|
|||
del_timer_sync(&td->release_timer);
|
||||
|
||||
sysfs_remove_group(&hdev->dev.kobj, &mt_attribute_group);
|
||||
@@ -2228,6 +2319,11 @@ static const struct hid_device_id mt_devices[] = {
|
||||
@@ -2219,6 +2310,11 @@ static const struct hid_device_id mt_devices[] = {
|
||||
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
||||
USB_DEVICE_ID_XIROKU_CSR2) },
|
||||
|
||||
|
@ -270,9 +270,9 @@ index 5ec1f174127a..a7a12b56f79c 100644
|
|||
{ .driver_data = MT_CLS_GOOGLE,
|
||||
HID_DEVICE(HID_BUS_ANY, HID_GROUP_ANY, USB_VENDOR_ID_GOOGLE,
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From 29e073fd0ed75ce3f28b49a4fd34358104a3fd13 Mon Sep 17 00:00:00 2001
|
||||
From 30849651b4c66e2b904e5b7ccd3a973f7f91c96a Mon Sep 17 00:00:00 2001
|
||||
From: PJungkamp <p.jungkamp@gmail.com>
|
||||
Date: Fri, 25 Feb 2022 12:04:25 +0100
|
||||
Subject: [PATCH] hid/multitouch: Add support for surface pro type cover tablet
|
||||
|
@ -301,7 +301,7 @@ Patchset: surface-typecover
|
|||
1 file changed, 122 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
|
||||
index a7a12b56f79c..d4ac41f2f9a8 100644
|
||||
index c8f3d05c8866..1c6e4d66e762 100644
|
||||
--- a/drivers/hid/hid-multitouch.c
|
||||
+++ b/drivers/hid/hid-multitouch.c
|
||||
@@ -77,6 +77,7 @@ MODULE_LICENSE("GPL");
|
||||
|
@ -570,5 +570,5 @@ index a7a12b56f79c..d4ac41f2f9a8 100644
|
|||
unregister_pm_notifier(&td->pm_notifier);
|
||||
del_timer_sync(&td->release_timer);
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From b57c1784927f0ef467efdee4cb2a026d7eea3c1c Mon Sep 17 00:00:00 2001
|
||||
From 024ce474ffd5215a369f76a4014c6ff3b506c39f Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Sun, 19 Feb 2023 22:12:24 +0100
|
||||
Subject: [PATCH] PCI: Add quirk to prevent calling shutdown mehtod
|
||||
|
@ -23,7 +23,7 @@ Patchset: surface-shutdown
|
|||
3 files changed, 40 insertions(+)
|
||||
|
||||
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
|
||||
index 51ec9e7e784f..40554890d721 100644
|
||||
index f47a3b10bf50..9ea4352aac56 100644
|
||||
--- a/drivers/pci/pci-driver.c
|
||||
+++ b/drivers/pci/pci-driver.c
|
||||
@@ -507,6 +507,9 @@ static void pci_device_shutdown(struct device *dev)
|
||||
|
@ -37,13 +37,13 @@ index 51ec9e7e784f..40554890d721 100644
|
|||
|
||||
if (drv && drv->shutdown)
|
||||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
||||
index ae95d0950772..036af941b5e6 100644
|
||||
index 472fa2c8ebce..6e86d7753d7d 100644
|
||||
--- a/drivers/pci/quirks.c
|
||||
+++ b/drivers/pci/quirks.c
|
||||
@@ -6223,3 +6223,39 @@ static void pci_fixup_d3cold_delay_1sec(struct pci_dev *pdev)
|
||||
pdev->d3cold_delay = 1000;
|
||||
}
|
||||
DECLARE_PCI_FIXUP_FINAL(0x5555, 0x0004, pci_fixup_d3cold_delay_1sec);
|
||||
@@ -6035,3 +6035,39 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9a2d, dpc_log_size);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9a2f, dpc_log_size);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9a31, dpc_log_size);
|
||||
#endif
|
||||
+
|
||||
+static const struct dmi_system_id no_shutdown_dmi_table[] = {
|
||||
+ /*
|
||||
|
@ -81,17 +81,17 @@ index ae95d0950772..036af941b5e6 100644
|
|||
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x466d, quirk_no_shutdown); // Thunderbolt 4 NHI
|
||||
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x46a8, quirk_no_shutdown); // GPU
|
||||
diff --git a/include/linux/pci.h b/include/linux/pci.h
|
||||
index 1596b1205b8d..608ab04a0b6c 100644
|
||||
index eccaf1abea79..f3684d9a388a 100644
|
||||
--- a/include/linux/pci.h
|
||||
+++ b/include/linux/pci.h
|
||||
@@ -465,6 +465,7 @@ struct pci_dev {
|
||||
@@ -463,6 +463,7 @@ struct pci_dev {
|
||||
unsigned int no_vf_scan:1; /* Don't scan for VFs after IOV enablement */
|
||||
unsigned int no_command_memory:1; /* No PCI_COMMAND_MEMORY */
|
||||
unsigned int rom_bar_overlap:1; /* ROM BAR disable broken */
|
||||
unsigned int rom_attr_enabled:1; /* Display of ROM attribute enabled? */
|
||||
+ unsigned int no_shutdown:1; /* Do not touch device on shutdown */
|
||||
pci_dev_flags_t dev_flags;
|
||||
atomic_t enable_cnt; /* pci_enable_device has been called */
|
||||
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 2d4cd827e3fc8aec6dee8da356eda809152d34ce Mon Sep 17 00:00:00 2001
|
||||
From 31dcb0a4451d13d722879d122e6c324d11e31c86 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Sun, 12 Mar 2023 01:41:57 +0100
|
||||
Subject: [PATCH] platform/surface: gpe: Add support for Surface Pro 9
|
||||
|
@ -47,5 +47,5 @@ index c219b840d491..69c4352e8406 100644
|
|||
.ident = "Surface Book 1",
|
||||
.matches = {
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
977
patches/6.1/0012-cameras.patch
Normal file
977
patches/6.1/0012-cameras.patch
Normal file
|
@ -0,0 +1,977 @@
|
|||
From d07be9c0bd2d2f63326d85c35de3bfcd6f8851d4 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Sun, 10 Oct 2021 20:56:57 +0200
|
||||
Subject: [PATCH] ACPI: delay enumeration of devices with a _DEP pointing to an
|
||||
INT3472 device
|
||||
|
||||
The clk and regulator frameworks expect clk/regulator consumer-devices
|
||||
to have info about the consumed clks/regulators described in the device's
|
||||
fw_node.
|
||||
|
||||
To work around cases where this info is not present in the firmware tables,
|
||||
which is often the case on x86/ACPI devices, both frameworks allow the
|
||||
provider-driver to attach info about consumers to the clks/regulators
|
||||
when registering these.
|
||||
|
||||
This causes problems with the probe ordering wrt drivers for consumers
|
||||
of these clks/regulators. Since the lookups are only registered when the
|
||||
provider-driver binds, trying to get these clks/regulators before then
|
||||
results in a -ENOENT error for clks and a dummy regulator for regulators.
|
||||
|
||||
One case where we hit this issue is camera sensors such as e.g. the OV8865
|
||||
sensor found on the Microsoft Surface Go. The sensor uses clks, regulators
|
||||
and GPIOs provided by a TPS68470 PMIC which is described in an INT3472
|
||||
ACPI device. There is special platform code handling this and setting
|
||||
platform_data with the necessary consumer info on the MFD cells
|
||||
instantiated for the PMIC under: drivers/platform/x86/intel/int3472.
|
||||
|
||||
For this to work properly the ov8865 driver must not bind to the I2C-client
|
||||
for the OV8865 sensor until after the TPS68470 PMIC gpio, regulator and
|
||||
clk MFD cells have all been fully setup.
|
||||
|
||||
The OV8865 on the Microsoft Surface Go is just one example, all X86
|
||||
devices using the Intel IPU3 camera block found on recent Intel SoCs
|
||||
have similar issues where there is an INT3472 HID ACPI-device, which
|
||||
describes the clks and regulators, and the driver for this INT3472 device
|
||||
must be fully initialized before the sensor driver (any sensor driver)
|
||||
binds for things to work properly.
|
||||
|
||||
On these devices the ACPI nodes describing the sensors all have a _DEP
|
||||
dependency on the matching INT3472 ACPI device (there is one per sensor).
|
||||
|
||||
This allows solving the probe-ordering problem by delaying the enumeration
|
||||
(instantiation of the I2C-client in the ov8865 example) of ACPI-devices
|
||||
which have a _DEP dependency on an INT3472 device.
|
||||
|
||||
The new acpi_dev_ready_for_enumeration() helper used for this is also
|
||||
exported because for devices, which have the enumeration_by_parent flag
|
||||
set, the parent-driver will do its own scan of child ACPI devices and
|
||||
it will try to enumerate those during its probe(). Code doing this such
|
||||
as e.g. the i2c-core-acpi.c code must call this new helper to ensure
|
||||
that it too delays the enumeration until all the _DEP dependencies are
|
||||
met on devices which have the new honor_deps flag set.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/acpi/scan.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
|
||||
index a0e347f6f97e..167dbf4cf623 100644
|
||||
--- a/drivers/acpi/scan.c
|
||||
+++ b/drivers/acpi/scan.c
|
||||
@@ -2107,6 +2107,9 @@ static acpi_status acpi_bus_check_add_2(acpi_handle handle, u32 lvl_not_used,
|
||||
|
||||
static void acpi_default_enumeration(struct acpi_device *device)
|
||||
{
|
||||
+ if (!acpi_dev_ready_for_enumeration(device))
|
||||
+ return;
|
||||
+
|
||||
/*
|
||||
* Do not enumerate devices with enumeration_by_parent flag set as
|
||||
* they will be enumerated by their respective parents.
|
||||
--
|
||||
2.42.0
|
||||
|
||||
From 71ad307fa27f57849d6a77a78a7f135e9d89a33a Mon Sep 17 00:00:00 2001
|
||||
From: zouxiaoh <xiaohong.zou@intel.com>
|
||||
Date: Fri, 25 Jun 2021 08:52:59 +0800
|
||||
Subject: [PATCH] iommu: intel-ipu: use IOMMU passthrough mode for Intel IPUs
|
||||
|
||||
Intel IPU(Image Processing Unit) has its own (IO)MMU hardware,
|
||||
The IPU driver allocates its own page table that is not mapped
|
||||
via the DMA, and thus the Intel IOMMU driver blocks access giving
|
||||
this error: DMAR: DRHD: handling fault status reg 3 DMAR:
|
||||
[DMA Read] Request device [00:05.0] PASID ffffffff
|
||||
fault addr 76406000 [fault reason 06] PTE Read access is not set
|
||||
As IPU is not an external facing device which is not risky, so use
|
||||
IOMMU passthrough mode for Intel IPUs.
|
||||
|
||||
Change-Id: I6dcccdadac308cf42e20a18e1b593381391e3e6b
|
||||
Depends-On: Iacd67578e8c6a9b9ac73285f52b4081b72fb68a6
|
||||
Tracked-On: #JIITL8-411
|
||||
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
|
||||
Signed-off-by: zouxiaoh <xiaohong.zou@intel.com>
|
||||
Signed-off-by: Xu Chongyang <chongyang.xu@intel.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/iommu/intel/iommu.c | 30 ++++++++++++++++++++++++++++++
|
||||
1 file changed, 30 insertions(+)
|
||||
|
||||
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
|
||||
index 66e8a5c18fb8..73beca5d7ca9 100644
|
||||
--- a/drivers/iommu/intel/iommu.c
|
||||
+++ b/drivers/iommu/intel/iommu.c
|
||||
@@ -37,6 +37,12 @@
|
||||
#define IS_GFX_DEVICE(pdev) ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY)
|
||||
#define IS_USB_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_SERIAL_USB)
|
||||
#define IS_ISA_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA)
|
||||
+#define IS_INTEL_IPU(pdev) ((pdev)->vendor == PCI_VENDOR_ID_INTEL && \
|
||||
+ ((pdev)->device == 0x9a19 || \
|
||||
+ (pdev)->device == 0x9a39 || \
|
||||
+ (pdev)->device == 0x4e19 || \
|
||||
+ (pdev)->device == 0x465d || \
|
||||
+ (pdev)->device == 0x1919))
|
||||
#define IS_IPTS(pdev) ((pdev)->vendor == PCI_VENDOR_ID_INTEL && \
|
||||
((pdev)->device == 0x9d3e))
|
||||
#define IS_AZALIA(pdev) ((pdev)->vendor == 0x8086 && (pdev)->device == 0x3a3e)
|
||||
@@ -289,12 +295,14 @@ EXPORT_SYMBOL_GPL(intel_iommu_enabled);
|
||||
|
||||
static int dmar_map_gfx = 1;
|
||||
static int dmar_map_ipts = 1;
|
||||
+static int dmar_map_ipu = 1;
|
||||
static int intel_iommu_superpage = 1;
|
||||
static int iommu_identity_mapping;
|
||||
static int iommu_skip_te_disable;
|
||||
|
||||
#define IDENTMAP_GFX 2
|
||||
#define IDENTMAP_AZALIA 4
|
||||
+#define IDENTMAP_IPU 8
|
||||
#define IDENTMAP_IPTS 16
|
||||
|
||||
const struct iommu_ops intel_iommu_ops;
|
||||
@@ -2635,6 +2643,9 @@ static int device_def_domain_type(struct device *dev)
|
||||
if ((iommu_identity_mapping & IDENTMAP_GFX) && IS_GFX_DEVICE(pdev))
|
||||
return IOMMU_DOMAIN_IDENTITY;
|
||||
|
||||
+ if ((iommu_identity_mapping & IDENTMAP_IPU) && IS_INTEL_IPU(pdev))
|
||||
+ return IOMMU_DOMAIN_IDENTITY;
|
||||
+
|
||||
if ((iommu_identity_mapping & IDENTMAP_IPTS) && IS_IPTS(pdev))
|
||||
return IOMMU_DOMAIN_IDENTITY;
|
||||
}
|
||||
@@ -3026,6 +3037,9 @@ static int __init init_dmars(void)
|
||||
if (!dmar_map_gfx)
|
||||
iommu_identity_mapping |= IDENTMAP_GFX;
|
||||
|
||||
+ if (!dmar_map_ipu)
|
||||
+ iommu_identity_mapping |= IDENTMAP_IPU;
|
||||
+
|
||||
if (!dmar_map_ipts)
|
||||
iommu_identity_mapping |= IDENTMAP_IPTS;
|
||||
|
||||
@@ -4782,6 +4796,18 @@ static void quirk_iommu_igfx(struct pci_dev *dev)
|
||||
dmar_map_gfx = 0;
|
||||
}
|
||||
|
||||
+static void quirk_iommu_ipu(struct pci_dev *dev)
|
||||
+{
|
||||
+ if (!IS_INTEL_IPU(dev))
|
||||
+ return;
|
||||
+
|
||||
+ if (risky_device(dev))
|
||||
+ return;
|
||||
+
|
||||
+ pci_info(dev, "Passthrough IOMMU for integrated Intel IPU\n");
|
||||
+ dmar_map_ipu = 0;
|
||||
+}
|
||||
+
|
||||
static void quirk_iommu_ipts(struct pci_dev *dev)
|
||||
{
|
||||
if (!IS_IPTS(dev))
|
||||
@@ -4793,6 +4819,7 @@ static void quirk_iommu_ipts(struct pci_dev *dev)
|
||||
pci_info(dev, "Passthrough IOMMU for IPTS\n");
|
||||
dmar_map_ipts = 0;
|
||||
}
|
||||
+
|
||||
/* G4x/GM45 integrated gfx dmar support is totally busted. */
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_igfx);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e00, quirk_iommu_igfx);
|
||||
@@ -4828,6 +4855,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1632, quirk_iommu_igfx);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163A, quirk_iommu_igfx);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163D, quirk_iommu_igfx);
|
||||
|
||||
+/* disable IPU dmar support */
|
||||
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_iommu_ipu);
|
||||
+
|
||||
/* disable IPTS dmar support */
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9D3E, quirk_iommu_ipts);
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
||||
From ce2efa0851b6fa4e88f1d59cdd4d95a8989a74d1 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <djrscally@gmail.com>
|
||||
Date: Sun, 10 Oct 2021 20:57:02 +0200
|
||||
Subject: [PATCH] platform/x86: int3472: Enable I2c daisy chain
|
||||
|
||||
The TPS68470 PMIC has an I2C passthrough mode through which I2C traffic
|
||||
can be forwarded to a device connected to the PMIC as though it were
|
||||
connected directly to the system bus. Enable this mode when the chip
|
||||
is initialised.
|
||||
|
||||
Signed-off-by: Daniel Scally <djrscally@gmail.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/platform/x86/intel/int3472/tps68470.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c
|
||||
index 5b8d1a9620a5..6a0ff035cf20 100644
|
||||
--- a/drivers/platform/x86/intel/int3472/tps68470.c
|
||||
+++ b/drivers/platform/x86/intel/int3472/tps68470.c
|
||||
@@ -46,6 +46,13 @@ static int tps68470_chip_init(struct device *dev, struct regmap *regmap)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ /* Enable I2C daisy chain */
|
||||
+ ret = regmap_write(regmap, TPS68470_REG_S_I2C_CTL, 0x03);
|
||||
+ if (ret) {
|
||||
+ dev_err(dev, "Failed to enable i2c daisy chain\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
dev_info(dev, "TPS68470 REVID: 0x%02x\n", version);
|
||||
|
||||
return 0;
|
||||
--
|
||||
2.42.0
|
||||
|
||||
From 5d384365a6d21ab507243f11dd8f2c3e2633cde9 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <djrscally@gmail.com>
|
||||
Date: Thu, 28 Oct 2021 21:55:16 +0100
|
||||
Subject: [PATCH] media: i2c: Add driver for DW9719 VCM
|
||||
|
||||
Add a driver for the DW9719 VCM. The driver creates a v4l2 subdevice
|
||||
and registers a control to set the desired focus.
|
||||
|
||||
Signed-off-by: Daniel Scally <djrscally@gmail.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
MAINTAINERS | 7 +
|
||||
drivers/media/i2c/Kconfig | 11 +
|
||||
drivers/media/i2c/Makefile | 1 +
|
||||
drivers/media/i2c/dw9719.c | 425 +++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 444 insertions(+)
|
||||
create mode 100644 drivers/media/i2c/dw9719.c
|
||||
|
||||
diff --git a/MAINTAINERS b/MAINTAINERS
|
||||
index 07a9c274c0e2..0ecc68379a3e 100644
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -6286,6 +6286,13 @@ T: git git://linuxtv.org/media_tree.git
|
||||
F: Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.yaml
|
||||
F: drivers/media/i2c/dw9714.c
|
||||
|
||||
+DONGWOON DW9719 LENS VOICE COIL DRIVER
|
||||
+M: Daniel Scally <djrscally@gmail.com>
|
||||
+L: linux-media@vger.kernel.org
|
||||
+S: Maintained
|
||||
+T: git git://linuxtv.org/media_tree.git
|
||||
+F: drivers/media/i2c/dw9719.c
|
||||
+
|
||||
DONGWOON DW9768 LENS VOICE COIL DRIVER
|
||||
M: Dongchun Zhu <dongchun.zhu@mediatek.com>
|
||||
L: linux-media@vger.kernel.org
|
||||
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
|
||||
index a34afb5217eb..fbaa2ce7fa3e 100644
|
||||
--- a/drivers/media/i2c/Kconfig
|
||||
+++ b/drivers/media/i2c/Kconfig
|
||||
@@ -828,6 +828,17 @@ config VIDEO_DW9714
|
||||
capability. This is designed for linear control of
|
||||
voice coil motors, controlled via I2C serial interface.
|
||||
|
||||
+config VIDEO_DW9719
|
||||
+ tristate "DW9719 lens voice coil support"
|
||||
+ depends on I2C && VIDEO_V4L2
|
||||
+ select MEDIA_CONTROLLER
|
||||
+ select VIDEO_V4L2_SUBDEV_API
|
||||
+ select V4L2_ASYNC
|
||||
+ help
|
||||
+ This is a driver for the DW9719 camera lens voice coil.
|
||||
+ This is designed for linear control of voice coil motors,
|
||||
+ controlled via I2C serial interface.
|
||||
+
|
||||
config VIDEO_DW9768
|
||||
tristate "DW9768 lens voice coil support"
|
||||
depends on I2C && VIDEO_DEV
|
||||
diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
|
||||
index 0a2933103dd9..b82a07c76388 100644
|
||||
--- a/drivers/media/i2c/Makefile
|
||||
+++ b/drivers/media/i2c/Makefile
|
||||
@@ -30,6 +30,7 @@ obj-$(CONFIG_VIDEO_CS5345) += cs5345.o
|
||||
obj-$(CONFIG_VIDEO_CS53L32A) += cs53l32a.o
|
||||
obj-$(CONFIG_VIDEO_CX25840) += cx25840/
|
||||
obj-$(CONFIG_VIDEO_DW9714) += dw9714.o
|
||||
+obj-$(CONFIG_VIDEO_DW9719) += dw9719.o
|
||||
obj-$(CONFIG_VIDEO_DW9768) += dw9768.o
|
||||
obj-$(CONFIG_VIDEO_DW9807_VCM) += dw9807-vcm.o
|
||||
obj-$(CONFIG_VIDEO_ET8EK8) += et8ek8/
|
||||
diff --git a/drivers/media/i2c/dw9719.c b/drivers/media/i2c/dw9719.c
|
||||
new file mode 100644
|
||||
index 000000000000..180b04d2a6b3
|
||||
--- /dev/null
|
||||
+++ b/drivers/media/i2c/dw9719.c
|
||||
@@ -0,0 +1,425 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+// Copyright (c) 2012 Intel Corporation
|
||||
+
|
||||
+/*
|
||||
+ * Based on linux/modules/camera/drivers/media/i2c/imx/dw9719.c in this repo:
|
||||
+ * https://github.com/ZenfoneArea/android_kernel_asus_zenfone5
|
||||
+ */
|
||||
+
|
||||
+#include <asm/unaligned.h>
|
||||
+
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/i2c.h>
|
||||
+#include <linux/pm_runtime.h>
|
||||
+#include <linux/regulator/consumer.h>
|
||||
+#include <linux/types.h>
|
||||
+
|
||||
+#include <media/v4l2-common.h>
|
||||
+#include <media/v4l2-ctrls.h>
|
||||
+#include <media/v4l2-subdev.h>
|
||||
+
|
||||
+#define DW9719_MAX_FOCUS_POS 1023
|
||||
+#define DW9719_CTRL_STEPS 16
|
||||
+#define DW9719_CTRL_DELAY_US 1000
|
||||
+#define DELAY_MAX_PER_STEP_NS (1000000 * 1023)
|
||||
+
|
||||
+#define DW9719_INFO 0
|
||||
+#define DW9719_ID 0xF1
|
||||
+#define DW9719_CONTROL 2
|
||||
+#define DW9719_VCM_CURRENT 3
|
||||
+
|
||||
+#define DW9719_MODE 6
|
||||
+#define DW9719_VCM_FREQ 7
|
||||
+
|
||||
+#define DW9719_MODE_SAC3 0x40
|
||||
+#define DW9719_DEFAULT_VCM_FREQ 0x60
|
||||
+#define DW9719_ENABLE_RINGING 0x02
|
||||
+
|
||||
+#define NUM_REGULATORS 2
|
||||
+
|
||||
+#define to_dw9719_device(x) container_of(x, struct dw9719_device, sd)
|
||||
+
|
||||
+struct dw9719_device {
|
||||
+ struct device *dev;
|
||||
+ struct i2c_client *client;
|
||||
+ struct regulator_bulk_data regulators[NUM_REGULATORS];
|
||||
+ struct v4l2_subdev sd;
|
||||
+
|
||||
+ struct dw9719_v4l2_ctrls {
|
||||
+ struct v4l2_ctrl_handler handler;
|
||||
+ struct v4l2_ctrl *focus;
|
||||
+ } ctrls;
|
||||
+};
|
||||
+
|
||||
+static int dw9719_i2c_rd8(struct i2c_client *client, u8 reg, u8 *val)
|
||||
+{
|
||||
+ struct i2c_msg msg[2];
|
||||
+ u8 buf[2] = { reg };
|
||||
+ int ret;
|
||||
+
|
||||
+ msg[0].addr = client->addr;
|
||||
+ msg[0].flags = 0;
|
||||
+ msg[0].len = 1;
|
||||
+ msg[0].buf = buf;
|
||||
+
|
||||
+ msg[1].addr = client->addr;
|
||||
+ msg[1].flags = I2C_M_RD;
|
||||
+ msg[1].len = 1;
|
||||
+ msg[1].buf = &buf[1];
|
||||
+ *val = 0;
|
||||
+
|
||||
+ ret = i2c_transfer(client->adapter, msg, 2);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ *val = buf[1];
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int dw9719_i2c_wr8(struct i2c_client *client, u8 reg, u8 val)
|
||||
+{
|
||||
+ struct i2c_msg msg;
|
||||
+ int ret;
|
||||
+
|
||||
+ u8 buf[2] = { reg, val };
|
||||
+
|
||||
+ msg.addr = client->addr;
|
||||
+ msg.flags = 0;
|
||||
+ msg.len = sizeof(buf);
|
||||
+ msg.buf = buf;
|
||||
+
|
||||
+ ret = i2c_transfer(client->adapter, &msg, 1);
|
||||
+
|
||||
+ return ret < 0 ? ret : 0;
|
||||
+}
|
||||
+
|
||||
+static int dw9719_i2c_wr16(struct i2c_client *client, u8 reg, u16 val)
|
||||
+{
|
||||
+ struct i2c_msg msg;
|
||||
+ u8 buf[3] = { reg };
|
||||
+ int ret;
|
||||
+
|
||||
+ put_unaligned_be16(val, buf + 1);
|
||||
+
|
||||
+ msg.addr = client->addr;
|
||||
+ msg.flags = 0;
|
||||
+ msg.len = sizeof(buf);
|
||||
+ msg.buf = buf;
|
||||
+
|
||||
+ ret = i2c_transfer(client->adapter, &msg, 1);
|
||||
+
|
||||
+ return ret < 0 ? ret : 0;
|
||||
+}
|
||||
+
|
||||
+static int dw9719_detect(struct dw9719_device *dw9719)
|
||||
+{
|
||||
+ int ret;
|
||||
+ u8 val;
|
||||
+
|
||||
+ ret = dw9719_i2c_rd8(dw9719->client, DW9719_INFO, &val);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ if (val != DW9719_ID) {
|
||||
+ dev_err(dw9719->dev, "Failed to detect correct id\n");
|
||||
+ ret = -ENXIO;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int dw9719_power_down(struct dw9719_device *dw9719)
|
||||
+{
|
||||
+ return regulator_bulk_disable(NUM_REGULATORS, dw9719->regulators);
|
||||
+}
|
||||
+
|
||||
+static int dw9719_power_up(struct dw9719_device *dw9719)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = regulator_bulk_enable(NUM_REGULATORS, dw9719->regulators);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Jiggle SCL pin to wake up device */
|
||||
+ ret = dw9719_i2c_wr8(dw9719->client, DW9719_CONTROL, 1);
|
||||
+
|
||||
+ /* Need 100us to transit from SHUTDOWN to STANDBY*/
|
||||
+ usleep_range(100, 1000);
|
||||
+
|
||||
+ ret = dw9719_i2c_wr8(dw9719->client, DW9719_CONTROL,
|
||||
+ DW9719_ENABLE_RINGING);
|
||||
+ if (ret < 0)
|
||||
+ goto fail_powerdown;
|
||||
+
|
||||
+ ret = dw9719_i2c_wr8(dw9719->client, DW9719_MODE, DW9719_MODE_SAC3);
|
||||
+ if (ret < 0)
|
||||
+ goto fail_powerdown;
|
||||
+
|
||||
+ ret = dw9719_i2c_wr8(dw9719->client, DW9719_VCM_FREQ,
|
||||
+ DW9719_DEFAULT_VCM_FREQ);
|
||||
+ if (ret < 0)
|
||||
+ goto fail_powerdown;
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+fail_powerdown:
|
||||
+ dw9719_power_down(dw9719);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int dw9719_t_focus_abs(struct dw9719_device *dw9719, s32 value)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ value = clamp(value, 0, DW9719_MAX_FOCUS_POS);
|
||||
+ ret = dw9719_i2c_wr16(dw9719->client, DW9719_VCM_CURRENT, value);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int dw9719_set_ctrl(struct v4l2_ctrl *ctrl)
|
||||
+{
|
||||
+ struct dw9719_device *dw9719 = container_of(ctrl->handler,
|
||||
+ struct dw9719_device,
|
||||
+ ctrls.handler);
|
||||
+ int ret;
|
||||
+
|
||||
+ /* Only apply changes to the controls if the device is powered up */
|
||||
+ if (!pm_runtime_get_if_in_use(dw9719->dev))
|
||||
+ return 0;
|
||||
+
|
||||
+ switch (ctrl->id) {
|
||||
+ case V4L2_CID_FOCUS_ABSOLUTE:
|
||||
+ ret = dw9719_t_focus_abs(dw9719, ctrl->val);
|
||||
+ break;
|
||||
+ default:
|
||||
+ ret = -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ pm_runtime_put(dw9719->dev);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static const struct v4l2_ctrl_ops dw9719_ctrl_ops = {
|
||||
+ .s_ctrl = dw9719_set_ctrl,
|
||||
+};
|
||||
+
|
||||
+static int __maybe_unused dw9719_suspend(struct device *dev)
|
||||
+{
|
||||
+ struct v4l2_subdev *sd = dev_get_drvdata(dev);
|
||||
+ struct dw9719_device *dw9719 = to_dw9719_device(sd);
|
||||
+ int ret;
|
||||
+ int val;
|
||||
+
|
||||
+ for (val = dw9719->ctrls.focus->val; val >= 0;
|
||||
+ val -= DW9719_CTRL_STEPS) {
|
||||
+ ret = dw9719_t_focus_abs(dw9719, val);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ usleep_range(DW9719_CTRL_DELAY_US, DW9719_CTRL_DELAY_US + 10);
|
||||
+ }
|
||||
+
|
||||
+ return dw9719_power_down(dw9719);
|
||||
+}
|
||||
+
|
||||
+static int __maybe_unused dw9719_resume(struct device *dev)
|
||||
+{
|
||||
+ struct v4l2_subdev *sd = dev_get_drvdata(dev);
|
||||
+ struct dw9719_device *dw9719 = to_dw9719_device(sd);
|
||||
+ int current_focus = dw9719->ctrls.focus->val;
|
||||
+ int ret;
|
||||
+ int val;
|
||||
+
|
||||
+ ret = dw9719_power_up(dw9719);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ for (val = current_focus % DW9719_CTRL_STEPS; val < current_focus;
|
||||
+ val += DW9719_CTRL_STEPS) {
|
||||
+ ret = dw9719_t_focus_abs(dw9719, val);
|
||||
+ if (ret)
|
||||
+ goto err_power_down;
|
||||
+
|
||||
+ usleep_range(DW9719_CTRL_DELAY_US, DW9719_CTRL_DELAY_US + 10);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+err_power_down:
|
||||
+ dw9719_power_down(dw9719);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int dw9719_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
||||
+{
|
||||
+ return pm_runtime_resume_and_get(sd->dev);
|
||||
+}
|
||||
+
|
||||
+static int dw9719_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
||||
+{
|
||||
+ pm_runtime_put(sd->dev);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct v4l2_subdev_internal_ops dw9719_internal_ops = {
|
||||
+ .open = dw9719_open,
|
||||
+ .close = dw9719_close,
|
||||
+};
|
||||
+
|
||||
+static int dw9719_init_controls(struct dw9719_device *dw9719)
|
||||
+{
|
||||
+ const struct v4l2_ctrl_ops *ops = &dw9719_ctrl_ops;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = v4l2_ctrl_handler_init(&dw9719->ctrls.handler, 1);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ dw9719->ctrls.focus = v4l2_ctrl_new_std(&dw9719->ctrls.handler, ops,
|
||||
+ V4L2_CID_FOCUS_ABSOLUTE, 0,
|
||||
+ DW9719_MAX_FOCUS_POS, 1, 0);
|
||||
+
|
||||
+ if (dw9719->ctrls.handler.error) {
|
||||
+ dev_err(dw9719->dev, "Error initialising v4l2 ctrls\n");
|
||||
+ ret = dw9719->ctrls.handler.error;
|
||||
+ goto err_free_handler;
|
||||
+ }
|
||||
+
|
||||
+ dw9719->sd.ctrl_handler = &dw9719->ctrls.handler;
|
||||
+
|
||||
+ return ret;
|
||||
+
|
||||
+err_free_handler:
|
||||
+ v4l2_ctrl_handler_free(&dw9719->ctrls.handler);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static const struct v4l2_subdev_ops dw9719_ops = { };
|
||||
+
|
||||
+static int dw9719_probe(struct i2c_client *client)
|
||||
+{
|
||||
+ struct dw9719_device *dw9719;
|
||||
+ int ret;
|
||||
+
|
||||
+ dw9719 = devm_kzalloc(&client->dev, sizeof(*dw9719), GFP_KERNEL);
|
||||
+ if (!dw9719)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ dw9719->client = client;
|
||||
+ dw9719->dev = &client->dev;
|
||||
+
|
||||
+ dw9719->regulators[0].supply = "vdd";
|
||||
+ /*
|
||||
+ * The DW9719 has only the 1 VDD voltage input, but some PMICs such as
|
||||
+ * the TPS68470 PMIC have I2C passthrough capability, to disconnect the
|
||||
+ * sensor's I2C pins from the I2C bus when the sensors VSIO (Sensor-IO)
|
||||
+ * is off, because some sensors then short these pins to ground;
|
||||
+ * and the DW9719 might sit behind this passthrough, this it needs to
|
||||
+ * enable VSIO as that will also enable the I2C passthrough.
|
||||
+ */
|
||||
+ dw9719->regulators[1].supply = "vsio";
|
||||
+
|
||||
+ ret = devm_regulator_bulk_get(&client->dev, NUM_REGULATORS,
|
||||
+ dw9719->regulators);
|
||||
+ if (ret)
|
||||
+ return dev_err_probe(&client->dev, ret, "getting regulators\n");
|
||||
+
|
||||
+ v4l2_i2c_subdev_init(&dw9719->sd, client, &dw9719_ops);
|
||||
+ dw9719->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
|
||||
+ dw9719->sd.internal_ops = &dw9719_internal_ops;
|
||||
+
|
||||
+ ret = dw9719_init_controls(dw9719);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = media_entity_pads_init(&dw9719->sd.entity, 0, NULL);
|
||||
+ if (ret < 0)
|
||||
+ goto err_free_ctrl_handler;
|
||||
+
|
||||
+ dw9719->sd.entity.function = MEDIA_ENT_F_LENS;
|
||||
+
|
||||
+ /*
|
||||
+ * We need the driver to work in the event that pm runtime is disable in
|
||||
+ * the kernel, so power up and verify the chip now. In the event that
|
||||
+ * runtime pm is disabled this will leave the chip on, so that the lens
|
||||
+ * will work.
|
||||
+ */
|
||||
+
|
||||
+ ret = dw9719_power_up(dw9719);
|
||||
+ if (ret)
|
||||
+ goto err_cleanup_media;
|
||||
+
|
||||
+ ret = dw9719_detect(dw9719);
|
||||
+ if (ret)
|
||||
+ goto err_powerdown;
|
||||
+
|
||||
+ pm_runtime_set_active(&client->dev);
|
||||
+ pm_runtime_get_noresume(&client->dev);
|
||||
+ pm_runtime_enable(&client->dev);
|
||||
+
|
||||
+ ret = v4l2_async_register_subdev(&dw9719->sd);
|
||||
+ if (ret < 0)
|
||||
+ goto err_pm_runtime;
|
||||
+
|
||||
+ pm_runtime_set_autosuspend_delay(&client->dev, 1000);
|
||||
+ pm_runtime_use_autosuspend(&client->dev);
|
||||
+ pm_runtime_put_autosuspend(&client->dev);
|
||||
+
|
||||
+ return ret;
|
||||
+
|
||||
+err_pm_runtime:
|
||||
+ pm_runtime_disable(&client->dev);
|
||||
+ pm_runtime_put_noidle(&client->dev);
|
||||
+err_powerdown:
|
||||
+ dw9719_power_down(dw9719);
|
||||
+err_cleanup_media:
|
||||
+ media_entity_cleanup(&dw9719->sd.entity);
|
||||
+err_free_ctrl_handler:
|
||||
+ v4l2_ctrl_handler_free(&dw9719->ctrls.handler);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void dw9719_remove(struct i2c_client *client)
|
||||
+{
|
||||
+ struct v4l2_subdev *sd = i2c_get_clientdata(client);
|
||||
+ struct dw9719_device *dw9719 = container_of(sd, struct dw9719_device,
|
||||
+ sd);
|
||||
+
|
||||
+ pm_runtime_disable(&client->dev);
|
||||
+ v4l2_async_unregister_subdev(sd);
|
||||
+ v4l2_ctrl_handler_free(&dw9719->ctrls.handler);
|
||||
+ media_entity_cleanup(&dw9719->sd.entity);
|
||||
+}
|
||||
+
|
||||
+static const struct i2c_device_id dw9719_id_table[] = {
|
||||
+ { "dw9719" },
|
||||
+ { }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(i2c, dw9719_id_table);
|
||||
+
|
||||
+static const struct dev_pm_ops dw9719_pm_ops = {
|
||||
+ SET_RUNTIME_PM_OPS(dw9719_suspend, dw9719_resume, NULL)
|
||||
+};
|
||||
+
|
||||
+static struct i2c_driver dw9719_i2c_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "dw9719",
|
||||
+ .pm = &dw9719_pm_ops,
|
||||
+ },
|
||||
+ .probe_new = dw9719_probe,
|
||||
+ .remove = dw9719_remove,
|
||||
+ .id_table = dw9719_id_table,
|
||||
+};
|
||||
+module_i2c_driver(dw9719_i2c_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Daniel Scally <djrscally@gmail.com>");
|
||||
+MODULE_DESCRIPTION("DW9719 VCM Driver");
|
||||
+MODULE_LICENSE("GPL");
|
||||
--
|
||||
2.42.0
|
||||
|
||||
From b4ce4a1930c03eb60e3a4362f0daf5595eabb3c0 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <djrscally@gmail.com>
|
||||
Date: Wed, 4 May 2022 23:21:45 +0100
|
||||
Subject: [PATCH] media: ipu3-cio2: Move functionality from .complete() to
|
||||
.bound()
|
||||
|
||||
Creating links and registering subdev nodes during the .complete()
|
||||
callback has the unfortunate effect of preventing all cameras that
|
||||
connect to a notifier from working if any one of their drivers fails
|
||||
to probe. Moving the functionality from .complete() to .bound() allows
|
||||
those camera sensor drivers that did probe correctly to work regardless.
|
||||
|
||||
Signed-off-by: Daniel Scally <djrscally@gmail.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/media/pci/intel/ipu3/ipu3-cio2-main.c | 65 +++++++------------
|
||||
1 file changed, 23 insertions(+), 42 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
|
||||
index 1bbe58b24d99..159f0d6cab8f 100644
|
||||
--- a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
|
||||
+++ b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
|
||||
@@ -1383,7 +1383,10 @@ static int cio2_notifier_bound(struct v4l2_async_notifier *notifier,
|
||||
{
|
||||
struct cio2_device *cio2 = to_cio2_device(notifier);
|
||||
struct sensor_async_subdev *s_asd = to_sensor_asd(asd);
|
||||
+ struct device *dev = &cio2->pci_dev->dev;
|
||||
struct cio2_queue *q;
|
||||
+ unsigned int pad;
|
||||
+ int ret;
|
||||
|
||||
if (cio2->queue[s_asd->csi2.port].sensor)
|
||||
return -EBUSY;
|
||||
@@ -1394,7 +1397,26 @@ static int cio2_notifier_bound(struct v4l2_async_notifier *notifier,
|
||||
q->sensor = sd;
|
||||
q->csi_rx_base = cio2->base + CIO2_REG_PIPE_BASE(q->csi2.port);
|
||||
|
||||
- return 0;
|
||||
+ for (pad = 0; pad < q->sensor->entity.num_pads; pad++)
|
||||
+ if (q->sensor->entity.pads[pad].flags &
|
||||
+ MEDIA_PAD_FL_SOURCE)
|
||||
+ break;
|
||||
+
|
||||
+ if (pad == q->sensor->entity.num_pads) {
|
||||
+ dev_err(dev, "failed to find src pad for %s\n",
|
||||
+ q->sensor->name);
|
||||
+ return -ENXIO;
|
||||
+ }
|
||||
+
|
||||
+ ret = media_create_pad_link(&q->sensor->entity, pad, &q->subdev.entity,
|
||||
+ CIO2_PAD_SINK, 0);
|
||||
+ if (ret) {
|
||||
+ dev_err(dev, "failed to create link for %s\n",
|
||||
+ q->sensor->name);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return v4l2_device_register_subdev_nodes(&cio2->v4l2_dev);
|
||||
}
|
||||
|
||||
/* The .unbind callback */
|
||||
@@ -1408,50 +1430,9 @@ static void cio2_notifier_unbind(struct v4l2_async_notifier *notifier,
|
||||
cio2->queue[s_asd->csi2.port].sensor = NULL;
|
||||
}
|
||||
|
||||
-/* .complete() is called after all subdevices have been located */
|
||||
-static int cio2_notifier_complete(struct v4l2_async_notifier *notifier)
|
||||
-{
|
||||
- struct cio2_device *cio2 = to_cio2_device(notifier);
|
||||
- struct device *dev = &cio2->pci_dev->dev;
|
||||
- struct sensor_async_subdev *s_asd;
|
||||
- struct v4l2_async_subdev *asd;
|
||||
- struct cio2_queue *q;
|
||||
- unsigned int pad;
|
||||
- int ret;
|
||||
-
|
||||
- list_for_each_entry(asd, &cio2->notifier.asd_list, asd_list) {
|
||||
- s_asd = to_sensor_asd(asd);
|
||||
- q = &cio2->queue[s_asd->csi2.port];
|
||||
-
|
||||
- for (pad = 0; pad < q->sensor->entity.num_pads; pad++)
|
||||
- if (q->sensor->entity.pads[pad].flags &
|
||||
- MEDIA_PAD_FL_SOURCE)
|
||||
- break;
|
||||
-
|
||||
- if (pad == q->sensor->entity.num_pads) {
|
||||
- dev_err(dev, "failed to find src pad for %s\n",
|
||||
- q->sensor->name);
|
||||
- return -ENXIO;
|
||||
- }
|
||||
-
|
||||
- ret = media_create_pad_link(
|
||||
- &q->sensor->entity, pad,
|
||||
- &q->subdev.entity, CIO2_PAD_SINK,
|
||||
- 0);
|
||||
- if (ret) {
|
||||
- dev_err(dev, "failed to create link for %s\n",
|
||||
- q->sensor->name);
|
||||
- return ret;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return v4l2_device_register_subdev_nodes(&cio2->v4l2_dev);
|
||||
-}
|
||||
-
|
||||
static const struct v4l2_async_notifier_operations cio2_async_ops = {
|
||||
.bound = cio2_notifier_bound,
|
||||
.unbind = cio2_notifier_unbind,
|
||||
- .complete = cio2_notifier_complete,
|
||||
};
|
||||
|
||||
static int cio2_parse_firmware(struct cio2_device *cio2)
|
||||
--
|
||||
2.42.0
|
||||
|
||||
From 95c34d5d2613b851abbeb9803112090f979b6b55 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <djrscally@gmail.com>
|
||||
Date: Thu, 2 Jun 2022 22:15:56 +0100
|
||||
Subject: [PATCH] media: ipu3-cio2: Re-add .complete() to ipu3-cio2
|
||||
|
||||
Removing the .complete() callback had some unintended consequences.
|
||||
Because the VCM driver is not directly linked to the ipu3-cio2
|
||||
driver .bound() never gets called for it, which means its devnode
|
||||
is never created if it probes late. Because .complete() waits for
|
||||
any sub-notifiers to also be complete it is captured in that call.
|
||||
|
||||
Signed-off-by: Daniel Scally <djrscally@gmail.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/media/pci/intel/ipu3/ipu3-cio2-main.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
|
||||
index 159f0d6cab8f..0b2abfa0c724 100644
|
||||
--- a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
|
||||
+++ b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
|
||||
@@ -1430,9 +1430,18 @@ static void cio2_notifier_unbind(struct v4l2_async_notifier *notifier,
|
||||
cio2->queue[s_asd->csi2.port].sensor = NULL;
|
||||
}
|
||||
|
||||
+/* .complete() is called after all subdevices have been located */
|
||||
+static int cio2_notifier_complete(struct v4l2_async_notifier *notifier)
|
||||
+{
|
||||
+ struct cio2_device *cio2 = to_cio2_device(notifier);
|
||||
+
|
||||
+ return v4l2_device_register_subdev_nodes(&cio2->v4l2_dev);
|
||||
+}
|
||||
+
|
||||
static const struct v4l2_async_notifier_operations cio2_async_ops = {
|
||||
.bound = cio2_notifier_bound,
|
||||
.unbind = cio2_notifier_unbind,
|
||||
+ .complete = cio2_notifier_complete,
|
||||
};
|
||||
|
||||
static int cio2_parse_firmware(struct cio2_device *cio2)
|
||||
--
|
||||
2.42.0
|
||||
|
||||
From bac0ebe98ba2cf810d2c4d988ac088e3a32a0c78 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Fri, 15 Jul 2022 23:48:00 +0200
|
||||
Subject: [PATCH] drivers/media/i2c: Fix DW9719 dependencies
|
||||
|
||||
It should depend on VIDEO_DEV instead of VIDEO_V4L2.
|
||||
|
||||
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/media/i2c/Kconfig | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
|
||||
index fbaa2ce7fa3e..7a46ad85dbd4 100644
|
||||
--- a/drivers/media/i2c/Kconfig
|
||||
+++ b/drivers/media/i2c/Kconfig
|
||||
@@ -830,7 +830,7 @@ config VIDEO_DW9714
|
||||
|
||||
config VIDEO_DW9719
|
||||
tristate "DW9719 lens voice coil support"
|
||||
- depends on I2C && VIDEO_V4L2
|
||||
+ depends on I2C && VIDEO_DEV
|
||||
select MEDIA_CONTROLLER
|
||||
select VIDEO_V4L2_SUBDEV_API
|
||||
select V4L2_ASYNC
|
||||
--
|
||||
2.42.0
|
||||
|
||||
From 46dc23e063ec36df32e808356b0de9ffc8a437b1 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
Date: Thu, 2 Mar 2023 12:59:39 +0000
|
||||
Subject: [PATCH] platform/x86: int3472: Remap reset GPIO for INT347E
|
||||
|
||||
ACPI _HID INT347E represents the OmniVision 7251 camera sensor. The
|
||||
driver for this sensor expects a single pin named "enable", but on
|
||||
some Microsoft Surface platforms the sensor is assigned a single
|
||||
GPIO who's type flag is INT3472_GPIO_TYPE_RESET.
|
||||
|
||||
Remap the GPIO pin's function from "reset" to "enable". This is done
|
||||
outside of the existing remap table since it is a more widespread
|
||||
discrepancy than that method is designed for. Additionally swap the
|
||||
polarity of the pin to match the driver's expectation.
|
||||
|
||||
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/platform/x86/intel/int3472/discrete.c | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
|
||||
index c42c3faa2c32..6f4b8e24eb56 100644
|
||||
--- a/drivers/platform/x86/intel/int3472/discrete.c
|
||||
+++ b/drivers/platform/x86/intel/int3472/discrete.c
|
||||
@@ -108,6 +108,9 @@ static int skl_int3472_map_gpio_to_sensor(struct int3472_discrete_device *int347
|
||||
{
|
||||
const struct int3472_sensor_config *sensor_config;
|
||||
char *path = agpio->resource_source.string_ptr;
|
||||
+ const struct acpi_device_id ov7251_ids[] = {
|
||||
+ { "INT347E" },
|
||||
+ };
|
||||
struct gpiod_lookup *table_entry;
|
||||
struct acpi_device *adev;
|
||||
acpi_handle handle;
|
||||
@@ -130,6 +133,17 @@ static int skl_int3472_map_gpio_to_sensor(struct int3472_discrete_device *int347
|
||||
}
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * In addition to the function remap table we need to bulk remap the
|
||||
+ * "reset" GPIO for the OmniVision 7251 sensor, as the driver for that
|
||||
+ * expects its only GPIO pin to be called "enable" (and to have the
|
||||
+ * opposite polarity).
|
||||
+ */
|
||||
+ if (!strcmp(func, "reset") && !acpi_match_device_ids(int3472->sensor, ov7251_ids)) {
|
||||
+ func = "enable";
|
||||
+ polarity = GPIO_ACTIVE_HIGH;
|
||||
+ }
|
||||
+
|
||||
/* Functions mapped to NULL should not be mapped to the sensor */
|
||||
if (!func)
|
||||
return 0;
|
||||
--
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 302d8dc26283bc10ba22bc549c41292d00125e60 Mon Sep 17 00:00:00 2001
|
||||
From d6d0f8e62b97df24a5dce5c4e2432078db93bf51 Mon Sep 17 00:00:00 2001
|
||||
From: Sachi King <nakato@nakato.io>
|
||||
Date: Sat, 29 May 2021 17:47:38 +1000
|
||||
Subject: [PATCH] ACPI: Add quirk for Surface Laptop 4 AMD missing irq 7
|
||||
|
@ -21,7 +21,7 @@ Patchset: amd-gpio
|
|||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
|
||||
index 85a3ce2a3666..2c0e04a3a697 100644
|
||||
index 0f762070a5e1..6362dd452233 100644
|
||||
--- a/arch/x86/kernel/acpi/boot.c
|
||||
+++ b/arch/x86/kernel/acpi/boot.c
|
||||
@@ -22,6 +22,7 @@
|
||||
|
@ -32,7 +32,7 @@ index 85a3ce2a3666..2c0e04a3a697 100644
|
|||
|
||||
#include <asm/e820/api.h>
|
||||
#include <asm/irqdomain.h>
|
||||
@@ -1251,6 +1252,17 @@ static void __init mp_config_acpi_legacy_irqs(void)
|
||||
@@ -1252,6 +1253,17 @@ static void __init mp_config_acpi_legacy_irqs(void)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ index 85a3ce2a3666..2c0e04a3a697 100644
|
|||
/*
|
||||
* Parse IOAPIC related entries in MADT
|
||||
* returns 0 on success, < 0 on error
|
||||
@@ -1306,6 +1318,11 @@ static int __init acpi_parse_madt_ioapic_entries(void)
|
||||
@@ -1307,6 +1319,11 @@ static int __init acpi_parse_madt_ioapic_entries(void)
|
||||
acpi_sci_ioapic_setup(acpi_gbl_FADT.sci_interrupt, 0, 0,
|
||||
acpi_gbl_FADT.sci_interrupt);
|
||||
|
||||
|
@ -63,9 +63,9 @@ index 85a3ce2a3666..2c0e04a3a697 100644
|
|||
mp_config_acpi_legacy_irqs();
|
||||
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From d2a793e4fd47cd1cba2847915e7078671d9e9ea5 Mon Sep 17 00:00:00 2001
|
||||
From 18e978524e3da6faa7023cdfc2e399ea085f0153 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Thu, 3 Jun 2021 14:04:26 +0200
|
||||
Subject: [PATCH] ACPI: Add AMD 13" Surface Laptop 4 model to irq 7 override
|
||||
|
@ -80,10 +80,10 @@ Patchset: amd-gpio
|
|||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
|
||||
index 2c0e04a3a697..b0e1dab3d2ec 100644
|
||||
index 6362dd452233..8a092c2c6fa8 100644
|
||||
--- a/arch/x86/kernel/acpi/boot.c
|
||||
+++ b/arch/x86/kernel/acpi/boot.c
|
||||
@@ -1254,12 +1254,19 @@ static void __init mp_config_acpi_legacy_irqs(void)
|
||||
@@ -1255,12 +1255,19 @@ static void __init mp_config_acpi_legacy_irqs(void)
|
||||
|
||||
static const struct dmi_system_id surface_quirk[] __initconst = {
|
||||
{
|
||||
|
@ -105,5 +105,5 @@ index 2c0e04a3a697..b0e1dab3d2ec 100644
|
|||
};
|
||||
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 55aabf536ba74a27665aa48413ff958be42cb8eb Mon Sep 17 00:00:00 2001
|
||||
From b607f45b1e64e99f7a92d14f326a1fdd1e63a521 Mon Sep 17 00:00:00 2001
|
||||
From: "Bart Groeneveld | GPX Solutions B.V" <bart@gpxbv.nl>
|
||||
Date: Mon, 5 Dec 2022 16:08:46 +0100
|
||||
Subject: [PATCH] acpi: allow usage of acpi_tad on HW-reduced platforms
|
||||
|
@ -17,11 +17,11 @@ but it does have an HW-reduced TAD, which can be used as a RTC instead.
|
|||
Signed-off-by: Bart Groeneveld | GPX Solutions B.V. <bart@gpxbv.nl>
|
||||
Patchset: rtc
|
||||
---
|
||||
drivers/acpi/acpi_tad.c | 36 ++++++++++++++++++++++++------------
|
||||
1 file changed, 24 insertions(+), 12 deletions(-)
|
||||
drivers/acpi/acpi_tad.c | 35 ++++++++++++++++++++++++-----------
|
||||
1 file changed, 24 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/acpi_tad.c b/drivers/acpi/acpi_tad.c
|
||||
index 33c3b16af556..900445d06623 100644
|
||||
index e9b8e8305e23..944276934e7e 100644
|
||||
--- a/drivers/acpi/acpi_tad.c
|
||||
+++ b/drivers/acpi/acpi_tad.c
|
||||
@@ -432,6 +432,14 @@ static ssize_t caps_show(struct device *dev, struct device_attribute *attr,
|
||||
|
@ -58,7 +58,7 @@ index 33c3b16af556..900445d06623 100644
|
|||
};
|
||||
|
||||
static ssize_t dc_alarm_store(struct device *dev, struct device_attribute *attr,
|
||||
@@ -564,13 +571,18 @@ static int acpi_tad_remove(struct platform_device *pdev)
|
||||
@@ -563,13 +570,18 @@ static int acpi_tad_remove(struct platform_device *pdev)
|
||||
|
||||
pm_runtime_get_sync(dev);
|
||||
|
||||
|
@ -79,20 +79,19 @@ index 33c3b16af556..900445d06623 100644
|
|||
if (dd->capabilities & ACPI_TAD_DC_WAKE) {
|
||||
acpi_tad_disable_timer(dev, ACPI_TAD_DC_TIMER);
|
||||
acpi_tad_clear_status(dev, ACPI_TAD_DC_TIMER);
|
||||
@@ -613,12 +625,6 @@ static int acpi_tad_probe(struct platform_device *pdev)
|
||||
goto remove_handler;
|
||||
@@ -604,11 +616,6 @@ static int acpi_tad_probe(struct platform_device *pdev)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
- if (!acpi_has_method(handle, "_PRW")) {
|
||||
- dev_info(dev, "Missing _PRW\n");
|
||||
- ret = -ENODEV;
|
||||
- goto remove_handler;
|
||||
- return -ENODEV;
|
||||
- }
|
||||
-
|
||||
dd = devm_kzalloc(dev, sizeof(*dd), GFP_KERNEL);
|
||||
if (!dd) {
|
||||
ret = -ENOMEM;
|
||||
@@ -649,6 +655,12 @@ static int acpi_tad_probe(struct platform_device *pdev)
|
||||
if (!dd)
|
||||
return -ENOMEM;
|
||||
@@ -637,6 +644,12 @@ static int acpi_tad_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
|
@ -106,5 +105,5 @@ index 33c3b16af556..900445d06623 100644
|
|||
ret = sysfs_create_group(&dev->kobj, &acpi_tad_dc_attr_group);
|
||||
if (ret)
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 45a9e7f97fc36942e3d70a78fe5313fa78733933 Mon Sep 17 00:00:00 2001
|
||||
From 38f9bee60e9c7c742358e862c6c9422964f1d41a Mon Sep 17 00:00:00 2001
|
||||
From: Tsuchiya Yuto <kitakar@gmail.com>
|
||||
Date: Sun, 18 Oct 2020 16:42:44 +0900
|
||||
Subject: [PATCH] (surface3-oemb) add DMI matches for Surface 3 with broken DMI
|
||||
|
@ -40,7 +40,7 @@ Patchset: surface3-oemb
|
|||
3 files changed, 24 insertions(+)
|
||||
|
||||
diff --git a/drivers/platform/surface/surface3-wmi.c b/drivers/platform/surface/surface3-wmi.c
|
||||
index c15ed7a12784..1ec8edb5aafa 100644
|
||||
index ca4602bcc7de..490b9731068a 100644
|
||||
--- a/drivers/platform/surface/surface3-wmi.c
|
||||
+++ b/drivers/platform/surface/surface3-wmi.c
|
||||
@@ -37,6 +37,13 @@ static const struct dmi_system_id surface3_dmi_table[] = {
|
||||
|
@ -58,10 +58,10 @@ index c15ed7a12784..1ec8edb5aafa 100644
|
|||
{ }
|
||||
};
|
||||
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
|
||||
index 20191a4473c2..5ba599b5aba6 100644
|
||||
index a506d940a2ea..2766484b8d2c 100644
|
||||
--- a/sound/soc/codecs/rt5645.c
|
||||
+++ b/sound/soc/codecs/rt5645.c
|
||||
@@ -3768,6 +3768,15 @@ static const struct dmi_system_id dmi_platform_data[] = {
|
||||
@@ -3717,6 +3717,15 @@ static const struct dmi_system_id dmi_platform_data[] = {
|
||||
},
|
||||
.driver_data = (void *)&intel_braswell_platform_data,
|
||||
},
|
||||
|
@ -78,7 +78,7 @@ index 20191a4473c2..5ba599b5aba6 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 5e2ec60e2954..207868c699f2 100644
|
||||
index cdcbf04b8832..958305779b12 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[] = {
|
||||
|
@ -97,5 +97,5 @@ index 5e2ec60e2954..207868c699f2 100644
|
|||
};
|
||||
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 710646309780d1a59cbeae7e4bfa92068364aa67 Mon Sep 17 00:00:00 2001
|
||||
From b8dec23a399dc5deb88ac30d71dd6270c1794ba0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
||||
Date: Tue, 3 Nov 2020 13:28:04 +0100
|
||||
Subject: [PATCH] mwifiex: Add quirk resetting the PCI bridge on MS Surface
|
||||
|
@ -163,9 +163,9 @@ index d6ff964aec5b..5d30ae39d65e 100644
|
|||
void mwifiex_initialize_quirks(struct pcie_service_card *card);
|
||||
int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From d10371a089a968b913b9413e1f06bd3d9d154b21 Mon Sep 17 00:00:00 2001
|
||||
From 44360e255e0cfebd6e0584e75e13c2cc69c7d41a Mon Sep 17 00:00:00 2001
|
||||
From: Tsuchiya Yuto <kitakar@gmail.com>
|
||||
Date: Sun, 4 Oct 2020 00:11:49 +0900
|
||||
Subject: [PATCH] mwifiex: pcie: disable bridge_d3 for Surface gen4+
|
||||
|
@ -318,9 +318,9 @@ index 5d30ae39d65e..c14eb56eb911 100644
|
|||
void mwifiex_initialize_quirks(struct pcie_service_card *card);
|
||||
int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From 59d4464c43b8c4090372cbf2632fc116a0ca8b2a Mon Sep 17 00:00:00 2001
|
||||
From 9203ef88e0067699c993d4715c48ff9deaea92be Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
||||
Date: Thu, 25 Mar 2021 11:33:02 +0100
|
||||
Subject: [PATCH] Bluetooth: btusb: Lower passive lescan interval on Marvell
|
||||
|
@ -356,7 +356,7 @@ Patchset: mwifiex
|
|||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
|
||||
index 66080fae072f..68e2f2976a51 100644
|
||||
index dfdfb72d350f..44ef02efba46 100644
|
||||
--- a/drivers/bluetooth/btusb.c
|
||||
+++ b/drivers/bluetooth/btusb.c
|
||||
@@ -65,6 +65,7 @@ static struct usb_driver btusb_driver;
|
||||
|
@ -367,7 +367,7 @@ index 66080fae072f..68e2f2976a51 100644
|
|||
|
||||
static const struct usb_device_id btusb_table[] = {
|
||||
/* Generic Bluetooth USB device */
|
||||
@@ -468,6 +469,7 @@ static const struct usb_device_id quirks_table[] = {
|
||||
@@ -468,6 +469,7 @@ static const struct usb_device_id blacklist_table[] = {
|
||||
{ USB_DEVICE(0x1286, 0x2044), .driver_info = BTUSB_MARVELL },
|
||||
{ USB_DEVICE(0x1286, 0x2046), .driver_info = BTUSB_MARVELL },
|
||||
{ USB_DEVICE(0x1286, 0x204e), .driver_info = BTUSB_MARVELL },
|
||||
|
@ -375,7 +375,7 @@ index 66080fae072f..68e2f2976a51 100644
|
|||
|
||||
/* Intel Bluetooth devices */
|
||||
{ USB_DEVICE(0x8087, 0x0025), .driver_info = BTUSB_INTEL_COMBINED },
|
||||
@@ -4395,6 +4397,19 @@ static int btusb_probe(struct usb_interface *intf,
|
||||
@@ -4317,6 +4319,19 @@ static int btusb_probe(struct usb_interface *intf,
|
||||
if (id->driver_info & BTUSB_MARVELL)
|
||||
hdev->set_bdaddr = btusb_set_bdaddr_marvell;
|
||||
|
||||
|
@ -396,5 +396,5 @@ index 66080fae072f..68e2f2976a51 100644
|
|||
(id->driver_info & BTUSB_MEDIATEK)) {
|
||||
hdev->setup = btusb_mtk_setup;
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 7b414f11dfa0be3204b0a43b82a75744f8218d57 Mon Sep 17 00:00:00 2001
|
||||
From 4ec07cef92d6b7ce42ccc5e1b0e73678cf023dcb Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Sat, 27 Feb 2021 00:45:52 +0100
|
||||
Subject: [PATCH] ath10k: Add module parameters to override board files
|
||||
|
@ -20,10 +20,10 @@ Patchset: ath10k
|
|||
1 file changed, 58 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
|
||||
index 0032f8aa892f..17717b53316b 100644
|
||||
index 6cdb225b7eac..19c036751fb1 100644
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -39,6 +39,9 @@ static bool fw_diag_log;
|
||||
@@ -38,6 +38,9 @@ static bool fw_diag_log;
|
||||
/* frame mode values are mapped as per enum ath10k_hw_txrx_mode */
|
||||
unsigned int ath10k_frame_mode = ATH10K_HW_TXRX_NATIVE_WIFI;
|
||||
|
||||
|
@ -33,7 +33,7 @@ index 0032f8aa892f..17717b53316b 100644
|
|||
unsigned long ath10k_coredump_mask = BIT(ATH10K_FW_CRASH_DUMP_REGISTERS) |
|
||||
BIT(ATH10K_FW_CRASH_DUMP_CE_DATA);
|
||||
|
||||
@@ -51,6 +54,9 @@ module_param(fw_diag_log, bool, 0644);
|
||||
@@ -50,6 +53,9 @@ module_param(fw_diag_log, bool, 0644);
|
||||
module_param_named(frame_mode, ath10k_frame_mode, uint, 0644);
|
||||
module_param_named(coredump_mask, ath10k_coredump_mask, ulong, 0444);
|
||||
|
||||
|
@ -43,7 +43,7 @@ index 0032f8aa892f..17717b53316b 100644
|
|||
MODULE_PARM_DESC(debug_mask, "Debugging mask");
|
||||
MODULE_PARM_DESC(uart_print, "Uart target debugging");
|
||||
MODULE_PARM_DESC(skip_otp, "Skip otp failure for calibration in testmode");
|
||||
@@ -60,6 +66,9 @@ MODULE_PARM_DESC(frame_mode,
|
||||
@@ -59,6 +65,9 @@ MODULE_PARM_DESC(frame_mode,
|
||||
MODULE_PARM_DESC(coredump_mask, "Bitfield of what to include in firmware crash file");
|
||||
MODULE_PARM_DESC(fw_diag_log, "Diag based fw log debugging");
|
||||
|
||||
|
@ -53,7 +53,7 @@ index 0032f8aa892f..17717b53316b 100644
|
|||
static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
{
|
||||
.id = QCA988X_HW_2_0_VERSION,
|
||||
@@ -928,6 +937,42 @@ static int ath10k_init_configure_target(struct ath10k *ar)
|
||||
@@ -911,6 +920,42 @@ static int ath10k_init_configure_target(struct ath10k *ar)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ index 0032f8aa892f..17717b53316b 100644
|
|||
static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
|
||||
const char *dir,
|
||||
const char *file)
|
||||
@@ -942,6 +987,19 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
|
||||
@@ -925,6 +970,19 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
|
||||
if (dir == NULL)
|
||||
dir = ".";
|
||||
|
||||
|
@ -117,5 +117,5 @@ index 0032f8aa892f..17717b53316b 100644
|
|||
ret = firmware_request_nowarn(&fw, filename, ar->dev);
|
||||
ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 4a25289e1ff42e22045f484673dd3846af3e0426 Mon Sep 17 00:00:00 2001
|
||||
From 6e7929685df7d87379ad03942e364d7e22122624 Mon Sep 17 00:00:00 2001
|
||||
From: Dorian Stoll <dorian.stoll@tmsp.io>
|
||||
Date: Thu, 30 Jul 2020 13:21:53 +0200
|
||||
Subject: [PATCH] misc: mei: Add missing IPTS device IDs
|
||||
|
@ -34,9 +34,9 @@ index 676d566f38dd..6b37dd1f8b2a 100644
|
|||
|
||||
{MEI_PCI_DEVICE(MEI_DEV_ID_TGP_LP, MEI_ME_PCH15_CFG)},
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From b81e81459d4077c94376c5680edd5b2fde70f297 Mon Sep 17 00:00:00 2001
|
||||
From 390bee34de9e6382d9a0e0af9e515cb1f114b210 Mon Sep 17 00:00:00 2001
|
||||
From: Liban Hannan <liban.p@gmail.com>
|
||||
Date: Tue, 12 Apr 2022 23:31:12 +0100
|
||||
Subject: [PATCH] iommu: ipts: use IOMMU passthrough mode for IPTS
|
||||
|
@ -58,10 +58,10 @@ Patchset: ipts
|
|||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
|
||||
index 744e4e6b8d72..0cbe3a521254 100644
|
||||
index 4a9d9e82847d..6387f3a6eccf 100644
|
||||
--- a/drivers/iommu/intel/iommu.c
|
||||
+++ b/drivers/iommu/intel/iommu.c
|
||||
@@ -38,6 +38,8 @@
|
||||
@@ -37,6 +37,8 @@
|
||||
#define IS_GFX_DEVICE(pdev) ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY)
|
||||
#define IS_USB_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_SERIAL_USB)
|
||||
#define IS_ISA_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA)
|
||||
|
@ -70,7 +70,7 @@ index 744e4e6b8d72..0cbe3a521254 100644
|
|||
#define IS_AZALIA(pdev) ((pdev)->vendor == 0x8086 && (pdev)->device == 0x3a3e)
|
||||
|
||||
#define IOAPIC_RANGE_START (0xfee00000)
|
||||
@@ -292,12 +294,14 @@ int intel_iommu_enabled = 0;
|
||||
@@ -287,12 +289,14 @@ int intel_iommu_enabled = 0;
|
||||
EXPORT_SYMBOL_GPL(intel_iommu_enabled);
|
||||
|
||||
static int dmar_map_gfx = 1;
|
||||
|
@ -85,7 +85,7 @@ index 744e4e6b8d72..0cbe3a521254 100644
|
|||
|
||||
const struct iommu_ops intel_iommu_ops;
|
||||
|
||||
@@ -2545,6 +2549,9 @@ static int device_def_domain_type(struct device *dev)
|
||||
@@ -2548,6 +2552,9 @@ static int device_def_domain_type(struct device *dev)
|
||||
|
||||
if ((iommu_identity_mapping & IDENTMAP_GFX) && IS_GFX_DEVICE(pdev))
|
||||
return IOMMU_DOMAIN_IDENTITY;
|
||||
|
@ -95,7 +95,7 @@ index 744e4e6b8d72..0cbe3a521254 100644
|
|||
}
|
||||
|
||||
return 0;
|
||||
@@ -2852,6 +2859,9 @@ static int __init init_dmars(void)
|
||||
@@ -2855,6 +2862,9 @@ static int __init init_dmars(void)
|
||||
if (!dmar_map_gfx)
|
||||
iommu_identity_mapping |= IDENTMAP_GFX;
|
||||
|
||||
|
@ -105,7 +105,7 @@ index 744e4e6b8d72..0cbe3a521254 100644
|
|||
check_tylersburg_isoch();
|
||||
|
||||
ret = si_domain_init(hw_pass_through);
|
||||
@@ -4832,6 +4842,17 @@ static void quirk_iommu_igfx(struct pci_dev *dev)
|
||||
@@ -4755,6 +4765,17 @@ static void quirk_iommu_igfx(struct pci_dev *dev)
|
||||
dmar_map_gfx = 0;
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ index 744e4e6b8d72..0cbe3a521254 100644
|
|||
/* G4x/GM45 integrated gfx dmar support is totally busted. */
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_igfx);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e00, quirk_iommu_igfx);
|
||||
@@ -4867,6 +4888,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1632, quirk_iommu_igfx);
|
||||
@@ -4790,6 +4811,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1632, quirk_iommu_igfx);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163A, quirk_iommu_igfx);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163D, quirk_iommu_igfx);
|
||||
|
||||
|
@ -134,9 +134,9 @@ index 744e4e6b8d72..0cbe3a521254 100644
|
|||
{
|
||||
if (risky_device(dev))
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From a16d734a58c18ef07813a8abe94320e69e0d77a7 Mon Sep 17 00:00:00 2001
|
||||
From 13b6ad2c284cf321144851a527dda96e6d4b9064 Mon Sep 17 00:00:00 2001
|
||||
From: Dorian Stoll <dorian.stoll@tmsp.io>
|
||||
Date: Sun, 11 Dec 2022 12:00:59 +0100
|
||||
Subject: [PATCH] hid: Add support for Intel Precise Touch and Stylus
|
||||
|
@ -203,10 +203,10 @@ Patchset: ipts
|
|||
create mode 100644 drivers/hid/ipts/thread.h
|
||||
|
||||
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
|
||||
index 790aa908e2a7..0b9d245d10e5 100644
|
||||
index dc456c86e956..b35203b9a7d8 100644
|
||||
--- a/drivers/hid/Kconfig
|
||||
+++ b/drivers/hid/Kconfig
|
||||
@@ -1345,4 +1345,6 @@ source "drivers/hid/amd-sfh-hid/Kconfig"
|
||||
@@ -1335,4 +1335,6 @@ source "drivers/hid/amd-sfh-hid/Kconfig"
|
||||
|
||||
source "drivers/hid/surface-hid/Kconfig"
|
||||
|
||||
|
@ -214,10 +214,10 @@ index 790aa908e2a7..0b9d245d10e5 100644
|
|||
+
|
||||
endif # HID_SUPPORT
|
||||
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
|
||||
index 8a06d0f840bc..2ef21b257d0b 100644
|
||||
index 7a9e160158f7..f58610f27216 100644
|
||||
--- a/drivers/hid/Makefile
|
||||
+++ b/drivers/hid/Makefile
|
||||
@@ -169,3 +169,5 @@ obj-$(INTEL_ISH_FIRMWARE_DOWNLOADER) += intel-ish-hid/
|
||||
@@ -168,3 +168,5 @@ obj-$(INTEL_ISH_FIRMWARE_DOWNLOADER) += intel-ish-hid/
|
||||
obj-$(CONFIG_AMD_SFH_HID) += amd-sfh-hid/
|
||||
|
||||
obj-$(CONFIG_SURFACE_HID_CORE) += surface-hid/
|
||||
|
@ -3226,5 +3226,5 @@ index 000000000000..1f966b8b32c4
|
|||
+
|
||||
+#endif /* IPTS_THREAD_H */
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 7a359e9084a94ddfbacd67ea99c572bdeebb72f3 Mon Sep 17 00:00:00 2001
|
||||
From cc8157a9538ba31fb72482b9fa52803241f0887d Mon Sep 17 00:00:00 2001
|
||||
From: Dorian Stoll <dorian.stoll@tmsp.io>
|
||||
Date: Sun, 11 Dec 2022 12:03:38 +0100
|
||||
Subject: [PATCH] iommu: intel: Disable source id verification for ITHC
|
||||
|
@ -10,7 +10,7 @@ Patchset: ithc
|
|||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/drivers/iommu/intel/irq_remapping.c b/drivers/iommu/intel/irq_remapping.c
|
||||
index 29b9e55dcf26..986e91c813ae 100644
|
||||
index 08f56326e2f8..75218b38995c 100644
|
||||
--- a/drivers/iommu/intel/irq_remapping.c
|
||||
+++ b/drivers/iommu/intel/irq_remapping.c
|
||||
@@ -386,6 +386,22 @@ static int set_msi_sid(struct irte *irte, struct pci_dev *dev)
|
||||
|
@ -37,9 +37,9 @@ index 29b9e55dcf26..986e91c813ae 100644
|
|||
* DMA alias provides us with a PCI device and alias. The only case
|
||||
* where the it will return an alias on a different bus than the
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From f023c8e014f11338ea77f6473152d56b79092e01 Mon Sep 17 00:00:00 2001
|
||||
From b835496e4ba0bc567b8e83fe1fcb5c4da34c1289 Mon Sep 17 00:00:00 2001
|
||||
From: Dorian Stoll <dorian.stoll@tmsp.io>
|
||||
Date: Sun, 11 Dec 2022 12:10:54 +0100
|
||||
Subject: [PATCH] hid: Add support for Intel Touch Host Controller
|
||||
|
@ -72,10 +72,10 @@ Patchset: ithc
|
|||
create mode 100644 drivers/hid/ithc/ithc.h
|
||||
|
||||
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
|
||||
index 0b9d245d10e5..8ba1c309228b 100644
|
||||
index b35203b9a7d8..3259f2764dc4 100644
|
||||
--- a/drivers/hid/Kconfig
|
||||
+++ b/drivers/hid/Kconfig
|
||||
@@ -1347,4 +1347,6 @@ source "drivers/hid/surface-hid/Kconfig"
|
||||
@@ -1337,4 +1337,6 @@ source "drivers/hid/surface-hid/Kconfig"
|
||||
|
||||
source "drivers/hid/ipts/Kconfig"
|
||||
|
||||
|
@ -83,10 +83,10 @@ index 0b9d245d10e5..8ba1c309228b 100644
|
|||
+
|
||||
endif # HID_SUPPORT
|
||||
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
|
||||
index 2ef21b257d0b..e94b79727b48 100644
|
||||
index f58610f27216..656a0783c709 100644
|
||||
--- a/drivers/hid/Makefile
|
||||
+++ b/drivers/hid/Makefile
|
||||
@@ -171,3 +171,4 @@ obj-$(CONFIG_AMD_SFH_HID) += amd-sfh-hid/
|
||||
@@ -170,3 +170,4 @@ obj-$(CONFIG_AMD_SFH_HID) += amd-sfh-hid/
|
||||
obj-$(CONFIG_SURFACE_HID_CORE) += surface-hid/
|
||||
|
||||
obj-$(CONFIG_HID_IPTS) += ipts/
|
||||
|
@ -1429,9 +1429,9 @@ index 000000000000..6a9b0d480bc1
|
|||
+void ithc_log_regs(struct ithc *ithc);
|
||||
+
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From 37dc17be7687c220d8c84f3ed200fa4fedeafb04 Mon Sep 17 00:00:00 2001
|
||||
From 7edaa4190fe42f701948b6320b82dce4bf0e0a42 Mon Sep 17 00:00:00 2001
|
||||
From: quo <tuple@list.ru>
|
||||
Date: Mon, 23 Oct 2023 10:15:29 +0200
|
||||
Subject: [PATCH] Update ITHC from module repo
|
||||
|
@ -3020,5 +3020,5 @@ index 6a9b0d480bc1..028e55a4ec53 100644
|
|||
void ithc_log_regs(struct ithc *ithc);
|
||||
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
33
patches/6.5/0006-surface-sam.patch
Normal file
33
patches/6.5/0006-surface-sam.patch
Normal file
|
@ -0,0 +1,33 @@
|
|||
From 1528e0fe127f03118f593fc1db51a4d4b5a20341 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Sun, 22 Oct 2023 14:57:11 +0200
|
||||
Subject: [PATCH] platform/surface: aggregator_registry: Add support for
|
||||
Surface Laptop Go 3
|
||||
|
||||
Add SAM client device nodes for the Surface Laptop Go 3. It seems to use
|
||||
the same SAM client devices as the Surface Laptop Go 1 and 2, so re-use
|
||||
their node group.
|
||||
|
||||
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Patchset: surface-sam
|
||||
---
|
||||
drivers/platform/surface/surface_aggregator_registry.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
|
||||
index 0fe5be539652..0d8c8395c588 100644
|
||||
--- a/drivers/platform/surface/surface_aggregator_registry.c
|
||||
+++ b/drivers/platform/surface/surface_aggregator_registry.c
|
||||
@@ -367,6 +367,9 @@ static const struct acpi_device_id ssam_platform_hub_match[] = {
|
||||
/* Surface Laptop Go 2 */
|
||||
{ "MSHW0290", (unsigned long)ssam_node_group_slg1 },
|
||||
|
||||
+ /* Surface Laptop Go 3 */
|
||||
+ { "MSHW0440", (unsigned long)ssam_node_group_slg1 },
|
||||
+
|
||||
/* Surface Laptop Studio */
|
||||
{ "MSHW0123", (unsigned long)ssam_node_group_sls },
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 95b66fb97652988a7b4be5bb1deaa625e1bb3c3f Mon Sep 17 00:00:00 2001
|
||||
From 2ba1a8bceb51c41accd3416aa85d86e58ae86d5d Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Sat, 25 Jul 2020 17:19:53 +0200
|
||||
Subject: [PATCH] i2c: acpi: Implement RawBytes read access
|
||||
|
@ -108,9 +108,9 @@ index d6037a328669..a290ebc77aea 100644
|
|||
dev_warn(&adapter->dev, "protocol 0x%02x not supported for client 0x%02x\n",
|
||||
accessor_type, client->addr);
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From 2b86ac312b956799265cdd1411d305cd2dcaf6db Mon Sep 17 00:00:00 2001
|
||||
From 646e55b10dd11dcabcb886a39c8d3b63ec16d867 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Sat, 13 Feb 2021 16:41:18 +0100
|
||||
Subject: [PATCH] platform/surface: Add driver for Surface Book 1 dGPU switch
|
||||
|
@ -331,5 +331,5 @@ index 000000000000..8b816ed8f35c
|
|||
+MODULE_DESCRIPTION("Discrete GPU Power-Switch for Surface Book 1");
|
||||
+MODULE_LICENSE("GPL");
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From c57b5f294df0367dd1411c050654e1f03470f776 Mon Sep 17 00:00:00 2001
|
||||
From f7519ec63734ab71e46bf03b6a38573788dfa29d Mon Sep 17 00:00:00 2001
|
||||
From: Sachi King <nakato@nakato.io>
|
||||
Date: Tue, 5 Oct 2021 00:05:09 +1100
|
||||
Subject: [PATCH] Input: soc_button_array - support AMD variant Surface devices
|
||||
|
@ -20,10 +20,10 @@ Patchset: surface-button
|
|||
1 file changed, 8 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
|
||||
index 9116f4248fd0..eba53cb0139e 100644
|
||||
index e79f5497948b..2bddbe6e9ea4 100644
|
||||
--- a/drivers/input/misc/soc_button_array.c
|
||||
+++ b/drivers/input/misc/soc_button_array.c
|
||||
@@ -542,8 +542,8 @@ static const struct soc_device_data soc_device_MSHW0028 = {
|
||||
@@ -537,8 +537,8 @@ static const struct soc_device_data soc_device_MSHW0028 = {
|
||||
* Both, the Surface Pro 4 (surfacepro3_button.c) and the above mentioned
|
||||
* devices use MSHW0040 for power and volume buttons, however the way they
|
||||
* have to be addressed differs. Make sure that we only load this drivers
|
||||
|
@ -34,7 +34,7 @@ index 9116f4248fd0..eba53cb0139e 100644
|
|||
*/
|
||||
#define MSHW0040_DSM_REVISION 0x01
|
||||
#define MSHW0040_DSM_GET_OMPR 0x02 // get OEM Platform Revision
|
||||
@@ -554,31 +554,14 @@ static const guid_t MSHW0040_DSM_UUID =
|
||||
@@ -549,31 +549,14 @@ static const guid_t MSHW0040_DSM_UUID =
|
||||
static int soc_device_check_MSHW0040(struct device *dev)
|
||||
{
|
||||
acpi_handle handle = ACPI_HANDLE(dev);
|
||||
|
@ -73,9 +73,9 @@ index 9116f4248fd0..eba53cb0139e 100644
|
|||
|
||||
/*
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From 41a632737f84b0404c1faca01edb90aecc9378ee Mon Sep 17 00:00:00 2001
|
||||
From 500ba0980d1e89041a9c83a3e937df0a2119f4af Mon Sep 17 00:00:00 2001
|
||||
From: Sachi King <nakato@nakato.io>
|
||||
Date: Tue, 5 Oct 2021 00:22:57 +1100
|
||||
Subject: [PATCH] platform/surface: surfacepro3_button: don't load on amd
|
||||
|
@ -145,5 +145,5 @@ index 2755601f979c..4240c98ca226 100644
|
|||
|
||||
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From b3fac417611f5bb4ae2a9bc9e828dacfe4418fbf Mon Sep 17 00:00:00 2001
|
||||
From b478d859ace437e33ae34ff41d639566d877fff5 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Sat, 18 Feb 2023 01:02:49 +0100
|
||||
Subject: [PATCH] USB: quirks: Add USB_QUIRK_DELAY_INIT for Surface Go 3
|
||||
|
@ -23,10 +23,10 @@ Patchset: surface-typecover
|
|||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
|
||||
index b4783574b8e6..360970620589 100644
|
||||
index 15e9bd180a1d..0d70461d01e1 100644
|
||||
--- a/drivers/usb/core/quirks.c
|
||||
+++ b/drivers/usb/core/quirks.c
|
||||
@@ -223,6 +223,9 @@ static const struct usb_device_id usb_quirk_list[] = {
|
||||
@@ -220,6 +220,9 @@ static const struct usb_device_id usb_quirk_list[] = {
|
||||
/* Microsoft Surface Dock Ethernet (RTL8153 GigE) */
|
||||
{ USB_DEVICE(0x045e, 0x07c6), .driver_info = USB_QUIRK_NO_LPM },
|
||||
|
||||
|
@ -37,9 +37,9 @@ index b4783574b8e6..360970620589 100644
|
|||
{ USB_DEVICE(0x046a, 0x0023), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From bf5167d418b660e321368222505a97d9f1ed68b4 Mon Sep 17 00:00:00 2001
|
||||
From edb9e1949c6164b318183b3796eab9bbd5e3297e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
||||
Date: Thu, 5 Nov 2020 13:09:45 +0100
|
||||
Subject: [PATCH] hid/multitouch: Turn off Type Cover keyboard backlight when
|
||||
|
@ -75,7 +75,7 @@ Patchset: surface-typecover
|
|||
1 file changed, 98 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
|
||||
index 3e91e4d6ba6f..45b7884c97f0 100644
|
||||
index 521b2ffb4244..c8f3d05c8866 100644
|
||||
--- a/drivers/hid/hid-multitouch.c
|
||||
+++ b/drivers/hid/hid-multitouch.c
|
||||
@@ -34,7 +34,10 @@
|
||||
|
@ -249,7 +249,7 @@ index 3e91e4d6ba6f..45b7884c97f0 100644
|
|||
|
||||
ret = sysfs_create_group(&hdev->dev.kobj, &mt_attribute_group);
|
||||
if (ret)
|
||||
@@ -1840,6 +1930,7 @@ static void mt_remove(struct hid_device *hdev)
|
||||
@@ -1842,6 +1932,7 @@ static void mt_remove(struct hid_device *hdev)
|
||||
{
|
||||
struct mt_device *td = hid_get_drvdata(hdev);
|
||||
|
||||
|
@ -257,7 +257,7 @@ index 3e91e4d6ba6f..45b7884c97f0 100644
|
|||
del_timer_sync(&td->release_timer);
|
||||
|
||||
sysfs_remove_group(&hdev->dev.kobj, &mt_attribute_group);
|
||||
@@ -2230,6 +2321,11 @@ static const struct hid_device_id mt_devices[] = {
|
||||
@@ -2219,6 +2310,11 @@ static const struct hid_device_id mt_devices[] = {
|
||||
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
|
||||
USB_DEVICE_ID_XIROKU_CSR2) },
|
||||
|
||||
|
@ -270,9 +270,9 @@ index 3e91e4d6ba6f..45b7884c97f0 100644
|
|||
{ .driver_data = MT_CLS_GOOGLE,
|
||||
HID_DEVICE(HID_BUS_ANY, HID_GROUP_ANY, USB_VENDOR_ID_GOOGLE,
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From dda4ca6e0248ae5acf3aaf78ee00e613f4e04bad Mon Sep 17 00:00:00 2001
|
||||
From 687dbad7b7d5da3923289f28fb576231ffe79f99 Mon Sep 17 00:00:00 2001
|
||||
From: PJungkamp <p.jungkamp@gmail.com>
|
||||
Date: Fri, 25 Feb 2022 12:04:25 +0100
|
||||
Subject: [PATCH] hid/multitouch: Add support for surface pro type cover tablet
|
||||
|
@ -301,7 +301,7 @@ Patchset: surface-typecover
|
|||
1 file changed, 122 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
|
||||
index 45b7884c97f0..f8978b405aca 100644
|
||||
index c8f3d05c8866..1c6e4d66e762 100644
|
||||
--- a/drivers/hid/hid-multitouch.c
|
||||
+++ b/drivers/hid/hid-multitouch.c
|
||||
@@ -77,6 +77,7 @@ MODULE_LICENSE("GPL");
|
||||
|
@ -511,7 +511,7 @@ index 45b7884c97f0..f8978b405aca 100644
|
|||
hid_err(hdev, "couldn't find backlight field\n");
|
||||
goto out;
|
||||
}
|
||||
@@ -1908,13 +1974,24 @@ static int mt_suspend(struct hid_device *hdev, pm_message_t state)
|
||||
@@ -1909,13 +1975,24 @@ static int mt_suspend(struct hid_device *hdev, pm_message_t state)
|
||||
|
||||
static int mt_reset_resume(struct hid_device *hdev)
|
||||
{
|
||||
|
@ -536,7 +536,7 @@ index 45b7884c97f0..f8978b405aca 100644
|
|||
/* Some Elan legacy devices require SET_IDLE to be set on resume.
|
||||
* It should be safe to send it to other devices too.
|
||||
* Tested on 3M, Stantum, Cypress, Zytronic, eGalax, and Elan panels. */
|
||||
@@ -1923,12 +2000,31 @@ static int mt_resume(struct hid_device *hdev)
|
||||
@@ -1924,6 +2001,10 @@ static int mt_resume(struct hid_device *hdev)
|
||||
|
||||
mt_set_modes(hdev, HID_LATENCY_NORMAL, true, true);
|
||||
|
||||
|
@ -546,7 +546,8 @@ index 45b7884c97f0..f8978b405aca 100644
|
|||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1931,6 +2012,21 @@ static int mt_resume(struct hid_device *hdev)
|
||||
static void mt_remove(struct hid_device *hdev)
|
||||
{
|
||||
struct mt_device *td = hid_get_drvdata(hdev);
|
||||
|
@ -569,5 +570,5 @@ index 45b7884c97f0..f8978b405aca 100644
|
|||
unregister_pm_notifier(&td->pm_notifier);
|
||||
del_timer_sync(&td->release_timer);
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From aa49dc59b192cc038ca789ac70215d7492f043cb Mon Sep 17 00:00:00 2001
|
||||
From 9349467c1adee5875fe9b6664f280a2d1ff77fb6 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Sun, 19 Feb 2023 22:12:24 +0100
|
||||
Subject: [PATCH] PCI: Add quirk to prevent calling shutdown mehtod
|
||||
|
@ -23,7 +23,7 @@ Patchset: surface-shutdown
|
|||
3 files changed, 40 insertions(+)
|
||||
|
||||
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
|
||||
index 51ec9e7e784f..40554890d721 100644
|
||||
index 41ee3dd8cecb..0bc473c2c187 100644
|
||||
--- a/drivers/pci/pci-driver.c
|
||||
+++ b/drivers/pci/pci-driver.c
|
||||
@@ -507,6 +507,9 @@ static void pci_device_shutdown(struct device *dev)
|
||||
|
@ -37,13 +37,13 @@ index 51ec9e7e784f..40554890d721 100644
|
|||
|
||||
if (drv && drv->shutdown)
|
||||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
||||
index d797df6e5f3e..c674ee496a0b 100644
|
||||
index 321156ca273d..37e06e778ce2 100644
|
||||
--- a/drivers/pci/quirks.c
|
||||
+++ b/drivers/pci/quirks.c
|
||||
@@ -6250,3 +6250,39 @@ static void pci_fixup_d3cold_delay_1sec(struct pci_dev *pdev)
|
||||
pdev->d3cold_delay = 1000;
|
||||
}
|
||||
DECLARE_PCI_FIXUP_FINAL(0x5555, 0x0004, pci_fixup_d3cold_delay_1sec);
|
||||
@@ -6138,3 +6138,39 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9a2d, dpc_log_size);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9a2f, dpc_log_size);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9a31, dpc_log_size);
|
||||
#endif
|
||||
+
|
||||
+static const struct dmi_system_id no_shutdown_dmi_table[] = {
|
||||
+ /*
|
||||
|
@ -81,17 +81,17 @@ index d797df6e5f3e..c674ee496a0b 100644
|
|||
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x466d, quirk_no_shutdown); // Thunderbolt 4 NHI
|
||||
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x46a8, quirk_no_shutdown); // GPU
|
||||
diff --git a/include/linux/pci.h b/include/linux/pci.h
|
||||
index 7ab0d13672da..8d8d9225e0db 100644
|
||||
index 7ee498cd1f37..740049a82343 100644
|
||||
--- a/include/linux/pci.h
|
||||
+++ b/include/linux/pci.h
|
||||
@@ -465,6 +465,7 @@ struct pci_dev {
|
||||
@@ -464,6 +464,7 @@ struct pci_dev {
|
||||
unsigned int no_vf_scan:1; /* Don't scan for VFs after IOV enablement */
|
||||
unsigned int no_command_memory:1; /* No PCI_COMMAND_MEMORY */
|
||||
unsigned int rom_bar_overlap:1; /* ROM BAR disable broken */
|
||||
unsigned int rom_attr_enabled:1; /* Display of ROM attribute enabled? */
|
||||
+ unsigned int no_shutdown:1; /* Do not touch device on shutdown */
|
||||
pci_dev_flags_t dev_flags;
|
||||
atomic_t enable_cnt; /* pci_enable_device has been called */
|
||||
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 36cf5399fd0f16f10f97c21131d29ebda13607f5 Mon Sep 17 00:00:00 2001
|
||||
From cc9f1aa3808d704ee8cbdb971ff2395d8db57b6d Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Sun, 12 Mar 2023 01:41:57 +0100
|
||||
Subject: [PATCH] platform/surface: gpe: Add support for Surface Pro 9
|
||||
|
@ -12,7 +12,7 @@ Patchset: surface-gpe
|
|||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/drivers/platform/surface/surface_gpe.c b/drivers/platform/surface/surface_gpe.c
|
||||
index 62fd4004db31..103fc4468262 100644
|
||||
index c219b840d491..69c4352e8406 100644
|
||||
--- a/drivers/platform/surface/surface_gpe.c
|
||||
+++ b/drivers/platform/surface/surface_gpe.c
|
||||
@@ -41,6 +41,11 @@ static const struct property_entry lid_device_props_l4F[] = {
|
||||
|
@ -47,5 +47,5 @@ index 62fd4004db31..103fc4468262 100644
|
|||
.ident = "Surface Book 1",
|
||||
.matches = {
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From c01ee9d838aff57b20b6fe9d57aaae5439748680 Mon Sep 17 00:00:00 2001
|
||||
From 6d04b8ab365775a6b1ab7b7c560b5d50e78bb783 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Sun, 10 Oct 2021 20:56:57 +0200
|
||||
Subject: [PATCH] ACPI: delay enumeration of devices with a _DEP pointing to an
|
||||
|
@ -58,10 +58,10 @@ Patchset: cameras
|
|||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
|
||||
index 1d249d0f61ae..558cf449a6e2 100644
|
||||
index 87e385542576..1183d09c13a6 100644
|
||||
--- a/drivers/acpi/scan.c
|
||||
+++ b/drivers/acpi/scan.c
|
||||
@@ -2113,6 +2113,9 @@ static acpi_status acpi_bus_check_add_2(acpi_handle handle, u32 lvl_not_used,
|
||||
@@ -2105,6 +2105,9 @@ static acpi_status acpi_bus_check_add_2(acpi_handle handle, u32 lvl_not_used,
|
||||
|
||||
static void acpi_default_enumeration(struct acpi_device *device)
|
||||
{
|
||||
|
@ -72,9 +72,9 @@ index 1d249d0f61ae..558cf449a6e2 100644
|
|||
* Do not enumerate devices with enumeration_by_parent flag set as
|
||||
* they will be enumerated by their respective parents.
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From 992be6ed831018a7673a0424adad595c44475de7 Mon Sep 17 00:00:00 2001
|
||||
From df1aa869818d56d8153223c60d74fb307cf3ff81 Mon Sep 17 00:00:00 2001
|
||||
From: zouxiaoh <xiaohong.zou@intel.com>
|
||||
Date: Fri, 25 Jun 2021 08:52:59 +0800
|
||||
Subject: [PATCH] iommu: intel-ipu: use IOMMU passthrough mode for Intel IPUs
|
||||
|
@ -100,10 +100,10 @@ Patchset: cameras
|
|||
1 file changed, 30 insertions(+)
|
||||
|
||||
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
|
||||
index 0cbe3a521254..9f3df5662889 100644
|
||||
index 6387f3a6eccf..d75107c47de0 100644
|
||||
--- a/drivers/iommu/intel/iommu.c
|
||||
+++ b/drivers/iommu/intel/iommu.c
|
||||
@@ -38,6 +38,12 @@
|
||||
@@ -37,6 +37,12 @@
|
||||
#define IS_GFX_DEVICE(pdev) ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY)
|
||||
#define IS_USB_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_SERIAL_USB)
|
||||
#define IS_ISA_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA)
|
||||
|
@ -116,7 +116,7 @@ index 0cbe3a521254..9f3df5662889 100644
|
|||
#define IS_IPTS(pdev) ((pdev)->vendor == PCI_VENDOR_ID_INTEL && \
|
||||
((pdev)->device == 0x9d3e))
|
||||
#define IS_AZALIA(pdev) ((pdev)->vendor == 0x8086 && (pdev)->device == 0x3a3e)
|
||||
@@ -295,12 +301,14 @@ EXPORT_SYMBOL_GPL(intel_iommu_enabled);
|
||||
@@ -290,12 +296,14 @@ EXPORT_SYMBOL_GPL(intel_iommu_enabled);
|
||||
|
||||
static int dmar_map_gfx = 1;
|
||||
static int dmar_map_ipts = 1;
|
||||
|
@ -131,7 +131,7 @@ index 0cbe3a521254..9f3df5662889 100644
|
|||
#define IDENTMAP_IPTS 16
|
||||
|
||||
const struct iommu_ops intel_iommu_ops;
|
||||
@@ -2550,6 +2558,9 @@ static int device_def_domain_type(struct device *dev)
|
||||
@@ -2553,6 +2561,9 @@ static int device_def_domain_type(struct device *dev)
|
||||
if ((iommu_identity_mapping & IDENTMAP_GFX) && IS_GFX_DEVICE(pdev))
|
||||
return IOMMU_DOMAIN_IDENTITY;
|
||||
|
||||
|
@ -141,7 +141,7 @@ index 0cbe3a521254..9f3df5662889 100644
|
|||
if ((iommu_identity_mapping & IDENTMAP_IPTS) && IS_IPTS(pdev))
|
||||
return IOMMU_DOMAIN_IDENTITY;
|
||||
}
|
||||
@@ -2859,6 +2870,9 @@ static int __init init_dmars(void)
|
||||
@@ -2862,6 +2873,9 @@ static int __init init_dmars(void)
|
||||
if (!dmar_map_gfx)
|
||||
iommu_identity_mapping |= IDENTMAP_GFX;
|
||||
|
||||
|
@ -151,7 +151,7 @@ index 0cbe3a521254..9f3df5662889 100644
|
|||
if (!dmar_map_ipts)
|
||||
iommu_identity_mapping |= IDENTMAP_IPTS;
|
||||
|
||||
@@ -4842,6 +4856,18 @@ static void quirk_iommu_igfx(struct pci_dev *dev)
|
||||
@@ -4765,6 +4779,18 @@ static void quirk_iommu_igfx(struct pci_dev *dev)
|
||||
dmar_map_gfx = 0;
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ index 0cbe3a521254..9f3df5662889 100644
|
|||
static void quirk_iommu_ipts(struct pci_dev *dev)
|
||||
{
|
||||
if (!IS_IPTS(dev))
|
||||
@@ -4853,6 +4879,7 @@ static void quirk_iommu_ipts(struct pci_dev *dev)
|
||||
@@ -4776,6 +4802,7 @@ static void quirk_iommu_ipts(struct pci_dev *dev)
|
||||
pci_info(dev, "Passthrough IOMMU for IPTS\n");
|
||||
dmar_map_ipts = 0;
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ index 0cbe3a521254..9f3df5662889 100644
|
|||
/* G4x/GM45 integrated gfx dmar support is totally busted. */
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_igfx);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e00, quirk_iommu_igfx);
|
||||
@@ -4888,6 +4915,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1632, quirk_iommu_igfx);
|
||||
@@ -4811,6 +4838,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1632, quirk_iommu_igfx);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163A, quirk_iommu_igfx);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163D, quirk_iommu_igfx);
|
||||
|
||||
|
@ -189,9 +189,9 @@ index 0cbe3a521254..9f3df5662889 100644
|
|||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9D3E, quirk_iommu_ipts);
|
||||
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From a3e7ba42e2b2cce37b0d4987fde18c745139c19b Mon Sep 17 00:00:00 2001
|
||||
From 58f403707b4b56371254100412f325a30ef1707d Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <djrscally@gmail.com>
|
||||
Date: Sun, 10 Oct 2021 20:57:02 +0200
|
||||
Subject: [PATCH] platform/x86: int3472: Enable I2c daisy chain
|
||||
|
@ -226,9 +226,694 @@ index 1e107fd49f82..e3e1696e7f0e 100644
|
|||
|
||||
return 0;
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From 9caa85a76f4310dd758c406b7754907ebdbb3931 Mon Sep 17 00:00:00 2001
|
||||
From 60a2d404d65225351612a7d3d3d5a1d1a382ca82 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <djrscally@gmail.com>
|
||||
Date: Wed, 4 May 2022 23:21:45 +0100
|
||||
Subject: [PATCH] media: ipu3-cio2: Move functionality from .complete() to
|
||||
.bound()
|
||||
|
||||
Creating links and registering subdev nodes during the .complete()
|
||||
callback has the unfortunate effect of preventing all cameras that
|
||||
connect to a notifier from working if any one of their drivers fails
|
||||
to probe. Moving the functionality from .complete() to .bound() allows
|
||||
those camera sensor drivers that did probe correctly to work regardless.
|
||||
|
||||
Signed-off-by: Daniel Scally <djrscally@gmail.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/media/pci/intel/ipu3/ipu3-cio2-main.c | 59 +++++++------------
|
||||
1 file changed, 21 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
|
||||
index ca51776a961f..c027b2bfd851 100644
|
||||
--- a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
|
||||
+++ b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
|
||||
@@ -1386,7 +1386,10 @@ static int cio2_notifier_bound(struct v4l2_async_notifier *notifier,
|
||||
{
|
||||
struct cio2_device *cio2 = to_cio2_device(notifier);
|
||||
struct sensor_async_subdev *s_asd = to_sensor_asd(asd);
|
||||
+ struct device *dev = &cio2->pci_dev->dev;
|
||||
struct cio2_queue *q;
|
||||
+ unsigned int pad;
|
||||
+ int ret;
|
||||
|
||||
if (cio2->queue[s_asd->csi2.port].sensor)
|
||||
return -EBUSY;
|
||||
@@ -1397,7 +1400,24 @@ static int cio2_notifier_bound(struct v4l2_async_notifier *notifier,
|
||||
q->sensor = sd;
|
||||
q->csi_rx_base = cio2->base + CIO2_REG_PIPE_BASE(q->csi2.port);
|
||||
|
||||
- return 0;
|
||||
+ ret = media_entity_get_fwnode_pad(&q->sensor->entity,
|
||||
+ s_asd->asd.match.fwnode,
|
||||
+ MEDIA_PAD_FL_SOURCE);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(dev, "no pad for endpoint %pfw (%d)\n",
|
||||
+ s_asd->asd.match.fwnode, ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = media_create_pad_link(&q->sensor->entity, ret, &q->subdev.entity,
|
||||
+ CIO2_PAD_SINK, 0);
|
||||
+ if (ret) {
|
||||
+ dev_err(dev, "failed to create link for %s\n",
|
||||
+ q->sensor->name);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return v4l2_device_register_subdev_nodes(&cio2->v4l2_dev);
|
||||
}
|
||||
|
||||
/* The .unbind callback */
|
||||
@@ -1411,46 +1431,9 @@ static void cio2_notifier_unbind(struct v4l2_async_notifier *notifier,
|
||||
cio2->queue[s_asd->csi2.port].sensor = NULL;
|
||||
}
|
||||
|
||||
-/* .complete() is called after all subdevices have been located */
|
||||
-static int cio2_notifier_complete(struct v4l2_async_notifier *notifier)
|
||||
-{
|
||||
- struct cio2_device *cio2 = to_cio2_device(notifier);
|
||||
- struct device *dev = &cio2->pci_dev->dev;
|
||||
- struct sensor_async_subdev *s_asd;
|
||||
- struct v4l2_async_subdev *asd;
|
||||
- struct cio2_queue *q;
|
||||
- int ret;
|
||||
-
|
||||
- list_for_each_entry(asd, &cio2->notifier.asd_list, asd_list) {
|
||||
- s_asd = to_sensor_asd(asd);
|
||||
- q = &cio2->queue[s_asd->csi2.port];
|
||||
-
|
||||
- ret = media_entity_get_fwnode_pad(&q->sensor->entity,
|
||||
- s_asd->asd.match.fwnode,
|
||||
- MEDIA_PAD_FL_SOURCE);
|
||||
- if (ret < 0) {
|
||||
- dev_err(dev, "no pad for endpoint %pfw (%d)\n",
|
||||
- s_asd->asd.match.fwnode, ret);
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- ret = media_create_pad_link(&q->sensor->entity, ret,
|
||||
- &q->subdev.entity, CIO2_PAD_SINK,
|
||||
- 0);
|
||||
- if (ret) {
|
||||
- dev_err(dev, "failed to create link for %s (endpoint %pfw, error %d)\n",
|
||||
- q->sensor->name, s_asd->asd.match.fwnode, ret);
|
||||
- return ret;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return v4l2_device_register_subdev_nodes(&cio2->v4l2_dev);
|
||||
-}
|
||||
-
|
||||
static const struct v4l2_async_notifier_operations cio2_async_ops = {
|
||||
.bound = cio2_notifier_bound,
|
||||
.unbind = cio2_notifier_unbind,
|
||||
- .complete = cio2_notifier_complete,
|
||||
};
|
||||
|
||||
static int cio2_parse_firmware(struct cio2_device *cio2)
|
||||
--
|
||||
2.42.0
|
||||
|
||||
From e9b59c24855f146141b665efed05b7455aeb5fd4 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <djrscally@gmail.com>
|
||||
Date: Thu, 2 Jun 2022 22:15:56 +0100
|
||||
Subject: [PATCH] media: ipu3-cio2: Re-add .complete() to ipu3-cio2
|
||||
|
||||
Removing the .complete() callback had some unintended consequences.
|
||||
Because the VCM driver is not directly linked to the ipu3-cio2
|
||||
driver .bound() never gets called for it, which means its devnode
|
||||
is never created if it probes late. Because .complete() waits for
|
||||
any sub-notifiers to also be complete it is captured in that call.
|
||||
|
||||
Signed-off-by: Daniel Scally <djrscally@gmail.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/media/pci/intel/ipu3/ipu3-cio2-main.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
|
||||
index c027b2bfd851..031acee26553 100644
|
||||
--- a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
|
||||
+++ b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
|
||||
@@ -1431,9 +1431,18 @@ static void cio2_notifier_unbind(struct v4l2_async_notifier *notifier,
|
||||
cio2->queue[s_asd->csi2.port].sensor = NULL;
|
||||
}
|
||||
|
||||
+/* .complete() is called after all subdevices have been located */
|
||||
+static int cio2_notifier_complete(struct v4l2_async_notifier *notifier)
|
||||
+{
|
||||
+ struct cio2_device *cio2 = to_cio2_device(notifier);
|
||||
+
|
||||
+ return v4l2_device_register_subdev_nodes(&cio2->v4l2_dev);
|
||||
+}
|
||||
+
|
||||
static const struct v4l2_async_notifier_operations cio2_async_ops = {
|
||||
.bound = cio2_notifier_bound,
|
||||
.unbind = cio2_notifier_unbind,
|
||||
+ .complete = cio2_notifier_complete,
|
||||
};
|
||||
|
||||
static int cio2_parse_firmware(struct cio2_device *cio2)
|
||||
--
|
||||
2.42.0
|
||||
|
||||
From 0926490302f353661c1a454f27611f5c94d928f0 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <djrscally@gmail.com>
|
||||
Date: Thu, 28 Oct 2021 21:55:16 +0100
|
||||
Subject: [PATCH] media: i2c: Add driver for DW9719 VCM
|
||||
|
||||
Add a driver for the DW9719 VCM. The driver creates a v4l2 subdevice
|
||||
and registers a control to set the desired focus.
|
||||
|
||||
Signed-off-by: Daniel Scally <djrscally@gmail.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
MAINTAINERS | 7 +
|
||||
drivers/media/i2c/Kconfig | 11 +
|
||||
drivers/media/i2c/Makefile | 1 +
|
||||
drivers/media/i2c/dw9719.c | 425 +++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 444 insertions(+)
|
||||
create mode 100644 drivers/media/i2c/dw9719.c
|
||||
|
||||
diff --git a/MAINTAINERS b/MAINTAINERS
|
||||
index 4cc6bf79fdd8..439cf523b80e 100644
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -6251,6 +6251,13 @@ T: git git://linuxtv.org/media_tree.git
|
||||
F: Documentation/devicetree/bindings/media/i2c/dongwoon,dw9714.yaml
|
||||
F: drivers/media/i2c/dw9714.c
|
||||
|
||||
+DONGWOON DW9719 LENS VOICE COIL DRIVER
|
||||
+M: Daniel Scally <djrscally@gmail.com>
|
||||
+L: linux-media@vger.kernel.org
|
||||
+S: Maintained
|
||||
+T: git git://linuxtv.org/media_tree.git
|
||||
+F: drivers/media/i2c/dw9719.c
|
||||
+
|
||||
DONGWOON DW9768 LENS VOICE COIL DRIVER
|
||||
M: Dongchun Zhu <dongchun.zhu@mediatek.com>
|
||||
L: linux-media@vger.kernel.org
|
||||
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
|
||||
index 0669aea3eba3..6959ee1a89fb 100644
|
||||
--- a/drivers/media/i2c/Kconfig
|
||||
+++ b/drivers/media/i2c/Kconfig
|
||||
@@ -855,6 +855,17 @@ config VIDEO_DW9714
|
||||
capability. This is designed for linear control of
|
||||
voice coil motors, controlled via I2C serial interface.
|
||||
|
||||
+config VIDEO_DW9719
|
||||
+ tristate "DW9719 lens voice coil support"
|
||||
+ depends on I2C && VIDEO_V4L2
|
||||
+ select MEDIA_CONTROLLER
|
||||
+ select VIDEO_V4L2_SUBDEV_API
|
||||
+ select V4L2_ASYNC
|
||||
+ help
|
||||
+ This is a driver for the DW9719 camera lens voice coil.
|
||||
+ This is designed for linear control of voice coil motors,
|
||||
+ controlled via I2C serial interface.
|
||||
+
|
||||
config VIDEO_DW9768
|
||||
tristate "DW9768 lens voice coil support"
|
||||
depends on I2C && VIDEO_DEV
|
||||
diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
|
||||
index c743aeb5d1ad..db1ebf5cadfe 100644
|
||||
--- a/drivers/media/i2c/Makefile
|
||||
+++ b/drivers/media/i2c/Makefile
|
||||
@@ -29,6 +29,7 @@ obj-$(CONFIG_VIDEO_CS5345) += cs5345.o
|
||||
obj-$(CONFIG_VIDEO_CS53L32A) += cs53l32a.o
|
||||
obj-$(CONFIG_VIDEO_CX25840) += cx25840/
|
||||
obj-$(CONFIG_VIDEO_DW9714) += dw9714.o
|
||||
+obj-$(CONFIG_VIDEO_DW9719) += dw9719.o
|
||||
obj-$(CONFIG_VIDEO_DW9768) += dw9768.o
|
||||
obj-$(CONFIG_VIDEO_DW9807_VCM) += dw9807-vcm.o
|
||||
obj-$(CONFIG_VIDEO_ET8EK8) += et8ek8/
|
||||
diff --git a/drivers/media/i2c/dw9719.c b/drivers/media/i2c/dw9719.c
|
||||
new file mode 100644
|
||||
index 000000000000..180b04d2a6b3
|
||||
--- /dev/null
|
||||
+++ b/drivers/media/i2c/dw9719.c
|
||||
@@ -0,0 +1,425 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+// Copyright (c) 2012 Intel Corporation
|
||||
+
|
||||
+/*
|
||||
+ * Based on linux/modules/camera/drivers/media/i2c/imx/dw9719.c in this repo:
|
||||
+ * https://github.com/ZenfoneArea/android_kernel_asus_zenfone5
|
||||
+ */
|
||||
+
|
||||
+#include <asm/unaligned.h>
|
||||
+
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/i2c.h>
|
||||
+#include <linux/pm_runtime.h>
|
||||
+#include <linux/regulator/consumer.h>
|
||||
+#include <linux/types.h>
|
||||
+
|
||||
+#include <media/v4l2-common.h>
|
||||
+#include <media/v4l2-ctrls.h>
|
||||
+#include <media/v4l2-subdev.h>
|
||||
+
|
||||
+#define DW9719_MAX_FOCUS_POS 1023
|
||||
+#define DW9719_CTRL_STEPS 16
|
||||
+#define DW9719_CTRL_DELAY_US 1000
|
||||
+#define DELAY_MAX_PER_STEP_NS (1000000 * 1023)
|
||||
+
|
||||
+#define DW9719_INFO 0
|
||||
+#define DW9719_ID 0xF1
|
||||
+#define DW9719_CONTROL 2
|
||||
+#define DW9719_VCM_CURRENT 3
|
||||
+
|
||||
+#define DW9719_MODE 6
|
||||
+#define DW9719_VCM_FREQ 7
|
||||
+
|
||||
+#define DW9719_MODE_SAC3 0x40
|
||||
+#define DW9719_DEFAULT_VCM_FREQ 0x60
|
||||
+#define DW9719_ENABLE_RINGING 0x02
|
||||
+
|
||||
+#define NUM_REGULATORS 2
|
||||
+
|
||||
+#define to_dw9719_device(x) container_of(x, struct dw9719_device, sd)
|
||||
+
|
||||
+struct dw9719_device {
|
||||
+ struct device *dev;
|
||||
+ struct i2c_client *client;
|
||||
+ struct regulator_bulk_data regulators[NUM_REGULATORS];
|
||||
+ struct v4l2_subdev sd;
|
||||
+
|
||||
+ struct dw9719_v4l2_ctrls {
|
||||
+ struct v4l2_ctrl_handler handler;
|
||||
+ struct v4l2_ctrl *focus;
|
||||
+ } ctrls;
|
||||
+};
|
||||
+
|
||||
+static int dw9719_i2c_rd8(struct i2c_client *client, u8 reg, u8 *val)
|
||||
+{
|
||||
+ struct i2c_msg msg[2];
|
||||
+ u8 buf[2] = { reg };
|
||||
+ int ret;
|
||||
+
|
||||
+ msg[0].addr = client->addr;
|
||||
+ msg[0].flags = 0;
|
||||
+ msg[0].len = 1;
|
||||
+ msg[0].buf = buf;
|
||||
+
|
||||
+ msg[1].addr = client->addr;
|
||||
+ msg[1].flags = I2C_M_RD;
|
||||
+ msg[1].len = 1;
|
||||
+ msg[1].buf = &buf[1];
|
||||
+ *val = 0;
|
||||
+
|
||||
+ ret = i2c_transfer(client->adapter, msg, 2);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ *val = buf[1];
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int dw9719_i2c_wr8(struct i2c_client *client, u8 reg, u8 val)
|
||||
+{
|
||||
+ struct i2c_msg msg;
|
||||
+ int ret;
|
||||
+
|
||||
+ u8 buf[2] = { reg, val };
|
||||
+
|
||||
+ msg.addr = client->addr;
|
||||
+ msg.flags = 0;
|
||||
+ msg.len = sizeof(buf);
|
||||
+ msg.buf = buf;
|
||||
+
|
||||
+ ret = i2c_transfer(client->adapter, &msg, 1);
|
||||
+
|
||||
+ return ret < 0 ? ret : 0;
|
||||
+}
|
||||
+
|
||||
+static int dw9719_i2c_wr16(struct i2c_client *client, u8 reg, u16 val)
|
||||
+{
|
||||
+ struct i2c_msg msg;
|
||||
+ u8 buf[3] = { reg };
|
||||
+ int ret;
|
||||
+
|
||||
+ put_unaligned_be16(val, buf + 1);
|
||||
+
|
||||
+ msg.addr = client->addr;
|
||||
+ msg.flags = 0;
|
||||
+ msg.len = sizeof(buf);
|
||||
+ msg.buf = buf;
|
||||
+
|
||||
+ ret = i2c_transfer(client->adapter, &msg, 1);
|
||||
+
|
||||
+ return ret < 0 ? ret : 0;
|
||||
+}
|
||||
+
|
||||
+static int dw9719_detect(struct dw9719_device *dw9719)
|
||||
+{
|
||||
+ int ret;
|
||||
+ u8 val;
|
||||
+
|
||||
+ ret = dw9719_i2c_rd8(dw9719->client, DW9719_INFO, &val);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ if (val != DW9719_ID) {
|
||||
+ dev_err(dw9719->dev, "Failed to detect correct id\n");
|
||||
+ ret = -ENXIO;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int dw9719_power_down(struct dw9719_device *dw9719)
|
||||
+{
|
||||
+ return regulator_bulk_disable(NUM_REGULATORS, dw9719->regulators);
|
||||
+}
|
||||
+
|
||||
+static int dw9719_power_up(struct dw9719_device *dw9719)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = regulator_bulk_enable(NUM_REGULATORS, dw9719->regulators);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Jiggle SCL pin to wake up device */
|
||||
+ ret = dw9719_i2c_wr8(dw9719->client, DW9719_CONTROL, 1);
|
||||
+
|
||||
+ /* Need 100us to transit from SHUTDOWN to STANDBY*/
|
||||
+ usleep_range(100, 1000);
|
||||
+
|
||||
+ ret = dw9719_i2c_wr8(dw9719->client, DW9719_CONTROL,
|
||||
+ DW9719_ENABLE_RINGING);
|
||||
+ if (ret < 0)
|
||||
+ goto fail_powerdown;
|
||||
+
|
||||
+ ret = dw9719_i2c_wr8(dw9719->client, DW9719_MODE, DW9719_MODE_SAC3);
|
||||
+ if (ret < 0)
|
||||
+ goto fail_powerdown;
|
||||
+
|
||||
+ ret = dw9719_i2c_wr8(dw9719->client, DW9719_VCM_FREQ,
|
||||
+ DW9719_DEFAULT_VCM_FREQ);
|
||||
+ if (ret < 0)
|
||||
+ goto fail_powerdown;
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+fail_powerdown:
|
||||
+ dw9719_power_down(dw9719);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int dw9719_t_focus_abs(struct dw9719_device *dw9719, s32 value)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ value = clamp(value, 0, DW9719_MAX_FOCUS_POS);
|
||||
+ ret = dw9719_i2c_wr16(dw9719->client, DW9719_VCM_CURRENT, value);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int dw9719_set_ctrl(struct v4l2_ctrl *ctrl)
|
||||
+{
|
||||
+ struct dw9719_device *dw9719 = container_of(ctrl->handler,
|
||||
+ struct dw9719_device,
|
||||
+ ctrls.handler);
|
||||
+ int ret;
|
||||
+
|
||||
+ /* Only apply changes to the controls if the device is powered up */
|
||||
+ if (!pm_runtime_get_if_in_use(dw9719->dev))
|
||||
+ return 0;
|
||||
+
|
||||
+ switch (ctrl->id) {
|
||||
+ case V4L2_CID_FOCUS_ABSOLUTE:
|
||||
+ ret = dw9719_t_focus_abs(dw9719, ctrl->val);
|
||||
+ break;
|
||||
+ default:
|
||||
+ ret = -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ pm_runtime_put(dw9719->dev);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static const struct v4l2_ctrl_ops dw9719_ctrl_ops = {
|
||||
+ .s_ctrl = dw9719_set_ctrl,
|
||||
+};
|
||||
+
|
||||
+static int __maybe_unused dw9719_suspend(struct device *dev)
|
||||
+{
|
||||
+ struct v4l2_subdev *sd = dev_get_drvdata(dev);
|
||||
+ struct dw9719_device *dw9719 = to_dw9719_device(sd);
|
||||
+ int ret;
|
||||
+ int val;
|
||||
+
|
||||
+ for (val = dw9719->ctrls.focus->val; val >= 0;
|
||||
+ val -= DW9719_CTRL_STEPS) {
|
||||
+ ret = dw9719_t_focus_abs(dw9719, val);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ usleep_range(DW9719_CTRL_DELAY_US, DW9719_CTRL_DELAY_US + 10);
|
||||
+ }
|
||||
+
|
||||
+ return dw9719_power_down(dw9719);
|
||||
+}
|
||||
+
|
||||
+static int __maybe_unused dw9719_resume(struct device *dev)
|
||||
+{
|
||||
+ struct v4l2_subdev *sd = dev_get_drvdata(dev);
|
||||
+ struct dw9719_device *dw9719 = to_dw9719_device(sd);
|
||||
+ int current_focus = dw9719->ctrls.focus->val;
|
||||
+ int ret;
|
||||
+ int val;
|
||||
+
|
||||
+ ret = dw9719_power_up(dw9719);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ for (val = current_focus % DW9719_CTRL_STEPS; val < current_focus;
|
||||
+ val += DW9719_CTRL_STEPS) {
|
||||
+ ret = dw9719_t_focus_abs(dw9719, val);
|
||||
+ if (ret)
|
||||
+ goto err_power_down;
|
||||
+
|
||||
+ usleep_range(DW9719_CTRL_DELAY_US, DW9719_CTRL_DELAY_US + 10);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+err_power_down:
|
||||
+ dw9719_power_down(dw9719);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int dw9719_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
||||
+{
|
||||
+ return pm_runtime_resume_and_get(sd->dev);
|
||||
+}
|
||||
+
|
||||
+static int dw9719_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
||||
+{
|
||||
+ pm_runtime_put(sd->dev);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct v4l2_subdev_internal_ops dw9719_internal_ops = {
|
||||
+ .open = dw9719_open,
|
||||
+ .close = dw9719_close,
|
||||
+};
|
||||
+
|
||||
+static int dw9719_init_controls(struct dw9719_device *dw9719)
|
||||
+{
|
||||
+ const struct v4l2_ctrl_ops *ops = &dw9719_ctrl_ops;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = v4l2_ctrl_handler_init(&dw9719->ctrls.handler, 1);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ dw9719->ctrls.focus = v4l2_ctrl_new_std(&dw9719->ctrls.handler, ops,
|
||||
+ V4L2_CID_FOCUS_ABSOLUTE, 0,
|
||||
+ DW9719_MAX_FOCUS_POS, 1, 0);
|
||||
+
|
||||
+ if (dw9719->ctrls.handler.error) {
|
||||
+ dev_err(dw9719->dev, "Error initialising v4l2 ctrls\n");
|
||||
+ ret = dw9719->ctrls.handler.error;
|
||||
+ goto err_free_handler;
|
||||
+ }
|
||||
+
|
||||
+ dw9719->sd.ctrl_handler = &dw9719->ctrls.handler;
|
||||
+
|
||||
+ return ret;
|
||||
+
|
||||
+err_free_handler:
|
||||
+ v4l2_ctrl_handler_free(&dw9719->ctrls.handler);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static const struct v4l2_subdev_ops dw9719_ops = { };
|
||||
+
|
||||
+static int dw9719_probe(struct i2c_client *client)
|
||||
+{
|
||||
+ struct dw9719_device *dw9719;
|
||||
+ int ret;
|
||||
+
|
||||
+ dw9719 = devm_kzalloc(&client->dev, sizeof(*dw9719), GFP_KERNEL);
|
||||
+ if (!dw9719)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ dw9719->client = client;
|
||||
+ dw9719->dev = &client->dev;
|
||||
+
|
||||
+ dw9719->regulators[0].supply = "vdd";
|
||||
+ /*
|
||||
+ * The DW9719 has only the 1 VDD voltage input, but some PMICs such as
|
||||
+ * the TPS68470 PMIC have I2C passthrough capability, to disconnect the
|
||||
+ * sensor's I2C pins from the I2C bus when the sensors VSIO (Sensor-IO)
|
||||
+ * is off, because some sensors then short these pins to ground;
|
||||
+ * and the DW9719 might sit behind this passthrough, this it needs to
|
||||
+ * enable VSIO as that will also enable the I2C passthrough.
|
||||
+ */
|
||||
+ dw9719->regulators[1].supply = "vsio";
|
||||
+
|
||||
+ ret = devm_regulator_bulk_get(&client->dev, NUM_REGULATORS,
|
||||
+ dw9719->regulators);
|
||||
+ if (ret)
|
||||
+ return dev_err_probe(&client->dev, ret, "getting regulators\n");
|
||||
+
|
||||
+ v4l2_i2c_subdev_init(&dw9719->sd, client, &dw9719_ops);
|
||||
+ dw9719->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
|
||||
+ dw9719->sd.internal_ops = &dw9719_internal_ops;
|
||||
+
|
||||
+ ret = dw9719_init_controls(dw9719);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = media_entity_pads_init(&dw9719->sd.entity, 0, NULL);
|
||||
+ if (ret < 0)
|
||||
+ goto err_free_ctrl_handler;
|
||||
+
|
||||
+ dw9719->sd.entity.function = MEDIA_ENT_F_LENS;
|
||||
+
|
||||
+ /*
|
||||
+ * We need the driver to work in the event that pm runtime is disable in
|
||||
+ * the kernel, so power up and verify the chip now. In the event that
|
||||
+ * runtime pm is disabled this will leave the chip on, so that the lens
|
||||
+ * will work.
|
||||
+ */
|
||||
+
|
||||
+ ret = dw9719_power_up(dw9719);
|
||||
+ if (ret)
|
||||
+ goto err_cleanup_media;
|
||||
+
|
||||
+ ret = dw9719_detect(dw9719);
|
||||
+ if (ret)
|
||||
+ goto err_powerdown;
|
||||
+
|
||||
+ pm_runtime_set_active(&client->dev);
|
||||
+ pm_runtime_get_noresume(&client->dev);
|
||||
+ pm_runtime_enable(&client->dev);
|
||||
+
|
||||
+ ret = v4l2_async_register_subdev(&dw9719->sd);
|
||||
+ if (ret < 0)
|
||||
+ goto err_pm_runtime;
|
||||
+
|
||||
+ pm_runtime_set_autosuspend_delay(&client->dev, 1000);
|
||||
+ pm_runtime_use_autosuspend(&client->dev);
|
||||
+ pm_runtime_put_autosuspend(&client->dev);
|
||||
+
|
||||
+ return ret;
|
||||
+
|
||||
+err_pm_runtime:
|
||||
+ pm_runtime_disable(&client->dev);
|
||||
+ pm_runtime_put_noidle(&client->dev);
|
||||
+err_powerdown:
|
||||
+ dw9719_power_down(dw9719);
|
||||
+err_cleanup_media:
|
||||
+ media_entity_cleanup(&dw9719->sd.entity);
|
||||
+err_free_ctrl_handler:
|
||||
+ v4l2_ctrl_handler_free(&dw9719->ctrls.handler);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void dw9719_remove(struct i2c_client *client)
|
||||
+{
|
||||
+ struct v4l2_subdev *sd = i2c_get_clientdata(client);
|
||||
+ struct dw9719_device *dw9719 = container_of(sd, struct dw9719_device,
|
||||
+ sd);
|
||||
+
|
||||
+ pm_runtime_disable(&client->dev);
|
||||
+ v4l2_async_unregister_subdev(sd);
|
||||
+ v4l2_ctrl_handler_free(&dw9719->ctrls.handler);
|
||||
+ media_entity_cleanup(&dw9719->sd.entity);
|
||||
+}
|
||||
+
|
||||
+static const struct i2c_device_id dw9719_id_table[] = {
|
||||
+ { "dw9719" },
|
||||
+ { }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(i2c, dw9719_id_table);
|
||||
+
|
||||
+static const struct dev_pm_ops dw9719_pm_ops = {
|
||||
+ SET_RUNTIME_PM_OPS(dw9719_suspend, dw9719_resume, NULL)
|
||||
+};
|
||||
+
|
||||
+static struct i2c_driver dw9719_i2c_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "dw9719",
|
||||
+ .pm = &dw9719_pm_ops,
|
||||
+ },
|
||||
+ .probe_new = dw9719_probe,
|
||||
+ .remove = dw9719_remove,
|
||||
+ .id_table = dw9719_id_table,
|
||||
+};
|
||||
+module_i2c_driver(dw9719_i2c_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Daniel Scally <djrscally@gmail.com>");
|
||||
+MODULE_DESCRIPTION("DW9719 VCM Driver");
|
||||
+MODULE_LICENSE("GPL");
|
||||
--
|
||||
2.42.0
|
||||
|
||||
From 3a35f5894c7e979357c64bbf198bd35dc3489a0a Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Fri, 15 Jul 2022 23:48:00 +0200
|
||||
Subject: [PATCH] drivers/media/i2c: Fix DW9719 dependencies
|
||||
|
||||
It should depend on VIDEO_DEV instead of VIDEO_V4L2.
|
||||
|
||||
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/media/i2c/Kconfig | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
|
||||
index 6959ee1a89fb..1d5082fe9ce3 100644
|
||||
--- a/drivers/media/i2c/Kconfig
|
||||
+++ b/drivers/media/i2c/Kconfig
|
||||
@@ -857,7 +857,7 @@ config VIDEO_DW9714
|
||||
|
||||
config VIDEO_DW9719
|
||||
tristate "DW9719 lens voice coil support"
|
||||
- depends on I2C && VIDEO_V4L2
|
||||
+ depends on I2C && VIDEO_DEV
|
||||
select MEDIA_CONTROLLER
|
||||
select VIDEO_V4L2_SUBDEV_API
|
||||
select V4L2_ASYNC
|
||||
--
|
||||
2.42.0
|
||||
|
||||
From acbd8c1b38ffee270862e8efcf68ae3580b1b82d Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
Date: Thu, 2 Mar 2023 12:59:39 +0000
|
||||
Subject: [PATCH] platform/x86: int3472: Remap reset GPIO for INT347E
|
||||
|
@ -282,9 +967,9 @@ index e33c2d75975c..c0c90ae66b70 100644
|
|||
if (ACPI_FAILURE(status))
|
||||
return -EINVAL;
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From 3ede4c09a68bc8ee1820986f865133c3cd188f2e Mon Sep 17 00:00:00 2001
|
||||
From b2ae8fc0aecde894bf6e8f52e515de645f1b4739 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
Date: Tue, 21 Mar 2023 13:45:26 +0000
|
||||
Subject: [PATCH] media: i2c: Clarify that gain is Analogue gain in OV7251
|
||||
|
@ -321,9 +1006,9 @@ index 675fb37a6fea..43b30db08c9e 100644
|
|||
V4L2_CID_TEST_PATTERN,
|
||||
ARRAY_SIZE(ov7251_test_pattern_menu) - 1,
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From 7161e88bfd849eb77ad8dcf5111ebc4a3f8c3fd4 Mon Sep 17 00:00:00 2001
|
||||
From 590fe333492348f48411fd9c2fc14d4302223266 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
Date: Wed, 22 Mar 2023 11:01:42 +0000
|
||||
Subject: [PATCH] media: v4l2-core: Acquire privacy led in
|
||||
|
@ -342,27 +1027,27 @@ Patchset: cameras
|
|||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
|
||||
index 091e8cf4114b..cca10f535584 100644
|
||||
index b16b5f4cb91e..33739a979cbc 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-async.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-async.c
|
||||
@@ -796,6 +796,10 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd)
|
||||
|
||||
INIT_LIST_HEAD(&sd->asc_list);
|
||||
@@ -760,6 +760,10 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd)
|
||||
struct v4l2_async_notifier *notifier;
|
||||
int ret;
|
||||
|
||||
+ ret = v4l2_subdev_get_privacy_led(sd);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
/*
|
||||
* No reference taken. The reference is held by the device (struct
|
||||
* v4l2_subdev.dev), and async sub-device does not exist independently
|
||||
* No reference taken. The reference is held by the device
|
||||
* (struct v4l2_subdev.dev), and async sub-device does not
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c
|
||||
index 7f181fbbb140..1c0347de4e21 100644
|
||||
index 4fa9225aa3d9..ed4c75253cbc 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-fwnode.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-fwnode.c
|
||||
@@ -1217,10 +1217,6 @@ int v4l2_async_register_subdev_sensor(struct v4l2_subdev *sd)
|
||||
@@ -1314,10 +1314,6 @@ int v4l2_async_register_subdev_sensor(struct v4l2_subdev *sd)
|
||||
|
||||
v4l2_async_subdev_nf_init(notifier, sd);
|
||||
v4l2_async_nf_init(notifier);
|
||||
|
||||
- ret = v4l2_subdev_get_privacy_led(sd);
|
||||
- if (ret < 0)
|
||||
|
@ -372,9 +1057,9 @@ index 7f181fbbb140..1c0347de4e21 100644
|
|||
if (ret < 0)
|
||||
goto out_cleanup;
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From aab439d9ca04f9e56b1573fb6fe666acd6ecc0fa Mon Sep 17 00:00:00 2001
|
||||
From cf42b6660ce6a705292e0cd0df8e7d39dcae8f04 Mon Sep 17 00:00:00 2001
|
||||
From: Kate Hsuan <hpa@redhat.com>
|
||||
Date: Tue, 21 Mar 2023 23:37:16 +0800
|
||||
Subject: [PATCH] platform: x86: int3472: Add MFD cell for tps68470 LED
|
||||
|
@ -413,9 +1098,9 @@ index e3e1696e7f0e..423dc555093f 100644
|
|||
for (i = 0; i < board_data->n_gpiod_lookups; i++)
|
||||
gpiod_add_lookup_table(board_data->tps68470_gpio_lookup_tables[i]);
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From 110530f6b622a9f4ae2308d684d7624be69218f9 Mon Sep 17 00:00:00 2001
|
||||
From 5ef4b0088658da64a7f39c37e33aad3469b3fb39 Mon Sep 17 00:00:00 2001
|
||||
From: Kate Hsuan <hpa@redhat.com>
|
||||
Date: Tue, 21 Mar 2023 23:37:17 +0800
|
||||
Subject: [PATCH] include: mfd: tps68470: Add masks for LEDA and LEDB
|
||||
|
@ -454,9 +1139,9 @@ index 7807fa329db0..2d2abb25b944 100644
|
|||
+
|
||||
#endif /* __LINUX_MFD_TPS68470_H */
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From 9353e9a63ccf0ffca8a097c4ebee7674f8a67d11 Mon Sep 17 00:00:00 2001
|
||||
From 3296fb49f2be7439c31fb45250c403a484107463 Mon Sep 17 00:00:00 2001
|
||||
From: Kate Hsuan <hpa@redhat.com>
|
||||
Date: Tue, 21 Mar 2023 23:37:18 +0800
|
||||
Subject: [PATCH] leds: tps68470: Add LED control for tps68470
|
||||
|
@ -479,10 +1164,10 @@ Patchset: cameras
|
|||
create mode 100644 drivers/leds/leds-tps68470.c
|
||||
|
||||
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
|
||||
index b92208eccdea..312c0c21cc5e 100644
|
||||
index 6046dfeca16f..385c06e4f1d3 100644
|
||||
--- a/drivers/leds/Kconfig
|
||||
+++ b/drivers/leds/Kconfig
|
||||
@@ -873,6 +873,18 @@ config LEDS_TPS6105X
|
||||
@@ -864,6 +864,18 @@ config LEDS_TPS6105X
|
||||
It is a single boost converter primarily for white LEDs and
|
||||
audio amplifiers.
|
||||
|
||||
|
@ -502,10 +1187,10 @@ index b92208eccdea..312c0c21cc5e 100644
|
|||
tristate "LED support for SGI Octane machines"
|
||||
depends on LEDS_CLASS
|
||||
diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
|
||||
index d7348e8bc019..10caea4e7c61 100644
|
||||
index d71f1226540c..e2002b535967 100644
|
||||
--- a/drivers/leds/Makefile
|
||||
+++ b/drivers/leds/Makefile
|
||||
@@ -84,6 +84,7 @@ obj-$(CONFIG_LEDS_TCA6507) += leds-tca6507.o
|
||||
@@ -83,6 +83,7 @@ obj-$(CONFIG_LEDS_TCA6507) += leds-tca6507.o
|
||||
obj-$(CONFIG_LEDS_TI_LMU_COMMON) += leds-ti-lmu-common.o
|
||||
obj-$(CONFIG_LEDS_TLC591XX) += leds-tlc591xx.o
|
||||
obj-$(CONFIG_LEDS_TPS6105X) += leds-tps6105x.o
|
||||
|
@ -705,5 +1390,5 @@ index 000000000000..35aeb5db89c8
|
|||
+MODULE_DESCRIPTION("LED driver for TPS68470 PMIC");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 63ebdc4f3b214e6bc789b55432fa9c5d1dbe916f Mon Sep 17 00:00:00 2001
|
||||
From bc06956985ee377fba5e8a4483d8777373c3d54c Mon Sep 17 00:00:00 2001
|
||||
From: Sachi King <nakato@nakato.io>
|
||||
Date: Sat, 29 May 2021 17:47:38 +1000
|
||||
Subject: [PATCH] ACPI: Add quirk for Surface Laptop 4 AMD missing irq 7
|
||||
|
@ -21,7 +21,7 @@ Patchset: amd-gpio
|
|||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
|
||||
index c55c0ef47a18..f29740cf89ff 100644
|
||||
index 53369c57751e..1ec1a9015178 100644
|
||||
--- a/arch/x86/kernel/acpi/boot.c
|
||||
+++ b/arch/x86/kernel/acpi/boot.c
|
||||
@@ -22,6 +22,7 @@
|
||||
|
@ -32,7 +32,7 @@ index c55c0ef47a18..f29740cf89ff 100644
|
|||
|
||||
#include <asm/e820/api.h>
|
||||
#include <asm/irqdomain.h>
|
||||
@@ -1255,6 +1256,17 @@ static void __init mp_config_acpi_legacy_irqs(void)
|
||||
@@ -1256,6 +1257,17 @@ static void __init mp_config_acpi_legacy_irqs(void)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ index c55c0ef47a18..f29740cf89ff 100644
|
|||
/*
|
||||
* Parse IOAPIC related entries in MADT
|
||||
* returns 0 on success, < 0 on error
|
||||
@@ -1310,6 +1322,11 @@ static int __init acpi_parse_madt_ioapic_entries(void)
|
||||
@@ -1311,6 +1323,11 @@ static int __init acpi_parse_madt_ioapic_entries(void)
|
||||
acpi_sci_ioapic_setup(acpi_gbl_FADT.sci_interrupt, 0, 0,
|
||||
acpi_gbl_FADT.sci_interrupt);
|
||||
|
||||
|
@ -63,9 +63,9 @@ index c55c0ef47a18..f29740cf89ff 100644
|
|||
mp_config_acpi_legacy_irqs();
|
||||
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
||||
From 82d8be77dbf1f5df125c796b7fdc8c60f2139eb8 Mon Sep 17 00:00:00 2001
|
||||
From 221495b0d4fc09a39ddff1ea38a82f621e26f722 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Thu, 3 Jun 2021 14:04:26 +0200
|
||||
Subject: [PATCH] ACPI: Add AMD 13" Surface Laptop 4 model to irq 7 override
|
||||
|
@ -80,10 +80,10 @@ Patchset: amd-gpio
|
|||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
|
||||
index f29740cf89ff..247d2a8bcdf4 100644
|
||||
index 1ec1a9015178..a7d40015e46a 100644
|
||||
--- a/arch/x86/kernel/acpi/boot.c
|
||||
+++ b/arch/x86/kernel/acpi/boot.c
|
||||
@@ -1258,12 +1258,19 @@ static void __init mp_config_acpi_legacy_irqs(void)
|
||||
@@ -1259,12 +1259,19 @@ static void __init mp_config_acpi_legacy_irqs(void)
|
||||
|
||||
static const struct dmi_system_id surface_quirk[] __initconst = {
|
||||
{
|
||||
|
@ -105,5 +105,5 @@ index f29740cf89ff..247d2a8bcdf4 100644
|
|||
};
|
||||
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 34ad5b493b00c944ed68d2436cad96785fe37a33 Mon Sep 17 00:00:00 2001
|
||||
From 709097b5e8cea4cb5296d01c6ba30c2761c1a36c Mon Sep 17 00:00:00 2001
|
||||
From: "Bart Groeneveld | GPX Solutions B.V" <bart@gpxbv.nl>
|
||||
Date: Mon, 5 Dec 2022 16:08:46 +0100
|
||||
Subject: [PATCH] acpi: allow usage of acpi_tad on HW-reduced platforms
|
||||
|
@ -17,11 +17,11 @@ but it does have an HW-reduced TAD, which can be used as a RTC instead.
|
|||
Signed-off-by: Bart Groeneveld | GPX Solutions B.V. <bart@gpxbv.nl>
|
||||
Patchset: rtc
|
||||
---
|
||||
drivers/acpi/acpi_tad.c | 36 ++++++++++++++++++++++++------------
|
||||
1 file changed, 24 insertions(+), 12 deletions(-)
|
||||
drivers/acpi/acpi_tad.c | 35 ++++++++++++++++++++++++-----------
|
||||
1 file changed, 24 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/acpi_tad.c b/drivers/acpi/acpi_tad.c
|
||||
index 33c3b16af556..900445d06623 100644
|
||||
index e9b8e8305e23..944276934e7e 100644
|
||||
--- a/drivers/acpi/acpi_tad.c
|
||||
+++ b/drivers/acpi/acpi_tad.c
|
||||
@@ -432,6 +432,14 @@ static ssize_t caps_show(struct device *dev, struct device_attribute *attr,
|
||||
|
@ -58,7 +58,7 @@ index 33c3b16af556..900445d06623 100644
|
|||
};
|
||||
|
||||
static ssize_t dc_alarm_store(struct device *dev, struct device_attribute *attr,
|
||||
@@ -564,13 +571,18 @@ static int acpi_tad_remove(struct platform_device *pdev)
|
||||
@@ -563,13 +570,18 @@ static int acpi_tad_remove(struct platform_device *pdev)
|
||||
|
||||
pm_runtime_get_sync(dev);
|
||||
|
||||
|
@ -79,20 +79,19 @@ index 33c3b16af556..900445d06623 100644
|
|||
if (dd->capabilities & ACPI_TAD_DC_WAKE) {
|
||||
acpi_tad_disable_timer(dev, ACPI_TAD_DC_TIMER);
|
||||
acpi_tad_clear_status(dev, ACPI_TAD_DC_TIMER);
|
||||
@@ -613,12 +625,6 @@ static int acpi_tad_probe(struct platform_device *pdev)
|
||||
goto remove_handler;
|
||||
@@ -604,11 +616,6 @@ static int acpi_tad_probe(struct platform_device *pdev)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
- if (!acpi_has_method(handle, "_PRW")) {
|
||||
- dev_info(dev, "Missing _PRW\n");
|
||||
- ret = -ENODEV;
|
||||
- goto remove_handler;
|
||||
- return -ENODEV;
|
||||
- }
|
||||
-
|
||||
dd = devm_kzalloc(dev, sizeof(*dd), GFP_KERNEL);
|
||||
if (!dd) {
|
||||
ret = -ENOMEM;
|
||||
@@ -649,6 +655,12 @@ static int acpi_tad_probe(struct platform_device *pdev)
|
||||
if (!dd)
|
||||
return -ENOMEM;
|
||||
@@ -637,6 +644,12 @@ static int acpi_tad_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
|
@ -106,5 +105,5 @@ index 33c3b16af556..900445d06623 100644
|
|||
ret = sysfs_create_group(&dev->kobj, &acpi_tad_dc_attr_group);
|
||||
if (ret)
|
||||
--
|
||||
2.44.0
|
||||
2.42.0
|
||||
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,852 +0,0 @@
|
|||
From 526bea529e4befa282fcfd01bbadbed7325faf01 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Sun, 10 Oct 2021 20:56:57 +0200
|
||||
Subject: [PATCH] ACPI: delay enumeration of devices with a _DEP pointing to an
|
||||
INT3472 device
|
||||
|
||||
The clk and regulator frameworks expect clk/regulator consumer-devices
|
||||
to have info about the consumed clks/regulators described in the device's
|
||||
fw_node.
|
||||
|
||||
To work around cases where this info is not present in the firmware tables,
|
||||
which is often the case on x86/ACPI devices, both frameworks allow the
|
||||
provider-driver to attach info about consumers to the clks/regulators
|
||||
when registering these.
|
||||
|
||||
This causes problems with the probe ordering wrt drivers for consumers
|
||||
of these clks/regulators. Since the lookups are only registered when the
|
||||
provider-driver binds, trying to get these clks/regulators before then
|
||||
results in a -ENOENT error for clks and a dummy regulator for regulators.
|
||||
|
||||
One case where we hit this issue is camera sensors such as e.g. the OV8865
|
||||
sensor found on the Microsoft Surface Go. The sensor uses clks, regulators
|
||||
and GPIOs provided by a TPS68470 PMIC which is described in an INT3472
|
||||
ACPI device. There is special platform code handling this and setting
|
||||
platform_data with the necessary consumer info on the MFD cells
|
||||
instantiated for the PMIC under: drivers/platform/x86/intel/int3472.
|
||||
|
||||
For this to work properly the ov8865 driver must not bind to the I2C-client
|
||||
for the OV8865 sensor until after the TPS68470 PMIC gpio, regulator and
|
||||
clk MFD cells have all been fully setup.
|
||||
|
||||
The OV8865 on the Microsoft Surface Go is just one example, all X86
|
||||
devices using the Intel IPU3 camera block found on recent Intel SoCs
|
||||
have similar issues where there is an INT3472 HID ACPI-device, which
|
||||
describes the clks and regulators, and the driver for this INT3472 device
|
||||
must be fully initialized before the sensor driver (any sensor driver)
|
||||
binds for things to work properly.
|
||||
|
||||
On these devices the ACPI nodes describing the sensors all have a _DEP
|
||||
dependency on the matching INT3472 ACPI device (there is one per sensor).
|
||||
|
||||
This allows solving the probe-ordering problem by delaying the enumeration
|
||||
(instantiation of the I2C-client in the ov8865 example) of ACPI-devices
|
||||
which have a _DEP dependency on an INT3472 device.
|
||||
|
||||
The new acpi_dev_ready_for_enumeration() helper used for this is also
|
||||
exported because for devices, which have the enumeration_by_parent flag
|
||||
set, the parent-driver will do its own scan of child ACPI devices and
|
||||
it will try to enumerate those during its probe(). Code doing this such
|
||||
as e.g. the i2c-core-acpi.c code must call this new helper to ensure
|
||||
that it too delays the enumeration until all the _DEP dependencies are
|
||||
met on devices which have the new honor_deps flag set.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/acpi/scan.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
|
||||
index e6ed1ba91e5c..b367890b7438 100644
|
||||
--- a/drivers/acpi/scan.c
|
||||
+++ b/drivers/acpi/scan.c
|
||||
@@ -2138,6 +2138,9 @@ static acpi_status acpi_bus_check_add_2(acpi_handle handle, u32 lvl_not_used,
|
||||
|
||||
static void acpi_default_enumeration(struct acpi_device *device)
|
||||
{
|
||||
+ if (!acpi_dev_ready_for_enumeration(device))
|
||||
+ return;
|
||||
+
|
||||
/*
|
||||
* Do not enumerate devices with enumeration_by_parent flag set as
|
||||
* they will be enumerated by their respective parents.
|
||||
--
|
||||
2.44.0
|
||||
|
||||
From d41ef92974135b1c22c2f46cbaba926701e0d4af Mon Sep 17 00:00:00 2001
|
||||
From: zouxiaoh <xiaohong.zou@intel.com>
|
||||
Date: Fri, 25 Jun 2021 08:52:59 +0800
|
||||
Subject: [PATCH] iommu: intel-ipu: use IOMMU passthrough mode for Intel IPUs
|
||||
|
||||
Intel IPU(Image Processing Unit) has its own (IO)MMU hardware,
|
||||
The IPU driver allocates its own page table that is not mapped
|
||||
via the DMA, and thus the Intel IOMMU driver blocks access giving
|
||||
this error: DMAR: DRHD: handling fault status reg 3 DMAR:
|
||||
[DMA Read] Request device [00:05.0] PASID ffffffff
|
||||
fault addr 76406000 [fault reason 06] PTE Read access is not set
|
||||
As IPU is not an external facing device which is not risky, so use
|
||||
IOMMU passthrough mode for Intel IPUs.
|
||||
|
||||
Change-Id: I6dcccdadac308cf42e20a18e1b593381391e3e6b
|
||||
Depends-On: Iacd67578e8c6a9b9ac73285f52b4081b72fb68a6
|
||||
Tracked-On: #JIITL8-411
|
||||
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
|
||||
Signed-off-by: zouxiaoh <xiaohong.zou@intel.com>
|
||||
Signed-off-by: Xu Chongyang <chongyang.xu@intel.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/iommu/intel/iommu.c | 30 ++++++++++++++++++++++++++++++
|
||||
1 file changed, 30 insertions(+)
|
||||
|
||||
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
|
||||
index 6c01b1aebf27..ceed043464b1 100644
|
||||
--- a/drivers/iommu/intel/iommu.c
|
||||
+++ b/drivers/iommu/intel/iommu.c
|
||||
@@ -45,6 +45,13 @@
|
||||
((pdev)->vendor == PCI_VENDOR_ID_INTEL && (pdev)->device == 0x34E4) \
|
||||
)
|
||||
|
||||
+#define IS_INTEL_IPU(pdev) ((pdev)->vendor == PCI_VENDOR_ID_INTEL && \
|
||||
+ ((pdev)->device == 0x9a19 || \
|
||||
+ (pdev)->device == 0x9a39 || \
|
||||
+ (pdev)->device == 0x4e19 || \
|
||||
+ (pdev)->device == 0x465d || \
|
||||
+ (pdev)->device == 0x1919))
|
||||
+
|
||||
#define IOAPIC_RANGE_START (0xfee00000)
|
||||
#define IOAPIC_RANGE_END (0xfeefffff)
|
||||
#define IOVA_START_ADDR (0x1000)
|
||||
@@ -154,12 +161,14 @@ EXPORT_SYMBOL_GPL(intel_iommu_enabled);
|
||||
|
||||
static int dmar_map_gfx = 1;
|
||||
static int dmar_map_ipts = 1;
|
||||
+static int dmar_map_ipu = 1;
|
||||
static int intel_iommu_superpage = 1;
|
||||
static int iommu_identity_mapping;
|
||||
static int iommu_skip_te_disable;
|
||||
|
||||
#define IDENTMAP_GFX 2
|
||||
#define IDENTMAP_AZALIA 4
|
||||
+#define IDENTMAP_IPU 8
|
||||
#define IDENTMAP_IPTS 16
|
||||
|
||||
const struct iommu_ops intel_iommu_ops;
|
||||
@@ -2420,6 +2429,9 @@ static int device_def_domain_type(struct device *dev)
|
||||
if ((iommu_identity_mapping & IDENTMAP_GFX) && IS_GFX_DEVICE(pdev))
|
||||
return IOMMU_DOMAIN_IDENTITY;
|
||||
|
||||
+ if ((iommu_identity_mapping & IDENTMAP_IPU) && IS_INTEL_IPU(pdev))
|
||||
+ return IOMMU_DOMAIN_IDENTITY;
|
||||
+
|
||||
if ((iommu_identity_mapping & IDENTMAP_IPTS) && IS_IPTS(pdev))
|
||||
return IOMMU_DOMAIN_IDENTITY;
|
||||
}
|
||||
@@ -2729,6 +2741,9 @@ static int __init init_dmars(void)
|
||||
if (!dmar_map_gfx)
|
||||
iommu_identity_mapping |= IDENTMAP_GFX;
|
||||
|
||||
+ if (!dmar_map_ipu)
|
||||
+ iommu_identity_mapping |= IDENTMAP_IPU;
|
||||
+
|
||||
if (!dmar_map_ipts)
|
||||
iommu_identity_mapping |= IDENTMAP_IPTS;
|
||||
|
||||
@@ -4909,6 +4924,18 @@ static void quirk_iommu_igfx(struct pci_dev *dev)
|
||||
dmar_map_gfx = 0;
|
||||
}
|
||||
|
||||
+static void quirk_iommu_ipu(struct pci_dev *dev)
|
||||
+{
|
||||
+ if (!IS_INTEL_IPU(dev))
|
||||
+ return;
|
||||
+
|
||||
+ if (risky_device(dev))
|
||||
+ return;
|
||||
+
|
||||
+ pci_info(dev, "Passthrough IOMMU for integrated Intel IPU\n");
|
||||
+ dmar_map_ipu = 0;
|
||||
+}
|
||||
+
|
||||
static void quirk_iommu_ipts(struct pci_dev *dev)
|
||||
{
|
||||
if (!IS_IPTS(dev))
|
||||
@@ -4956,6 +4983,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1632, quirk_iommu_igfx);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163A, quirk_iommu_igfx);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163D, quirk_iommu_igfx);
|
||||
|
||||
+/* disable IPU dmar support */
|
||||
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_iommu_ipu);
|
||||
+
|
||||
/* disable IPTS dmar support */
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9D3E, quirk_iommu_ipts);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x34E4, quirk_iommu_ipts);
|
||||
--
|
||||
2.44.0
|
||||
|
||||
From 214600c4c0c3039ba0d0a5e522a2eb162da3857b Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <djrscally@gmail.com>
|
||||
Date: Sun, 10 Oct 2021 20:57:02 +0200
|
||||
Subject: [PATCH] platform/x86: int3472: Enable I2c daisy chain
|
||||
|
||||
The TPS68470 PMIC has an I2C passthrough mode through which I2C traffic
|
||||
can be forwarded to a device connected to the PMIC as though it were
|
||||
connected directly to the system bus. Enable this mode when the chip
|
||||
is initialised.
|
||||
|
||||
Signed-off-by: Daniel Scally <djrscally@gmail.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/platform/x86/intel/int3472/tps68470.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c
|
||||
index 1e107fd49f82..e3e1696e7f0e 100644
|
||||
--- a/drivers/platform/x86/intel/int3472/tps68470.c
|
||||
+++ b/drivers/platform/x86/intel/int3472/tps68470.c
|
||||
@@ -46,6 +46,13 @@ static int tps68470_chip_init(struct device *dev, struct regmap *regmap)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ /* Enable I2C daisy chain */
|
||||
+ ret = regmap_write(regmap, TPS68470_REG_S_I2C_CTL, 0x03);
|
||||
+ if (ret) {
|
||||
+ dev_err(dev, "Failed to enable i2c daisy chain\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
dev_info(dev, "TPS68470 REVID: 0x%02x\n", version);
|
||||
|
||||
return 0;
|
||||
--
|
||||
2.44.0
|
||||
|
||||
From f5c4f5e1de99e04416ddffca65246a7769a202e3 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
Date: Thu, 2 Mar 2023 12:59:39 +0000
|
||||
Subject: [PATCH] platform/x86: int3472: Remap reset GPIO for INT347E
|
||||
|
||||
ACPI _HID INT347E represents the OmniVision 7251 camera sensor. The
|
||||
driver for this sensor expects a single pin named "enable", but on
|
||||
some Microsoft Surface platforms the sensor is assigned a single
|
||||
GPIO who's type flag is INT3472_GPIO_TYPE_RESET.
|
||||
|
||||
Remap the GPIO pin's function from "reset" to "enable". This is done
|
||||
outside of the existing remap table since it is a more widespread
|
||||
discrepancy than that method is designed for. Additionally swap the
|
||||
polarity of the pin to match the driver's expectation.
|
||||
|
||||
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/platform/x86/intel/int3472/discrete.c | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
|
||||
index 07b302e09340..1d3097bc7e48 100644
|
||||
--- a/drivers/platform/x86/intel/int3472/discrete.c
|
||||
+++ b/drivers/platform/x86/intel/int3472/discrete.c
|
||||
@@ -83,12 +83,26 @@ static int skl_int3472_map_gpio_to_sensor(struct int3472_discrete_device *int347
|
||||
const char *func, u32 polarity)
|
||||
{
|
||||
int ret;
|
||||
+ const struct acpi_device_id ov7251_ids[] = {
|
||||
+ { "INT347E" },
|
||||
+ };
|
||||
|
||||
if (int3472->n_sensor_gpios >= INT3472_MAX_SENSOR_GPIOS) {
|
||||
dev_warn(int3472->dev, "Too many GPIOs mapped\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * In addition to the function remap table we need to bulk remap the
|
||||
+ * "reset" GPIO for the OmniVision 7251 sensor, as the driver for that
|
||||
+ * expects its only GPIO pin to be called "enable" (and to have the
|
||||
+ * opposite polarity).
|
||||
+ */
|
||||
+ if (!strcmp(func, "reset") && !acpi_match_device_ids(int3472->sensor, ov7251_ids)) {
|
||||
+ func = "enable";
|
||||
+ polarity = GPIO_ACTIVE_HIGH;
|
||||
+ }
|
||||
+
|
||||
ret = skl_int3472_fill_gpiod_lookup(&int3472->gpios.table[int3472->n_sensor_gpios],
|
||||
agpio, func, polarity);
|
||||
if (ret)
|
||||
--
|
||||
2.44.0
|
||||
|
||||
From 216df183e0ad29051b42fcb856d0818a6094f16d Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
Date: Tue, 21 Mar 2023 13:45:26 +0000
|
||||
Subject: [PATCH] media: i2c: Clarify that gain is Analogue gain in OV7251
|
||||
|
||||
Update the control ID for the gain control in the ov7251 driver to
|
||||
V4L2_CID_ANALOGUE_GAIN.
|
||||
|
||||
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/media/i2c/ov7251.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/i2c/ov7251.c b/drivers/media/i2c/ov7251.c
|
||||
index 30f61e04ecaf..9c1292ca8552 100644
|
||||
--- a/drivers/media/i2c/ov7251.c
|
||||
+++ b/drivers/media/i2c/ov7251.c
|
||||
@@ -1051,7 +1051,7 @@ static int ov7251_s_ctrl(struct v4l2_ctrl *ctrl)
|
||||
case V4L2_CID_EXPOSURE:
|
||||
ret = ov7251_set_exposure(ov7251, ctrl->val);
|
||||
break;
|
||||
- case V4L2_CID_GAIN:
|
||||
+ case V4L2_CID_ANALOGUE_GAIN:
|
||||
ret = ov7251_set_gain(ov7251, ctrl->val);
|
||||
break;
|
||||
case V4L2_CID_TEST_PATTERN:
|
||||
@@ -1572,7 +1572,7 @@ static int ov7251_init_ctrls(struct ov7251 *ov7251)
|
||||
ov7251->exposure = v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops,
|
||||
V4L2_CID_EXPOSURE, 1, 32, 1, 32);
|
||||
ov7251->gain = v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops,
|
||||
- V4L2_CID_GAIN, 16, 1023, 1, 16);
|
||||
+ V4L2_CID_ANALOGUE_GAIN, 16, 1023, 1, 16);
|
||||
v4l2_ctrl_new_std_menu_items(&ov7251->ctrls, &ov7251_ctrl_ops,
|
||||
V4L2_CID_TEST_PATTERN,
|
||||
ARRAY_SIZE(ov7251_test_pattern_menu) - 1,
|
||||
--
|
||||
2.44.0
|
||||
|
||||
From 0573bb8c22ed0f0476a2ca6c5df2a7f09c6a1b66 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
Date: Wed, 22 Mar 2023 11:01:42 +0000
|
||||
Subject: [PATCH] media: v4l2-core: Acquire privacy led in
|
||||
v4l2_async_register_subdev()
|
||||
|
||||
The current call to v4l2_subdev_get_privacy_led() is contained in
|
||||
v4l2_async_register_subdev_sensor(), but that function isn't used by
|
||||
all the sensor drivers. Move the acquisition of the privacy led to
|
||||
v4l2_async_register_subdev() instead.
|
||||
|
||||
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/media/v4l2-core/v4l2-async.c | 4 ++++
|
||||
drivers/media/v4l2-core/v4l2-fwnode.c | 4 ----
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
|
||||
index 3ec323bd528b..b55570a0142c 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-async.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-async.c
|
||||
@@ -796,6 +796,10 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd)
|
||||
|
||||
INIT_LIST_HEAD(&sd->asc_list);
|
||||
|
||||
+ ret = v4l2_subdev_get_privacy_led(sd);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
/*
|
||||
* No reference taken. The reference is held by the device (struct
|
||||
* v4l2_subdev.dev), and async sub-device does not exist independently
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c
|
||||
index 89c7192148df..44eca113e772 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-fwnode.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-fwnode.c
|
||||
@@ -1219,10 +1219,6 @@ int v4l2_async_register_subdev_sensor(struct v4l2_subdev *sd)
|
||||
|
||||
v4l2_async_subdev_nf_init(notifier, sd);
|
||||
|
||||
- ret = v4l2_subdev_get_privacy_led(sd);
|
||||
- if (ret < 0)
|
||||
- goto out_cleanup;
|
||||
-
|
||||
ret = v4l2_async_nf_parse_fwnode_sensor(sd->dev, notifier);
|
||||
if (ret < 0)
|
||||
goto out_cleanup;
|
||||
--
|
||||
2.44.0
|
||||
|
||||
From 84d70102a7892f720a11a0b3d313f3932c859798 Mon Sep 17 00:00:00 2001
|
||||
From: Kate Hsuan <hpa@redhat.com>
|
||||
Date: Tue, 21 Mar 2023 23:37:16 +0800
|
||||
Subject: [PATCH] platform: x86: int3472: Add MFD cell for tps68470 LED
|
||||
|
||||
Add MFD cell for tps68470-led.
|
||||
|
||||
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
Signed-off-by: Kate Hsuan <hpa@redhat.com>
|
||||
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/platform/x86/intel/int3472/tps68470.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c
|
||||
index e3e1696e7f0e..423dc555093f 100644
|
||||
--- a/drivers/platform/x86/intel/int3472/tps68470.c
|
||||
+++ b/drivers/platform/x86/intel/int3472/tps68470.c
|
||||
@@ -17,7 +17,7 @@
|
||||
#define DESIGNED_FOR_CHROMEOS 1
|
||||
#define DESIGNED_FOR_WINDOWS 2
|
||||
|
||||
-#define TPS68470_WIN_MFD_CELL_COUNT 3
|
||||
+#define TPS68470_WIN_MFD_CELL_COUNT 4
|
||||
|
||||
static const struct mfd_cell tps68470_cros[] = {
|
||||
{ .name = "tps68470-gpio" },
|
||||
@@ -200,7 +200,8 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client)
|
||||
cells[1].name = "tps68470-regulator";
|
||||
cells[1].platform_data = (void *)board_data->tps68470_regulator_pdata;
|
||||
cells[1].pdata_size = sizeof(struct tps68470_regulator_platform_data);
|
||||
- cells[2].name = "tps68470-gpio";
|
||||
+ cells[2].name = "tps68470-led";
|
||||
+ cells[3].name = "tps68470-gpio";
|
||||
|
||||
for (i = 0; i < board_data->n_gpiod_lookups; i++)
|
||||
gpiod_add_lookup_table(board_data->tps68470_gpio_lookup_tables[i]);
|
||||
--
|
||||
2.44.0
|
||||
|
||||
From 183f7e4da9cacc2a0f9cb3549adad9a3c95f1b94 Mon Sep 17 00:00:00 2001
|
||||
From: Kate Hsuan <hpa@redhat.com>
|
||||
Date: Tue, 21 Mar 2023 23:37:17 +0800
|
||||
Subject: [PATCH] include: mfd: tps68470: Add masks for LEDA and LEDB
|
||||
|
||||
Add flags for both LEDA(TPS68470_ILEDCTL_ENA), LEDB
|
||||
(TPS68470_ILEDCTL_ENB), and current control mask for LEDB
|
||||
(TPS68470_ILEDCTL_CTRLB)
|
||||
|
||||
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
|
||||
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Kate Hsuan <hpa@redhat.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
include/linux/mfd/tps68470.h | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/include/linux/mfd/tps68470.h b/include/linux/mfd/tps68470.h
|
||||
index 7807fa329db0..2d2abb25b944 100644
|
||||
--- a/include/linux/mfd/tps68470.h
|
||||
+++ b/include/linux/mfd/tps68470.h
|
||||
@@ -34,6 +34,7 @@
|
||||
#define TPS68470_REG_SGPO 0x22
|
||||
#define TPS68470_REG_GPDI 0x26
|
||||
#define TPS68470_REG_GPDO 0x27
|
||||
+#define TPS68470_REG_ILEDCTL 0x28
|
||||
#define TPS68470_REG_VCMVAL 0x3C
|
||||
#define TPS68470_REG_VAUX1VAL 0x3D
|
||||
#define TPS68470_REG_VAUX2VAL 0x3E
|
||||
@@ -94,4 +95,8 @@
|
||||
#define TPS68470_GPIO_MODE_OUT_CMOS 2
|
||||
#define TPS68470_GPIO_MODE_OUT_ODRAIN 3
|
||||
|
||||
+#define TPS68470_ILEDCTL_ENA BIT(2)
|
||||
+#define TPS68470_ILEDCTL_ENB BIT(6)
|
||||
+#define TPS68470_ILEDCTL_CTRLB GENMASK(5, 4)
|
||||
+
|
||||
#endif /* __LINUX_MFD_TPS68470_H */
|
||||
--
|
||||
2.44.0
|
||||
|
||||
From 0f3811853f436eed853d7d226eb811f65137d03a Mon Sep 17 00:00:00 2001
|
||||
From: Kate Hsuan <hpa@redhat.com>
|
||||
Date: Tue, 21 Mar 2023 23:37:18 +0800
|
||||
Subject: [PATCH] leds: tps68470: Add LED control for tps68470
|
||||
|
||||
There are two LED controllers, LEDA indicator LED and LEDB flash LED for
|
||||
tps68470. LEDA can be enabled by setting TPS68470_ILEDCTL_ENA. Moreover,
|
||||
tps68470 provides four levels of power status for LEDB. If the
|
||||
properties called "ti,ledb-current" can be found, the current will be
|
||||
set according to the property values. These two LEDs can be controlled
|
||||
through the LED class of sysfs (tps68470-leda and tps68470-ledb).
|
||||
|
||||
Signed-off-by: Kate Hsuan <hpa@redhat.com>
|
||||
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/leds/Kconfig | 12 +++
|
||||
drivers/leds/Makefile | 1 +
|
||||
drivers/leds/leds-tps68470.c | 185 +++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 198 insertions(+)
|
||||
create mode 100644 drivers/leds/leds-tps68470.c
|
||||
|
||||
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
|
||||
index d721b254e1e4..1717f94d1491 100644
|
||||
--- a/drivers/leds/Kconfig
|
||||
+++ b/drivers/leds/Kconfig
|
||||
@@ -899,6 +899,18 @@ config LEDS_TPS6105X
|
||||
It is a single boost converter primarily for white LEDs and
|
||||
audio amplifiers.
|
||||
|
||||
+config LEDS_TPS68470
|
||||
+ tristate "LED support for TI TPS68470"
|
||||
+ depends on LEDS_CLASS
|
||||
+ depends on INTEL_SKL_INT3472
|
||||
+ help
|
||||
+ This driver supports TPS68470 PMIC with LED chip.
|
||||
+ It provides two LED controllers, with the ability to drive 2
|
||||
+ indicator LEDs and 2 flash LEDs.
|
||||
+
|
||||
+ To compile this driver as a module, choose M and it will be
|
||||
+ called leds-tps68470
|
||||
+
|
||||
config LEDS_IP30
|
||||
tristate "LED support for SGI Octane machines"
|
||||
depends on LEDS_CLASS
|
||||
diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
|
||||
index ce07dc295ff0..0ebf6a9f9f7f 100644
|
||||
--- a/drivers/leds/Makefile
|
||||
+++ b/drivers/leds/Makefile
|
||||
@@ -86,6 +86,7 @@ obj-$(CONFIG_LEDS_TCA6507) += leds-tca6507.o
|
||||
obj-$(CONFIG_LEDS_TI_LMU_COMMON) += leds-ti-lmu-common.o
|
||||
obj-$(CONFIG_LEDS_TLC591XX) += leds-tlc591xx.o
|
||||
obj-$(CONFIG_LEDS_TPS6105X) += leds-tps6105x.o
|
||||
+obj-$(CONFIG_LEDS_TPS68470) += leds-tps68470.o
|
||||
obj-$(CONFIG_LEDS_TURRIS_OMNIA) += leds-turris-omnia.o
|
||||
obj-$(CONFIG_LEDS_WM831X_STATUS) += leds-wm831x-status.o
|
||||
obj-$(CONFIG_LEDS_WM8350) += leds-wm8350.o
|
||||
diff --git a/drivers/leds/leds-tps68470.c b/drivers/leds/leds-tps68470.c
|
||||
new file mode 100644
|
||||
index 000000000000..35aeb5db89c8
|
||||
--- /dev/null
|
||||
+++ b/drivers/leds/leds-tps68470.c
|
||||
@@ -0,0 +1,185 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * LED driver for TPS68470 PMIC
|
||||
+ *
|
||||
+ * Copyright (C) 2023 Red Hat
|
||||
+ *
|
||||
+ * Authors:
|
||||
+ * Kate Hsuan <hpa@redhat.com>
|
||||
+ */
|
||||
+
|
||||
+#include <linux/leds.h>
|
||||
+#include <linux/mfd/tps68470.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/property.h>
|
||||
+#include <linux/regmap.h>
|
||||
+
|
||||
+
|
||||
+#define lcdev_to_led(led_cdev) \
|
||||
+ container_of(led_cdev, struct tps68470_led, lcdev)
|
||||
+
|
||||
+#define led_to_tps68470(led, index) \
|
||||
+ container_of(led, struct tps68470_device, leds[index])
|
||||
+
|
||||
+enum tps68470_led_ids {
|
||||
+ TPS68470_ILED_A,
|
||||
+ TPS68470_ILED_B,
|
||||
+ TPS68470_NUM_LEDS
|
||||
+};
|
||||
+
|
||||
+static const char *tps68470_led_names[] = {
|
||||
+ [TPS68470_ILED_A] = "tps68470-iled_a",
|
||||
+ [TPS68470_ILED_B] = "tps68470-iled_b",
|
||||
+};
|
||||
+
|
||||
+struct tps68470_led {
|
||||
+ unsigned int led_id;
|
||||
+ struct led_classdev lcdev;
|
||||
+};
|
||||
+
|
||||
+struct tps68470_device {
|
||||
+ struct device *dev;
|
||||
+ struct regmap *regmap;
|
||||
+ struct tps68470_led leds[TPS68470_NUM_LEDS];
|
||||
+};
|
||||
+
|
||||
+enum ctrlb_current {
|
||||
+ CTRLB_2MA = 0,
|
||||
+ CTRLB_4MA = 1,
|
||||
+ CTRLB_8MA = 2,
|
||||
+ CTRLB_16MA = 3,
|
||||
+};
|
||||
+
|
||||
+static int tps68470_brightness_set(struct led_classdev *led_cdev, enum led_brightness brightness)
|
||||
+{
|
||||
+ struct tps68470_led *led = lcdev_to_led(led_cdev);
|
||||
+ struct tps68470_device *tps68470 = led_to_tps68470(led, led->led_id);
|
||||
+ struct regmap *regmap = tps68470->regmap;
|
||||
+
|
||||
+ switch (led->led_id) {
|
||||
+ case TPS68470_ILED_A:
|
||||
+ return regmap_update_bits(regmap, TPS68470_REG_ILEDCTL, TPS68470_ILEDCTL_ENA,
|
||||
+ brightness ? TPS68470_ILEDCTL_ENA : 0);
|
||||
+ case TPS68470_ILED_B:
|
||||
+ return regmap_update_bits(regmap, TPS68470_REG_ILEDCTL, TPS68470_ILEDCTL_ENB,
|
||||
+ brightness ? TPS68470_ILEDCTL_ENB : 0);
|
||||
+ }
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
+
|
||||
+static enum led_brightness tps68470_brightness_get(struct led_classdev *led_cdev)
|
||||
+{
|
||||
+ struct tps68470_led *led = lcdev_to_led(led_cdev);
|
||||
+ struct tps68470_device *tps68470 = led_to_tps68470(led, led->led_id);
|
||||
+ struct regmap *regmap = tps68470->regmap;
|
||||
+ int ret = 0;
|
||||
+ int value = 0;
|
||||
+
|
||||
+ ret = regmap_read(regmap, TPS68470_REG_ILEDCTL, &value);
|
||||
+ if (ret)
|
||||
+ return dev_err_probe(led_cdev->dev, -EINVAL, "failed on reading register\n");
|
||||
+
|
||||
+ switch (led->led_id) {
|
||||
+ case TPS68470_ILED_A:
|
||||
+ value = value & TPS68470_ILEDCTL_ENA;
|
||||
+ break;
|
||||
+ case TPS68470_ILED_B:
|
||||
+ value = value & TPS68470_ILEDCTL_ENB;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return value ? LED_ON : LED_OFF;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int tps68470_ledb_current_init(struct platform_device *pdev,
|
||||
+ struct tps68470_device *tps68470)
|
||||
+{
|
||||
+ int ret = 0;
|
||||
+ unsigned int curr;
|
||||
+
|
||||
+ /* configure LEDB current if the properties can be got */
|
||||
+ if (!device_property_read_u32(&pdev->dev, "ti,ledb-current", &curr)) {
|
||||
+ if (curr > CTRLB_16MA) {
|
||||
+ dev_err(&pdev->dev,
|
||||
+ "Invalid LEDB current value: %d\n",
|
||||
+ curr);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ ret = regmap_update_bits(tps68470->regmap, TPS68470_REG_ILEDCTL,
|
||||
+ TPS68470_ILEDCTL_CTRLB, curr);
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int tps68470_leds_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ int i = 0;
|
||||
+ int ret = 0;
|
||||
+ struct tps68470_device *tps68470;
|
||||
+ struct tps68470_led *led;
|
||||
+ struct led_classdev *lcdev;
|
||||
+
|
||||
+ tps68470 = devm_kzalloc(&pdev->dev, sizeof(struct tps68470_device),
|
||||
+ GFP_KERNEL);
|
||||
+ if (!tps68470)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ tps68470->dev = &pdev->dev;
|
||||
+ tps68470->regmap = dev_get_drvdata(pdev->dev.parent);
|
||||
+
|
||||
+ for (i = 0; i < TPS68470_NUM_LEDS; i++) {
|
||||
+ led = &tps68470->leds[i];
|
||||
+ lcdev = &led->lcdev;
|
||||
+
|
||||
+ led->led_id = i;
|
||||
+
|
||||
+ lcdev->name = devm_kasprintf(tps68470->dev, GFP_KERNEL, "%s::%s",
|
||||
+ tps68470_led_names[i], LED_FUNCTION_INDICATOR);
|
||||
+ if (!lcdev->name)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ lcdev->max_brightness = 1;
|
||||
+ lcdev->brightness = 0;
|
||||
+ lcdev->brightness_set_blocking = tps68470_brightness_set;
|
||||
+ lcdev->brightness_get = tps68470_brightness_get;
|
||||
+ lcdev->dev = &pdev->dev;
|
||||
+
|
||||
+ ret = devm_led_classdev_register(tps68470->dev, lcdev);
|
||||
+ if (ret) {
|
||||
+ dev_err_probe(tps68470->dev, ret,
|
||||
+ "error registering led\n");
|
||||
+ goto err_exit;
|
||||
+ }
|
||||
+
|
||||
+ if (i == TPS68470_ILED_B) {
|
||||
+ ret = tps68470_ledb_current_init(pdev, tps68470);
|
||||
+ if (ret)
|
||||
+ goto err_exit;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+err_exit:
|
||||
+ if (ret) {
|
||||
+ for (i = 0; i < TPS68470_NUM_LEDS; i++) {
|
||||
+ if (tps68470->leds[i].lcdev.name)
|
||||
+ devm_led_classdev_unregister(&pdev->dev,
|
||||
+ &tps68470->leds[i].lcdev);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+static struct platform_driver tps68470_led_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "tps68470-led",
|
||||
+ },
|
||||
+ .probe = tps68470_leds_probe,
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(tps68470_led_driver);
|
||||
+
|
||||
+MODULE_ALIAS("platform:tps68470-led");
|
||||
+MODULE_DESCRIPTION("LED driver for TPS68470 PMIC");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
--
|
||||
2.44.0
|
||||
|
||||
From 87ebc160cb35a068acfaf59847c84656cb52b1b7 Mon Sep 17 00:00:00 2001
|
||||
From: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
Date: Thu, 25 May 2023 14:12:04 +0300
|
||||
Subject: [PATCH] media: ipu3-cio2: Further clean up async subdev link creation
|
||||
|
||||
Use v4l2_create_fwnode_links_to_pad() to create links from async
|
||||
sub-devices to the CSI-2 receiver subdevs.
|
||||
|
||||
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
|
||||
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/media/pci/intel/ipu3/ipu3-cio2.c | 22 +++++-----------------
|
||||
1 file changed, 5 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
|
||||
index ed08bf4178f0..83e29c56fe33 100644
|
||||
--- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c
|
||||
+++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <media/v4l2-device.h>
|
||||
#include <media/v4l2-event.h>
|
||||
#include <media/v4l2-fwnode.h>
|
||||
+#include <media/v4l2-mc.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/videobuf2-dma-sg.h>
|
||||
|
||||
@@ -1407,7 +1408,6 @@ static void cio2_notifier_unbind(struct v4l2_async_notifier *notifier,
|
||||
static int cio2_notifier_complete(struct v4l2_async_notifier *notifier)
|
||||
{
|
||||
struct cio2_device *cio2 = to_cio2_device(notifier);
|
||||
- struct device *dev = &cio2->pci_dev->dev;
|
||||
struct sensor_async_subdev *s_asd;
|
||||
struct v4l2_async_connection *asd;
|
||||
struct cio2_queue *q;
|
||||
@@ -1417,23 +1417,10 @@ static int cio2_notifier_complete(struct v4l2_async_notifier *notifier)
|
||||
s_asd = to_sensor_asd(asd);
|
||||
q = &cio2->queue[s_asd->csi2.port];
|
||||
|
||||
- ret = media_entity_get_fwnode_pad(&q->sensor->entity,
|
||||
- s_asd->asd.match.fwnode,
|
||||
- MEDIA_PAD_FL_SOURCE);
|
||||
- if (ret < 0) {
|
||||
- dev_err(dev, "no pad for endpoint %pfw (%d)\n",
|
||||
- s_asd->asd.match.fwnode, ret);
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- ret = media_create_pad_link(&q->sensor->entity, ret,
|
||||
- &q->subdev.entity, CIO2_PAD_SINK,
|
||||
- 0);
|
||||
- if (ret) {
|
||||
- dev_err(dev, "failed to create link for %s (endpoint %pfw, error %d)\n",
|
||||
- q->sensor->name, s_asd->asd.match.fwnode, ret);
|
||||
+ ret = v4l2_create_fwnode_links_to_pad(asd->sd,
|
||||
+ &q->subdev_pads[CIO2_PAD_SINK], 0);
|
||||
+ if (ret)
|
||||
return ret;
|
||||
- }
|
||||
}
|
||||
|
||||
return v4l2_device_register_subdev_nodes(&cio2->v4l2_dev);
|
||||
@@ -1572,6 +1559,7 @@ static int cio2_queue_init(struct cio2_device *cio2, struct cio2_queue *q)
|
||||
v4l2_subdev_init(subdev, &cio2_subdev_ops);
|
||||
subdev->flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
|
||||
subdev->owner = THIS_MODULE;
|
||||
+ subdev->dev = dev;
|
||||
snprintf(subdev->name, sizeof(subdev->name),
|
||||
CIO2_ENTITY_NAME " %td", q - cio2->queue);
|
||||
subdev->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
|
||||
--
|
||||
2.44.0
|
||||
|
||||
From c5d6c95fd5cefbd4ba9779fc965bce0a36bdbe5e Mon Sep 17 00:00:00 2001
|
||||
From: mojyack <mojyack@gmail.com>
|
||||
Date: Sat, 3 Feb 2024 12:59:53 +0900
|
||||
Subject: [PATCH] media: staging: ipu3-imgu: Fix multiple calls of s_stream on
|
||||
stream stop
|
||||
|
||||
Adapt to 009905e "media: v4l2-subdev: Document and enforce .s_stream() requirements"
|
||||
|
||||
Patchset: cameras
|
||||
---
|
||||
drivers/staging/media/ipu3/ipu3-v4l2.c | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c
|
||||
index 3df58eb3e882..81aff2d5d898 100644
|
||||
--- a/drivers/staging/media/ipu3/ipu3-v4l2.c
|
||||
+++ b/drivers/staging/media/ipu3/ipu3-v4l2.c
|
||||
@@ -538,18 +538,18 @@ static void imgu_vb2_stop_streaming(struct vb2_queue *vq)
|
||||
|
||||
WARN_ON(!node->enabled);
|
||||
|
||||
- pipe = node->pipe;
|
||||
- dev_dbg(dev, "Try to stream off node [%u][%u]", pipe, node->id);
|
||||
- imgu_pipe = &imgu->imgu_pipe[pipe];
|
||||
- r = v4l2_subdev_call(&imgu_pipe->imgu_sd.subdev, video, s_stream, 0);
|
||||
- if (r)
|
||||
- dev_err(&imgu->pci_dev->dev,
|
||||
- "failed to stop subdev streaming\n");
|
||||
-
|
||||
mutex_lock(&imgu->streaming_lock);
|
||||
/* Was this the first node with streaming disabled? */
|
||||
if (imgu->streaming && imgu_all_nodes_streaming(imgu, node)) {
|
||||
/* Yes, really stop streaming now */
|
||||
+ pipe = node->pipe;
|
||||
+ dev_dbg(dev, "Try to stream off node [%u][%u]", pipe, node->id);
|
||||
+ imgu_pipe = &imgu->imgu_pipe[pipe];
|
||||
+ r = v4l2_subdev_call(&imgu_pipe->imgu_sd.subdev, video, s_stream, 0);
|
||||
+ if (r)
|
||||
+ dev_err(&imgu->pci_dev->dev,
|
||||
+ "failed to stop subdev streaming\n");
|
||||
+
|
||||
dev_dbg(dev, "IMGU streaming is ready to stop");
|
||||
r = imgu_s_stream(imgu, false);
|
||||
if (!r)
|
||||
--
|
||||
2.44.0
|
||||
|
||||
From 65421dfc17e3559d45345ea2aa48b44268653496 Mon Sep 17 00:00:00 2001
|
||||
From: mojyack <mojyack@gmail.com>
|
||||
Date: Tue, 26 Mar 2024 05:55:44 +0900
|
||||
Subject: [PATCH] media: i2c: dw9719: fix probe error on surface go 2
|
||||
|
||||
On surface go 2, sometimes probing dw9719 fails with "dw9719: probe of i2c-INT347A:00-VCM failed with error -121".
|
||||
The -121(-EREMOTEIO) is came from drivers/i2c/busses/i2c-designware-common.c:575, and indicates the initialize occurs too early.
|
||||
So just add some delay.
|
||||
There is no exact reason for this 10000us, but 100us failed.
|
||||
---
|
||||
drivers/media/i2c/dw9719.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/i2c/dw9719.c b/drivers/media/i2c/dw9719.c
|
||||
index c626ed845928..0094cfda57ea 100644
|
||||
--- a/drivers/media/i2c/dw9719.c
|
||||
+++ b/drivers/media/i2c/dw9719.c
|
||||
@@ -82,6 +82,9 @@ static int dw9719_power_up(struct dw9719_device *dw9719)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ /* Wait for device to be acknowledged */
|
||||
+ fsleep(10000);
|
||||
+
|
||||
/* Jiggle SCL pin to wake up device */
|
||||
cci_write(dw9719->regmap, DW9719_CONTROL, 1, &ret);
|
||||
|
||||
--
|
||||
2.44.0
|
||||
|
|
@ -1 +1 @@
|
|||
../../../patches/6.8/0001-surface3-oemb.patch
|
||||
../../../patches/6.5/0001-surface3-oemb.patch
|
|
@ -1 +1 @@
|
|||
../../../patches/6.8/0002-mwifiex.patch
|
||||
../../../patches/6.5/0002-mwifiex.patch
|
|
@ -1 +1 @@
|
|||
../../../patches/6.8/0003-ath10k.patch
|
||||
../../../patches/6.5/0003-ath10k.patch
|
|
@ -1 +1 @@
|
|||
../../../patches/6.8/0004-ipts.patch
|
||||
../../../patches/6.5/0004-ipts.patch
|
|
@ -1 +1 @@
|
|||
../../../patches/6.8/0005-ithc.patch
|
||||
../../../patches/6.5/0005-ithc.patch
|
|
@ -1 +1 @@
|
|||
../../../patches/6.8/0006-surface-sam.patch
|
||||
../../../patches/6.5/0006-surface-sam.patch
|
|
@ -1 +1 @@
|
|||
../../../patches/6.8/0007-surface-sam-over-hid.patch
|
||||
../../../patches/6.5/0007-surface-sam-over-hid.patch
|
|
@ -1 +1 @@
|
|||
../../../patches/6.8/0008-surface-button.patch
|
||||
../../../patches/6.5/0008-surface-button.patch
|
|
@ -1 +1 @@
|
|||
../../../patches/6.8/0009-surface-typecover.patch
|
||||
../../../patches/6.5/0009-surface-typecover.patch
|
|
@ -1 +1 @@
|
|||
../../../patches/6.8/0010-surface-shutdown.patch
|
||||
../../../patches/6.5/0010-surface-shutdown.patch
|
|
@ -1 +1 @@
|
|||
../../../patches/6.8/0011-surface-gpe.patch
|
||||
../../../patches/6.5/0011-surface-gpe.patch
|
|
@ -1 +1 @@
|
|||
../../../patches/6.8/0012-cameras.patch
|
||||
../../../patches/6.5/0012-cameras.patch
|
|
@ -1 +1 @@
|
|||
../../../patches/6.8/0013-amd-gpio.patch
|
||||
../../../patches/6.5/0013-amd-gpio.patch
|
|
@ -1 +1 @@
|
|||
../../../patches/6.8/0014-rtc.patch
|
||||
../../../patches/6.5/0014-rtc.patch
|
|
@ -3,7 +3,7 @@
|
|||
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
|
||||
|
||||
pkgbase=linux-surface
|
||||
pkgver=6.8.6.arch1
|
||||
pkgver=6.5.9.arch2
|
||||
pkgrel=1
|
||||
pkgdesc='Linux'
|
||||
_shortver=${pkgver%.*}
|
||||
|
@ -56,24 +56,24 @@ validpgpkeys=(
|
|||
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
|
||||
'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig)
|
||||
)
|
||||
sha256sums=('2a56b8533af53cf5d3be8882a4a2da34a8d5a2d26569b098102aa072960c32e0'
|
||||
'9a21f27cdfdb1d7b27af526b2c85632eca890e5264cd44dcb0882e9953794a2a'
|
||||
'985cd5e0b11538f31887e451c398d226c06ca4b34c5466e93a21ebd65b7b3919'
|
||||
sha256sums=('SKIP'
|
||||
'e8d4bbd63808eeec78680c7de4383333b76ab9d58214042bd4b01d784bbc8ec8'
|
||||
'c2a412b0203b31bb3c6b64d3c00d7669d3e58c723f542ecdda940016599d342a'
|
||||
'3cabe391cc39dbee88a79f76e9e7a68f7fbcd5518941aa2ab73a77692c87dead'
|
||||
'ee9857e96ee5d871aa557f6d6d142474c26187faa2c21b351bafde065b288fe0'
|
||||
'12f914866916181f232b4f159a270bce1fc8bd8e93c4f86ae7b18f8d6a777573'
|
||||
'1984f355569702ff87cfab75682ceb89bfe40ad22c5c4dd8653abe623e000dfb'
|
||||
'be01d5c3e851830be8ef55c794e8480e5cf19ff6b66266db32d352c2c60eebe4'
|
||||
'0b27a1ea32c6cdbb3ab89866724b0b193998d7ee0525d736242411c2ec3d4bd5'
|
||||
'ca4c0bc2b26e3e07c29537cbecc8bade50212d5a0277ae1a834b7c33c36f7c8a'
|
||||
'9dd041d482eb7f0479487c5fe127f4fd6bec1209d9cd7d77a73f87b205035238'
|
||||
'bd32fc7cc18345f027a4fe2af2b249d27470f7b120b1e521dd26008cc34e1e8d'
|
||||
'02d720e3fffae018fc8719a98135e63c84e8b7f39769bcdee45ddf973a567732'
|
||||
'6225348b31112a67f5e37a9075363b36c103ba6144083cf4e2d7d83edc77513c'
|
||||
'ea0016af33f682a0353738b00c39407b7e1a96a9ccfb04b3904b58143c1953ee'
|
||||
'f59a6c1a59699664eeeb5243cb961845944cbc6d1c63353ad9d2ff7d8b593ec3'
|
||||
'1e620fa5bb90d7a8d4a57d0dc1552b096762a4da4cf1a5ce461d54c3c9b9885f'
|
||||
'7693cf1df35a47ec8702543d9665f9010a5c7db18a39d9506649e892fd36954f')
|
||||
'712f4a23ef8cb32a5951f13567812183664ba4b64d3ed35e9c9ba5473f71175f'
|
||||
'54d81f23d3beb37bb2ddf829652aac3fa68a6ce3b9b2e798c75fee74d9ef545f'
|
||||
'452a10f9b52a4919a8a58b90101ad27b4da9a3802af69d5f4d3d0c96973f381f'
|
||||
'f251c8c93bb4e731b1184b4afa967cce0ad41a1a0e5f1baa733387c2b414b388'
|
||||
'75adbdce7cd3735a90ddc24c0a27885e2e1134d6621c257429dac1b25cb719b9'
|
||||
'f86153231d0a25dfe9a6421211ce0484e3a7a8b1381fe0d7c539c5f2ea934a80'
|
||||
'9fece85510effaefef6eb95de4f7c68df2f4f2676a7bfa9d3d8e7ecef2b2eec6'
|
||||
'9a3fd79c85f1b8652332c1bb98ee2a4f6ebfff4c67eefc13a26211754788779c'
|
||||
'98d56a0e98eedfcc0bf123c2395db013d6afad50f5ce19d0d3be23148a44cc6c'
|
||||
'7f563dfe82d7f156ba46a8b2c52635153c30c6068fa1826ed90ba41f75ca7b83'
|
||||
'd419c28113eaa23f367869ddde588be2903df869f88e0d94e1fa7b746ec9eceb'
|
||||
'ea2c8477ede5e0298697d54a50da73652be824d38f5247bb5f837e7418de4318'
|
||||
'5636d7362364fb8924de53bc693f50076daf9b000cce56c7089b882c3bb4c6df'
|
||||
'e60c579691a7f70840911faa0a1ee006ed0909cc3b4f82d39db5c940bb7daaab')
|
||||
|
||||
|
||||
export KBUILD_BUILD_HOST=archlinux
|
||||
|
@ -171,7 +171,7 @@ _package() {
|
|||
DEPMOD=/doesnt/exist modules_install # Suppress depmod
|
||||
|
||||
# remove build and source links
|
||||
rm "$modulesdir"/build
|
||||
rm "$modulesdir"/{source,build}
|
||||
}
|
||||
|
||||
_package-headers() {
|
||||
|
|
|
@ -24,20 +24,3 @@ CONFIG_ANDROID=y
|
|||
CONFIG_ANDROID_BINDER_IPC=y
|
||||
CONFIG_ANDROID_BINDERFS=y
|
||||
CONFIG_ANDROID_BINDER_DEVICES=""
|
||||
|
||||
##
|
||||
## Build-in basic pinctrl/serial modules to prevent race-conditions in drivers
|
||||
## relying on them (like soc-button-array, SAM)
|
||||
##
|
||||
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
CONFIG_MFD_INTEL_LPSS=y
|
||||
CONFIG_MFD_INTEL_LPSS_PCI=y
|
||||
|
||||
CONFIG_PINCTRL_INTEL=y
|
||||
CONFIG_PINCTRL_ALDERLAKE=y
|
||||
CONFIG_PINCTRL_CANNONLAKE=y
|
||||
CONFIG_PINCTRL_ICELAKE=y
|
||||
CONFIG_PINCTRL_METEORLAKE=y
|
||||
CONFIG_PINCTRL_SUNRISEPOINT=y
|
||||
CONFIG_PINCTRL_TIGERLAKE=y
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1 +1 @@
|
|||
../../../configs/surface-6.8.config
|
||||
../../../configs/surface-6.5.config
|
|
@ -0,0 +1,132 @@
|
|||
From be7a0019f698b236692d06f6beff99d44f3802b5 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Hutchings <ben@decadent.org.uk>
|
||||
Date: Mon, 7 Sep 2020 02:51:53 +0100
|
||||
Subject: [PATCH 1/2] Export symbols needed by Android drivers
|
||||
|
||||
We want to enable use of the Android ashmem and binder drivers to
|
||||
support Anbox, but they should not be built-in as that would waste
|
||||
resources and increase security attack surface on systems that don't
|
||||
need them.
|
||||
|
||||
Export the currently un-exported symbols they depend on.
|
||||
---
|
||||
fs/file.c | 1 +
|
||||
kernel/sched/core.c | 1 +
|
||||
kernel/sched/wait.c | 1 +
|
||||
kernel/task_work.c | 1 +
|
||||
mm/memory.c | 1 +
|
||||
mm/shmem.c | 1 +
|
||||
security/security.c | 4 ++++
|
||||
7 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/fs/file.c b/fs/file.c
|
||||
index 7893ea161d77..066f90a4f572 100644
|
||||
--- a/fs/file.c
|
||||
+++ b/fs/file.c
|
||||
@@ -814,6 +814,7 @@ struct file *close_fd_get_file(unsigned int fd)
|
||||
|
||||
return file;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(close_fd_get_file);
|
||||
|
||||
void do_close_on_exec(struct files_struct *files)
|
||||
{
|
||||
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
|
||||
index a68d1276bab0..5e5adf3f4f49 100644
|
||||
--- a/kernel/sched/core.c
|
||||
+++ b/kernel/sched/core.c
|
||||
@@ -7227,6 +7227,7 @@ static bool is_nice_reduction(const struct task_struct *p, const int nice)
|
||||
|
||||
return (nice_rlim <= task_rlimit(p, RLIMIT_NICE));
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(can_nice);
|
||||
|
||||
/*
|
||||
* can_nice - check if a task can reduce its nice value
|
||||
diff --git a/kernel/sched/wait.c b/kernel/sched/wait.c
|
||||
index 133b74730738..a2a3381ede73 100644
|
||||
--- a/kernel/sched/wait.c
|
||||
+++ b/kernel/sched/wait.c
|
||||
@@ -247,6 +247,7 @@ void __wake_up_pollfree(struct wait_queue_head *wq_head)
|
||||
/* POLLFREE must have cleared the queue. */
|
||||
WARN_ON_ONCE(waitqueue_active(wq_head));
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(__wake_up_pollfree);
|
||||
|
||||
/*
|
||||
* Note: we use "set_current_state()" _after_ the wait-queue add,
|
||||
diff --git a/kernel/task_work.c b/kernel/task_work.c
|
||||
index 065e1ef8fc8d..7d06ea82a53e 100644
|
||||
--- a/kernel/task_work.c
|
||||
+++ b/kernel/task_work.c
|
||||
@@ -73,6 +73,7 @@ int task_work_add(struct task_struct *task, struct callback_head *work,
|
||||
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(task_work_add);
|
||||
|
||||
/**
|
||||
* task_work_cancel_match - cancel a pending work added by task_work_add()
|
||||
diff --git a/mm/memory.c b/mm/memory.c
|
||||
index 5ce82a76201d..c20d92584f25 100644
|
||||
--- a/mm/memory.c
|
||||
+++ b/mm/memory.c
|
||||
@@ -1755,6 +1755,7 @@ void zap_page_range_single(struct vm_area_struct *vma, unsigned long address,
|
||||
mmu_notifier_invalidate_range_end(&range);
|
||||
tlb_finish_mmu(&tlb);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(zap_page_range_single);
|
||||
|
||||
/**
|
||||
* zap_vma_ptes - remove ptes mapping the vma
|
||||
diff --git a/mm/shmem.c b/mm/shmem.c
|
||||
index e40a08c5c6d7..3082bd4dfd52 100644
|
||||
--- a/mm/shmem.c
|
||||
+++ b/mm/shmem.c
|
||||
@@ -4351,6 +4351,7 @@ int shmem_zero_setup(struct vm_area_struct *vma)
|
||||
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(shmem_zero_setup);
|
||||
|
||||
/**
|
||||
* shmem_read_folio_gfp - read into page cache, using specified page allocation flags.
|
||||
diff --git a/security/security.c b/security/security.c
|
||||
index d5ff7ff45b77..79cc02ff5971 100644
|
||||
--- a/security/security.c
|
||||
+++ b/security/security.c
|
||||
@@ -798,6 +798,7 @@ int security_binder_set_context_mgr(const struct cred *mgr)
|
||||
{
|
||||
return call_int_hook(binder_set_context_mgr, 0, mgr);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_binder_set_context_mgr);
|
||||
|
||||
/**
|
||||
* security_binder_transaction() - Check if a binder transaction is allowed
|
||||
@@ -813,6 +814,7 @@ int security_binder_transaction(const struct cred *from,
|
||||
{
|
||||
return call_int_hook(binder_transaction, 0, from, to);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_binder_transaction);
|
||||
|
||||
/**
|
||||
* security_binder_transfer_binder() - Check if a binder transfer is allowed
|
||||
@@ -828,6 +830,7 @@ int security_binder_transfer_binder(const struct cred *from,
|
||||
{
|
||||
return call_int_hook(binder_transfer_binder, 0, from, to);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_binder_transfer_binder);
|
||||
|
||||
/**
|
||||
* security_binder_transfer_file() - Check if a binder file xfer is allowed
|
||||
@@ -844,6 +847,7 @@ int security_binder_transfer_file(const struct cred *from,
|
||||
{
|
||||
return call_int_hook(binder_transfer_file, 0, from, to, file);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_binder_transfer_file);
|
||||
|
||||
/**
|
||||
* security_ptrace_access_check() - Check if tracing is allowed
|
||||
--
|
||||
2.41.0
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
From fbfaff58fe821fa93ceeb17e034886a6d8447207 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Mon, 20 Nov 2023 22:54:05 +0100
|
||||
Subject: [PATCH] Partially revert "integrity: Only use machine keyring when
|
||||
uefi_check_trust_mok_keys is true"
|
||||
|
||||
This partially reverts commit 3d6ae1a5d0c2019d274284859f556dcb64aa98a7.
|
||||
|
||||
MokListTrustedRT doesn't seem to be set by the Shim version used by
|
||||
Ubuntu and Debian. Therefore, these systems don't trust the MOK keys on
|
||||
newer kernels. While pre-5.19 kernels silently disregard the untrusted
|
||||
keys and (without signature enforcement enabled) still load external
|
||||
modules (tainting the kernel), on 5.19 kernels, this breaks module
|
||||
loading. Therefore, revert this change.
|
||||
---
|
||||
security/integrity/platform_certs/machine_keyring.c | 9 +--------
|
||||
1 file changed, 1 insertion(+), 8 deletions(-)
|
||||
|
||||
diff --git a/security/integrity/platform_certs/machine_keyring.c b/security/integrity/platform_certs/machine_keyring.c
|
||||
index a401640a63cd1..a1ad244cbf86d 100644
|
||||
--- a/security/integrity/platform_certs/machine_keyring.c
|
||||
+++ b/security/integrity/platform_certs/machine_keyring.c
|
||||
@@ -51,14 +51,7 @@ void __init add_to_machine_keyring(const char *source, const void *data, size_t
|
||||
*/
|
||||
static __init bool uefi_check_trust_mok_keys(void)
|
||||
{
|
||||
- struct efi_mokvar_table_entry *mokvar_entry;
|
||||
-
|
||||
- mokvar_entry = efi_mokvar_entry_find("MokListTrustedRT");
|
||||
-
|
||||
- if (mokvar_entry)
|
||||
- return true;
|
||||
-
|
||||
- return false;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
static bool __init trust_moklist(void)
|
||||
--
|
||||
2.42.1
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
From 9564bb04930ddcffa8b859ccf48ca40767ec8da4 Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Date: Fri, 26 Aug 2022 21:24:36 +0200
|
||||
Subject: [PATCH] Revert "integrity: Only use machine keyring when
|
||||
uefi_check_trust_mok_keys is true"
|
||||
|
||||
This reverts commit 3d6ae1a5d0c2019d274284859f556dcb64aa98a7.
|
||||
|
||||
MokListTrustedRT doesn't seem to be set by the Shim version used by
|
||||
Ubuntu and Debian. Therefore, these systems don't trust the MOK keys on
|
||||
newer kernels. While pre-5.19 kernels silently disregard the untrusted
|
||||
keys and (without signature enforcement enabled) still load external
|
||||
modules (tainting the kernel), on 5.19 kernels, this breaks module
|
||||
loading. Therefore, revert this change.
|
||||
|
||||
See https://github.com/linux-surface/linux-surface/issues/906.
|
||||
---
|
||||
security/integrity/digsig.c | 2 +-
|
||||
security/integrity/integrity.h | 5 -----
|
||||
.../integrity/platform_certs/keyring_handler.c | 2 +-
|
||||
.../integrity/platform_certs/machine_keyring.c | 16 ----------------
|
||||
4 files changed, 2 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c
|
||||
index 6f31ffe23c48..590cd07b804b 100644
|
||||
--- a/security/integrity/digsig.c
|
||||
+++ b/security/integrity/digsig.c
|
||||
@@ -113,7 +113,7 @@ static int __init __integrity_init_keyring(const unsigned int id,
|
||||
} else {
|
||||
if (id == INTEGRITY_KEYRING_PLATFORM)
|
||||
set_platform_trusted_keys(keyring[id]);
|
||||
- if (id == INTEGRITY_KEYRING_MACHINE && trust_moklist())
|
||||
+ if (id == INTEGRITY_KEYRING_MACHINE)
|
||||
set_machine_trusted_keys(keyring[id]);
|
||||
if (id == INTEGRITY_KEYRING_IMA)
|
||||
load_module_cert(keyring[id]);
|
||||
diff --git a/security/integrity/integrity.h b/security/integrity/integrity.h
|
||||
index 7167a6e99bdc..1dbb494c86c0 100644
|
||||
--- a/security/integrity/integrity.h
|
||||
+++ b/security/integrity/integrity.h
|
||||
@@ -320,14 +320,9 @@ static inline void __init add_to_platform_keyring(const char *source,
|
||||
|
||||
#ifdef CONFIG_INTEGRITY_MACHINE_KEYRING
|
||||
void __init add_to_machine_keyring(const char *source, const void *data, size_t len);
|
||||
-bool __init trust_moklist(void);
|
||||
#else
|
||||
static inline void __init add_to_machine_keyring(const char *source,
|
||||
const void *data, size_t len)
|
||||
{
|
||||
}
|
||||
-static inline bool __init trust_moklist(void)
|
||||
-{
|
||||
- return false;
|
||||
-}
|
||||
#endif
|
||||
diff --git a/security/integrity/platform_certs/keyring_handler.c b/security/integrity/platform_certs/keyring_handler.c
|
||||
index 8a1124e4d769..b22e0125a483 100644
|
||||
--- a/security/integrity/platform_certs/keyring_handler.c
|
||||
+++ b/security/integrity/platform_certs/keyring_handler.c
|
||||
@@ -61,7 +61,7 @@ __init efi_element_handler_t get_handler_for_db(const efi_guid_t *sig_type)
|
||||
__init efi_element_handler_t get_handler_for_mok(const efi_guid_t *sig_type)
|
||||
{
|
||||
if (efi_guidcmp(*sig_type, efi_cert_x509_guid) == 0) {
|
||||
- if (IS_ENABLED(CONFIG_INTEGRITY_MACHINE_KEYRING) && trust_moklist())
|
||||
+ if (IS_ENABLED(CONFIG_INTEGRITY_MACHINE_KEYRING))
|
||||
return add_to_machine_keyring;
|
||||
else
|
||||
return add_to_platform_keyring;
|
||||
diff --git a/security/integrity/platform_certs/machine_keyring.c b/security/integrity/platform_certs/machine_keyring.c
|
||||
index 7aaed7950b6e..09fd8f20c756 100644
|
||||
--- a/security/integrity/platform_certs/machine_keyring.c
|
||||
+++ b/security/integrity/platform_certs/machine_keyring.c
|
||||
@@ -8,8 +8,6 @@
|
||||
#include <linux/efi.h>
|
||||
#include "../integrity.h"
|
||||
|
||||
-static bool trust_mok;
|
||||
-
|
||||
static __init int machine_keyring_init(void)
|
||||
{
|
||||
int rc;
|
||||
@@ -61,17 +59,3 @@ static __init bool uefi_check_trust_mok_keys(void)
|
||||
|
||||
return false;
|
||||
}
|
||||
-
|
||||
-bool __init trust_moklist(void)
|
||||
-{
|
||||
- static bool initialized;
|
||||
-
|
||||
- if (!initialized) {
|
||||
- initialized = true;
|
||||
-
|
||||
- if (uefi_check_trust_mok_keys())
|
||||
- trust_mok = true;
|
||||
- }
|
||||
-
|
||||
- return trust_mok;
|
||||
-}
|
||||
--
|
||||
2.41.0
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
From 8459746f889d72794c164d18423344686267a451 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Lindgren <tony@atomide.com>
|
||||
Date: Thu, 5 Oct 2023 10:56:42 +0300
|
||||
Subject: [PATCH] serial: core: Fix checks for tx runtime PM state
|
||||
|
||||
commit 81a61051e0ce5fd7e09225c0d5985da08c7954a7 upstream.
|
||||
|
||||
Maximilian reported that surface_serial_hub serdev tx does not work during
|
||||
system suspend. During system suspend, runtime PM gets disabled in
|
||||
__device_suspend_late(), and tx is unable to wake-up the serial core port
|
||||
device that we use to check if tx is safe to start. Johan summarized the
|
||||
regression noting that serdev tx no longer always works as earlier when the
|
||||
serdev device is runtime PM active.
|
||||
|
||||
The serdev device and the serial core controller devices are siblings of
|
||||
the serial port hardware device. The runtime PM usage count from serdev
|
||||
device does not propagate to the serial core device siblings, it only
|
||||
propagates to the parent.
|
||||
|
||||
In addition to the tx issue for suspend, testing for the serial core port
|
||||
device can cause an unnecessary delay in enabling tx while waiting for the
|
||||
serial core port device to wake-up. The serial core port device wake-up is
|
||||
only needed to flush pending tx when the serial port hardware device was
|
||||
in runtime PM suspended state.
|
||||
|
||||
To fix the regression, we need to check the runtime PM state of the parent
|
||||
serial port hardware device for tx instead of the serial core port device.
|
||||
|
||||
As the serial port device drivers may or may not implement runtime PM, we
|
||||
need to also add a check for pm_runtime_enabled().
|
||||
|
||||
Reported-by: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Cc: stable <stable@kernel.org>
|
||||
Fixes: 84a9582fd203 ("serial: core: Start managing serial controllers to enable runtime PM")
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
Tested-by: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||
Link: https://lore.kernel.org/r/20231005075644.25936-1-tony@atomide.com
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/tty/serial/serial_core.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
|
||||
index bf63a045fdc8..83c419ac78bc 100644
|
||||
--- a/drivers/tty/serial/serial_core.c
|
||||
+++ b/drivers/tty/serial/serial_core.c
|
||||
@@ -157,7 +157,7 @@ static void __uart_start(struct tty_struct *tty)
|
||||
* enabled, serial_port_runtime_resume() calls start_tx() again
|
||||
* after enabling the device.
|
||||
*/
|
||||
- if (pm_runtime_active(&port_dev->dev))
|
||||
+ if (!pm_runtime_enabled(port->dev) || pm_runtime_active(port->dev))
|
||||
port->ops->start_tx(port);
|
||||
pm_runtime_mark_last_busy(&port_dev->dev);
|
||||
pm_runtime_put_autosuspend(&port_dev->dev);
|
||||
--
|
||||
2.42.0
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
From 9917ce49cb4e0d91977f11ce5b04b15856a0d82c Mon Sep 17 00:00:00 2001
|
||||
From: Ben Hutchings <ben@decadent.org.uk>
|
||||
Date: Fri, 22 Jun 2018 17:27:00 +0100
|
||||
Subject: [PATCH 2/2] android: Enable building ashmem and binder as modules
|
||||
|
||||
We want to enable use of the Android ashmem and binder drivers to
|
||||
support Anbox, but they should not be built-in as that would waste
|
||||
resources and increase security attack surface on systems that don't
|
||||
need them.
|
||||
|
||||
- Add a MODULE_LICENSE declaration to ashmem
|
||||
- Change the Makefiles to build each driver as an object with the
|
||||
"_linux" suffix (which is what Anbox expects)
|
||||
- Change config symbol types to tristate
|
||||
|
||||
Update:
|
||||
In upstream commit 721412ed3d titled "staging: remove ashmem" the ashmem
|
||||
driver was removed entirely. Secondary commit message:
|
||||
"The mainline replacement for ashmem is memfd, so remove the legacy
|
||||
code from drivers/staging/"
|
||||
Consequently, the ashmem part of this patch has been removed.
|
||||
---
|
||||
drivers/android/Kconfig | 2 +-
|
||||
drivers/android/Makefile | 7 ++++---
|
||||
drivers/android/binder_alloc.c | 2 +-
|
||||
3 files changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/android/Kconfig b/drivers/android/Kconfig
|
||||
index 07aa8ae0a058..94a3a86f9bd4 100644
|
||||
--- a/drivers/android/Kconfig
|
||||
+++ b/drivers/android/Kconfig
|
||||
@@ -2,7 +2,7 @@
|
||||
menu "Android"
|
||||
|
||||
config ANDROID_BINDER_IPC
|
||||
- bool "Android Binder IPC Driver"
|
||||
+ tristate "Android Binder IPC Driver"
|
||||
depends on MMU
|
||||
default n
|
||||
help
|
||||
diff --git a/drivers/android/Makefile b/drivers/android/Makefile
|
||||
index c9d3d0c99c25..55411d9a9c2a 100644
|
||||
--- a/drivers/android/Makefile
|
||||
+++ b/drivers/android/Makefile
|
||||
@@ -1,6 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
ccflags-y += -I$(src) # needed for trace events
|
||||
|
||||
-obj-$(CONFIG_ANDROID_BINDERFS) += binderfs.o
|
||||
-obj-$(CONFIG_ANDROID_BINDER_IPC) += binder.o binder_alloc.o
|
||||
-obj-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o
|
||||
+obj-$(CONFIG_ANDROID_BINDER_IPC) += binder_linux.o
|
||||
+binder_linux-y := binder.o binder_alloc.o
|
||||
+binder_linux-$(CONFIG_ANDROID_BINDERFS) += binderfs.o
|
||||
+binder_linux-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o
|
||||
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
|
||||
index 662a2a2e2e84..98fcbb0c8325 100644
|
||||
--- a/drivers/android/binder_alloc.c
|
||||
+++ b/drivers/android/binder_alloc.c
|
||||
@@ -38,7 +38,7 @@ enum {
|
||||
};
|
||||
static uint32_t binder_alloc_debug_mask = BINDER_DEBUG_USER_ERROR;
|
||||
|
||||
-module_param_named(debug_mask, binder_alloc_debug_mask,
|
||||
+module_param_named(alloc_debug_mask, binder_alloc_debug_mask,
|
||||
uint, 0644);
|
||||
|
||||
#define binder_alloc_debug(mask, x...) \
|
||||
--
|
||||
2.41.0
|
||||
|
|
@ -40,15 +40,14 @@ CONFIG_SYSTEM_TRUSTED_KEYS=""
|
|||
CONFIG_SYSTEM_REVOCATION_KEYS=""
|
||||
|
||||
##
|
||||
## Modules required for running Android apps
|
||||
##
|
||||
## Ubuntu builds binder as a module by patching the Makefile. To keep it
|
||||
## simple, we just put it into vmlinux. One patch less to keep track of.
|
||||
## Additional options from upstream (not in PPA)
|
||||
##
|
||||
|
||||
CONFIG_ANDROID_BINDER_IPC=y
|
||||
CONFIG_ANDROID_BINDERFS=y
|
||||
CONFIG_ANDROID_BINDER_DEVICES=""
|
||||
CONFIG_ASHMEM=m
|
||||
CONFIG_ANDROID=y
|
||||
CONFIG_ANDROID_BINDER_IPC=m
|
||||
# CONFIG_ANDROID_BINDERFS is not set
|
||||
CONFIG_ANDROID_BINDER_DEVICES="binder"
|
||||
# CONFIG_ANDROID_BINDER_IPC_SELFTEST is not set
|
||||
|
||||
##
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
KERNEL_VERSION="6.8.6"
|
||||
KERNEL_REVISION="1"
|
||||
KERNEL_VERSION="6.5.7"
|
||||
KERNEL_REVISION="2"
|
||||
KERNEL_LOCALVERSION="-surface"
|
||||
|
|
|
@ -158,7 +158,7 @@ for config in configs:
|
|||
f.write(line)
|
||||
|
||||
system("git add redhat/configs/custom-overrides/generic")
|
||||
system("git commit --allow-empty -m 'Merge %s config'" % args.package_name)
|
||||
system("git commit -m 'Merge %s config'" % args.package_name)
|
||||
|
||||
cmd = ["make"]
|
||||
|
||||
|
|
|
@ -18,13 +18,13 @@ PACKAGE_NAME = "surface"
|
|||
## Fedora tags: kernel-X.Y.Z
|
||||
## Upstream tags: vX.Y.Z
|
||||
##
|
||||
PACKAGE_TAG = "kernel-6.8.6-0"
|
||||
PACKAGE_TAG = "kernel-6.5.9-0"
|
||||
|
||||
##
|
||||
## The release number of the modified kernel package.
|
||||
## e.g. 300 for kernel-6.3.1-300.fc38.foo
|
||||
##
|
||||
PACKAGE_RELEASE = "1"
|
||||
PACKAGE_RELEASE = "2"
|
||||
|
||||
##
|
||||
## Build options for configuring which parts of the kernel package are enabled.
|
||||
|
|
|
@ -1,87 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
|
||||
def grub2_editenv(*args: Any, **kwargs: Any) -> str:
|
||||
subprocess.run(["grub2-editenv", *args], check=True, **kwargs)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
boot: Path = Path("/boot")
|
||||
mid: Path = Path("/etc/machine-id")
|
||||
|
||||
if not boot.exists():
|
||||
print("ERROR: /boot directory does not exist")
|
||||
return 1
|
||||
|
||||
if not mid.exists():
|
||||
print("ERROR: /etc/machine-id does not exist")
|
||||
return 1
|
||||
|
||||
blsdir: Path = boot / "loader" / "entries"
|
||||
|
||||
if not blsdir.exists():
|
||||
print("ERROR: /boot/loader/entries does not exist")
|
||||
return 1
|
||||
|
||||
try:
|
||||
grub2_editenv("--help", capture_output=True)
|
||||
except:
|
||||
print("ERROR: grub2-editenv is not working")
|
||||
return 1
|
||||
|
||||
# Get list of surface kernels sorted by timestamp.
|
||||
#
|
||||
# We use creation time here because it represents when the kernel was installed.
|
||||
# Modification time can be a bit wonky and seems to correspond to the build date.
|
||||
kernels: list[Path] = sorted(
|
||||
boot.glob("vmlinuz-*.surface.*"),
|
||||
key=lambda x: x.stat().st_ctime,
|
||||
reverse=True,
|
||||
)
|
||||
|
||||
if len(kernels) == 0:
|
||||
print("ERROR: Failed to find a surface kernel")
|
||||
return 1
|
||||
|
||||
# The saved_entry property from grubenv determines what kernel is booted by default.
|
||||
# Its value is the filename of the BLS entry in /boot/loader/entries minus the file extension.
|
||||
#
|
||||
# The BLS files are named using a combination of the machine ID and the version string
|
||||
# of the kernel that is being booted. Since we have the vmlinux, we can get the version
|
||||
# from its name, and the machine ID from /etc/machine-id.
|
||||
#
|
||||
# This allows setting the default kernel without calling grubby or having to figure out
|
||||
# which path GRUB will use to boot the kernel.
|
||||
|
||||
kernel: Path = kernels[0]
|
||||
|
||||
machineid: str = mid.read_text().strip()
|
||||
version: str = kernel.name.lstrip("vmlinuz-")
|
||||
|
||||
blscfg: Path = blsdir / "{}-{}.conf".format(machineid, version)
|
||||
|
||||
# Make sure the config really exists
|
||||
if not blscfg.exists():
|
||||
print("ERROR: {} does not exist".format(blscfg))
|
||||
return 1
|
||||
|
||||
print("Kernel: {}".format(kernel))
|
||||
print("BLS entry: {}".format(blscfg))
|
||||
|
||||
grub2_editenv("-", "set", "saved_entry={}".format(blscfg.stem))
|
||||
|
||||
# Update timestamp for rEFInd and ensure it is marked as latest across all kernels
|
||||
kernel.touch(exist_ok=True)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
|
@ -3,4 +3,4 @@ Description=linux-surface default kernel watchdog
|
|||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/linux-surface-default-watchdog.py
|
||||
ExecStart=/usr/bin/linux-surface-default-watchdog.sh
|
||||
|
|
23
pkg/fedora/kernel-surface/files/linux-surface-default-watchdog.sh
Executable file
23
pkg/fedora/kernel-surface/files/linux-surface-default-watchdog.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# Get list of surface kernels with timestamp
|
||||
KERNELS="$(
|
||||
find /boot -maxdepth 1 -name 'vmlinuz-*.surface.*' -print0 | xargs -0 -I '{}' \
|
||||
stat -c "%W %n" {}
|
||||
)"
|
||||
|
||||
# Sort by timestamp
|
||||
KERNELS="$(echo "${KERNELS}" | sort -n)"
|
||||
|
||||
# Get latest kernel (last line) and extract the path
|
||||
VMLINUX="$(echo "${KERNELS}" | tail -n1 | cut -d' ' -f2)"
|
||||
|
||||
echo "${VMLINUX}"
|
||||
|
||||
# update GRUB config
|
||||
grubby --set-default "$(grub2-mkrelpath "${VMLINUX}")"
|
||||
|
||||
# Update timestamp for rEFInd
|
||||
# Ensure it's marked as latest across all kernels, not just surface ones
|
||||
touch "${VMLINUX}"
|
|
@ -19,7 +19,7 @@ index 43dce82a9d36..28df94e561d4 100644
|
|||
|
||||
+Source4100: linux-surface-default-watchdog.path
|
||||
+Source4101: linux-surface-default-watchdog.service
|
||||
+Source4102: linux-surface-default-watchdog.py
|
||||
+Source4102: linux-surface-default-watchdog.sh
|
||||
+Source4103: 90-linux-surface-default-watchdog.preset
|
||||
+
|
||||
## Patches needed for building this package
|
||||
|
@ -81,7 +81,7 @@ index 43dce82a9d36..28df94e561d4 100644
|
|||
%endif
|
||||
|
||||
+%files default-watchdog
|
||||
+%{_bindir}/linux-surface-default-watchdog.py
|
||||
+%{_bindir}/linux-surface-default-watchdog.sh
|
||||
+%{_unitdir}/linux-surface-default-watchdog.path
|
||||
+%{_unitdir}/linux-surface-default-watchdog.service
|
||||
+%{_presetdir}/90-linux-surface-default-watchdog.preset
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
From bb654591f82503f9e3c319902af2a2b64c18ae50 Mon Sep 17 00:00:00 2001
|
||||
From: Dorian Stoll <dorian.stoll@tmsp.io>
|
||||
Date: Sat, 13 Jan 2024 12:30:02 +0100
|
||||
Subject: [PATCH] HACK: Move surface_fan and surface_temp to kernel-modules
|
||||
|
||||
---
|
||||
redhat/fedora_files/filter-modules.sh.fedora | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/redhat/fedora_files/filter-modules.sh.fedora b/redhat/fedora_files/filter-modules.sh.fedora
|
||||
index 2e7b79eba1d9..7ef7614cbda2 100755
|
||||
--- a/redhat/fedora_files/filter-modules.sh.fedora
|
||||
+++ b/redhat/fedora_files/filter-modules.sh.fedora
|
||||
@@ -84,6 +84,9 @@ filter_ko() {
|
||||
return 0
|
||||
}
|
||||
|
||||
+# HACK: move surface_fan and surface_temp to kernel-modules
|
||||
+singlemods="${singlemods} surface_fan surface_temp"
|
||||
+
|
||||
# Filter the drivers/ subsystems
|
||||
for subsys in ${driverdirs}
|
||||
do
|
||||
--
|
||||
2.43.0
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From a82af933b2ee35e24140ee7fddf9a083596cda3f Mon Sep 17 00:00:00 2001
|
||||
From: Dorian Stoll <dorian.stoll@tmsp.io>
|
||||
Date: Mon, 29 Jan 2024 19:26:41 +0100
|
||||
Subject: [PATCH] Pull in intel-vsc-firmware
|
||||
|
||||
This package contains the IPU3 firmware needed for camera support.
|
||||
---
|
||||
redhat/kernel.spec.template | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
|
||||
index 4ece0fa3a56c..768316b2ec82 100644
|
||||
--- a/redhat/kernel.spec.template
|
||||
+++ b/redhat/kernel.spec.template
|
||||
@@ -1028,6 +1028,7 @@ Requires(pre): %{kernel_prereq}\
|
||||
Requires(pre): %{initrd_prereq}\
|
||||
Requires(pre): ((linux-firmware >= 20150904-56.git6ebf5d57) if linux-firmware)\
|
||||
Recommends: linux-firmware\
|
||||
+Recommends: intel-vsc-firmware\
|
||||
Recommends: iptsd\
|
||||
Recommends: %{package_name}-default-watchdog\
|
||||
Requires(preun): systemd >= 200\
|
||||
--
|
||||
2.43.0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From d4bbfbfee98f8b117885cf88a48f686ac889d73e Mon Sep 17 00:00:00 2001
|
||||
From 71133b4337411ddd550d5e5ef68a12c510740b2c Mon Sep 17 00:00:00 2001
|
||||
From: Dorian Stoll <dorian.stoll@tmsp.io>
|
||||
Date: Sat, 22 Jul 2023 10:45:33 +0200
|
||||
Subject: [PATCH] Use a custom key and certificate for Secure Boot signing
|
||||
|
@ -9,10 +9,10 @@ Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
|
|||
1 file changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
|
||||
index 0fb19cc23041..d7bd6013423c 100644
|
||||
index 28df94e561d4..fd44abc4118a 100644
|
||||
--- a/redhat/kernel.spec.template
|
||||
+++ b/redhat/kernel.spec.template
|
||||
@@ -762,6 +762,7 @@ BuildRequires: system-sb-certs
|
||||
@@ -805,6 +805,7 @@ BuildRequires: system-sb-certs
|
||||
%ifarch x86_64 aarch64
|
||||
BuildRequires: nss-tools
|
||||
BuildRequires: pesign >= 0.10-4
|
||||
|
@ -20,7 +20,7 @@ index 0fb19cc23041..d7bd6013423c 100644
|
|||
%endif
|
||||
%endif
|
||||
%endif
|
||||
@@ -821,6 +822,13 @@ Source2: kernel.changelog
|
||||
@@ -864,6 +865,13 @@ Source1: Makefile.rhelver
|
||||
%define signing_key_filename kernel-signing-s390.cer
|
||||
%endif
|
||||
|
||||
|
@ -34,10 +34,10 @@ index 0fb19cc23041..d7bd6013423c 100644
|
|||
%if %{?released_kernel}
|
||||
|
||||
Source10: redhatsecurebootca5.cer
|
||||
@@ -2201,9 +2209,7 @@ BuildKernel() {
|
||||
@@ -2096,9 +2104,7 @@ BuildKernel() {
|
||||
SignImage=$KernelImage
|
||||
|
||||
%ifarch x86_64 aarch64
|
||||
%{log_msg "Sign kernel image"}
|
||||
- %pesign -s -i $SignImage -o vmlinuz.tmp -a %{secureboot_ca_0} -c %{secureboot_key_0} -n %{pesign_name_0}
|
||||
- %pesign -s -i vmlinuz.tmp -o vmlinuz.signed -a %{secureboot_ca_1} -c %{secureboot_key_1} -n %{pesign_name_1}
|
||||
- rm vmlinuz.tmp
|
||||
|
@ -45,8 +45,8 @@ index 0fb19cc23041..d7bd6013423c 100644
|
|||
%endif
|
||||
%ifarch s390x ppc64le
|
||||
if [ -x /usr/bin/rpm-sign ]; then
|
||||
@@ -2783,9 +2789,6 @@ BuildKernel() {
|
||||
%{log_msg "Install certs"}
|
||||
@@ -2650,9 +2656,6 @@ BuildKernel() {
|
||||
# Red Hat UEFI Secure Boot CA cert, which can be used to authenticate the kernel
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer
|
||||
%ifarch x86_64 aarch64
|
||||
- install -m 0644 %{secureboot_ca_0} $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer/kernel-signing-ca-20200609.cer
|
||||
|
@ -56,5 +56,5 @@ index 0fb19cc23041..d7bd6013423c 100644
|
|||
install -m 0644 %{secureboot_ca_0} $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer/kernel-signing-ca.cer
|
||||
%endif
|
||||
--
|
||||
2.44.0
|
||||
2.41.0
|
||||
|
||||
|
|
|
@ -88,6 +88,6 @@ getfedora()
|
|||
|
||||
tag 'arch' "$(getarch)"
|
||||
tag 'debian' "$(getdebian)"
|
||||
tag 'fedora-37' "$(getfedora)"
|
||||
tag 'fedora-38' "$(getfedora)"
|
||||
tag 'fedora-39' "$(getfedora)"
|
||||
tag 'fedora-40' "$(getfedora)"
|
||||
|
|
Loading…
Reference in a new issue