├── .gitignore ├── patches ├── bsw-byt-cb-sof.patch └── i2c-Add-device-property-for-probing.patch └── .github └── workflows └── build.yml /.gitignore: -------------------------------------------------------------------------------- 1 | linux* 2 | -------------------------------------------------------------------------------- /patches/bsw-byt-cb-sof.patch: -------------------------------------------------------------------------------- 1 | diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c 2 | index 425b023b0..2f14ff711 100644 3 | --- a/sound/soc/sof/core.c 4 | +++ b/sound/soc/sof/core.c 5 | @@ -12,6 +12,7 @@ 6 | #include 7 | #include 8 | #include 9 | +#include "../intel/common/soc-intel-quirks.h" 10 | #include "sof-priv.h" 11 | #include "sof-of-dev.h" 12 | #include "ops.h" 13 | @@ -578,6 +579,11 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data) 14 | /* initialize sof device */ 15 | sdev->dev = dev; 16 | 17 | + /* Baytrail and Cherrytrail need debug mode enabled in order to work properly */ 18 | + if (soc_intel_is_byt() || soc_intel_is_cht()) { 19 | + sof_core_debug = 1; 20 | + } 21 | + 22 | /* initialize default DSP power state */ 23 | sdev->dsp_power_state.state = SOF_DSP_PM_D0; 24 | 25 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: "Debian kernel" 2 | on: 3 | push: 4 | branches: [ "main" ] 5 | workflow_dispatch: 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Maximize build space 12 | uses: easimon/maximize-build-space@master 13 | with: 14 | root-reserve-mb: 5120 15 | swap-size-mb: 1024 16 | remove-dotnet: 'true' 17 | - name: Check out 18 | uses: actions/checkout@v3 19 | - name: Install dependencies 20 | run: sudo apt update; sudo apt install -y git build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison binutils debhelper 21 | - name: Build kernel 22 | run: bash build.sh 23 | - name: Upload build artifacts 24 | uses: actions/upload-artifact@v4 25 | with: 26 | name: debian-kernel 27 | path: | 28 | *.deb 29 | -------------------------------------------------------------------------------- /patches/i2c-Add-device-property-for-probing.patch: -------------------------------------------------------------------------------- 1 | diff --git a/Documentation/devicetree/bindings/i2c/i2c.txt b/Documentation/devicetree/bindings/i2c/i2c.txt 2 | index fc3dd7e..dc08a6c 100644 3 | --- a/Documentation/devicetree/bindings/i2c/i2c.txt 4 | +++ b/Documentation/devicetree/bindings/i2c/i2c.txt 5 | 6 | @@ -137,6 +137,11 @@ 7 | - wakeup-source 8 | device can be used as a wakeup source. 9 | 10 | +- linux,probed 11 | + If this property is present, then the I2C device will be 12 | + probed before being added using i2c_new_scanned_device, else 13 | + linux will instantiate the I2C device normally. 14 | + 15 | Binding may contain optional "interrupts" property, describing interrupts 16 | used by the device. I2C core will assign "irq" interrupt (or the very first 17 | interrupt if not using interrupt names) as primary interrupt for the slave. 18 | 19 | diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c 20 | index 4dd777c..f657f76 100644 21 | --- a/drivers/i2c/i2c-core-acpi.c 22 | +++ b/drivers/i2c/i2c-core-acpi.c 23 | 24 | @@ -278,6 +278,8 @@ 25 | struct acpi_device *adev, 26 | struct i2c_board_info *info) 27 | { 28 | + struct i2c_client *client; 29 | + 30 | /* 31 | * Skip registration on boards where the ACPI tables are 32 | * known to contain bogus I2C devices. 33 | @@ -288,7 +290,15 @@ 34 | adev->power.flags.ignore_parent = true; 35 | acpi_device_set_enumerated(adev); 36 | 37 | - if (IS_ERR(i2c_new_client_device(adapter, info))) 38 | + if (!acpi_dev_get_property(adev, "linux,probed", ACPI_TYPE_ANY, NULL)) { 39 | + unsigned short addrs[] = { info->addr, I2C_CLIENT_END }; 40 | + 41 | + client = i2c_new_scanned_device(adapter, info, addrs, NULL); 42 | + } else { 43 | + client = i2c_new_client_device(adapter, info); 44 | + } 45 | + 46 | + if (IS_ERR(client)) 47 | adev->power.flags.ignore_parent = false; 48 | } 49 | 50 | 51 | diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c 52 | index 3ed74aa..fd375ce 100644 53 | --- a/drivers/i2c/i2c-core-of.c 54 | +++ b/drivers/i2c/i2c-core-of.c 55 | 56 | @@ -75,7 +75,15 @@ 57 | if (ret) 58 | return ERR_PTR(ret); 59 | 60 | - client = i2c_new_client_device(adap, &info); 61 | + /* Allow device property to enable probing before init */ 62 | + if (of_get_property(node, "linux,probed", NULL)) { 63 | + unsigned short addrs[] = { info.addr, I2C_CLIENT_END }; 64 | + 65 | + client = i2c_new_scanned_device(adap, &info, addrs, NULL); 66 | + } else { 67 | + client = i2c_new_client_device(adap, &info); 68 | + } 69 | + 70 | if (IS_ERR(client)) 71 | dev_err(&adap->dev, "of_i2c: Failure registering %pOF\n", node); 72 | 73 | 74 | --------------------------------------------------------------------------------