Conversation
📝 WalkthroughWalkthroughBumps SM8250 kernel branches (current → 6.18, edge → 6.19), updates kernel defconfig, and adds an sm8250-6.18 patchset: DRM notifier + DSI touch integration, many DTS/DTSI board changes, audio/TDM and codec updates, new power (fuel‑gauge/charger) drivers, panel drivers, FastRPC/NCM refactors, peripheral drivers, and multiple fixes. Changes
Sequence Diagram(s)sequenceDiagram
participant DSI as msm_dsi_manager
participant Notifier as mi_drm_notifier
participant TS as touchscreen_driver
participant DRM as drm_panel
DRM->>DSI: panel_prepare / panel_enable
DSI->>Notifier: mi_drm_notifier_call_chain(MI_DRM_EVENT_BLANK, MI_DRM_BLANK_UNBLANK)
Notifier->>TS: notifier callback invoked (notifier_data)
TS->>TS: handle panel on/off (enable/disable touchscreen)
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 15
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
config/kernel/linux-sm8250-edge.config (1)
1-1: Update the version comment to reflect kernel 6.18.The comment still references kernel 6.14, but this config is now for the 6.18 edge branch.
📝 Proposed fix
-# Armbian defconfig generated with 6.14 +# Armbian defconfig generated with 6.18
🤖 Fix all issues with AI agents
In @patch/kernel/archive/sm8250-6.18/0000.patching_config.yaml:
- Around line 4-8: Update the YAML metadata to reflect the 6.18 kernel bump:
change the `name` field from sm8250-6.12 to sm8250-6.18, update the `branch`
field from linux-6.12.y to linux-6.18.y, and replace the `last-known-good-tag`
(currently v6.12.5) with an appropriate 6.18 tag (e.g., v6.18.1 or the correct
6.18.x tag you intend to use).
In
@patch/kernel/archive/sm8250-6.18/0019-input-nt36xxx-Enable-pen-support.patch:
- Around line 78-81: The suspend path disables the pen only when
ts->pen_input_dev_enable is true but resume always calls
disable_pen_input_device(false), causing asymmetric state; fix by saving the
current pen enabled flag before suspend (e.g., store ts->pen_input_dev_enable
into a new field like ts->pen_was_enabled or a local/state variable in the
suspend handler) and on resume only call disable_pen_input_device(false) if that
saved flag indicates the pen was enabled before suspend, ensuring
disable_pen_input_device(true) is called in suspend only when
ts->pen_input_dev_enable was true and the resume restores state conditionally
based on the saved flag.
In
@patch/kernel/archive/sm8250-6.18/0020-nt36xxx-add-pen-input-resolution.patch:
- Around line 35-36: The hardcoded
PANEL_DEFAULT_WIDTH_MM/PANEL_DEFAULT_HEIGHT_MM values used in the nt36xxx code
when calling input_abs_set_res(ts->pen_input_dev, ABS_X/ABS_Y, ...) should be
made device-specific: read panel physical width/height (e.g.,
"pen-panel-width-mm" and "pen-panel-height-mm" or reuse existing panel size DT
properties) from the device tree in the driver probe (where struct ts is
initialized) and fall back to the current defaults if missing, then use those
retrieved u32 values instead of the compile-time constants when computing the
resolution for input_abs_set_res; update the probe/struct initialization code to
store these values (e.g., ts->panel_width_mm / ts->panel_height_mm) and
reference them where ABS_X/ABS_Y resolutions are set so different devices can
provide correct dimensions.
In
@patch/kernel/archive/sm8250-6.18/0027-Input-touchscreen-add-Synaptics-TCM-oncell-S3908.patch:
- Line 553: devm_gpiod_get() result for tcm->reset_gpio isn't checked for
ERR_PTR; if it fails the error pointer may later be passed to
gpiod_set_value_cansleep() causing a crash. After calling
devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_LOW) in the probe/init path
(where tcm->reset_gpio is assigned), check IS_ERR(tcm->reset_gpio) and handle
the error: log the failure with dev_err(&client->dev, ...), return the
appropriate PTR_ERR(tcm->reset_gpio) (or fall back if preferred) so
gpiod_set_value_cansleep() is never called with an error pointer. Ensure
references to tcm->reset_gpio and devm_gpiod_get/dev_err/PTR_ERR are updated
accordingly.
- Line 438: The code calls le32_to_cpu(header->length) but
tcm_message_header::length is defined as __le16, so replace the 32-bit
conversion with le16_to_cpu(header->length) and ensure the receiving variable
(len) is an appropriate 16-bit type (e.g., u16 or unsigned int) or explicitly
cast to size_t when used for buffer sizes/limits; update any subsequent uses
that assume a 32-bit value to avoid sign/overflow issues.
- Around line 564-602: The IRQ is requested via
devm_request_threaded_irq(&client->dev, client->irq, NULL, tcm_report_irq, ...)
before the input device is allocated/registered, which can race with
tcm_handle_touch_report reading tcm->input; move the devm_request_threaded_irq
call so it runs after tcm_hw_init, after tcm->input is allocated and configured
(input_set_abs_params, touchscreen_parse_properties, input_mt_init_slots,
input_set_drvdata) and after input_register_device succeeds, so the IRQ handler
always sees a valid tcm->input; ensure error paths unregister or rely on devm
semantics as appropriate.
In
@patch/kernel/archive/sm8250-6.18/0028-arm64-dts-qcom-add-OnePlus-8T-kebab.patch:
- Around line 686-691: channel@4e is incorrectly using the same ADC mux constant
as channel@4d (ADC5_AMUX_THM2_100K_PU) causing a duplicate ADC register; update
the reg property of channel@4e (the node with label "wifi_therm") to
ADC5_AMUX_THM3_100K_PU to match the expected node/address pattern and ensure the
wifi_therm channel references the correct ADC mux.
- Around line 169-179: The panel_avdd_5p5 regulator and its pinctrl disagree on
the GPIO number: panel_avdd_5p5 declares gpio = <&tlmm 61 GPIO_ACTIVE_HIGH>
while panel_avdd_pins uses pins = "gpio65"; fix by making the GPIO reference
consistent (either change the regulator gpio to use 65 or change panel_avdd_pins
to "gpio61"), ensure the &tlmm controller and GPIO_ACTIVE_HIGH flag remain
correct, and update any related labels/comments so panel_avdd_5p5,
panel_avdd_pins, gpio and pins all match.
In
@patch/kernel/archive/sm8250-6.18/0038-Input-driver-for-AYN-Odin2-Gamepad.patch:
- Around line 244-277: The GPIO pointers returned by devm_gpiod_get_optional
(boot_gpio, enable_gpio, reset_gpio) are left as ERR_PTR values after IS_ERR
logging and later treated as truthy, causing invalid gpiod_set_value_cansleep
calls; update the error handling so that after detecting
IS_ERR(gamepad_dev->boot_gpio/enable_gpio/reset_gpio) you set that field to NULL
(or otherwise clear the ERR_PTR) OR change the later conditional checks to use
!IS_ERR(...) && gamepad_dev->*_gpio before calling gpiod_set_value_cansleep,
ensuring only valid non-error gpio pointers are used.
- Around line 141-175: Move the function-static prev_states into struct
gamepad_device (add an unsigned long prev_states field) and update
gamepad_input_handler to use dev->prev_states instead of the static variable;
also add a guard at the top of gamepad_input_handler that returns early if
data->data_len < 14 to prevent out-of-bounds reads, and keep the existing
bitmap_xor and for_each_set_bit logic but operate on &dev->prev_states and write
back dev->prev_states = keys after input_sync; reference symbols: struct
gamepad_device, prev_states, gamepad_input_handler, data->data_len, data->data,
keymap, ARRAY_SIZE(keymap).
In
@patch/kernel/archive/sm8250-6.18/0039-input-add-Qualcomm-SPMI-haptics-driver.patch:
- Around line 838-992: The probe allocates the spmi_haptics struct but never
initializes the play_lock mutex, yet mutex_destroy(&haptics->play_lock) is
called on error and in remove; fix by calling mutex_init(&haptics->play_lock)
early in spmi_haptics_probe (e.g., immediately after devm_kzalloc and before any
code that can jump to register_fail or before INIT_WORK/spmi_haptics_init), so
the mutex is always initialized before any cancel_work_sync/ mutex_destroy paths
run.
- Line 1004: Replace the deprecated SIMPLE_DEV_PM_OPS usage with
DEFINE_SIMPLE_DEV_PM_OPS: change the line creating spmi_haptics_pm_ops to use
DEFINE_SIMPLE_DEV_PM_OPS(spmi_haptics_pm_ops, spmi_haptics_suspend, NULL); so
the compiler sees spmi_haptics_suspend/resume correctly and you can remove any
__maybe_unused annotations that were compensating for the old macro.
🟡 Minor comments (7)
patch/kernel/archive/sm8250-6.18/0000.patching_config.yaml-1-1 (1)
1-1: Update the file path reference in the comment.The comment references
sm8250-6.7but this file is forsm8250-6.18.📝 Proposed fix
-config: # This is file 'patch/kernel/archive/sm8250-6.7/0000.patching_config.yaml' +config: # This is file 'patch/kernel/archive/sm8250-6.18/0000.patching_config.yaml'patch/kernel/archive/sm8250-6.18/0009-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Add-dev.patch-582-590 (1)
582-590: Usestatus = "okay"instead ofstatus = "ok".The devicetree specification defines the canonical value as
"okay", not"ok". While some parsers may accept both, using the standard value ensures consistency.Suggested fix
charger@66 { compatible = "ti,bq25980"; - status = "ok"; + status = "okay"; reg = <0x66>;patch/kernel/archive/sm8250-6.18/0001-drm-Add-drm-notifier-support.patch-79-89 (1)
79-89: Fix typo and event constant names in documentation.Two issues in the function documentation:
- Line 82: "inculde" should be "include"
- Line 81: References
MSM_DRM_EARLY_EVENT_BLANKandMSM_DRM_EVENT_BLANK, but the actual constants areMI_DRM_EVENT_BLANKandMI_DRM_EARLY_EVENT_BLANK(defined in the header)📝 Proposed fix
* mi_drm_notifier_call_chain - notify clients of drm_events - * @val: event MSM_DRM_EARLY_EVENT_BLANK or MSM_DRM_EVENT_BLANK - * @v: notifier data, inculde display id and display blank + * @val: event MI_DRM_EARLY_EVENT_BLANK or MI_DRM_EVENT_BLANK + * @v: notifier data, include display id and display blank * event(unblank or power down).patch/kernel/archive/sm8250-6.18/0001-drm-Add-drm-notifier-support.patch-52-77 (1)
52-77: Fix variable name mismatch in documentation.The function documentation references
msm_drm_notifier_list(lines 57, 71), but the actual variable is namedmi_drm_notifier_list(line 50). This inconsistency can confuse developers reading the code.📝 Proposed fix
* This function registers a notifier callback function - * to msm_drm_notifier_list, which would be called when + * to mi_drm_notifier_list, which would be called when * received unblank/power down event.* This function unregisters the callback function from - * msm_drm_notifier_list. + * mi_drm_notifier_list.patch/kernel/archive/sm8250-6.18/0028-arm64-dts-qcom-add-OnePlus-8T-kebab.patch-90-94 (1)
90-94: Typo in node name:key-vol-dowmshould bekey-vol-down.The node name has a typo ("dowm" instead of "down"), which is inconsistent with the label "Volume down".
Proposed fix
- key-vol-dowm { + key-vol-down { label = "Volume down"; linux,code = <KEY_VOLUMEDOWN>; gpios = <&pm8150_gpios 7 GPIO_ACTIVE_LOW>; };patch/kernel/archive/sm8250-6.18/0027-Input-touchscreen-add-Synaptics-TCM-oncell-S3908.patch-36-46 (1)
36-46: Kconfig help text is incomplete.The help text for
TOUCHSCREEN_SYNAPTICS_TCM_ONCELLat line 40 is incomplete: "Say Y if you have the Synaptics S3908 TCM Oncell" (missing "touchscreen" or similar).📝 Proposed fix
help - Say Y if you have the Synaptics S3908 TCM Oncell + Say Y if you have the Synaptics S3908 TCM Oncell touchscreen.patch/kernel/archive/sm8250-6.18/0027-Input-touchscreen-add-Synaptics-TCM-oncell-S3908.patch-76-92 (1)
76-92: Fix duplicate include and use modern GPIO API.Issues found:
- Line 78 and 85:
linux/input/touchscreen.his included twice- Line 88:
linux/of_gpio.his deprecated; uselinux/gpio/consumer.hinstead (the driver already usesdevm_gpiod_get)- Line 90:
linux/pm_runtime.his included but PM runtime functions are not used🔧 Proposed fix
#include <linux/i2c.h> #include <linux/input.h> #include <linux/input/touchscreen.h> #include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/property.h> #include <linux/unaligned.h> #include <linux/delay.h> #include <linux/input/mt.h> -#include <linux/input/touchscreen.h> #include <linux/interrupt.h> #include <linux/irq.h> -#include <linux/of_gpio.h> +#include <linux/gpio/consumer.h> #include <linux/module.h> -#include <linux/pm_runtime.h> #include <linux/regulator/consumer.h>
🧹 Nitpick comments (14)
patch/kernel/archive/sm8250-6.18/0021-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Restore.patch (1)
80-80: Trailing whitespace detected.Line 80 contains trailing whitespace (spaces after the closing brace). This may cause issues with strict patch validation or linting tools.
Suggested fix
- }; + }; reserved-memory {Remove the trailing spaces after
};on line 80.patch/kernel/archive/sm8250-6.18/0009-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Add-dev.patch (3)
79-96: Consider usingwakeup-sourceinstead of deprecatedgpio-key,wakeup.The
gpio-key,wakeupproperty is deprecated in favor ofwakeup-sourcein the gpio-keys binding.Suggested fix
vol-up { label = "Volume Up"; gpios = <&pm8150_gpios 6 GPIO_ACTIVE_LOW>; linux,code = <KEY_VOLUMEUP>; debounce-interval = <15>; linux,can-disable; - gpio-key,wakeup; + wakeup-source; }; vol-down { label = "Volume Down"; linux,code = <KEY_VOLUMEDOWN>; gpios = <&pm8150_gpios 7 GPIO_ACTIVE_LOW>; debounce-interval = <15>; linux,can-disable; - gpio-key,wakeup; + wakeup-source; };
606-622: Consider using IRQ_TYPE_ macros for interrupt flags.*The interrupt flags value
0x2008is less readable than using named macros. If this isIRQ_TYPE_LEVEL_LOW(0x8) with additional flags, consider documenting or using the appropriate macro. The NFC node at line 572 usesIRQ_TYPE_LEVEL_HIGHwhich is more readable.
564-577: Inconsistent indentation: spaces used instead of tabs.The I2C device nodes (
&i2c1,&i2c5,&i2c16) use 4-space indentation while the rest of the file uses tabs. Kernel DTS files conventionally use tabs for indentation.patch/kernel/archive/sm8250-6.18/0001-drm-Add-drm-notifier-support.patch (1)
32-45: Consider modernizing to SPDX license identifiers.Both source files use the old GPL-2.0 boilerplate license text. Modern kernel code typically uses SPDX license identifiers for clarity and brevity. Consider replacing the boilerplate with:
// SPDX-License-Identifier: GPL-2.0-onlyThis keeps the license intent identical while following current kernel standards.
Also applies to: 96-109
patch/kernel/archive/sm8250-6.18/0038-Input-driver-for-AYN-Odin2-Gamepad.patch (2)
22-25: Kconfig entry missing help text and GPIO dependency.The Kconfig entry is minimal. Consider adding:
- A
helpsection describing the driver for users configuring the kernel.- A dependency on
GPIOLIBsince the driver usesdevm_gpiod_get_optional.Suggested Kconfig improvement
config JOYSTICK_ODIN2 tristate "AYN Odin2 gamepad" depends on SERIAL_DEV_BUS + depends on GPIOLIB || COMPILE_TEST + help + Say Y here if you have an AYN Odin2 handheld gaming device + and want to use its built-in gamepad controller. + + To compile this driver as a module, choose M here: the + module will be called odin2.
359-359: MODULE_ALIAS uses wrong prefix for serdev driver.The driver uses
MODULE_ALIAS("platform:" DRIVER_NAME)but this is a serdev driver, not a platform driver. The alias won't match anything useful. For serdev drivers, module autoloading is typically handled via the OF match table'sMODULE_DEVICE_TABLE(of, ...)which is already present.Consider removing the misleading alias or using the correct format.
Suggested fix
-MODULE_ALIAS("platform:" DRIVER_NAME); +MODULE_ALIAS("of:N*T*Cayn,odin2-gamepad");Or simply remove the line since
MODULE_DEVICE_TABLE(of, ...)already handles autoloading.patch/kernel/archive/sm8250-6.18/0020-nt36xxx-add-pen-input-resolution.patch (2)
19-19: Consider moving variable declarations to the beginning of the block.Line 19 declares variables in the middle of a block after other statements. While valid in C99+, the Linux kernel coding style typically prefers variable declarations at the beginning of blocks for consistency.
34-34: Fix formatting: extra space before comma.Line 34 has an extra space before the comma:
y_max ,should bey_max,.✨ Formatting fix
- input_set_abs_params(ts->pen_input_dev, ABS_Y, 0, y_max , 0, 0); + input_set_abs_params(ts->pen_input_dev, ABS_Y, 0, y_max, 0, 0);patch/kernel/archive/sm8250-6.18/0019-input-nt36xxx-Enable-pen-support.patch (1)
64-72: Use standard C comment style.The patch uses C++ style
//comments instead of the kernel standard/* */style. While this works, kernel code conventionally uses C89-style comments for consistency.♻️ Preferred style
-//#ifdef CONFIG_FACTORY_BUILD +/* +#ifdef CONFIG_FACTORY_BUILD +*/ ts->pen_input_dev_enable = 1; -//#else -// ts->pen_input_dev_enable = 0; -//#endif +/* +#else + ts->pen_input_dev_enable = 0; +#endif +*/patch/kernel/archive/sm8250-6.18/0027-Input-touchscreen-add-Synaptics-TCM-oncell-S3908.patch (2)
594-594: Consider deriving max touch slots from device capabilities.The maximum number of touch slots is hardcoded as
10. The device reportsmax_objectsin thetcm_app_infostructure (line 184), which could be used here for a more accurate configuration. Alternatively, define this as a named constant for clarity.💡 Possible improvement
Option 1: Use device-reported maximum:
+ u8 max_objects[2]; + // ... in tcm_hw_init, also populate max_objects ... + // ... in tcm_probe ... - ret = input_mt_init_slots(tcm->input, 10, INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED); + ret = input_mt_init_slots(tcm->input, max_objects, INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED);Option 2: Define as a constant:
+#define TCM_MAX_TOUCH_SLOTS 10 + // ... in tcm_probe ... - ret = input_mt_init_slots(tcm->input, 10, INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED); + ret = input_mt_init_slots(tcm->input, TCM_MAX_TOUCH_SLOTS, INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED);
364-365: Touch report length validation logs but continues processing.If the touch report length is invalid (not a multiple of the expected point size), the code logs an error but continues processing. This could lead to parsing garbage data. Consider returning early or clamping the number of processed points.
🛡️ More defensive approach
if ((len - 3) % sizeof(*point)) - dev_err(&tcm->client->dev, "invalid touch report length\n"); + dev_warn(&tcm->client->dev, "invalid touch report length %zu (expected multiple of %zu)\n", + len, sizeof(*point)); + /* Clamp to avoid processing incomplete point */ + len = ((len - 1) / sizeof(*point)) * sizeof(*point) + 1; + }patch/kernel/archive/sm8250-6.18/0006-ASoC-qcom-sm8250-Add-tdm-support.patch (2)
100-106: Unchecked return value ofsnd_soc_dai_set_sysclk.The return value of
snd_soc_dai_set_sysclk()is not checked. If this call fails, the error goes unnoticed and could cause hard-to-debug audio issues at runtime.♻️ Suggested fix
for_each_rtd_codec_dais(rtd, j, codec_dai) { ret = snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt); - snd_soc_dai_set_sysclk(codec_dai, 0, TDM_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); if (ret < 0) { dev_err(rtd->dev, "TDM fmt err:%d\n", ret); return ret; } + ret = snd_soc_dai_set_sysclk(codec_dai, 0, TDM_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); + if (ret < 0) { + dev_err(rtd->dev, "TDM sysclk err:%d\n", ret); + return ret; + } }
41-73: Inconsistent indentation in TDM hw_params function.The playback and capture branches use inconsistent indentation (mixture of 2-space and 3-space indents, and different alignments). While this is an existing patch being ported, consider normalizing to kernel coding style (tabs) if/when updating this patch.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (23)
config/kernel/linux-sm8250-edge.configconfig/sources/families/sm8250.confpatch/kernel/archive/sm8250-6.18/0000.patching_config.yamlpatch/kernel/archive/sm8250-6.18/0001-drm-Add-drm-notifier-support.patchpatch/kernel/archive/sm8250-6.18/0003-Input-Add-nt36523-touchscreen-driver.patchpatch/kernel/archive/sm8250-6.18/0005-arm64-dts-qcom-sm8250-xiaomi-elish-enable-touchscree.patchpatch/kernel/archive/sm8250-6.18/0006-ASoC-qcom-sm8250-Add-tdm-support.patchpatch/kernel/archive/sm8250-6.18/0007-arm64-dts-qcom-sm8250-xiaomi-elish-Add-sound-support.patchpatch/kernel/archive/sm8250-6.18/0008-Asoc-wm_adsp-Add-prefix-support.patchpatch/kernel/archive/sm8250-6.18/0009-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Add-dev.patchpatch/kernel/archive/sm8250-6.18/0016-arm64-dts-qcom-sm8250-xiaomi-elish-add-keyboard-supp.patchpatch/kernel/archive/sm8250-6.18/0017-arm64-dts-qcom-sm8250-xiaomi-elish-remove-framebuffe.patchpatch/kernel/archive/sm8250-6.18/0019-input-nt36xxx-Enable-pen-support.patchpatch/kernel/archive/sm8250-6.18/0020-nt36xxx-add-pen-input-resolution.patchpatch/kernel/archive/sm8250-6.18/0021-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Restore.patchpatch/kernel/archive/sm8250-6.18/0023-Asoc-wm_adsp-Use-xiaomi-elish-firmware-name.patchpatch/kernel/archive/sm8250-6.18/0024-input-nt36523-short-the-firmware-download-delay-from.patchpatch/kernel/archive/sm8250-6.18/0027-Input-touchscreen-add-Synaptics-TCM-oncell-S3908.patchpatch/kernel/archive/sm8250-6.18/0028-arm64-dts-qcom-add-OnePlus-8T-kebab.patchpatch/kernel/archive/sm8250-6.18/0038-Input-driver-for-AYN-Odin2-Gamepad.patchpatch/kernel/archive/sm8250-6.18/0039-input-add-Qualcomm-SPMI-haptics-driver.patchpatch/kernel/archive/sm8250-6.18/0040-arm64-dts-qcom-pm8150b-introduce-spmi-haptics.patchpatch/kernel/archive/sm8250-6.18/dt/.placeholder
🧰 Additional context used
🧠 Learnings (41)
📓 Common learnings
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.
Learnt from: rpardini
Repo: armbian/build PR: 9159
File: patch/u-boot/u-boot-genio/0026-dts-configs-add-Grinn-GenioSBC-510.patch:161-161
Timestamp: 2026-01-03T20:46:29.189Z
Learning: For the Armbian genio family (config/sources/families/genio.conf and patch/u-boot/u-boot-genio/), when reviewing PRs that include vendor U-Boot patches from Collabora, avoid flagging potential issues in board configurations that are out of scope for the PR's primary focus (e.g., don't flag Genio 510/700 board issues when the PR is focused on radxa-nio-12l/Genio 1200). The maintainer prioritizes keeping vendor patches close to upstream for easier re-copying and maintenance, even if secondary board configs have potential mismatches.
<!-- </add_learning>
Learnt from: tabrisnet
Repo: armbian/build PR: 8746
File: config/sources/families/filogic.conf:61-68
Timestamp: 2025-10-13T02:26:18.249Z
Learning: In the Armbian build system, the "edge" kernel branch is intended to be bleeding-edge and experimental. It does not require hardware testing or stability verification before merging, as it's expected to contain potentially unstable or untested code for early adopters and developers.
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-07-21T04:12:02.439Z
Learning: In the Armbian build system, for recurring maintenance tasks like kernel version bumping, TODO comments should use generic version formats (e.g., "MAJOR.MINOR-rc1") rather than specific version numbers (e.g., "6.17-rc1") to avoid the need for frequent comment updates that would create unnecessary maintenance overhead.
Learnt from: rpardini
Repo: armbian/build PR: 8879
File: config/sources/families/uefi-x86.conf:0-0
Timestamp: 2025-11-06T15:36:04.682Z
Learning: As of PR #8879, the uefi-x86 family in the Armbian build system now includes kernel patches for the first time. The current and edge branches for uefi-x86 are specifically configured for Apple T2-based x86 machines, including T2-specific patches from the linux-t2 project and custom kernel configuration options for Apple hardware drivers.
📚 Learning: 2025-06-25T03:42:09.086Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8330
File: config/sources/families/sun55iw3.conf:32-36
Timestamp: 2025-06-25T03:42:09.086Z
Learning: In Armbian build system configuration files like config/sources/families/*.conf, KERNELSOURCE is explicitly declared when using unofficial or 3rd party kernel repositories (like the "dev" branch using https://github.com/apritzel/linux), but can be omitted when using the standard mainline kernel (like the "edge" branch) since it will fall back to the default mainline source.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-06-25T03:40:52.109Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8330
File: config/sources/families/sun55iw3.conf:32-36
Timestamp: 2025-06-25T03:40:52.109Z
Learning: In Armbian build system configuration files like config/sources/families/*.conf, when KERNELSOURCE is not explicitly declared in a case branch, the system falls back to a default KERNELSOURCE value, so missing KERNELSOURCE declarations are not critical issues.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-11-02T20:49:56.719Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8849
File: config/boards/radxa-e54c.csc:14-28
Timestamp: 2025-11-02T20:49:56.719Z
Learning: In Armbian board configuration files (config/boards/*.conf, *.csc, etc.), do not use kernel_config_set, kernel_config_set_m, kernel_config_set_y, or custom_kernel_config__* functions to modify kernel configuration. Kernel configuration is associated with LINUXFAMILY/BOARDFAMILY, not individual BOARD. Board-specific kernel modifications cause inconsistency in kernel packages published to the apt repository because boards within a family share the same kernel packages. Kernel configuration changes must be made in the appropriate kernel config file (e.g., config/kernel/linux-*-*.config) or in family configuration files (config/sources/families/*.conf, *.inc) instead.
Applied to files:
config/sources/families/sm8250.confpatch/kernel/archive/sm8250-6.18/0000.patching_config.yamlconfig/kernel/linux-sm8250-edge.config
📚 Learning: 2025-11-10T22:05:40.490Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8913
File: config/sources/families/k3-beagle.conf:16-16
Timestamp: 2025-11-10T22:05:40.490Z
Learning: In the Armbian build system, kernel branches using non-mainline/vendor forks (like BeagleBoard's linux repository) should be named "vendor" or "vendor-rt" rather than "current" or "edge". The "current" and "edge" naming is reserved for mainline kernel branches. This affects both the case statement in family config files (e.g., `vendor | vendor-rt)` instead of `current | current-rt)`) and the corresponding KERNEL_TARGET declarations in board config files.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-04-30T16:16:47.150Z
Learnt from: The-going
Repo: armbian/build PR: 8147
File: config/sources/families/include/sunxi64_common.inc:38-39
Timestamp: 2025-04-30T16:16:47.150Z
Learning: The Armbian build system references Linux kernel versions in the form "tag:v6.14.4" in the KERNELBRANCH variable, even when point release tags might not be directly visible in the upstream repository in the same form.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-09-14T06:29:18.958Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:29:18.958Z
Learning: In the Armbian build system, vendor branch configurations in family files are designed to be shared across multiple SoCs within the same family that use the same vendor kernel tree. For example, rk35xx and rockchip-rk3588 families both use identical vendor branch settings (same KERNELSOURCE, KERNELBRANCH, and KERNELPATCHDIR), demonstrating that vendor branches are intentionally generic rather than SoC-specific.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-10-26T10:41:35.118Z
Learnt from: HackingGate
Repo: armbian/build PR: 8665
File: config/boards/photonicat2.csc:4-4
Timestamp: 2025-10-26T10:41:35.118Z
Learning: In the Armbian build system, rk3576 boards consistently use BOARDFAMILY="rk35xx" for both vendor and edge kernel targets. The rk35xx family configuration sources rockchip64_common.inc, which provides edge and current kernel branch definitions, making these branches available even though they're not defined directly in rk35xx.conf.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-12-12T23:09:56.813Z
Learnt from: tabrisnet
Repo: armbian/build PR: 9058
File: config/sources/families/spacemit.conf:39-45
Timestamp: 2025-12-12T23:09:56.813Z
Learning: In Armbian build configs for vendor kernel sources, prefer the following branch naming conventions: use 'vendor' or 'vendor-rt' for stable vendor releases, and 'vendor-edge' for bleeding-edge/pre-release vendor versions. The 'edge' naming without the 'vendor-' prefix is reserved for mainline kernel branches. Apply this pattern to family config files under config/sources/families (e.g., spacemit.conf) to ensure consistent vendor kernel sourcing naming across the repository.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-07-21T04:12:02.439Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-07-21T04:12:02.439Z
Learning: In the Armbian build system, for recurring maintenance tasks like kernel version bumping, TODO comments should use generic version formats (e.g., "MAJOR.MINOR-rc1") rather than specific version numbers (e.g., "6.17-rc1") to avoid the need for frequent comment updates that would create unnecessary maintenance overhead.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-12-19T13:56:45.124Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Applied to files:
config/sources/families/sm8250.confpatch/kernel/archive/sm8250-6.18/0028-arm64-dts-qcom-add-OnePlus-8T-kebab.patchpatch/kernel/archive/sm8250-6.18/0000.patching_config.yamlpatch/kernel/archive/sm8250-6.18/0023-Asoc-wm_adsp-Use-xiaomi-elish-firmware-name.patchpatch/kernel/archive/sm8250-6.18/0009-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Add-dev.patch
📚 Learning: 2025-10-13T02:26:18.249Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8746
File: config/sources/families/filogic.conf:61-68
Timestamp: 2025-10-13T02:26:18.249Z
Learning: In the Armbian build system, the "edge" kernel branch is intended to be bleeding-edge and experimental. It does not require hardware testing or stability verification before merging, as it's expected to contain potentially unstable or untested code for early adopters and developers.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-09-29T06:32:32.361Z
Learnt from: amazingfate
Repo: armbian/build PR: 8687
File: config/sources/mainline-kernel.conf.sh:11-11
Timestamp: 2025-09-29T06:32:32.361Z
Learning: There can be timing discrepancies between different kernel.org sources (web pages vs git repositories) when new kernel releases are published. Direct verification via git.kernel.org repository URLs is more reliable than general web searches for confirming tag availability.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2026-01-06T21:17:42.268Z
Learnt from: paolosabatino
Repo: armbian/build PR: 9171
File: patch/misc/bluetooth-rtl8723cs/bluetooth-btrtl-add-rtl8703bs.patch:34-34
Timestamp: 2026-01-06T21:17:42.268Z
Learning: In Linux kernel btrtl.c driver patches, recent kernel practice removes the .bin extension from fw_name entries in ic_id_table[] to support multiple firmware file formats/versions. The driver's firmware-parsing code dynamically selects the correct file variant. When reviewing bluetooth-rtl patches, fw_name without .bin extension (e.g., "rtl_bt/rtl8723cs_xx_fw") is the modern correct pattern, not an error.
Applied to files:
patch/kernel/archive/sm8250-6.18/0008-Asoc-wm_adsp-Add-prefix-support.patchpatch/kernel/archive/sm8250-6.18/0023-Asoc-wm_adsp-Use-xiaomi-elish-firmware-name.patchpatch/kernel/archive/sm8250-6.18/0024-input-nt36523-short-the-firmware-download-delay-from.patch
📚 Learning: 2025-12-17T15:46:22.709Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 9096
File: patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-overlays.patch:4-5
Timestamp: 2025-12-17T15:46:22.709Z
Learning: In Armbian kernel patches, when patches are renamed or reorganized, the old Subject line may be intentionally preserved in the patch header (as a second Subject line) for archival/historical purposes to document the previous patch name. This is an Armbian-specific practice for tracking patch evolution and should not be flagged as an error when the maintainer has intentionally included it for documentation.
Applied to files:
patch/kernel/archive/sm8250-6.18/0008-Asoc-wm_adsp-Add-prefix-support.patchpatch/kernel/archive/sm8250-6.18/0028-arm64-dts-qcom-add-OnePlus-8T-kebab.patchpatch/kernel/archive/sm8250-6.18/0000.patching_config.yamlpatch/kernel/archive/sm8250-6.18/0023-Asoc-wm_adsp-Use-xiaomi-elish-firmware-name.patchpatch/kernel/archive/sm8250-6.18/0009-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Add-dev.patchpatch/kernel/archive/sm8250-6.18/0021-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Restore.patch
📚 Learning: 2025-12-17T05:09:02.306Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.
Applied to files:
patch/kernel/archive/sm8250-6.18/0008-Asoc-wm_adsp-Add-prefix-support.patchpatch/kernel/archive/sm8250-6.18/0028-arm64-dts-qcom-add-OnePlus-8T-kebab.patchpatch/kernel/archive/sm8250-6.18/0017-arm64-dts-qcom-sm8250-xiaomi-elish-remove-framebuffe.patchpatch/kernel/archive/sm8250-6.18/0000.patching_config.yamlpatch/kernel/archive/sm8250-6.18/0023-Asoc-wm_adsp-Use-xiaomi-elish-firmware-name.patchpatch/kernel/archive/sm8250-6.18/0024-input-nt36523-short-the-firmware-download-delay-from.patchpatch/kernel/archive/sm8250-6.18/0007-arm64-dts-qcom-sm8250-xiaomi-elish-Add-sound-support.patchpatch/kernel/archive/sm8250-6.18/0016-arm64-dts-qcom-sm8250-xiaomi-elish-add-keyboard-supp.patchpatch/kernel/archive/sm8250-6.18/0009-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Add-dev.patchpatch/kernel/archive/sm8250-6.18/0005-arm64-dts-qcom-sm8250-xiaomi-elish-enable-touchscree.patchpatch/kernel/archive/sm8250-6.18/0027-Input-touchscreen-add-Synaptics-TCM-oncell-S3908.patchpatch/kernel/archive/sm8250-6.18/0021-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Restore.patch
📚 Learning: 2025-09-11T06:06:52.328Z
Learnt from: SuperKali
Repo: armbian/build PR: 8608
File: lib/functions/compilation/patch/drivers_network.sh:361-363
Timestamp: 2025-09-11T06:06:52.328Z
Learning: For the RTW88 SDIO RF path detection fix patch (004-rtw88-sdio-rf-path-detection-fix.patch), SuperKali prefers using exact version matching (eq 6.1 || eq 6.16) rather than range checks, as the patch has only been tested on those specific kernel versions and may be mainstreamed soon.
Applied to files:
patch/kernel/archive/sm8250-6.18/0008-Asoc-wm_adsp-Add-prefix-support.patchpatch/kernel/archive/sm8250-6.18/0023-Asoc-wm_adsp-Use-xiaomi-elish-firmware-name.patchpatch/kernel/archive/sm8250-6.18/0021-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Restore.patch
📚 Learning: 2025-09-14T11:37:35.089Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:65-72
Timestamp: 2025-09-14T11:37:35.089Z
Learning: In the Armbian build system, patch directories referenced in BOOTPATCHDIR and KERNELPATCHDIR configurations can be non-existent without causing build failures. Empty patch directories are also ignored by git, so missing patch directories should not be flagged as errors during code review.
Applied to files:
patch/kernel/archive/sm8250-6.18/0000.patching_config.yaml
📚 Learning: 2025-11-20T18:20:11.985Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.
Applied to files:
patch/kernel/archive/sm8250-6.18/0000.patching_config.yamlpatch/kernel/archive/sm8250-6.18/0009-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Add-dev.patchpatch/kernel/archive/sm8250-6.18/0021-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Restore.patch
📚 Learning: 2025-12-21T10:28:48.455Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 9086
File: patch/kernel/archive/uefi-arm64-6.19/net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch.disabled:625-633
Timestamp: 2025-12-21T10:28:48.455Z
Learning: The patch "net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch" in patch/kernel/archive/uefi-arm64-6.19/ is known to break compilation on kernel 6.19 and is therefore disabled (has .disabled extension).
Applied to files:
patch/kernel/archive/sm8250-6.18/0000.patching_config.yamlpatch/kernel/archive/sm8250-6.18/0021-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Restore.patch
📚 Learning: 2025-07-23T07:30:52.265Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8417
File: config/boards/orangepi5pro.csc:57-58
Timestamp: 2025-07-23T07:30:52.265Z
Learning: In the Armbian build system, BOOTPATCHDIR can contain board-specific subdirectories (e.g., board_orangepi5pro) for applying patches to specific boards only. The framework automatically checks if such board-specific subdirectories exist for the board being built and applies those patches accordingly.
Applied to files:
patch/kernel/archive/sm8250-6.18/0000.patching_config.yaml
📚 Learning: 2025-09-27T21:47:58.020Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8678
File: config/kernel/linux-bcm2711-edge.config:859-861
Timestamp: 2025-09-27T21:47:58.020Z
Learning: In the Armbian build system, kernel configuration files in config/kernel/ are generated through an automated process: taking previous config → applying scripted changes from armbian-kernel.sh → running kernel's `make oldconfig` → processing by Armbian machinery back into config files. This automated process properly handles kernel configuration dependencies and reduces the likelihood of manual configuration errors.
Applied to files:
patch/kernel/archive/sm8250-6.18/0000.patching_config.yamlconfig/kernel/linux-sm8250-edge.config
📚 Learning: 2025-09-27T21:50:04.845Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8678
File: config/kernel/linux-sm8250-edge.config:80-82
Timestamp: 2025-09-27T21:50:04.845Z
Learning: In the Armbian build system, kernel configuration files are generated through this automated process: taking previous config → applying scripted changes from armbian-kernel.sh → running kernel's `make oldconfig` → processing by Armbian machinery back into config files. This automated process properly handles kernel configuration dependencies and reduces the likelihood of manual configuration errors.
Applied to files:
patch/kernel/archive/sm8250-6.18/0000.patching_config.yamlconfig/kernel/linux-sm8250-edge.config
📚 Learning: 2026-01-03T20:46:29.189Z
Learnt from: rpardini
Repo: armbian/build PR: 9159
File: patch/u-boot/u-boot-genio/0026-dts-configs-add-Grinn-GenioSBC-510.patch:161-161
Timestamp: 2026-01-03T20:46:29.189Z
Learning: For the Armbian genio family (config/sources/families/genio.conf and patch/u-boot/u-boot-genio/), when reviewing PRs that include vendor U-Boot patches from Collabora, avoid flagging potential issues in board configurations that are out of scope for the PR's primary focus (e.g., don't flag Genio 510/700 board issues when the PR is focused on radxa-nio-12l/Genio 1200). The maintainer prioritizes keeping vendor patches close to upstream for easier re-copying and maintenance, even if secondary board configs have potential mismatches.
<!-- </add_learning>
Applied to files:
patch/kernel/archive/sm8250-6.18/0000.patching_config.yaml
📚 Learning: 2025-09-27T21:49:55.796Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8678
File: config/kernel/linux-sm8250-current.config:78-80
Timestamp: 2025-09-27T21:49:55.796Z
Learning: In the Armbian build system, kernel configuration files are generated through an automated process: taking previous config → applying scripted changes from armbian-kernel.sh → running kernel's `make oldconfig` → processing by Armbian machinery back into config files. This automated process properly handles kernel configuration dependencies and reduces the likelihood of manual configuration errors.
Applied to files:
patch/kernel/archive/sm8250-6.18/0000.patching_config.yamlconfig/kernel/linux-sm8250-edge.config
📚 Learning: 2025-08-03T15:21:20.148Z
Learnt from: pyavitz
Repo: armbian/build PR: 8455
File: config/sources/families/sun50iw1.conf:19-24
Timestamp: 2025-08-03T15:21:20.148Z
Learning: In the Armbian build system, when copying firmware files during family_tweaks_s(), use /lib/firmware/updates/ instead of /lib/firmware/ to avoid conflicts with the Armbian firmware package. The /lib/firmware/updates directory takes precedence in Linux firmware loading hierarchy and is the proper location for user-installed firmware files.
Applied to files:
patch/kernel/archive/sm8250-6.18/0023-Asoc-wm_adsp-Use-xiaomi-elish-firmware-name.patch
📚 Learning: 2025-03-31T22:20:41.849Z
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75
Timestamp: 2025-03-31T22:20:41.849Z
Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.
Applied to files:
patch/kernel/archive/sm8250-6.18/0024-input-nt36523-short-the-firmware-download-delay-from.patch
📚 Learning: 2025-11-08T06:39:24.527Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8886
File: patch/kernel/rk35xx-vendor-6.1/dt/rk3528-nanopi-rev01.dts:9-9
Timestamp: 2025-11-08T06:39:24.527Z
Learning: In Armbian's Rockchip vendor kernel branches (rk35xx-vendor), device tree files may not require the same headers as mainline Linux. For example, input key definitions like KEY_BACK and KEY_VOLUMEUP may be handled differently in BSP kernels and don't necessarily need explicit includes like <dt-bindings/input/input.h> that would be required in mainline kernel device trees.
Applied to files:
patch/kernel/archive/sm8250-6.18/0016-arm64-dts-qcom-sm8250-xiaomi-elish-add-keyboard-supp.patchpatch/kernel/archive/sm8250-6.18/0009-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Add-dev.patchpatch/kernel/archive/sm8250-6.18/0039-input-add-Qualcomm-SPMI-haptics-driver.patch
📚 Learning: 2025-08-30T04:13:16.457Z
Learnt from: tabrisnet
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-30T04:13:16.457Z
Learning: Armbian kernel configuration files like linux-filogic-current.config are autogenerated overlays on top of arch defconfig. Comments added manually will be lost during future updates by maintainers, and explicit "CONFIG_OPTION is not set" statements aren't needed for mutually exclusive options since these are overlay configs that only specify changes from the base configuration.
Applied to files:
config/kernel/linux-sm8250-edge.config
📚 Learning: 2025-03-31T12:57:13.880Z
Learnt from: libiunc
Repo: armbian/build PR: 8033
File: config/kernel/linux-starfive2-vendor.config:43-43
Timestamp: 2025-03-31T12:57:13.880Z
Learning: For StarFive2 platform kernel configurations, maintain alignment with vendor-provided configurations rather than modifying security settings like SECCOMP. This ensures hardware compatibility as intended by the manufacturer.
Applied to files:
config/kernel/linux-sm8250-edge.config
📚 Learning: 2025-10-23T19:48:42.980Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8812
File: config/kernel/linux-sm8250-edge.config:498-501
Timestamp: 2025-10-23T19:48:42.980Z
Learning: For Armbian EDGE kernel configs, CONFIG_ATH12K=m alone is sufficient for PCI-based Wi-Fi 7 devices (e.g., WCN785x/QCN9274). A separate CONFIG_ATH12K_PCI option is not required, as confirmed by maintainer testing.
Applied to files:
config/kernel/linux-sm8250-edge.config
📚 Learning: 2025-09-27T21:50:15.915Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8678
File: config/kernel/linux-sunxi64-current.config:94-94
Timestamp: 2025-09-27T21:50:15.915Z
Learning: When kernel config files are generated through Armbian's automated process (previous config → armbian-kernel.sh changes → make oldconfig → Armbian machinery processing), manual config file edits are not appropriate since they would be overwritten. Deprecated option handling should be implemented in the automated tooling instead.
Applied to files:
config/kernel/linux-sm8250-edge.config
📚 Learning: 2025-12-23T04:44:34.317Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 9067
File: patch/kernel/archive/rockchip64-6.19/dt/rk3399-orangepi-4-lts.dts:869-875
Timestamp: 2025-12-23T04:44:34.317Z
Learning: When reviewing device tree changes, validate node properties against the official kernel device tree binding documentation (*.yaml files) rather than relying solely on historical patterns in existing DTS files. Copy-paste errors can persist across versions, and bindings define the authoritative set of valid properties for each device node type.
Applied to files:
patch/kernel/archive/sm8250-6.18/0009-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Add-dev.patch
📚 Learning: 2025-09-18T03:36:17.862Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8537
File: config/boards/qcom-robotics-rb5.conf:1-1
Timestamp: 2025-09-18T03:36:17.862Z
Learning: In Armbian board configuration files (regardless of file extension), the standard pattern is to have only one line as a comment describing the board hardware specifications. This single-line description typically includes the SoC model, core count, RAM options, and key features like connectivity options, storage interfaces, and special features. The file extensions indicate board support status: .conf (standard support), .csc (community supported), .eos (end of support), .tvb (tvbox), .wip (work in progress).
Applied to files:
patch/kernel/archive/sm8250-6.18/0009-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Add-dev.patch
📚 Learning: 2025-07-27T15:53:30.629Z
Learnt from: pyavitz
Repo: armbian/build PR: 8421
File: config/kernel/linux-sunxi64-edge.config:805-825
Timestamp: 2025-07-27T15:53:30.629Z
Learning: In the Armbian build system, kernel configurations prioritize broad hardware compatibility over optimization concerns. Even when including numerous legacy/obsolete drivers causes technical issues like increased initramfs size and slower enumeration, the project philosophy is to "appease the masses" by ensuring maximum device compatibility rather than optimizing for specific use cases.
Applied to files:
patch/kernel/archive/sm8250-6.18/0009-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Add-dev.patch
📚 Learning: 2025-07-17T04:12:33.125Z
Learnt from: pyavitz
Repo: armbian/build PR: 8388
File: config/boards/kickpik2b.conf:1-14
Timestamp: 2025-07-17T04:12:33.125Z
Learning: In the Armbian build system, board configuration files (*.conf) follow a project standard of not including shebang lines, even though they contain bash code and are sourced by the build system. This is an established Armbian convention that individual contributors are expected to follow, and changes to this standard would require broader project maintainer approval.
Applied to files:
patch/kernel/archive/sm8250-6.18/0009-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Add-dev.patch
📚 Learning: 2025-09-18T03:36:17.862Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8537
File: config/boards/qcom-robotics-rb5.conf:1-1
Timestamp: 2025-09-18T03:36:17.862Z
Learning: In Armbian board configuration files, .wip and .conf extensions require BOARD_MAINTAINER to be present and contain at least one maintainer. If no maintainer is present, the board support rules state it does not qualify for standard support and must be moved to community support (.csc extension). This is documented at https://docs.armbian.com/User-Guide_Board-Support-Rules/
Applied to files:
patch/kernel/archive/sm8250-6.18/0009-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Add-dev.patch
📚 Learning: 2025-09-09T07:30:22.419Z
Learnt from: amazingfate
Repo: armbian/build PR: 8595
File: lib/functions/compilation/patch/drivers_network.sh:0-0
Timestamp: 2025-09-09T07:30:22.419Z
Learning: RTW_WARN_LMT sed workaround in driver_rtl8852bs() function in lib/functions/compilation/patch/drivers_network.sh is necessary for kernel 6.1 compatibility, even when the upstream wifi-rtl8852bs driver has the macro defined for newer kernels. The workaround ensures cross-kernel compatibility from 6.1 to 6.16+.
Applied to files:
patch/kernel/archive/sm8250-6.18/0021-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Restore.patch
📚 Learning: 2025-08-02T14:59:28.145Z
Learnt from: amazingfate
Repo: armbian/build PR: 8453
File: lib/functions/compilation/patch/drivers_network.sh:213-216
Timestamp: 2025-08-02T14:59:28.145Z
Learning: The wireless driver patches wireless-rtl8812au-Fix-6.16.patch, wireless-rtl8811cu-Fix-6.16.patch, and wireless-rtl88x2bu-Fix-6.16.patch in the Armbian build system are backward compatible and can be applied unconditionally without version checks, even though they're named for 6.16+ fixes.
Applied to files:
patch/kernel/archive/sm8250-6.18/0021-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Restore.patch
📚 Learning: 2025-07-17T04:16:29.551Z
Learnt from: pyavitz
Repo: armbian/build PR: 8388
File: config/boards/kickpik2b.conf:56-72
Timestamp: 2025-07-17T04:16:29.551Z
Learning: For AIC8800 Bluetooth devices in Armbian board configurations, systemd service configurations intentionally use Type=idle and boot delays because there is no compatibility to load AIC8800 bluetooth in mainline kernel. These delays and service timing are necessary workarounds for hardware limitations rather than performance issues.
Applied to files:
patch/kernel/archive/sm8250-6.18/0021-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Restore.patch
📚 Learning: 2025-10-22T07:51:53.015Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8789
File: config/kernel/linux-sunxi64-edge.config:839-839
Timestamp: 2025-10-22T07:51:53.015Z
Learning: In Armbian's wireless driver configuration, CONFIG_RK_WIFI_DEVICE_* options are Rockchip-specific device registration settings, while CONFIG_WLAN_UWE* are the actual cross-platform driver modules for UWE5622 wireless chips. The UWE5622 chip (manufactured by Unisoc/Spreadtrum) is used on multiple Allwinner boards including Orange Pi Zero 2/2W/3 and Orange Pi 3 LTS, so CONFIG_WLAN_UWE5621/5622 along with Unisoc infrastructure options (CONFIG_SPARD_WLAN_SUPPORT, CONFIG_SC23XX, CONFIG_UNISOC_WIFI_PS, CONFIG_WCN_BSP_DRIVER_BUILDIN) are correct in sunxi64 kernel configs.
Applied to files:
patch/kernel/archive/sm8250-6.18/0021-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Restore.patch
patch/kernel/archive/sm8250-6.18/0013-input-nt36xxx-Enable-pen-support.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0013-input-nt36xxx-Enable-pen-support.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0014-nt36xxx-add-pen-input-resolution.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0027-Input-touchscreen-add-Synaptics-TCM-oncell-S3908.patch
Outdated
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0038-Input-driver-for-AYN-Odin2-Gamepad.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0038-Input-driver-for-AYN-Odin2-Gamepad.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0038-Input-driver-for-AYN-Odin2-Gamepad.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0039-input-add-Qualcomm-SPMI-haptics-driver.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0039-input-add-Qualcomm-SPMI-haptics-driver.patch
Show resolved
Hide resolved
|
If 6.18 works we can bump current to 6.18 since it is aleady new lts. |
I have tested most of the features on xiaomi-elish and used it for a week. I think 6.18 is quite stable on sm8250. |
|
Currently, all Armbian-supported SM8250 devices have available device trees. |
|
@tjstyle Can you help me test how it works on Retroid Pocket? |
There was a problem hiding this comment.
Actionable comments posted: 14
🤖 Fix all issues with AI agents
In
@patch/kernel/archive/sm8250-6.18/0032-power-supply-Driver-for-Qualcomm-SMB5-Signed-off-by-.patch:
- Around line 445-449: The code uses usb_online returned by
smb5_get_prop_usb_online without checking the function return code; update the
smb5_get_prop_usb_online call in the same function (like
smb5_apsd_get_charger_type) to check rc immediately and return rc on error
before testing usb_online, then only set *val = POWER_SUPPLY_STATUS_DISCHARGING
when rc == 0 and usb_online is false.
- Around line 21-28: The Kconfig entry for CHARGER_QCOM_SMB5 has a misleading
short description ("Qualcomm PMI8998 PMIC charger driver") copied from another
config; update the wording in the CHARGER_QCOM_SMB5 tristate/descriptive string
to correctly reference SMB5/PM8150B (e.g., "Qualcomm PM8150B/SMB5 PMIC charger
driver" or similar) so the short description matches the help text and driver
target.
- Around line 396-400: smb5_get_prop_usb_online's return value (rc) isn't
checked before using usb_online; verify rc after calling
smb5_get_prop_usb_online and handle errors before reading usb_online — e.g., if
rc < 0 return rc (or set *val to an appropriate default and return rc) instead
of using usb_online when the call failed; update the block around
smb5_get_prop_usb_online, usb_online, *val and POWER_SUPPLY_USB_TYPE_UNKNOWN
accordingly.
- Around line 728-729: The regmap write is missing the driver's base offset:
change the regmap_write call that currently passes BARK_BITE_WDOG_PET to use the
full register address by adding chip->base (i.e., pass chip->base +
BARK_BITE_WDOG_PET) so regmap_write(chip->regmap, chip->base +
BARK_BITE_WDOG_PET, BARK_BITE_WDOG_PET_BIT); keep the same regmap, bit constant
and error handling.
- Around line 597-599: The handler logs battery overvoltage when
CHARGER_ERROR_STATUS_BAT_OV_BIT is set but never updates the health output;
modify the function that checks stat (the block containing
CHARGER_ERROR_STATUS_BAT_OV_BIT and dev_err) to set *val =
POWER_SUPPLY_HEALTH_OVERVOLTAGE when that bit is present and ensure the function
returns that health (or short-circuits further checks) so callers don't
incorrectly report POWER_SUPPLY_HEALTH_GOOD.
In
@patch/kernel/archive/sm8250-6.18/0033-power-supply-Driver-for-Qualcomm-FG.patch:
- Around line 487-489: The debug message passed to dev_vdbg (the call using
chip->dev with the format string "Wrtiting address 0x%x with offset %d of length
%d to SRAM") contains a typo; update the format string to "Writing address 0x%x
with offset %d of length %d to SRAM" (or similar grammar like "with offset %d
and length %d") in that dev_vdbg invocation to correct the spelling.
- Around line 1157-1165: The code unconditionally assigns chip->status =
propval.intval even when power_supply_get_property() (called for psy ==
chip->chg_psy) fails, so guard the use of propval by checking the return value:
after calling power_supply_get_property(psy, POWER_SUPPLY_PROP_STATUS, &propval)
set chip->status = POWER_SUPPLY_STATUS_UNKNOWN on error (ret != 0) and only
assign chip->status = propval.intval when ret == 0; leave the
power_supply_changed(chip->batt_psy) call as-is.
- Around line 1223-1229: Typo in the dev_err message: change "sourete" to
"source" in the error string emitted after qcom_fg_masked_write; locate the
block that calls qcom_fg_masked_write with MEM_INTF_IMA_CFG(chip) and update the
dev_err call (using chip->dev) to log "Failed to configure interrupt source:
%d\n" so the message is correct and still includes the return code.
- Around line 497-517: The loop writes 'len' bytes via qcom_fg_write to
MEM_INTF_WR_DATA0 but the data interface is 4 bytes wide, so it must only write
up to (4 - offset) bytes per iteration; change the loop in the function using
qcom_fg_write/MEM_INTF_WR_DATA0/MEM_INTF_ADDR_LSB to compute write_size =
min(len, 4 - offset), call qcom_fg_write with write_size (to MEM_INTF_WR_DATA0 +
offset), check ret and goto out on error, then advance addr by 4 (per-word
address increment), advance wr_data by write_size, subtract write_size from len,
and set offset = 0 before the next iteration. Ensure the initial address write
(qcom_fg_write to MEM_INTF_ADDR_LSB) remains unchanged and error-checked.
- Around line 1045-1049: The error message in the qcom_fg_read call is wrong:
change the dev_err invocation in the qcom_fg_read error path to indicate a read
failure (e.g., "Failed to read RD_DATA3: %d\n") instead of "Failed to write
RD_DATA3", so update the dev_err in the block after ret = qcom_fg_read(...) to
correctly reflect the operation (use the same dev_err(chip->dev, ...) call but
with "read" in the message).
- Around line 436-456: The loop can request more than the 4-byte SRAM register
window and corrupt data; compute a chunk = min(len, 4 - offset), call
qcom_fg_read(chip, rd_data, MEM_INTF_RD_DATA0(chip) + offset, chunk), then
update rd_data += chunk, len -= chunk, set offset = 0, and only advance addr by
4 when chunk == (4 - offset) (i.e., when you consumed the rest of the current
4-byte word); retain error checks around qcom_fg_write/qcom_fg_read and use the
same symbols (qcom_fg_write, qcom_fg_read, MEM_INTF_RD_DATA0, addr, rd_data,
len, offset) to locate and apply this fix.
In
@patch/kernel/archive/sm8250-6.18/0041-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch:
- Line 630: Fix inconsistent indentation by replacing mixed spaces with tabs for
the device tree properties: ensure the `color = <LED_COLOR_ID_RED>;` line uses a
leading tab (not spaces), the `enable-gpios = <...>;` property on the
`enable-gpios` line uses a leading tab, normalize the gpio configuration block
(the lines configuring GPIOs around the gpio entries at the block containing the
gpio setup on lines ~1066-1070) to use tabs for all indentation, and remove
trailing whitespace after the `"HPHR_OUT",` entry; keep tabs as the consistent
indentation style to match kernel DTS coding standards.
- Line 24: Remove the stray `/dts-v1/;` directive from the .dtsi include (it
should only be in top-level .dts files); locate the line containing `/dts-v1/;`
(as shown in the diff) and delete it so the include file no longer contains the
directive, then re-run device-tree compilation to verify the error is resolved.
- Around line 4-5: The patch Subject is malformed: the "Subject:" header is
split and includes the Signed-off-by line; fix the commit header so the Subject
is a single clean line like "arm64: dts: qcom: add SM8250 Retroid Pocket
variant" and move the "Signed-off-by: Teguh Sobirin <teguh@sobir.in>" into the
patch body/footer (commit message body) beneath the subject, ensuring no other
header lines are broken or wrapped across multiple lines.
🧹 Nitpick comments (11)
patch/kernel/archive/sm8250-6.18/0033-power-supply-Driver-for-Qualcomm-FG.patch (2)
743-743: Missing space in temperature calculation.Missing space between minus operator and constant for consistency with coding style.
✨ Proposed fix
- *val = temp -2730; + *val = temp - 2730; return 0;
1386-1387: Code style: Add space afterifkeyword.The Linux kernel coding style prefers a space after control flow keywords (
if,while,for). This pattern appears in multiple locations throughout the file (lines 303, 332, 337, 371, 1386).✨ Example fix for this location
- if(chip->sram_wq) + if (chip->sram_wq) destroy_workqueue(chip->sram_wq);patch/kernel/archive/sm8250-6.18/0035-arm64-dts-qcom-pm8150b-Add-a-FG-Signed-off-by-Teguh-.patch (1)
4-5: Malformed patch subject line.The
Signed-off-bytrailer is concatenated into the Subject line instead of being in the commit message body. This should be:Subject: arm64: dts: qcom: pm8150b: Add a FG Signed-off-by: Teguh Sobirin <teguh@sobir.in>While this doesn't affect patch application, it results in a confusing git history entry.
patch/kernel/archive/sm8250-6.18/0034-arm64-dts-qcom-pm8150b-Add-a-charger-Signed-off-by-T.patch (1)
4-5: Same malformed subject line issue.The
Signed-off-bytrailer is concatenated into the Subject line. Same fix as the fuel gauge patch applies here.patch/kernel/archive/sm8250-6.18/0032-power-supply-Driver-for-Qualcomm-SMB5-Signed-off-by-.patch (7)
4-5: Same malformed subject line.All three patches in this series have the
Signed-off-byincorrectly concatenated into the Subject line.
307-308: Minor typo in comment.The comment says "pmi8150b" but should be "pm8150b" to match the driver name.
493-493: Trailing whitespace.Line 493 has trailing whitespace after the multiplication operator.
521-523: Consistent pattern: unchecked return value.Same pattern -
smb5_get_prop_usb_onlinereturn value isn't checked. Consider a consistent error handling approach across all call sites.
736-742: Static descriptor name is misleading but overwritten.The static
.name = "pmi8998_charger"doesn't match the actual device, but the probe function correctly generates the name from match data. Consider using a generic placeholder like"smb5_charger"for clarity.Also, Line 741 has inconsistent indentation (extra leading space).
935-937: Variable reuse reduces clarity.The
rcvariable is used both for the calculated voltage value and the return code fromregmap_update_bits. While functional, this is confusing. Consider using a separate variable for the calculation.Suggested improvement
- rc = (chip->batt_info->voltage_max_design_uv - 3487500) / 7500 + 1; - rc = regmap_update_bits(chip->regmap, chip->base + FLOAT_VOLTAGE_CFG, - FLOAT_VOLTAGE_SETTING_MASK, rc); + int vfloat = (chip->batt_info->voltage_max_design_uv - 3487500) / 7500 + 1; + rc = regmap_update_bits(chip->regmap, chip->base + FLOAT_VOLTAGE_CFG, + FLOAT_VOLTAGE_SETTING_MASK, vfloat);
972-972: Typo: "sentinal" should be "sentinel".Common typo in kernel driver boilerplate.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (9)
config/sources/families/sm8250.confpatch/kernel/archive/sm8250-6.18/0000.patching_config.yamlpatch/kernel/archive/sm8250-6.18/0029-arm64-dts-qcom-Add-venus-firmware-for-OnePlus-8T.patchpatch/kernel/archive/sm8250-6.18/0031-arm64-dts-qcom-sm8250-add-uart16-Signed-off-by-Teguh.patchpatch/kernel/archive/sm8250-6.18/0032-power-supply-Driver-for-Qualcomm-SMB5-Signed-off-by-.patchpatch/kernel/archive/sm8250-6.18/0033-power-supply-Driver-for-Qualcomm-FG.patchpatch/kernel/archive/sm8250-6.18/0034-arm64-dts-qcom-pm8150b-Add-a-charger-Signed-off-by-T.patchpatch/kernel/archive/sm8250-6.18/0035-arm64-dts-qcom-pm8150b-Add-a-FG-Signed-off-by-Teguh-.patchpatch/kernel/archive/sm8250-6.18/0041-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch
🚧 Files skipped from review as they are similar to previous changes (1)
- patch/kernel/archive/sm8250-6.18/0000.patching_config.yaml
🧰 Additional context used
🧠 Learnings (23)
📓 Common learnings
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.
Learnt from: rpardini
Repo: armbian/build PR: 9159
File: patch/u-boot/u-boot-genio/0026-dts-configs-add-Grinn-GenioSBC-510.patch:161-161
Timestamp: 2026-01-03T20:46:29.189Z
Learning: For the Armbian genio family (config/sources/families/genio.conf and patch/u-boot/u-boot-genio/), when reviewing PRs that include vendor U-Boot patches from Collabora, avoid flagging potential issues in board configurations that are out of scope for the PR's primary focus (e.g., don't flag Genio 510/700 board issues when the PR is focused on radxa-nio-12l/Genio 1200). The maintainer prioritizes keeping vendor patches close to upstream for easier re-copying and maintenance, even if secondary board configs have potential mismatches.
<!-- </add_learning>
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.
Learnt from: EvilOlaf
Repo: armbian/build PR: 9086
File: patch/kernel/archive/uefi-arm64-6.19/net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch.disabled:625-633
Timestamp: 2025-12-21T10:28:48.455Z
Learning: The patch "net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch" in patch/kernel/archive/uefi-arm64-6.19/ is known to break compilation on kernel 6.19 and is therefore disabled (has .disabled extension).
Learnt from: tabrisnet
Repo: armbian/build PR: 8913
File: config/sources/families/k3-beagle.conf:16-16
Timestamp: 2025-11-10T22:05:40.490Z
Learning: In the Armbian build system, kernel branches using non-mainline/vendor forks (like BeagleBoard's linux repository) should be named "vendor" or "vendor-rt" rather than "current" or "edge". The "current" and "edge" naming is reserved for mainline kernel branches. This affects both the case statement in family config files (e.g., `vendor | vendor-rt)` instead of `current | current-rt)`) and the corresponding KERNEL_TARGET declarations in board config files.
Learnt from: rpardini
Repo: armbian/build PR: 8879
File: config/sources/families/uefi-x86.conf:0-0
Timestamp: 2025-11-06T15:36:04.682Z
Learning: As of PR #8879, the uefi-x86 family in the Armbian build system now includes kernel patches for the first time. The current and edge branches for uefi-x86 are specifically configured for Apple T2-based x86 machines, including T2-specific patches from the linux-t2 project and custom kernel configuration options for Apple hardware drivers.
📚 Learning: 2025-12-17T05:09:02.306Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.
Applied to files:
patch/kernel/archive/sm8250-6.18/0031-arm64-dts-qcom-sm8250-add-uart16-Signed-off-by-Teguh.patchpatch/kernel/archive/sm8250-6.18/0035-arm64-dts-qcom-pm8150b-Add-a-FG-Signed-off-by-Teguh-.patchpatch/kernel/archive/sm8250-6.18/0034-arm64-dts-qcom-pm8150b-Add-a-charger-Signed-off-by-T.patchpatch/kernel/archive/sm8250-6.18/0041-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patchpatch/kernel/archive/sm8250-6.18/0029-arm64-dts-qcom-Add-venus-firmware-for-OnePlus-8T.patchpatch/kernel/archive/sm8250-6.18/0032-power-supply-Driver-for-Qualcomm-SMB5-Signed-off-by-.patch
📚 Learning: 2025-12-19T13:56:45.124Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Applied to files:
patch/kernel/archive/sm8250-6.18/0031-arm64-dts-qcom-sm8250-add-uart16-Signed-off-by-Teguh.patchpatch/kernel/archive/sm8250-6.18/0034-arm64-dts-qcom-pm8150b-Add-a-charger-Signed-off-by-T.patchpatch/kernel/archive/sm8250-6.18/0041-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patchpatch/kernel/archive/sm8250-6.18/0033-power-supply-Driver-for-Qualcomm-FG.patchconfig/sources/families/sm8250.confpatch/kernel/archive/sm8250-6.18/0032-power-supply-Driver-for-Qualcomm-SMB5-Signed-off-by-.patch
📚 Learning: 2025-11-20T18:20:11.985Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.
Applied to files:
patch/kernel/archive/sm8250-6.18/0031-arm64-dts-qcom-sm8250-add-uart16-Signed-off-by-Teguh.patchpatch/kernel/archive/sm8250-6.18/0041-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch
📚 Learning: 2025-03-31T22:20:41.849Z
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75
Timestamp: 2025-03-31T22:20:41.849Z
Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.
Applied to files:
patch/kernel/archive/sm8250-6.18/0031-arm64-dts-qcom-sm8250-add-uart16-Signed-off-by-Teguh.patch
📚 Learning: 2026-01-10T04:28:58.758Z
Learnt from: kasimling
Repo: armbian/build PR: 9177
File: patch/kernel/archive/rockchip64-6.18/rk3588-1212-arm64-dts-Automatic-fan-speed-and-USB-3.0-Type-A-por.patch:37-41
Timestamp: 2026-01-10T04:28:58.758Z
Learning: When reviewing Linux kernel device-tree bindings involving thermal cooling devices, THERMAL_NO_LIMIT can be used for both min_state (lower) and max_state (upper). If used as lower/min_state, the framework converts it to 0; if used as upper/max_state, it converts to the cooling device's max_state. Verify patch entries like: cooling-device = <&fan THERMAL_NO_LIMIT 1> are valid and correctly reflect the intended bounds. Ensure consistent interpretation of NO_LIMIT in both min and max contexts and that the resulting values align with the device's actual limits.
Applied to files:
patch/kernel/archive/sm8250-6.18/0031-arm64-dts-qcom-sm8250-add-uart16-Signed-off-by-Teguh.patchpatch/kernel/archive/sm8250-6.18/0035-arm64-dts-qcom-pm8150b-Add-a-FG-Signed-off-by-Teguh-.patchpatch/kernel/archive/sm8250-6.18/0034-arm64-dts-qcom-pm8150b-Add-a-charger-Signed-off-by-T.patchpatch/kernel/archive/sm8250-6.18/0041-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patchpatch/kernel/archive/sm8250-6.18/0029-arm64-dts-qcom-Add-venus-firmware-for-OnePlus-8T.patchpatch/kernel/archive/sm8250-6.18/0033-power-supply-Driver-for-Qualcomm-FG.patchpatch/kernel/archive/sm8250-6.18/0032-power-supply-Driver-for-Qualcomm-SMB5-Signed-off-by-.patch
📚 Learning: 2025-12-17T15:46:22.709Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 9096
File: patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-overlays.patch:4-5
Timestamp: 2025-12-17T15:46:22.709Z
Learning: In Armbian kernel patches, when patches are renamed or reorganized, the old Subject line may be intentionally preserved in the patch header (as a second Subject line) for archival/historical purposes to document the previous patch name. This is an Armbian-specific practice for tracking patch evolution and should not be flagged as an error when the maintainer has intentionally included it for documentation.
Applied to files:
patch/kernel/archive/sm8250-6.18/0035-arm64-dts-qcom-pm8150b-Add-a-FG-Signed-off-by-Teguh-.patchpatch/kernel/archive/sm8250-6.18/0034-arm64-dts-qcom-pm8150b-Add-a-charger-Signed-off-by-T.patchpatch/kernel/archive/sm8250-6.18/0041-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patchpatch/kernel/archive/sm8250-6.18/0029-arm64-dts-qcom-Add-venus-firmware-for-OnePlus-8T.patch
📚 Learning: 2026-01-07T18:21:41.085Z
Learnt from: rpardini
Repo: armbian/build PR: 9180
File: patch/kernel/archive/sm8250-6.18/0000.patching_config.yaml:4-8
Timestamp: 2026-01-07T18:21:41.085Z
Learning: In Armbian patch/kernel/archive/**/0000.patching_config.yaml files, the version metadata fields (name, branch, last-known-good-tag, kind, type) under the "info stuff" comment are not used by the patching scripts. When reviewing these files, do not suggest updating or fixing these metadata fields. Instead, suggest removing them entirely as they serve no functional purpose.
Applied to files:
patch/kernel/archive/sm8250-6.18/0041-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch
📚 Learning: 2026-01-03T20:46:29.189Z
Learnt from: rpardini
Repo: armbian/build PR: 9159
File: patch/u-boot/u-boot-genio/0026-dts-configs-add-Grinn-GenioSBC-510.patch:161-161
Timestamp: 2026-01-03T20:46:29.189Z
Learning: For the Armbian genio family (config/sources/families/genio.conf and patch/u-boot/u-boot-genio/), when reviewing PRs that include vendor U-Boot patches from Collabora, avoid flagging potential issues in board configurations that are out of scope for the PR's primary focus (e.g., don't flag Genio 510/700 board issues when the PR is focused on radxa-nio-12l/Genio 1200). The maintainer prioritizes keeping vendor patches close to upstream for easier re-copying and maintenance, even if secondary board configs have potential mismatches.
<!-- </add_learning>
Applied to files:
patch/kernel/archive/sm8250-6.18/0041-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patchconfig/sources/families/sm8250.conf
📚 Learning: 2025-11-08T06:39:24.527Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8886
File: patch/kernel/rk35xx-vendor-6.1/dt/rk3528-nanopi-rev01.dts:9-9
Timestamp: 2025-11-08T06:39:24.527Z
Learning: In Armbian's Rockchip vendor kernel branches (rk35xx-vendor), device tree files may not require the same headers as mainline Linux. For example, input key definitions like KEY_BACK and KEY_VOLUMEUP may be handled differently in BSP kernels and don't necessarily need explicit includes like <dt-bindings/input/input.h> that would be required in mainline kernel device trees.
Applied to files:
patch/kernel/archive/sm8250-6.18/0041-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch
📚 Learning: 2025-06-25T03:42:09.086Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8330
File: config/sources/families/sun55iw3.conf:32-36
Timestamp: 2025-06-25T03:42:09.086Z
Learning: In Armbian build system configuration files like config/sources/families/*.conf, KERNELSOURCE is explicitly declared when using unofficial or 3rd party kernel repositories (like the "dev" branch using https://github.com/apritzel/linux), but can be omitted when using the standard mainline kernel (like the "edge" branch) since it will fall back to the default mainline source.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-11-10T22:05:40.490Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8913
File: config/sources/families/k3-beagle.conf:16-16
Timestamp: 2025-11-10T22:05:40.490Z
Learning: In the Armbian build system, kernel branches using non-mainline/vendor forks (like BeagleBoard's linux repository) should be named "vendor" or "vendor-rt" rather than "current" or "edge". The "current" and "edge" naming is reserved for mainline kernel branches. This affects both the case statement in family config files (e.g., `vendor | vendor-rt)` instead of `current | current-rt)`) and the corresponding KERNEL_TARGET declarations in board config files.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-11-02T20:49:56.719Z
Learnt from: igorpecovnik
Repo: armbian/build PR: 8849
File: config/boards/radxa-e54c.csc:14-28
Timestamp: 2025-11-02T20:49:56.719Z
Learning: In Armbian board configuration files (config/boards/*.conf, *.csc, etc.), do not use kernel_config_set, kernel_config_set_m, kernel_config_set_y, or custom_kernel_config__* functions to modify kernel configuration. Kernel configuration is associated with LINUXFAMILY/BOARDFAMILY, not individual BOARD. Board-specific kernel modifications cause inconsistency in kernel packages published to the apt repository because boards within a family share the same kernel packages. Kernel configuration changes must be made in the appropriate kernel config file (e.g., config/kernel/linux-*-*.config) or in family configuration files (config/sources/families/*.conf, *.inc) instead.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-10-26T10:41:35.118Z
Learnt from: HackingGate
Repo: armbian/build PR: 8665
File: config/boards/photonicat2.csc:4-4
Timestamp: 2025-10-26T10:41:35.118Z
Learning: In the Armbian build system, rk3576 boards consistently use BOARDFAMILY="rk35xx" for both vendor and edge kernel targets. The rk35xx family configuration sources rockchip64_common.inc, which provides edge and current kernel branch definitions, making these branches available even though they're not defined directly in rk35xx.conf.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-06-25T03:40:52.109Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8330
File: config/sources/families/sun55iw3.conf:32-36
Timestamp: 2025-06-25T03:40:52.109Z
Learning: In Armbian build system configuration files like config/sources/families/*.conf, when KERNELSOURCE is not explicitly declared in a case branch, the system falls back to a default KERNELSOURCE value, so missing KERNELSOURCE declarations are not critical issues.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-12-12T23:09:56.813Z
Learnt from: tabrisnet
Repo: armbian/build PR: 9058
File: config/sources/families/spacemit.conf:39-45
Timestamp: 2025-12-12T23:09:56.813Z
Learning: In Armbian build configs for vendor kernel sources, prefer the following branch naming conventions: use 'vendor' or 'vendor-rt' for stable vendor releases, and 'vendor-edge' for bleeding-edge/pre-release vendor versions. The 'edge' naming without the 'vendor-' prefix is reserved for mainline kernel branches. Apply this pattern to family config files under config/sources/families (e.g., spacemit.conf) to ensure consistent vendor kernel sourcing naming across the repository.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-09-14T06:29:18.958Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:29:18.958Z
Learning: In the Armbian build system, vendor branch configurations in family files are designed to be shared across multiple SoCs within the same family that use the same vendor kernel tree. For example, rk35xx and rockchip-rk3588 families both use identical vendor branch settings (same KERNELSOURCE, KERNELBRANCH, and KERNELPATCHDIR), demonstrating that vendor branches are intentionally generic rather than SoC-specific.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-07-21T04:12:02.439Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-07-21T04:12:02.439Z
Learning: In the Armbian build system, for recurring maintenance tasks like kernel version bumping, TODO comments should use generic version formats (e.g., "MAJOR.MINOR-rc1") rather than specific version numbers (e.g., "6.17-rc1") to avoid the need for frequent comment updates that would create unnecessary maintenance overhead.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-10-13T02:26:18.249Z
Learnt from: tabrisnet
Repo: armbian/build PR: 8746
File: config/sources/families/filogic.conf:61-68
Timestamp: 2025-10-13T02:26:18.249Z
Learning: In the Armbian build system, the "edge" kernel branch is intended to be bleeding-edge and experimental. It does not require hardware testing or stability verification before merging, as it's expected to contain potentially unstable or untested code for early adopters and developers.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-04-30T16:16:47.150Z
Learnt from: The-going
Repo: armbian/build PR: 8147
File: config/sources/families/include/sunxi64_common.inc:38-39
Timestamp: 2025-04-30T16:16:47.150Z
Learning: The Armbian build system references Linux kernel versions in the form "tag:v6.14.4" in the KERNELBRANCH variable, even when point release tags might not be directly visible in the upstream repository in the same form.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-10-14T05:08:11.785Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8754
File: config/boards/bestv-r3300-l.csc:14-16
Timestamp: 2025-10-14T05:08:11.785Z
Learning: In the Armbian build system, BOOTBRANCH_BOARD is a valid framework variable used as a fallback when BOOTBRANCH is unset. The framework checks BOOTBRANCH_BOARD before applying the default bootloader branch value (see config/sources/common.conf). Board configuration files can use BOOTBRANCH_BOARD to specify the bootloader branch.
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-08-21T08:10:59.502Z
Learnt from: leggewie
Repo: armbian/build PR: 8524
File: config/boards/orangepi2.csc:6-6
Timestamp: 2025-08-21T08:10:59.502Z
Learning: Not all Armbian boards support all kernel versions (legacy, current, edge). Some boards may only support specific kernel versions due to hardware limitations or lack of mainline support, which is why their KERNEL_TARGET contains only the supported options (e.g., just "legacy").
Applied to files:
config/sources/families/sm8250.conf
📚 Learning: 2025-05-05T12:35:07.143Z
Learnt from: Grippy98
Repo: armbian/build PR: 8152
File: lib/functions/configuration/interactive.sh:209-266
Timestamp: 2025-05-05T12:35:07.143Z
Learning: For the interactive kernel selection in Armbian, KERNEL_MAJOR_MINOR and KERNEL_DESCRIPTION are parsed from family.conf but deliberately not set as environment variables to avoid potential interference with other parts of the build system.
Applied to files:
config/sources/families/sm8250.conf
🔇 Additional comments (13)
config/sources/families/sm8250.conf (2)
18-22: Verifylinux-6.18.yis the intended ref forcurrent(and exists in the expected kernel source).Looks fine structurally, but since this relies on external branch naming, please confirm the source you’re pulling from actually exposes
linux-6.18.yand Armbian’s kernel fetch logic resolvesbranch:linux-6.18.yas expected. (As per guidelines: external dependency/API validity should be verified.)
24-27: The missingKERNELBRANCHis intentional and not a bug.For mainline kernel branches (like "edge"), Armbian's build system automatically sets
KERNELBRANCHvia themainline_kernel_decide_version__900_defaults()hook inconfig/sources/mainline-kernel.conf.sh. WhenKERNEL_MAJOR_MINOR="6.19"is declared without an explicitKERNELBRANCH, the hook deterministically appliesKERNELBRANCH="branch:linux-6.19.y".This pattern is intentional and used consistently across many family configs (k3_common.inc, mvebu.conf, sm8550.conf, imx6.conf, etc.). The k3_common.inc file explicitly documents this:
# KERNELBRANCH defined in mainline-kernel.conf.sh.The build system is not falling back to an unintended default—it's executing a well-designed, explicit mechanism. The proposed fix would be redundant.
Likely an incorrect or invalid review comment.
patch/kernel/archive/sm8250-6.18/0041-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch (2)
1455-1560: RP5 variant structure looks good.The RP5 device tree properly includes the
/dts-v1/;directive (appropriate for .dts files), includes the common dtsi, and correctly overrides device-specific properties like framebuffer dimensions, LED groupings, and touchscreen configuration.
1561-1664: RPmini variant structure looks good.The RPmini device tree follows the same structure as RP5, with appropriate hardware-specific differences (960×1280 display vs 1080×1920, 90° rotation vs 270°). The variant properly reuses the common dtsi and overrides only device-specific properties.
patch/kernel/archive/sm8250-6.18/0031-arm64-dts-qcom-sm8250-add-uart16-Signed-off-by-Teguh.patch (3)
43-46: Pinctrl configuration follows established pattern.The qup_uart16_default state correctly defines the standard 2-pin UART configuration (TX/RX on gpio50, gpio51) and follows the same pattern as other UART pinctrl entries in this file (e.g., qup_uart12_default, qup_uart17_default).
1-10: Fix the commit message format.The commit subject line incorrectly includes the "Signed-off-by" text. The signature should be in the commit body, not the subject line.
Expected format:
Subject: arm64: dts: qcom: sm8250: add uart16 Signed-off-by: Teguh Sobirin <teguh@sobir.in>⛔ Skipped due to learnings
Learnt from: EvilOlaf Repo: armbian/build PR: 9096 File: patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-overlays.patch:4-5 Timestamp: 2025-12-17T15:46:22.709Z Learning: In Armbian kernel patches, when patches are renamed or reorganized, the old Subject line may be intentionally preserved in the patch header (as a second Subject line) for archival/historical purposes to document the previous patch name. This is an Armbian-specific practice for tracking patch evolution and should not be flagged as an error when the maintainer has intentionally included it for documentation.Learnt from: EvilOlaf Repo: armbian/build PR: 0 File: :0-0 Timestamp: 2025-12-17T05:09:02.306Z Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.Learnt from: EvilOlaf Repo: armbian/build PR: 8968 File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36 Timestamp: 2025-11-20T18:20:11.985Z Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.Learnt from: EvilOlaf Repo: armbian/build PR: 0 File: :0-0 Timestamp: 2025-12-19T13:56:45.124Z Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.Learnt from: rpardini Repo: armbian/build PR: 9180 File: patch/kernel/archive/sm8250-6.18/0000.patching_config.yaml:4-8 Timestamp: 2026-01-07T18:21:41.085Z Learning: In Armbian patch/kernel/archive/**/0000.patching_config.yaml files, the version metadata fields (name, branch, last-known-good-tag, kind, type) under the "info stuff" comment are not used by the patching scripts. When reviewing these files, do not suggest updating or fixing these metadata fields. Instead, suggest removing them entirely as they serve no functional purpose.Learnt from: rpardini Repo: armbian/build PR: 9159 File: patch/u-boot/u-boot-genio/0026-dts-configs-add-Grinn-GenioSBC-510.patch:161-161 Timestamp: 2026-01-03T20:46:29.189Z Learning: For the Armbian genio family (config/sources/families/genio.conf and patch/u-boot/u-boot-genio/), when reviewing PRs that include vendor U-Boot patches from Collabora, avoid flagging potential issues in board configurations that are out of scope for the PR's primary focus (e.g., don't flag Genio 510/700 board issues when the PR is focused on radxa-nio-12l/Genio 1200). The maintainer prioritizes keeping vendor patches close to upstream for easier re-copying and maintenance, even if secondary board configs have potential mismatches. <!-- </add_learning>
19-34: UART16 node definition is correct and properly ported.This patch is carried forward identically from sm8250-6.12, maintaining compatibility across the kernel version bump. The uart16 node shares address 0x888000 with the spi16 node (expected and correct for Qualcomm QUP blocks—these hardware units can be configured as SPI, I2C, or UART). Board-specific device trees should enable only one mode per QUP instance.
The node includes all required properties (compatible, clocks, interrupts, power domains, interconnects) and correctly sets status to "disabled" for the SoC-level device tree. No changes needed.
patch/kernel/archive/sm8250-6.18/0029-arm64-dts-qcom-Add-venus-firmware-for-OnePlus-8T.patch (1)
19-21: Use correct Venus firmware path from linux-firmware.The firmware path
qcom/sm8250/OnePlus/kebab/venus.mbndoes not match the linux-firmware directory structure. Venus firmware in linux-firmware is stored under versioned directories (qcom/venus-5.2/,qcom/venus-5.4/, etc.), not under device-specific subdirectories. For SM8250, usefirmware-name = "qcom/venus-5.4/venus.mbn"(orqcom/venus-5.2/venus.mbnfor older firmware). Alternatively, other OnePlus SM8250 devices in this patchset use"postmarketos/venus.mbn"— confirm which version is appropriate for OnePlus 8T and update accordingly.⛔ Skipped due to learnings
Learnt from: EvilOlaf Repo: armbian/build PR: 0 File: :0-0 Timestamp: 2025-12-17T05:09:02.306Z Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.Learnt from: paolosabatino Repo: armbian/build PR: 9171 File: patch/misc/bluetooth-rtl8723cs/bluetooth-btrtl-add-rtl8703bs.patch:34-34 Timestamp: 2026-01-06T21:17:42.268Z Learning: In Linux kernel btrtl.c driver patches, recent kernel practice removes the .bin extension from fw_name entries in ic_id_table[] to support multiple firmware file formats/versions. The driver's firmware-parsing code dynamically selects the correct file variant. When reviewing bluetooth-rtl patches, fw_name without .bin extension (e.g., "rtl_bt/rtl8723cs_xx_fw") is the modern correct pattern, not an error.Learnt from: EvilOlaf Repo: armbian/build PR: 9067 File: patch/kernel/archive/rockchip64-6.19/dt/rk3399-orangepi-4-lts.dts:869-875 Timestamp: 2025-12-23T04:44:34.317Z Learning: When reviewing device tree changes, validate node properties against the official kernel device tree binding documentation (*.yaml files) rather than relying solely on historical patterns in existing DTS files. Copy-paste errors can persist across versions, and bindings define the authoritative set of valid properties for each device node type.Learnt from: EvilOlaf Repo: armbian/build PR: 0 File: :0-0 Timestamp: 2025-12-19T13:56:45.124Z Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.Learnt from: rpardini Repo: armbian/build PR: 9180 File: patch/kernel/archive/sm8250-6.18/0000.patching_config.yaml:4-8 Timestamp: 2026-01-07T18:21:41.085Z Learning: In Armbian patch/kernel/archive/**/0000.patching_config.yaml files, the version metadata fields (name, branch, last-known-good-tag, kind, type) under the "info stuff" comment are not used by the patching scripts. When reviewing these files, do not suggest updating or fixing these metadata fields. Instead, suggest removing them entirely as they serve no functional purpose.patch/kernel/archive/sm8250-6.18/0034-arm64-dts-qcom-pm8150b-Add-a-charger-Signed-off-by-T.patch (2)
19-37: Charger DT node looks correct and matches the driver.The node structure aligns with the SMB5 charger driver in patch 0032. The
io-channelsproperty references ADC channels 7 and 8 which are added in this same patch.
46-56: ADC channel node names should be validated against the official QCOM ADC5 device tree binding documentation.The patch uses
channel@7andchannel@8withregvalues ofADC5_USB_IN_IandADC5_USB_IN_V_16respectively. According to upstream QCOM ADC5 patterns, generic channel node names likeadc-chan@<N>are preferred, and the unit-address should match the actual register value. Additionally, the IIO mappings suggestADC5_USB_IN_Icorresponds to index 0, not 7, indicating a potential mismatch between node names and their register definitions.Verify that the chosen node names and their unit-addresses align with the official QCOM ADC5 binding documentation (qcom,spmi-adc5-gen3.yaml in upstream kernel) and confirm the actual values of the ADC5_* macros to ensure DT compatibility.
patch/kernel/archive/sm8250-6.18/0032-power-supply-Driver-for-Qualcomm-SMB5-Signed-off-by-.patch (2)
41-41: Makefile entry is correct.The object file name matches the source file and is properly gated by the config option.
564-583: IIO channel reading logic is correct.The function appropriately returns 0 when not charging (avoiding unnecessary IIO reads) and properly validates the channel pointer.
patch/kernel/archive/sm8250-6.18/0035-arm64-dts-qcom-pm8150b-Add-a-FG-Signed-off-by-Teguh-.patch (1)
19-25: The fuel gauge driver already exists in patch 0033 (power-supply-Driver-for-Qualcomm-FG.patch), which precedes this DT node patch in the series. The driver includes explicit support forqcom,pm8150b-fgwith the registered device match entry andops_fg_gen4operations structure. The DT node is correctly structured and the driver dependency is satisfied.
...h/kernel/archive/sm8250-6.18/0028-From-Teguh-Sobirin-teguh-sobir.in-Date-Sun-24-Nov-20.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0028-From-Teguh-Sobirin-teguh-sobir.in-Date-Sun-24-Nov-20.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0028-From-Teguh-Sobirin-teguh-sobir.in-Date-Sun-24-Nov-20.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0028-From-Teguh-Sobirin-teguh-sobir.in-Date-Sun-24-Nov-20.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0028-From-Teguh-Sobirin-teguh-sobir.in-Date-Sun-24-Nov-20.patch
Outdated
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0024-power-supply-Add-driver-for-Qualcomm-PMIC-fuel-gauge.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0024-power-supply-Add-driver-for-Qualcomm-PMIC-fuel-gauge.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0041-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0041-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0041-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch
Show resolved
Hide resolved
|
@CodeChenL Hello, thank you for your work! I was originally planning to bump the SM8250 current kernel to 6.18, but I’ve closed my task after seeing your PR. Would it be possible for you to bump the current kernel to 6.18 instead of the edge kernel? If that’s not convenient for you, I can try to bump current to 6.18 and edge to 6.19 once this PR is merged. However, I don't have a Xiaomi device; I only have an SM8250 device that I maintain downstream. Would you be able to help with testing when the time comes? :) |
This is exactly what I did last night, advancing current to 6.18. I would be very happy to test with you! |
|
I am gradually porting the 6.12 patch to 6.18, and after the review, I will organize the commits neatly. |
Ah, I just checked the commit messages and you're right. My apologies for the oversight! Anyway, thank you for the clarification and for your work. |
|
But the 0010-0015 section in https://github.com/armbian/build/tree/main/patch/kernel/archive/sm8250-6.12 confuses me, what problem is it used to fix? A large screen? which device depends on these patches? |
These patches are introduced from kernel of postmarket os. If xiaomi elish can work without them, we can consider dropping them since they're not merged mainline for a long time. |
Currently, the DSI screen of Xiaomi-Elish is functioning perfectly. It's really great to receive this news, because they deviate too far from the main line, making it difficult to port |
I'm not very familiar with DRM and Qualcomm DPU, but I suspect these patches are optimizing for dual-DSI screen devices or single screens using dual DSI controllers? I've checked other projects like Batocera, REG-Linux, and ROCKNIX—which mainly support Retroid handhelds—and it seems they don't have these specific patches in their 6.18 kernels. |
There was a problem hiding this comment.
Actionable comments posted: 8
🤖 Fix all issues with AI agents
In
@patch/kernel/archive/sm8250-6.18/0006-ASoC-qcom-sm8250-Add-tdm-support.patch:
- Around line 100-107: The loop using for_each_rtd_codec_dais sets codec formats
and sysclk but ignores snd_soc_dai_set_sysclk’s return value; modify the loop so
you capture and check the return of snd_soc_dai_set_sysclk (e.g., assign its
return to ret), and if ret < 0 log the error with dev_err(rtd->dev, "TDM sysclk
err:%d\n", ret) and return ret, just like the existing check for
snd_soc_dai_set_fmt; keep snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt) and
TDM_BCLK_RATE/SNDRV_PCM_STREAM_PLAYBACK usage intact.
In
@patch/kernel/archive/sm8250-6.18/0025-drm-mipi-add-mipi_dsi_generic_write_multi_type.patch:
- Around line 34-36: The doc comment for mipi_dsi_generic_write_multi_type is
incorrect: it claims the function "will automatically choose the right data type
depending on the payload length" but the function takes an explicit type
parameter named type and uses it directly; update the comment to state that the
caller-provided type is used (do not claim auto-selection), remove or replace
the misleading sentence, and briefly document the type parameter behavior and
expected payload handling so the comment matches the implementation.
In
@patch/kernel/archive/sm8250-6.18/0026-drm-panel-add-driver-for-samsung-amb655x.patch:
- Around line 274-278: The error log in the regulator_bulk_disable path is
incorrect: when calling regulator_bulk_disable(ARRAY_SIZE(amb655x->supplies),
amb655x->supplies) the dev_err currently says "Failed to enable regulators";
change the message to reflect the disable action (e.g., "Failed to disable
regulators: %d\n") so the dev_err(dev, ...) correctly reports failures from
regulator_bulk_disable and continue returning ret. Include the same ret variable
and dev as currently used.
- Around line 372-379: The probe currently logs regulator_bulk_enable failures
but continues execution and never disables regulators on later failures; change
the regulator_bulk_enable call handling to return on error (use ret from
regulator_bulk_enable), and add an err_disable_regulators label that calls
regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies) and then
returns the appropriate dev_err_probe(...) result; update all subsequent error
paths (failure of devm_gpiod_get_optional for ctx->reset_gpio, backlight init,
dsi_attach, etc.) to jump to err_disable_regulators so regulators are always
disabled on error.
In
@patch/kernel/archive/sm8250-6.18/0036-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patch:
- Around line 320-332: of_property_read_u32 may leave rotation uninitialized and
the current flow falls through even on error; initialize rotation to a safe
sentinel (e.g., -1), check the return value from of_property_read_u32 and if it
fails set ctx->orientation = DRM_MODE_PANEL_ORIENTATION_UNKNOWN and skip further
parsing, and when parsing valid values use explicit checks for 0/90/180/270
mapping to DRM_MODE_PANEL_ORIENTATION_NORMAL/RIGHT_UP/BOTTOM_UP/LEFT_UP and
otherwise set orientation to UNKNOWN (do not silently leave previous value).
Reference symbols: of_property_read_u32, rotation, ctx->orientation,
DRM_MODE_PANEL_ORIENTATION_UNKNOWN, DRM_MODE_PANEL_ORIENTATION_NORMAL,
DRM_MODE_PANEL_ORIENTATION_RIGHT_UP, DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP,
DRM_MODE_PANEL_ORIENTATION_LEFT_UP.
In
@patch/kernel/archive/sm8250-6.18/0037-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch:
- Around line 281-284: The code only checks for PTR_ERR(priv->sdb) ==
-EPROBE_DEFER after calling devm_gpiod_get, leaving other error pointers in
priv->sdb that will be dereferenced later (priv->sdb used at line ~296); change
the check to use IS_ERR(priv->sdb) and return PTR_ERR(priv->sdb) on error (or
handle ENOENT specially if intended), e.g. replace the PTR_ERR(...) ==
-EPROBE_DEFER branch with a full IS_ERR check and propagate the actual error
code from PTR_ERR(priv->sdb) so no error pointer is stored in priv->sdb.
- Line 347: Fix the typo in the MODULE_AUTHOR macro by adding the missing
closing angle bracket to the email address in the string passed to MODULE_AUTHOR
(the symbol MODULE_AUTHOR in the patch); change the author string so it ends
with ">" before the closing quote and parentheses so the macro becomes
syntactically correct.
- Around line 291-310: The probe enables the regulator
(regulator_enable(priv->vdd)) and sets the SDB GPIO high
(gpiod_set_value_cansleep(priv->sdb, 1)) before calling htr3212_init_regs and
htr3212_parse_dt, but on failures those resources are not cleaned up; add proper
error handling by introducing goto-based cleanup labels (e.g., err_disable_reg)
and on any failure after the regulator/GPIO are acquired call
gpiod_set_value_cansleep(priv->sdb, 0) and regulator_disable(priv->vdd) (and
undo i2c_set_clientdata if necessary) before returning, updating the failure
paths from htr3212_init_regs and htr3212_parse_dt to jump to the cleanup
label(s).
🧹 Nitpick comments (6)
patch/kernel/archive/sm8250-6.18/0006-ASoC-qcom-sm8250-Add-tdm-support.patch (3)
20-20: Consider markingtdm_slot_offsetasconst.The array is read-only and never modified. Adding
constimproves code clarity and allows compiler optimizations.Suggested change
-static unsigned int tdm_slot_offset[8] = {0, 4, 8, 12, 16, 20, 24, 28}; +static const unsigned int tdm_slot_offset[8] = {0, 4, 8, 12, 16, 20, 24, 28};
41-73: Inconsistent indentation violates kernel coding style.The function body uses spaces with varying indentation levels (2-space, then misaligned blocks). Linux kernel coding style requires tabs for indentation. This will likely trigger checkpatch.pl warnings.
Suggested fix (showing corrected indentation with tabs)
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0, 0x03, - slots, slot_width); - if (ret < 0) { - dev_err(rtd->dev, "%s: failed to set tdm slot, err:%d\n", - __func__, ret); - goto end; - } - - ret = snd_soc_dai_set_channel_map(cpu_dai, 0, NULL, - channels, tdm_slot_offset); - if (ret < 0) { - dev_err(rtd->dev, "%s: failed to set channel map, err:%d\n", - __func__, ret); - goto end; - } + ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0, 0x03, + slots, slot_width); + if (ret < 0) { + dev_err(rtd->dev, "%s: failed to set tdm slot, err:%d\n", + __func__, ret); + goto end; + } + + ret = snd_soc_dai_set_channel_map(cpu_dai, 0, NULL, + channels, tdm_slot_offset); + if (ret < 0) { + dev_err(rtd->dev, "%s: failed to set channel map, err:%d\n", + __func__, ret); + goto end; + } } else { - ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0xf, 0, - slots, slot_width); - if (ret < 0) { - dev_err(rtd->dev, "%s: failed to set tdm slot, err:%d\n", - __func__, ret); - goto end; - } - - ret = snd_soc_dai_set_channel_map(cpu_dai, channels, - tdm_slot_offset, 0, NULL); - if (ret < 0) { - dev_err(rtd->dev, "%s: failed to set channel map, err:%d\n", - __func__, ret); - goto end; - } + ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0xf, 0, + slots, slot_width); + if (ret < 0) { + dev_err(rtd->dev, "%s: failed to set tdm slot, err:%d\n", + __func__, ret); + goto end; + } + + ret = snd_soc_dai_set_channel_map(cpu_dai, channels, + tdm_slot_offset, 0, NULL); + if (ret < 0) { + dev_err(rtd->dev, "%s: failed to set channel map, err:%d\n", + __func__, ret); + goto end; + } }
86-86: Minor style: missing space after comma.- int ret,j; + int ret, j;patch/kernel/archive/sm8250-6.18/0036-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patch (2)
21-31: Consider removing unused DRM_DISPLAY_DP_HELPER select.The driver doesn't appear to use DisplayPort helpers. The
select DRM_DISPLAY_DP_HELPERmay have been copied from another panel driver but isn't needed here. This adds unnecessary build dependencies.Suggested Kconfig cleanup
config DRM_PANEL_DDIC_CH13726A tristate "DDIC CH13726A-based DSI panel" depends on OF depends on DRM_MIPI_DSI depends on BACKLIGHT_CLASS_DEVICE - select DRM_DISPLAY_DP_HELPER - select DRM_DISPLAY_HELPER help Say Y here if you want to enable support for DDIC CH13726A-based display panels.
339-340: Minor: Double space and inconsistent indentation.Style fix
- dsi->mode_flags = MIPI_DSI_MODE_VIDEO_BURST | - MIPI_DSI_CLOCK_NON_CONTINUOUS; + dsi->mode_flags = MIPI_DSI_MODE_VIDEO_BURST | + MIPI_DSI_CLOCK_NON_CONTINUOUS;patch/kernel/archive/sm8250-6.18/0037-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch (1)
131-140: Simplify redundant return logic.The
if (ret) return ret; return 0;pattern can be simplified.Proposed simplification
static int htr3212_reset_regs(struct htr3212_priv *priv) { - int ret; - - ret = htr3212_write(priv, HTR3212_RESET, 0x00); - if (ret) - return ret; - - return 0; + return htr3212_write(priv, HTR3212_RESET, 0x00); }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (7)
patch/kernel/archive/sm8250-6.18/0006-ASoC-qcom-sm8250-Add-tdm-support.patchpatch/kernel/archive/sm8250-6.18/0023-Asoc-wm_adsp-Use-xiaomi-elish-firmware-name.patchpatch/kernel/archive/sm8250-6.18/0025-drm-mipi-add-mipi_dsi_generic_write_multi_type.patchpatch/kernel/archive/sm8250-6.18/0026-drm-panel-add-driver-for-samsung-amb655x.patchpatch/kernel/archive/sm8250-6.18/0036-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patchpatch/kernel/archive/sm8250-6.18/0037-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patchpatch/kernel/archive/sm8250-6.18/0042-arm64-dts-qcom-sm8250-oneplus-Add-pm8150b-type-c-nod.patch
🚧 Files skipped from review as they are similar to previous changes (1)
- patch/kernel/archive/sm8250-6.18/0023-Asoc-wm_adsp-Use-xiaomi-elish-firmware-name.patch
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.
Learnt from: EvilOlaf
Repo: armbian/build PR: 9096
File: patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-overlays.patch:4-5
Timestamp: 2025-12-17T15:46:22.709Z
Learning: In Armbian kernel patches, when patches are renamed or reorganized, the old Subject line may be intentionally preserved in the patch header (as a second Subject line) for archival/historical purposes to document the previous patch name. This is an Armbian-specific practice for tracking patch evolution and should not be flagged as an error when the maintainer has intentionally included it for documentation.
Learnt from: rpardini
Repo: armbian/build PR: 9159
File: patch/u-boot/u-boot-genio/0026-dts-configs-add-Grinn-GenioSBC-510.patch:161-161
Timestamp: 2026-01-03T20:46:29.189Z
Learning: For the Armbian genio family (config/sources/families/genio.conf and patch/u-boot/u-boot-genio/), when reviewing PRs that include vendor U-Boot patches from Collabora, avoid flagging potential issues in board configurations that are out of scope for the PR's primary focus (e.g., don't flag Genio 510/700 board issues when the PR is focused on radxa-nio-12l/Genio 1200). The maintainer prioritizes keeping vendor patches close to upstream for easier re-copying and maintenance, even if secondary board configs have potential mismatches.
<!-- </add_learning>
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.
Learnt from: EvilOlaf
Repo: armbian/build PR: 9086
File: patch/kernel/archive/uefi-arm64-6.19/net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch.disabled:625-633
Timestamp: 2025-12-21T10:28:48.455Z
Learning: The patch "net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch" in patch/kernel/archive/uefi-arm64-6.19/ is known to break compilation on kernel 6.19 and is therefore disabled (has .disabled extension).
📚 Learning: 2026-01-10T04:28:58.758Z
Learnt from: kasimling
Repo: armbian/build PR: 9177
File: patch/kernel/archive/rockchip64-6.18/rk3588-1212-arm64-dts-Automatic-fan-speed-and-USB-3.0-Type-A-por.patch:37-41
Timestamp: 2026-01-10T04:28:58.758Z
Learning: When reviewing Linux kernel device-tree bindings involving thermal cooling devices, THERMAL_NO_LIMIT can be used for both min_state (lower) and max_state (upper). If used as lower/min_state, the framework converts it to 0; if used as upper/max_state, it converts to the cooling device's max_state. Verify patch entries like: cooling-device = <&fan THERMAL_NO_LIMIT 1> are valid and correctly reflect the intended bounds. Ensure consistent interpretation of NO_LIMIT in both min and max contexts and that the resulting values align with the device's actual limits.
Applied to files:
patch/kernel/archive/sm8250-6.18/0025-drm-mipi-add-mipi_dsi_generic_write_multi_type.patchpatch/kernel/archive/sm8250-6.18/0026-drm-panel-add-driver-for-samsung-amb655x.patchpatch/kernel/archive/sm8250-6.18/0006-ASoC-qcom-sm8250-Add-tdm-support.patchpatch/kernel/archive/sm8250-6.18/0037-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patchpatch/kernel/archive/sm8250-6.18/0036-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patchpatch/kernel/archive/sm8250-6.18/0042-arm64-dts-qcom-sm8250-oneplus-Add-pm8150b-type-c-nod.patch
📚 Learning: 2025-12-13T11:00:33.143Z
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/kernel/archive/spacemit-6.6/dt/lcd_tc358762xbg_dpi_800x480.dtsi:3-61
Timestamp: 2025-12-13T11:00:33.143Z
Learning: On the SpacemiT MusePi Pro board with spacemit-6.6 kernel, LCD/DSI support is disabled in k1-musepi-pro.dts because enabling it causes the unit to lock up during boot. The lcd_tc358762xbg_dpi_800x480.dtsi file exists but DSI remains disabled at the controller level.
Applied to files:
patch/kernel/archive/sm8250-6.18/0026-drm-panel-add-driver-for-samsung-amb655x.patch
📚 Learning: 2025-12-17T05:09:02.306Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.
Applied to files:
patch/kernel/archive/sm8250-6.18/0037-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patchpatch/kernel/archive/sm8250-6.18/0036-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patchpatch/kernel/archive/sm8250-6.18/0042-arm64-dts-qcom-sm8250-oneplus-Add-pm8150b-type-c-nod.patch
📚 Learning: 2025-12-19T13:56:45.124Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Applied to files:
patch/kernel/archive/sm8250-6.18/0036-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patch
📚 Learning: 2025-12-17T15:46:22.709Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 9096
File: patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-overlays.patch:4-5
Timestamp: 2025-12-17T15:46:22.709Z
Learning: In Armbian kernel patches, when patches are renamed or reorganized, the old Subject line may be intentionally preserved in the patch header (as a second Subject line) for archival/historical purposes to document the previous patch name. This is an Armbian-specific practice for tracking patch evolution and should not be flagged as an error when the maintainer has intentionally included it for documentation.
Applied to files:
patch/kernel/archive/sm8250-6.18/0036-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patch
📚 Learning: 2026-01-03T07:27:45.955Z
Learnt from: iav
Repo: armbian/build PR: 9158
File: patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch:598-600
Timestamp: 2026-01-03T07:27:45.955Z
Learning: In Rockchip vendor kernel branches (e.g., rockchip64-6.18), the FUSB302 device tree binding accepts usb-role-switch as a phandle reference to a USB role switch provider (e.g., typec_extcon_bridge), not just as a boolean flag as in mainline kernel bindings. The vendor implementation allows usb-role-switch = <&typec_extcon_bridge>; to work correctly.
Applied to files:
patch/kernel/archive/sm8250-6.18/0042-arm64-dts-qcom-sm8250-oneplus-Add-pm8150b-type-c-nod.patch
🔇 Additional comments (17)
patch/kernel/archive/sm8250-6.18/0042-arm64-dts-qcom-sm8250-oneplus-Add-pm8150b-type-c-nod.patch (4)
1-21: Patch metadata and header look good.The commit message accurately describes the change: adding Type-C node for OTG functionality and PD negotiation support. The diff stat aligns with the changes below.
22-58: Type-C connector configuration is well-structured.The USB-C connector node properly defines:
- Dual role for both power and data (required for OTG)
- Reasonable PD negotiation values (15W source, up to 60W sink with variable PDO)
- Correct endpoint linking to the DWC3 controller
The
self-poweredproperty andop-sink-microwattof 10W are appropriate for a smartphone device.
60-64: VBUS regulator configuration is consistent with PD capabilities.The current limits (500mA min, 3A max) align correctly with the source-pdos definition of 5V @ 3A.
69-80: USB DWC3 OTG configuration is correct.The changes properly enable OTG functionality:
dr_mode = "otg"enables dual-role operationusb-role-switchenables dynamic role switching based on Type-C CC line state- The bidirectional endpoint linking between
pm8150b_hs_inandusb_1_dwc3_hs_outfollows the correct DTS graph binding pattern for USB Type-Cpatch/kernel/archive/sm8250-6.18/0025-drm-mipi-add-mipi_dsi_generic_write_multi_type.patch (2)
41-65: Implementation looks correct.The function correctly:
- Initializes the DSI message with the explicit type parameter
- Respects the accumulated error pattern used by other
_multihelpers- Logs failures with appropriate context
- Returns bytes written or negative error
87-99: Macro implementation is correct.The
mipi_dsi_dcs_write_long_multimacro follows the established pattern and correctly usesMIPI_DSI_DCS_LONG_WRITEto force long write commands for panels like Samsung AMB655X that require this behavior.patch/kernel/archive/sm8250-6.18/0006-ASoC-qcom-sm8250-Add-tdm-support.patch (1)
116-119: LGTM!The switch with range expression correctly routes TDM DAI IDs to the dedicated TDM handler while allowing non-TDM DAIs to fall through to the SDW hw_params path.
patch/kernel/archive/sm8250-6.18/0026-drm-panel-add-driver-for-samsung-amb655x.patch (4)
213-219: Verify:set_display_oncalled in the off sequence.Line 215 calls
mipi_dsi_dcs_set_display_on_multiwithin the panel off function, which is counterintuitive. If this is an intentional panel-specific quirk (some panels require unusual sequences), consider adding a comment explaining why. Otherwise, this may be a copy-paste error and should beset_display_off_multi.
59-77: LGTM!The includes and header structure are appropriate for a MIPI DSI panel driver with DSC support.
283-314: LGTM!The display mode definition and
get_modesimplementation are correct. The clock calculation follows standard DRM practices.
427-457: LGTM!The remove function, OF match table, and module registration follow standard kernel driver patterns.
patch/kernel/archive/sm8250-6.18/0036-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patch (5)
43-43: LGTM!The Makefile entry follows the established pattern for panel drivers.
292-361: LGTM!The probe and remove lifecycle is correctly implemented with proper cleanup on error paths and use of devm_* managed resources.
148-192: LGTM!The prepare/unprepare functions have proper guard checks, error handling, and cleanup paths.
194-220: LGTM!Display mode definitions follow kernel conventions with correct clock calculations for 60Hz refresh rate.
375-380: LGTM!The OF match table correctly maps compatibles to their respective display modes.
patch/kernel/archive/sm8250-6.18/0037-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch (1)
196-197: Verifyalways-onproperty is read from correct DT node.
device_property_read_bool(dev, "always-on")reads from the parent I2C device node, not the LED child node. If per-LED suspend control is intended, this should read fromchildinstead.
patch/kernel/archive/sm8250-6.18/0005-ASoC-qcom-sm8250-Add-tdm-support.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0025-drm-mipi-add-mipi_dsi_generic_write_multi_type.patch
Outdated
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0026-drm-panel-add-driver-for-samsung-amb655x.patch
Outdated
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0026-drm-panel-add-driver-for-samsung-amb655x.patch
Outdated
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0036-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0037-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0037-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0037-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch
Show resolved
Hide resolved
|
I'm not very familiar with the build framework. |
|
I have ported all patches to 6.18 (excluding those already merged into the mainline and the aforementioned 0010-0015). |
Tricky, as armbian/build can run on many different host OS & under Docker (CI is on |
We indeed don't need to guarantee dependency control before the host compilation, but we should at least ensure that cli with docker and CI are ready to use out of the box. I think we need to include a new version of mkbootimg in https://github.com/armbian/docker-armbian-build/pkgs/container/docker-armbian-build/638345440?tag=armbian-ubuntu-noble-latest . The new version of mkbootimg already exists in the armbian noble repository. |
We don't use the Armbian repo in the armbian/build prebuilt Docker images, as that would cause an infinite dependency loop. I still think building it from source, or external binaries, and only when needed might be easier. |
|
Here is kernel tree from pmos: https://gitlab.com/sm8250-mainline/linux/-/commits/sm8250/v6.13?ref_type=heads, which has not get updated since v6.13. |
It seems that a bq25970 charger driver has been added, and I am very interested in it, as the current charging speed is too slow |
|
It's working very well so far, and I'm ready for a review. |
There was a problem hiding this comment.
Actionable comments posted: 14
🤖 Fix all issues with AI agents
In
`@patch/kernel/archive/sm8250-6.18/0065-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patch`:
- Around line 320-333: of_property_read_u32(retval) return value isn't checked
before using the rotation variable: if of_property_read_u32(dev->of_node,
"rotation", &rotation) fails rotation is uninitialized and ctx->orientation may
remain unset; fix by initializing rotation to a safe default (e.g., 0) before
calling of_property_read_u32, or by handling non-zero return values explicitly
(set ctx->orientation to DRM_MODE_PANEL_ORIENTATION_UNKNOWN on error) and only
switch on rotation when the read succeeds; update the block around the
of_property_read_u32 call and the subsequent if/else chain that assigns
ctx->orientation (references: of_property_read_u32, rotation, ctx->orientation,
DRM_MODE_PANEL_ORIENTATION_NORMAL, DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP, DRM_MODE_PANEL_ORIENTATION_LEFT_UP,
DRM_MODE_PANEL_ORIENTATION_UNKNOWN).
In
`@patch/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch`:
- Line 347: The MODULE_AUTHOR macro invocation MODULE_AUTHOR("Teguh Sobirin
<teguh@sobir.in"); has a typo: the closing angle bracket is missing in the
email; update the string to include the closing '>' so the macro becomes
MODULE_AUTHOR("Teguh Sobirin <teguh@sobir.in>"); ensuring the AUTHOR entry is
syntactically correct and the email is properly enclosed.
- Around line 196-197: The code reads the "always-on" property from the parent
device (device_property_read_bool(dev,...)) but it should read the per-LED
property from the LED child device; change the call to use the led classdev
device (device_property_read_bool(&cdev->dev, "always-on")) so cdev->flags |=
LED_CORE_SUSPENDRESUME is based on the child node's property.
- Around line 291-310: The probe enables the regulator with
regulator_enable(priv->vdd) but returns on errors from htr3212_init_regs or
htr3212_parse_dt without disabling it, causing a resource leak; fix by
registering a cleanup via devm_add_action_or_reset(dev,
cleanup_regulator_action, priv->vdd) immediately after successful
regulator_enable (or use a goto-based error path) so the regulator is disabled
on all failure returns, and ensure any early returns after i2c_set_clientdata or
other failures call the same cleanup (or fall through to the common error label)
so gpiod_set_value_cansleep/state and priv->vdd are properly reverted.
In
`@patch/kernel/archive/sm8250-6.18/0067-Input-driver-for-AYN-Odin2-Gamepad.patch`:
- Around line 244-277: The code stores error pointers from
devm_gpiod_get_optional into gamepad_dev->boot_gpio/enable_gpio/reset_gpio then
later calls gpiod_set_value_cansleep on them, which can crash; change each
IS_ERR check to (a) capture err = PTR_ERR(...), if err == -EPROBE_DEFER return
err to defer probe, otherwise log the warning and set the corresponding
gamepad_dev->* pointer to NULL so later if checks skip calling
gpiod_set_value_cansleep; update the boot_gpio, enable_gpio and reset_gpio
handling around devm_gpiod_get_optional and the subsequent
gpiod_set_value_cansleep calls accordingly.
- Around line 209-219: The code reads recv_data_buffer.data_len from the packet
and then memcpy's that many bytes into recv_data_buffer.data without validation;
to fix, validate recv_data_buffer.data_len against the expected maximum
(MAX_DATA_LEN or 64) and ensure the provided packet length (count) is at least 8
+ recv_data_buffer.data_len before performing memcpy; if either check fails,
reject the packet (return error) or clamp the copy length, and use
sizeof(recv_data_buffer.data) or MAX_DATA_LEN when zeroing the buffer to avoid
overruns in the memset/memcpy paths.
- Around line 141-175: The handler uses a static unsigned long prev_states
shared across all devices; make prev_states a per-instance field in struct
gamepad_device (e.g., add unsigned long prev_states;) and replace the
static/uses in gamepad_input_handler to reference dev->prev_states (use
&dev->prev_states in bitmap_xor and assign dev->prev_states = keys at the end).
Initialize dev->prev_states appropriately when a device is probed/allocated
(zero or current keys) and remove the file-local static declaration to restore
correct per-device edge detection.
- Around line 160-171: The code reads data->data[0]..data->data[13] without
verifying payload length; in gamepad_input_handler add a bounds check that
ensures data->data_len >= 14 before any access and return/ignore the packet if
it’s shorter, so the input_report_abs calls for
ABS_HAT2X/ABS_HAT2Y/ABS_X/ABS_Y/ABS_RX/ABS_RY never index out of bounds; place
the check at the start of gamepad_input_handler (before the 0x755 and int16_t
casts) and handle the error path consistently with surrounding handler behavior.
In
`@patch/kernel/archive/sm8250-6.18/0068-input-add-Qualcomm-SPMI-haptics-driver.patch`:
- Around line 961-962: The mutex play_lock in struct spmi_haptics is never
initialized, causing undefined behavior when
spmi_haptics_enable()/spmi_haptics_disable() use it; initialize it (call
mutex_init(&haptics->play_lock)) during haptics setup—e.g., immediately after
allocating/zeroing haptics and before INIT_WORK(&haptics->work,
spmi_haptics_work) or input device assignment—so the lock is valid when used by
spmi_haptics_enable/spmi_haptics_disable.
- Around line 600-606: The call to spmi_haptics_write_masked(...) assigns to ret
but is not checked; after calling spmi_haptics_write_masked(haptics,
haptics->base + HAP_LRA_AUTO_RES_REG, mask, val) check if ret < 0 and return ret
(or handle the error) before proceeding to
spmi_haptics_write_play_mode(haptics); ensure the check uses the same ret
variable so failures during the auto-resonance register write abort early.
- Around line 1006-1016: The spmi_haptics_remove function is unregistering an
input device that was allocated with devm_input_allocate_device (devm-managed),
causing a double-free; remove the explicit call to
input_unregister_device(haptics->haptics_input_dev) (leave cancel_work_sync,
mutex_destroy, and boost GPIO handling intact) so the devm release path cleans
up the input device automatically and ensure no further use of
haptics->haptics_input_dev after removal.
- Around line 732-738: The kernel-doc above the function is for
spmi_haptics_enable but the function is spmi_haptics_disable; update the comment
header to reference spmi_haptics_disable and adjust the short description to
reflect that this handler stops/disables vibration (keep the `@haptics`, `@enable`
parameter and Returns line as-is unless the parameter name changes in code).
Ensure the function name in the comment exactly matches spmi_haptics_disable so
the doc and implementation are consistent.
- Around line 987-991: The register_fail cleanup label calls
cancel_work_sync(&haptics->work) and mutex_destroy(&haptics->play_lock) even
when INIT_WORK and mutex_init haven't been run; split the error path into two
labels (e.g., register_fail_uninit and register_fail_init), or move INIT_WORK
and mutex_init earlier in probe so haptics->work and play_lock are initialized
before any jump to register_fail, and ensure cancel_work_sync and mutex_destroy
are only called from the path where INIT_WORK and mutex_init succeeded; update
references to register_fail, INIT_WORK, mutex_init, cancel_work_sync,
mutex_destroy, haptics->work and haptics->play_lock accordingly.
🧹 Nitpick comments (14)
patch/kernel/archive/sm8250-6.18/0064-arm64-dts-qcom-sm8250-add-uart16-Signed-off-by-Teguh.patch (1)
4-5: Malformed patch subject line.The
Signed-off-bytag is concatenated with the subject line instead of appearing in the commit body after a blank line. This is a minor formatting issue in the patch header.Expected format:
Subject: arm64: dts: qcom: sm8250: add uart16 Signed-off-by: Teguh Sobirin <teguh@sobir.in>Consider tidying this when reorganizing commits as mentioned in PR discussion.
patch/kernel/archive/sm8250-6.18/0070-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch (4)
1062-1072: Inconsistent indentation in pinctrl state.Lines 1066-1070 use spaces instead of tabs for indentation, while the rest of the file uses tabs. This inconsistency should be corrected for maintainability.
fan_pwm_active: fan-pwm-active-state { pins = "gpio6"; function = "func1"; - bias-disable; - power-source = <0>; - output-low; - qcom,drive-strength = <3>; - drive-push-pull; + bias-disable; + power-source = <0>; + output-low; + qcom,drive-strength = <3>; + drive-push-pull; };
630-631: Stray leading space character.Line 630 has an extra space character before the tabs. This should be cleaned up.
- color = <LED_COLOR_ID_RED>; + color = <LED_COLOR_ID_RED>;
771-771: Mixed tab/space indentation.Line 771 has mixed tab-space-tab indentation (
\t \t). Should use consistent tab indentation.- enable-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>; + enable-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
1142-1142: Trailing whitespace after comma.Line 1142 appears to have trailing whitespace after the comma.
- "IN2_HPHR", "HPHR_OUT", + "IN2_HPHR", "HPHR_OUT",patch/kernel/archive/sm8250-6.18/0065-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patch (1)
21-31: Unnecessary Kconfig selections for DSI panel driver.This is a MIPI-DSI panel driver, but the Kconfig selects
DRM_DISPLAY_DP_HELPERandDRM_DISPLAY_HELPERwhich are DisplayPort-related helpers. The driver source doesn't use any DP functionality. These selections can likely be removed.Suggested Kconfig cleanup
config DRM_PANEL_DDIC_CH13726A tristate "DDIC CH13726A-based DSI panel" depends on OF depends on DRM_MIPI_DSI depends on BACKLIGHT_CLASS_DEVICE - select DRM_DISPLAY_DP_HELPER - select DRM_DISPLAY_HELPER help Say Y here if you want to enable support for DDIC CH13726A-based display panels.patch/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch (3)
21-29: Unnecessaryselect REGMAP_I2C— driver uses raw SMBus calls.The driver uses
i2c_smbus_write_byte_data()directly rather than the regmap API. Either remove theselect REGMAP_I2Cline, or refactor the driver to usedevm_regmap_init_i2c()for more consistent register access patterns.
95-108: Minor: Extra whitespace on line 101.There's a double space before
i2c_smbus_write_byte_data. Trivial style nit.Suggested fix
- ret = i2c_smbus_write_byte_data(priv->client, reg, val); + ret = i2c_smbus_write_byte_data(priv->client, reg, val);
150-154: Move variable declarations to block start.Kernel coding style prefers variable declarations at the beginning of a block. The mixed declarations here work but reduce readability.
Suggested fix
static int htr3212_init_regs(struct htr3212_priv *priv) { + u8 value = GENMASK(HTR3212_ENABLE_BIT, 0); + u8 num_regs = HTR3212_CHANNELS / HTR3212_ENABLE_BIT; int ret; + int i; ret = htr3212_reset_regs(priv); if (ret) return ret; - u8 value = GENMASK(HTR3212_ENABLE_BIT, 0); - u8 num_regs = HTR3212_CHANNELS / HTR3212_ENABLE_BIT; - - int i; - for (i = 0; i < num_regs; i++) {patch/kernel/archive/sm8250-6.18/0068-input-add-Qualcomm-SPMI-haptics-driver.patch (2)
698-702: Use standard errno instead of bare-1.Returning
-1is non-idiomatic for kernel code. Consider using a meaningful error code like-EBUSYor-EPERM.Proposed fix
if (haptics->sc_count > SC_MAX_COUNT) { dev_err(haptics->dev, "Can't play while in short circuit"); - ret = -1; + ret = -EBUSY; goto out; }
1057-1062: Consider adding SPDX license identifier.Kernel headers should include an SPDX license identifier for license clarity.
Proposed fix
+/* SPDX-License-Identifier: GPL-2.0-only */ /* * This header provides constants for pmi8998 SPMI haptics options. */patch/kernel/archive/sm8250-6.18/0067-Input-driver-for-AYN-Odin2-Gamepad.patch (3)
22-25: Consider adding Kconfig help text.Kernel coding style recommends including a
helpsection for new Kconfig options to describe the driver's purpose and supported hardware.Suggested improvement
config JOYSTICK_ODIN2 tristate "AYN Odin2 gamepad" depends on SERIAL_DEV_BUS + help + Say Y here if you have an AYN Odin2 handheld gaming device + and want to use its built-in gamepad. + + To compile this driver as a module, choose M here: the + module will be called odin2.
354-359: Incorrect MODULE_ALIAS for serdev driver.This driver uses the serdev bus, not the platform bus. The
MODULE_ALIAS("platform:...")is incorrect and should either be removed or changed to reflect the actual bus type. Theof_device_idtable already handles device matching correctly.Proposed fix
MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Gamepad driver for Ayn Odin2"); MODULE_AUTHOR("Molly Sophia <mollysophia379@gmail.com>"); MODULE_AUTHOR("BigfootACA <bigfoot@classfun.cn>"); MODULE_AUTHOR("Teguh Sobirin <teguh@sobir.in>"); -MODULE_ALIAS("platform:" DRIVER_NAME);
298-299: Trailing whitespace.Line 299 has trailing whitespace after the semicolon. This would be flagged by
checkpatch.pl.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (7)
patch/kernel/archive/sm8250-6.18/0064-arm64-dts-qcom-sm8250-add-uart16-Signed-off-by-Teguh.patchpatch/kernel/archive/sm8250-6.18/0065-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patchpatch/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patchpatch/kernel/archive/sm8250-6.18/0067-Input-driver-for-AYN-Odin2-Gamepad.patchpatch/kernel/archive/sm8250-6.18/0068-input-add-Qualcomm-SPMI-haptics-driver.patchpatch/kernel/archive/sm8250-6.18/0069-arm64-dts-qcom-pm8150b-introduce-spmi-haptics.patchpatch/kernel/archive/sm8250-6.18/0070-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.
Learnt from: EvilOlaf
Repo: armbian/build PR: 9096
File: patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-overlays.patch:4-5
Timestamp: 2025-12-17T15:46:22.709Z
Learning: In Armbian kernel patches, when patches are renamed or reorganized, the old Subject line may be intentionally preserved in the patch header (as a second Subject line) for archival/historical purposes to document the previous patch name. This is an Armbian-specific practice for tracking patch evolution and should not be flagged as an error when the maintainer has intentionally included it for documentation.
Learnt from: rpardini
Repo: armbian/build PR: 9159
File: patch/u-boot/u-boot-genio/0026-dts-configs-add-Grinn-GenioSBC-510.patch:161-161
Timestamp: 2026-01-03T20:46:29.189Z
Learning: For the Armbian genio family (config/sources/families/genio.conf and patch/u-boot/u-boot-genio/), when reviewing PRs that include vendor U-Boot patches from Collabora, avoid flagging potential issues in board configurations that are out of scope for the PR's primary focus (e.g., don't flag Genio 510/700 board issues when the PR is focused on radxa-nio-12l/Genio 1200). The maintainer prioritizes keeping vendor patches close to upstream for easier re-copying and maintenance, even if secondary board configs have potential mismatches.
<!-- </add_learning>
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75
Timestamp: 2025-03-31T22:20:41.849Z
Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.
Learnt from: EvilOlaf
Repo: armbian/build PR: 9086
File: patch/kernel/archive/uefi-arm64-6.19/net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch.disabled:625-633
Timestamp: 2025-12-21T10:28:48.455Z
Learning: The patch "net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch" in patch/kernel/archive/uefi-arm64-6.19/ is known to break compilation on kernel 6.19 and is therefore disabled (has .disabled extension).
Learnt from: rpardini
Repo: armbian/build PR: 8879
File: config/sources/families/uefi-x86.conf:0-0
Timestamp: 2025-11-06T15:36:04.682Z
Learning: As of PR `#8879`, the uefi-x86 family in the Armbian build system now includes kernel patches for the first time. The current and edge branches for uefi-x86 are specifically configured for Apple T2-based x86 machines, including T2-specific patches from the linux-t2 project and custom kernel configuration options for Apple hardware drivers.
Learnt from: tabrisnet
Repo: armbian/build PR: 8913
File: config/sources/families/k3-beagle.conf:16-16
Timestamp: 2025-11-10T22:05:40.490Z
Learning: In the Armbian build system, kernel branches using non-mainline/vendor forks (like BeagleBoard's linux repository) should be named "vendor" or "vendor-rt" rather than "current" or "edge". The "current" and "edge" naming is reserved for mainline kernel branches. This affects both the case statement in family config files (e.g., `vendor | vendor-rt)` instead of `current | current-rt)`) and the corresponding KERNEL_TARGET declarations in board config files.
Learnt from: tabrisnet
Repo: armbian/build PR: 8746
File: config/sources/families/filogic.conf:61-68
Timestamp: 2025-10-13T02:26:18.249Z
Learning: In the Armbian build system, the "edge" kernel branch is intended to be bleeding-edge and experimental. It does not require hardware testing or stability verification before merging, as it's expected to contain potentially unstable or untested code for early adopters and developers.
📚 Learning: 2025-12-17T05:09:02.306Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.
Applied to files:
patch/kernel/archive/sm8250-6.18/0070-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patchpatch/kernel/archive/sm8250-6.18/0069-arm64-dts-qcom-pm8150b-introduce-spmi-haptics.patchpatch/kernel/archive/sm8250-6.18/0065-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patchpatch/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patchpatch/kernel/archive/sm8250-6.18/0064-arm64-dts-qcom-sm8250-add-uart16-Signed-off-by-Teguh.patch
📚 Learning: 2025-12-17T15:46:22.709Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 9096
File: patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-overlays.patch:4-5
Timestamp: 2025-12-17T15:46:22.709Z
Learning: In Armbian kernel patches, when patches are renamed or reorganized, the old Subject line may be intentionally preserved in the patch header (as a second Subject line) for archival/historical purposes to document the previous patch name. This is an Armbian-specific practice for tracking patch evolution and should not be flagged as an error when the maintainer has intentionally included it for documentation.
Applied to files:
patch/kernel/archive/sm8250-6.18/0070-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patchpatch/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch
📚 Learning: 2025-12-19T13:56:45.124Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Applied to files:
patch/kernel/archive/sm8250-6.18/0070-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patchpatch/kernel/archive/sm8250-6.18/0065-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patchpatch/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patchpatch/kernel/archive/sm8250-6.18/0064-arm64-dts-qcom-sm8250-add-uart16-Signed-off-by-Teguh.patch
📚 Learning: 2025-11-20T18:20:11.985Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.
Applied to files:
patch/kernel/archive/sm8250-6.18/0070-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch
📚 Learning: 2025-11-08T06:39:24.527Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8886
File: patch/kernel/rk35xx-vendor-6.1/dt/rk3528-nanopi-rev01.dts:9-9
Timestamp: 2025-11-08T06:39:24.527Z
Learning: In Armbian's Rockchip vendor kernel branches (rk35xx-vendor), device tree files may not require the same headers as mainline Linux. For example, input key definitions like KEY_BACK and KEY_VOLUMEUP may be handled differently in BSP kernels and don't necessarily need explicit includes like <dt-bindings/input/input.h> that would be required in mainline kernel device trees.
Applied to files:
patch/kernel/archive/sm8250-6.18/0070-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patchpatch/kernel/archive/sm8250-6.18/0068-input-add-Qualcomm-SPMI-haptics-driver.patch
📚 Learning: 2026-01-10T04:28:58.758Z
Learnt from: kasimling
Repo: armbian/build PR: 9177
File: patch/kernel/archive/rockchip64-6.18/rk3588-1212-arm64-dts-Automatic-fan-speed-and-USB-3.0-Type-A-por.patch:37-41
Timestamp: 2026-01-10T04:28:58.758Z
Learning: When reviewing Linux kernel device-tree bindings involving thermal cooling devices, THERMAL_NO_LIMIT can be used for both min_state (lower) and max_state (upper). If used as lower/min_state, the framework converts it to 0; if used as upper/max_state, it converts to the cooling device's max_state. Verify patch entries like: cooling-device = <&fan THERMAL_NO_LIMIT 1> are valid and correctly reflect the intended bounds. Ensure consistent interpretation of NO_LIMIT in both min and max contexts and that the resulting values align with the device's actual limits.
Applied to files:
patch/kernel/archive/sm8250-6.18/0070-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patchpatch/kernel/archive/sm8250-6.18/0067-Input-driver-for-AYN-Odin2-Gamepad.patchpatch/kernel/archive/sm8250-6.18/0069-arm64-dts-qcom-pm8150b-introduce-spmi-haptics.patchpatch/kernel/archive/sm8250-6.18/0068-input-add-Qualcomm-SPMI-haptics-driver.patchpatch/kernel/archive/sm8250-6.18/0065-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patchpatch/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patchpatch/kernel/archive/sm8250-6.18/0064-arm64-dts-qcom-sm8250-add-uart16-Signed-off-by-Teguh.patch
🔇 Additional comments (13)
patch/kernel/archive/sm8250-6.18/0064-arm64-dts-qcom-sm8250-add-uart16-Signed-off-by-Teguh.patch (2)
19-34: UART16 device tree node looks correct.The node properly:
- Shares base address
0x888000withspi16(expected for QUP—only one mode active at a time)- References correct clock (
GCC_QUPV3_WRAP2_S2_CLK) for QUP wrap2 serial engine 2- Uses appropriate interconnect paths for QUP core and config
- Is disabled by default, requiring board-specific enablement
43-46: Pinctrl state is correctly defined.Two-pin configuration (gpio50/gpio51) for basic TX/RX UART without hardware flow control is appropriate. The
qup16function assignment matches the UART16 peripheral.patch/kernel/archive/sm8250-6.18/0070-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch (6)
19-318: Well-structured common device tree.The common DTSI file provides a comprehensive and well-organized hardware configuration covering:
- Power management (regulators, PMU)
- Thermal zones with appropriate trip points
- LED controllers (htr3212 on I2C buses)
- Audio codec (WCD9385)
- WiFi/BT (QCA6390)
- Display subsystem
The structure properly separates common hardware definitions to be shared by variant-specific DTS files.
1459-1559: Clean variant-specific overrides for RP5.The RP5 DTS properly:
- Includes the common DTSI
- Defines framebuffer matching the 1080x1920 display
- Configures LED groups for the RP5's physical layout
- Overrides touchscreen size and orientation
- Sets panel compatible and rotation (270°)
1565-1663: Clean variant-specific overrides for RP Mini.The RP Mini DTS follows the same clean pattern with appropriate values for its hardware configuration (960x1280 display, 90° rotation, different LED mappings).
4-5: Malformed patch subject line.The
Signed-off-by:tag appears to have been merged into the Subject line. Standard git format-patch format should have these on separate lines:Subject: arm64: dts: qcom: add SM8250 Retroid Pocket variant Signed-off-by: Teguh Sobirin <teguh@sobir.in>This is cosmetic and won't affect patch application, but consider fixing for cleaner git history.
⛔ Skipped due to learnings
Learnt from: EvilOlaf Repo: armbian/build PR: 9096 File: patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-overlays.patch:4-5 Timestamp: 2025-12-17T15:46:22.709Z Learning: In Armbian kernel patches, when patches are renamed or reorganized, the old Subject line may be intentionally preserved in the patch header (as a second Subject line) for archival/historical purposes to document the previous patch name. This is an Armbian-specific practice for tracking patch evolution and should not be flagged as an error when the maintainer has intentionally included it for documentation.Learnt from: EvilOlaf Repo: armbian/build PR: 0 File: :0-0 Timestamp: 2025-12-17T05:09:02.306Z Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.Learnt from: EvilOlaf Repo: armbian/build PR: 8968 File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36 Timestamp: 2025-11-20T18:20:11.985Z Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.Learnt from: rpardini Repo: armbian/build PR: 9180 File: patch/kernel/archive/sm8250-6.18/0000.patching_config.yaml:4-8 Timestamp: 2026-01-07T18:21:41.085Z Learning: In Armbian patch/kernel/archive/**/0000.patching_config.yaml files, the version metadata fields (name, branch, last-known-good-tag, kind, type) under the "info stuff" comment are not used by the patching scripts. When reviewing these files, do not suggest updating or fixing these metadata fields. Instead, suggest removing them entirely as they serve no functional purpose.Learnt from: rpardini Repo: armbian/build PR: 9159 File: patch/u-boot/u-boot-genio/0026-dts-configs-add-Grinn-GenioSBC-510.patch:161-161 Timestamp: 2026-01-03T20:46:29.189Z Learning: For the Armbian genio family (config/sources/families/genio.conf and patch/u-boot/u-boot-genio/), when reviewing PRs that include vendor U-Boot patches from Collabora, avoid flagging potential issues in board configurations that are out of scope for the PR's primary focus (e.g., don't flag Genio 510/700 board issues when the PR is focused on radxa-nio-12l/Genio 1200). The maintainer prioritizes keeping vendor patches close to upstream for easier re-copying and maintenance, even if secondary board configs have potential mismatches. <!-- </add_learning>Learnt from: EvilOlaf Repo: armbian/build PR: 0 File: :0-0 Timestamp: 2025-12-19T13:56:45.124Z Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.Learnt from: rpardini Repo: armbian/build PR: 8044 File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75 Timestamp: 2025-03-31T22:20:41.849Z Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.Learnt from: EvilOlaf Repo: armbian/build PR: 8428 File: config/boards/lckfb-taishanpi.csc:5-9 Timestamp: 2025-07-25T03:51:50.830Z Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.Learnt from: EvilOlaf Repo: armbian/build PR: 9067 File: patch/kernel/archive/rockchip64-6.19/dt/rk3399-orangepi-4-lts.dts:869-875 Timestamp: 2025-12-23T04:44:34.317Z Learning: When reviewing device tree changes, validate node properties against the official kernel device tree binding documentation (*.yaml files) rather than relying solely on historical patterns in existing DTS files. Copy-paste errors can persist across versions, and bindings define the authoritative set of valid properties for each device node type.
1377-1378: The gamepad driver is available. Patch 0067 (Input-driver-for-AYN-Odin2-Gamepad.patch) includes the driver with the matching compatible string at line 339, and patch 0070 correctly references it in the device tree. The patches are in the proper order.
594-596: No issue found—the LED controller driver is available.The
heroic,htr3212driver is included in the same patch series (patch 0066:leds-Add-driver-for-HEROIC-HTR3212) and properly registers the compatible string in its device tree match table. The driver patch precedes the device tree patch in the correct order.patch/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch (2)
69-93: LGTM!The register definitions and data structures are well-organized. The flexible array member for
leds[]properly supports variable LED count from device tree.
313-326: LGTM!The remove function properly handles cleanup: resets registers (with error logging), deasserts the GPIO, and disables the regulator in the correct order.
patch/kernel/archive/sm8250-6.18/0067-Input-driver-for-AYN-Odin2-Gamepad.patch (1)
29-40: LGTM: Makefile integration.The Makefile entry correctly adds
odin2.owith theCONFIG_JOYSTICK_ODIN2guard, following the existing pattern in the file.patch/kernel/archive/sm8250-6.18/0069-arm64-dts-qcom-pm8150b-introduce-spmi-haptics.patch (2)
1-47: AI summary mismatch detected.The AI-generated summary describes a fastrpc revert patch (0061), but this file is actually
0069-arm64-dts-qcom-pm8150b-introduce-spmi-haptics.patchwhich adds SPMI haptics bindings for PM8150B. The summary content is entirely unrelated to this patch.
29-42: LGTM — haptics node configuration is correct, with clarification on play-mode.The DT node is well-formed:
- Compatible string pattern (specific then generic fallback) follows standard practice
- Register address 0xc000 aligns with PM8150B haptics peripheral address space
- Interrupt configuration with SPMI SID 0x3 is appropriate for pm8150b's secondary partition
- Status disabled by default is correct for optional hardware
HAP_WAVE_SINE and qcom,brake-pattern values are valid per the binding header. However, note that HAP_PLAY_BUFFER is currently the only supported play mode — the driver explicitly rejects any other value (DIRECT, AUDIO, PWM) with an error, so this is not a flexible default but a hardware limitation of the current driver implementation.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
...h/kernel/archive/sm8250-6.18/0065-drm-panel-Add-DDIC-CH13726A-panel-Signed-off-by-Tegu.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0068-input-add-Qualcomm-SPMI-haptics-driver.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0068-input-add-Qualcomm-SPMI-haptics-driver.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0068-input-add-Qualcomm-SPMI-haptics-driver.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0068-input-add-Qualcomm-SPMI-haptics-driver.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0068-input-add-Qualcomm-SPMI-haptics-driver.patch
Show resolved
Hide resolved
|
I have reviewed the AI's suggestions and applied the following modifications to the "problematic" patches: 0005-ASoC-qcom-sm8250-Add-tdm-support.patch:
0008-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-Add-dev.patch:
0013-input-nt36xxx-Enable-pen-support.patch:
0014-nt36xxx-add-pen-input-resolution.patch:
0024-power-supply-Add-driver-for-Qualcomm-PMIC-fuel-gauge.patch:
0025-power-qcom_fg-Add-initial-pm8150b-support.patch:
0028-From-Teguh-Sobirin-teguh-sobir.in-Date-Sun-24-Nov-20.patch:
0063-usb-gadget-Refactor-NCM-net_device-lifecycle.patch:
I have tested these on my sm8250 device, and it boots fine with common peripherals working as expected. @CodeChenL, could you please test these updated patches on the Xiaomi Elish when you have a moment? If everything looks good, I believe it’s time to merge 0005-ASoC-qcom-sm8250-Add-tdm-support.patch |
Thank you for your work, I will test and merge when I have time |
0159a81 to
0177a18
Compare
|
Hi @retro98boy , thank you for your changes, everything is working well. I have merged your modifications and rebased to the latest main branch. Hi everyone, i think they are ready to be merged into the main repository |
There was a problem hiding this comment.
Actionable comments posted: 16
🤖 Fix all issues with AI agents
In `@config/sources/families/sm8250.conf`:
- Around line 24-26: The edge block is missing an explicit KERNELBRANCH
declaration; to match the current block and avoid relying on the hook, add a
global declaration setting KERNELBRANCH to 'branch:linux-6.19.y' in the edge
case (alongside the existing KERNEL_MAJOR_MINOR and KERNEL_GIT_CACHE_TTL lines),
e.g. declare -g KERNELBRANCH='branch:linux-6.19.y' so the edge block explicitly
defines KERNELBRANCH rather than depending on mainline-kernel.conf.sh.
In `@patch/kernel/archive/sm8250-6.18/0001-drm-Add-drm-notifier-support.patch`:
- Around line 55-86: Update the doc comments for the notifier API to remove
stale "msm"/`MSM_*` identifiers and fix typos: change any occurrences of
"msm_drm_notifier_list", "msm_*" and "MSM_DRM_*" in the comments to the current
"mi_drm_notifier_list", "mi_*" and "MI_DRM_*" names as appropriate, and correct
the typo "inculde" to "include" in the description for
mi_drm_notifier_call_chain; ensure the function docblocks for
mi_drm_register_client, mi_drm_unregister_client and mi_drm_notifier_call_chain
consistently reference the mi_* API symbols and proper event names.
- Around line 50-67: The build can fail because EXPORT_SYMBOL may not be defined
by current headers; add the appropriate export header (e.g., include
<linux/export.h> or <linux/module.h>) at the top of the file so
EXPORT_SYMBOL(mi_drm_register_client) resolves; update the includes near
mi_drm_notifier_list/mi_drm_register_client/EXPORT_SYMBOL to add that header.
In
`@patch/kernel/archive/sm8250-6.18/0013-input-nt36xxx-Enable-pen-support.patch`:
- Around line 111-118: The call to disable_pen_input_device(false) from
Boot_Update_Firmware is done while holding ts->lock whereas other call sites
(suspend/resume) call it without the lock; make disable_pen_input_device safe to
call from any context by adding internal synchronization and documenting its
locking behaviour: modify disable_pen_input_device to take/release ts->lock (or
another dedicated mutex) internally, update its comment to state it acquires the
lock, and remove/avoid double-locking at call sites (adjust Boot_Update_Firmware
or suspend/resume callers if they currently expect to hold the lock) so all
callers have consistent semantics; reference the disable_pen_input_device
function and the Boot_Update_Firmware/suspend/resume call sites when making the
change.
In
`@patch/kernel/archive/sm8250-6.18/0014-nt36xxx-add-pen-input-resolution.patch`:
- Around line 20-37: The trailing space before the comma in the second
input_set_abs_params call should be removed to match kernel style: locate the
block that sets x_max/y_max and calls input_set_abs_params (function
input_set_abs_params, variables x_max and y_max) and change the call
input_set_abs_params(ts->pen_input_dev, ABS_Y, 0, y_max , 0, 0) to remove the
stray space so it reads input_set_abs_params(ts->pen_input_dev, ABS_Y, 0, y_max,
0, 0); also verify nearby input_abs_set_res calls (input_abs_set_res with
PANEL_DEFAULT_HEIGHT_MM) follow spacing conventions.
In
`@patch/kernel/archive/sm8250-6.18/0016-drm-panel-Add-panel-driver-for-samsung-amsa26zp01.patch`:
- Around line 294-299: The code registers the panel with
drm_panel_add(&ctx->panel) but does not unregister it if
samsung_amsa26zp01_create_backlight(dsi) fails; modify the failure path to call
drm_panel_remove(&ctx->panel) before returning so the panel is cleaned up.
Specifically, after detecting IS_ERR(ctx->panel.backlight) in the block that
currently returns dev_err_probe(...), invoke drm_panel_remove(&ctx->panel) and
then return the dev_err_probe result, mirroring the cleanup used later in the
file.
- Around line 273-275: Remove the probe-time regulator enable to avoid reference
count imbalance: delete the call to
regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies) from probe() and
ensure that regulators are only enabled/disabled in the panel's prepare() and
unprepare() helpers (which already call regulator_bulk_disable()). Leave
ctx->supplies intact and do not add any new enable in probe(); verify that
prepare() performs regulator_bulk_enable and unprepare() performs
regulator_bulk_disable to maintain proper PM ordering.
- Around line 204-212: samsung_amsa26zp01_get_modes is advertising both
samsung_2k_dsc_120_mode and samsung_2k_dsc_60_mode while the panel init in
samsung_amsa26zp01_on currently forces 120 Hz via
mipi_dsi_generic_write_seq_multi, so remove the line that adds
samsung_2k_dsc_60_mode from samsung_amsa26zp01_get_modes (leave only
samsung_2k_dsc_120_mode) to avoid exposing 60 Hz until you implement mode‑aware
initialization in samsung_amsa26zp01_on that selects the proper MIPI command
based on the negotiated mode.
In
`@patch/kernel/archive/sm8250-6.18/0019-ASoC-qcom-sm8250-Add-primary-tdm-support.patch`:
- Around line 25-32: The loop over for_each_rtd_codec_dais currently ignores the
return value of snd_soc_dai_set_sysclk; update the loop to capture and check its
return like snd_soc_dai_set_fmt does: call snd_soc_dai_set_fmt(codec_dai,
codec_dai_fmt) into ret, then call snd_soc_dai_set_sysclk(codec_dai, 0,
TDM_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK) into ret (or a new variable) and if
that value is < 0 log the error via dev_err(rtd->dev, "TDM sysclk err:%d\n",
ret) and return the error; keep the existing fmt error handling unchanged so
both calls are validated for codec_dai.
- Around line 21-23: The call to snd_soc_dai_set_sysclk(cpu_dai,
Q6AFE_LPASS_CLK_ID_PRI_TDM_IBIT, TDM_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK)
ignores its return value; capture its return (e.g., int ret =
snd_soc_dai_set_sysclk(...)), check if ret < 0 and handle it the same way as the
TERTIARY_TDM_RX_0 case (log an error and return/propagate the error), and remove
the stray extra whitespace before the comma in Q6AFE_LPASS_CLK_ID_PRI_TDM_IBIT ,
to match the error-checking pattern used elsewhere.
In
`@patch/kernel/archive/sm8250-6.18/0063-usb-gadget-Refactor-NCM-net_device-lifecycle.patch`:
- Around line 59-66: The gether_setup_opts_default function fails to initialize
the ifname_set field, so callers that pass a reused non-zeroed struct can get a
stale override; update gether_setup_opts_default to explicitly set
opts->ifname_set to false/0 along with the other defaults (in the same function
where you set qmult, name, dev_mac, addr_assign_type, host_mac) so the exported
helper always produces a known default state.
- Around line 578-585: The error handling after gether_setup_default()
incorrectly returns -ENOMEM for any failure; change the return to propagate the
real error by returning PTR_ERR(netdev) when IS_ERR(netdev) is true, leaving the
subsequent scoped_guard/mutex and gether_apply_opts(netdev, &ncm_opts->net_opts)
logic intact; reference netdev, gether_setup_default(), PTR_ERR(netdev),
gether_apply_opts, and ncm_opts->lock to locate and update the check so the
actual failure code is preserved.
In
`@patch/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch`:
- Around line 60-67: The driver calls devm_regulator_get(), regulator_enable()
and regulator_disable() but does not include the regulator consumer header; add
the missing include for linux/regulator/consumer.h near the other includes so
the references to devm_regulator_get, regulator_enable and regulator_disable
resolve correctly and the file compiles cleanly.
In
`@patch/kernel/archive/sm8250-6.18/0067-Input-driver-for-AYN-Odin2-Gamepad.patch`:
- Around line 198-212: The minimum packet length check is off by one: the code
allows count==7 but then reads data[7], causing an out-of-bounds access; update
the guard that uses count (the if that calls dev_warn_ratelimited) to require at
least 8 bytes (e.g., change the check to reject count < 8) so subsequent uses of
data[7] and the checksum comparison in gamepad_data_checksum are safe, keeping
the rest of the logic that fills recv_data_buffer.header,
recv_data_buffer.frame_number, recv_data_buffer.command, and
recv_data_buffer.data_len unchanged.
- Line 359: The MODULE_ALIAS line added using MODULE_ALIAS("platform:"
DRIVER_NAME) is incorrect for a serdev driver; remove that MODULE_ALIAS
invocation (reference symbol: MODULE_ALIAS and DRIVER_NAME) and rely on the
existing MODULE_DEVICE_TABLE(of, ...) entry (symbol: MODULE_DEVICE_TABLE) for
OF-based autoloading, or if you really need an alias use the appropriate serdev
alias scheme instead of "platform:". Ensure the MODULE_ALIAS("platform:"
DRIVER_NAME) line is deleted or replaced with the correct serdev-specific alias.
In
`@patch/kernel/archive/sm8250-6.18/0070-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch`:
- Around line 4-5: The patch Subject line currently embeds "Signed-off-by:" and
the signer line lacks the tag; update the patch header so the Subject only
contains the commit title ("arm64: dts: qcom: add SM8250 Retroid Pocket
variant") and move the signer into its own "Signed-off-by: Teguh Sobirin
<teguh@sobir.in>" line below the commit message header to restore a proper
Signed-off-by header.
♻️ Duplicate comments (21)
patch/kernel/archive/sm8250-6.18/0014-nt36xxx-add-pen-input-resolution.patch (1)
36-37: Hardcoded panel dimensions concern already raised.The previous review flagged that these hardcoded
PANEL_DEFAULT_WIDTH_MM(148) andPANEL_DEFAULT_HEIGHT_MM(237) values may not be appropriate for all devices using this driver. The suggestion to make these device-specific via device tree properties remains valid.Also applies to: 51-53
patch/kernel/archive/sm8250-6.18/0013-input-nt36xxx-Enable-pen-support.patch (3)
21-56: Synchronization and clarity concerns already flagged.The race condition concerns and magic number issues were previously identified. Additionally, line 32's conditional override logic is hard to follow:
disable = (!(ts->pen_input_dev_enable) || ts->pen_is_charge) ? true : disable;This silently overrides the caller's intent when pen input is disabled or charging, making the function's behavior non-obvious from call sites.
77-82: Asymmetric suspend/resume handling previously flagged.The conditional pen disable in suspend (only when
ts->pen_input_dev_enableis true) versus unconditional enable in resume was already identified as an issue in prior review.
85-91: Unconditional resume enable is part of the asymmetry issue.This unconditional call to
disable_pen_input_device(false)on resume, regardless of the pre-suspend state, was previously flagged. The resume logic should match the suspend condition.patch/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch (4)
196-197: Bug:always-onproperty read from wrong device node.
device_property_read_bool(dev, "always-on")reads from the parent device, butalways-onis a per-LED property that should be read from the child node.Suggested fix
- if (!device_property_read_bool(dev, "always-on")) + if (!of_property_read_bool(child, "always-on")) cdev->flags |= LED_CORE_SUSPENDRESUME;
281-283: Incomplete GPIO error handling — other errors ignored.Only
-EPROBE_DEFERis handled. Ifdevm_gpiod_get()returns another error (e.g.,-ENOENT,-EBUSY), the code continues with an invalidERR_PTR, leading to a crash whengpiod_set_value_cansleep()is called.Suggested fix
priv->sdb = devm_gpiod_get(dev, "sdb", GPIOD_OUT_HIGH); - if (PTR_ERR(priv->sdb) == -EPROBE_DEFER) - return -EPROBE_DEFER; + if (IS_ERR(priv->sdb)) + return PTR_ERR(priv->sdb);
291-310: Resource leak: regulator not disabled on error paths.If
htr3212_init_regs()orhtr3212_parse_dt()fails afterregulator_enable(), the regulator remains enabled.Suggested fix using goto-based cleanup
ret = regulator_enable(priv->vdd); if (ret < 0) return ret; gpiod_set_value_cansleep(priv->sdb, 1); usleep_range(10000, 11000); priv->client = client; i2c_set_clientdata(client, priv); ret = htr3212_init_regs(priv); if (ret) - return ret; + goto err_disable_regulator; ret = htr3212_parse_dt(dev, priv); if (ret) - return ret; + goto err_disable_regulator; return 0; + +err_disable_regulator: + gpiod_set_value_cansleep(priv->sdb, 0); + regulator_disable(priv->vdd); + return ret; }
347-347: Typo: Missing closing>in MODULE_AUTHOR.The email address is missing its closing angle bracket.
Suggested fix
-MODULE_AUTHOR("Teguh Sobirin <teguh@sobir.in"); +MODULE_AUTHOR("Teguh Sobirin <teguh@sobir.in>");patch/kernel/archive/sm8250-6.18/0063-usb-gadget-Refactor-NCM-net_device-lifecycle.patch (1)
192-199: Validatehex_to_bin()results when parsing MAC addresses.Invalid hex characters yield
-1, which currently gets folded intonew_addrsilently. Please validatehex_to_bin()(or switch tomac_pton()), and fail on invalid input. This is the same issue previously raised.🔧 Proposed fix
- for (int i = 0; i < ETH_ALEN; i++) { \ - unsigned char num; \ + for (int i = 0; i < ETH_ALEN; i++) { \ + int hi, lo; \ if ((*p == '.') || (*p == ':')) \ p++; \ - num = hex_to_bin(*p++) << 4; \ - num |= hex_to_bin(*p++); \ - new_addr[i] = num; \ + hi = hex_to_bin(*p++); \ + lo = hex_to_bin(*p++); \ + if (hi < 0 || lo < 0) \ + return -EINVAL; \ + new_addr[i] = (hi << 4) | lo; \ } \Also applies to: 230-237
patch/kernel/archive/sm8250-6.18/0067-Input-driver-for-AYN-Odin2-Gamepad.patch (4)
209-219: Buffer overflow:data_lennot validated before memcpy.This issue was previously identified. The
data_lenfield is read from the packet without bounds checking againstMAX_DATA_LENor verifying the packet actually contains the claimed data length.
141-175: Staticprev_statesbreaks multi-device support.This issue was previously identified. The static variable is shared across all driver instances, causing incorrect edge detection if multiple devices were probed.
160-171: Missing bounds check ondata->dataaccess.This issue was previously identified. The function accesses
data->data[0]throughdata->data[13]without verifyingdata->data_len >= 14.
244-263: GPIO error pointers not cleared, risking kernel crash.This issue was previously identified. When
devm_gpiod_get_optionalreturns an error, the code warns but keeps the error pointer stored, causing crashes in subsequentgpiod_set_value_cansleepcalls.patch/kernel/archive/sm8250-6.18/0052-arm64-dts-qcom-sm8250-Add-device-tree-for-Xiaomi-Mi-.patch (1)
15-16: Typo in patch metadata ("Singed-off-by").✅ Proposed fix
-Singed-off-by: Dawid Wróbel <me@dawidwróbel.com> +Signed-off-by: Dawid Wróbel <me@dawidwróbel.com>patch/kernel/archive/sm8250-6.18/0028-From-Teguh-Sobirin-teguh-sobir.in-Date-Sun-24-Nov-20.patch (3)
449-453: Same missing error check pattern insmb5_get_prop_status.Same issue as
smb5_apsd_get_charger_type- the return value ofsmb5_get_prop_usb_onlineshould be checked before usingusb_online.Suggested fix
rc = smb5_get_prop_usb_online(chip, &usb_online); + if (rc < 0) + return rc; if (!usb_online) { *val = POWER_SUPPLY_STATUS_DISCHARGING; - return rc; + return 0; }
400-404: Missing error check forsmb5_get_prop_usb_online.If
smb5_get_prop_usb_onlinefails,usb_onlinemay be uninitialized. The return code should be checked before using the value.Suggested fix
rc = smb5_get_prop_usb_online(chip, &usb_online); + if (rc < 0) + return rc; if (!usb_online) { *val = POWER_SUPPLY_USB_TYPE_UNKNOWN; - return rc; + return 0; }
601-624: Battery overvoltage detected but health value not set.When
CHARGER_ERROR_STATUS_BAT_OV_BITis set, the function logs an error but doesn't set*valtoPOWER_SUPPLY_HEALTH_OVERVOLTAGE. The function continues to the temperature checks and may returnPOWER_SUPPLY_HEALTH_GOODeven when battery overvoltage is detected.Suggested fix
if (stat & CHARGER_ERROR_STATUS_BAT_OV_BIT) { dev_err(chip->dev, "battery over-voltage\n"); + *val = POWER_SUPPLY_HEALTH_OVERVOLTAGE; + return 0; }patch/kernel/archive/sm8250-6.18/0068-input-add-Qualcomm-SPMI-haptics-driver.patch (4)
600-606: Check auto‑res register write before proceeding.
Line 600 assignsretfrom the auto‑res write, but it isn’t checked before configuring play mode, so a failed write silently continues.🐛 Proposed fix
ret = spmi_haptics_write_masked(haptics, haptics->base + HAP_LRA_AUTO_RES_REG, mask, val); +if (ret < 0) + return ret; /* Configure the PLAY MODE register */ ret = spmi_haptics_write_play_mode(haptics);
732-738: Fix kernel‑doc header for spmi_haptics_disable.
Line 732 documentsspmi_haptics_enableand an@enableparam that doesn’t exist.✏️ Suggested update
/** - * spmi_haptics_enable - handler to start/stop vibration + * spmi_haptics_disable - handler to stop vibration * `@haptics`: pointer to haptics struct - * `@enable`: state to set * Returns: 0 on success, < 0 on failure */
961-991: Initialize work/mutex before any error path uses them.
Line 961 initializes work late andplay_lockis never initialized; Line 987’s cleanup can run even on early failures. MoveINIT_WORK/mutex_initearlier and ensure all post‑init failures funnel through a safe cleanup label.🔒️ Suggested restructuring
+ INIT_WORK(&haptics->work, spmi_haptics_work); + mutex_init(&haptics->play_lock); + haptics->play_irq = platform_get_irq_byname(pdev, "play"); if (haptics->play_irq < 0) { dev_err(&pdev->dev, "Unable to get play irq\n"); ret = haptics->play_irq; goto register_fail; } @@ - input_dev = devm_input_allocate_device(&pdev->dev); - if (!input_dev) - return -ENOMEM; - - INIT_WORK(&haptics->work, spmi_haptics_work); + input_dev = devm_input_allocate_device(&pdev->dev); + if (!input_dev) { + ret = -ENOMEM; + goto register_fail; + } haptics->haptics_input_dev = input_dev; @@ register_fail: cancel_work_sync(&haptics->work); mutex_destroy(&haptics->play_lock); return ret;
1006-1013: Avoid unregistering a devm‑managed input device.
Line 1012 callsinput_unregister_device()on a device allocated viadevm_input_allocate_device(), which is already released by devres.🧹 Proposed fix
cancel_work_sync(&haptics->work); mutex_destroy(&haptics->play_lock); - input_unregister_device(haptics->haptics_input_dev);
🧹 Nitpick comments (12)
patch/kernel/archive/sm8250-6.18/0013-input-nt36xxx-Enable-pen-support.patch (1)
66-73: Remove commented-out code instead of leaving it.Since the intent is to always enable pen input, remove the dead conditional entirely rather than leaving it commented out. Commented-out code clutters the patch and may cause confusion about whether it should be restored.
♻️ Proposed fix
-//#ifdef CONFIG_FACTORY_BUILD ts->pen_input_dev_enable = 1; -//#else -// ts->pen_input_dev_enable = 0; -//#endifpatch/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch (4)
21-29: Unnecessaryselect REGMAP_I2C— driver uses raw SMBus API.The Kconfig selects
REGMAP_I2C, but the driver implementation usesi2c_smbus_write_byte_data()directly rather than the regmap framework. Either remove the select or refactor the driver to use regmap for consistency.Option 1: Remove unnecessary select
config LEDS_HTR3212 tristate "HEROIC HTR3212 LED driver" depends on LEDS_CLASS && I2C - select REGMAP_I2C help
101-101: Minor: double space before function call.Suggested fix
- ret = i2c_smbus_write_byte_data(priv->client, reg, val); + ret = i2c_smbus_write_byte_data(priv->client, reg, val);
150-160: Confusing use ofHTR3212_ENABLE_BITconstant.
HTR3212_ENABLE_BIT(value 1) is used both as the upper bit forGENMASK()and as a divisor fornum_regs. This dual purpose makes the code harder to understand. Consider using separate constants or adding a comment explaining the register layout.
272-274: Consider logging an error when no LED children are defined.Returning
-EINVALsilently makes debugging DT issues harder. A dev_err() explaining no LED child nodes were found would help users.Suggested fix
count = of_get_available_child_count(dev_of_node(dev)); - if (!count) + if (!count) { + dev_err(dev, "No LED child nodes defined\n"); return -EINVAL; + }patch/kernel/archive/sm8250-6.18/0005-ASoC-qcom-sm8250-Add-tdm-support.patch (1)
29-78: Inconsistent indentation insm8250_tdm_snd_hw_params.The function uses mixed indentation (2 spaces in the playback branch starting at line 42, 3 spaces in the capture branch starting at line 59). Linux kernel style prefers tabs for indentation. This is a minor style inconsistency that could be cleaned up when convenient.
patch/kernel/archive/sm8250-6.18/0001-drm-Add-drm-notifier-support.patch (1)
124-133: Clarify the notifier payload type in the public header.
mi_drm_notifier_call_chain()exposes avoid *vpayload, but the header doesn’t define its layout even though the comment implies display ID + blank event. Consider adding a small struct/typedef in this header or updating the comment to reflect the actual payload shape.patch/kernel/archive/sm8250-6.18/0067-Input-driver-for-AYN-Odin2-Gamepad.patch (4)
22-25: Kconfig entry missing help text.Kernel Kconfig entries should include a
helpsection describing what the driver does and when to enable it. This helps users make informed decisions during kernel configuration.Suggested improvement
config JOYSTICK_ODIN2 tristate "AYN Odin2 gamepad" depends on SERIAL_DEV_BUS + help + Say Y here if you have an AYN Odin2 handheld gaming device + and want to use its built-in gamepad. + + To compile this driver as a module, choose M here: the + module will be called odin2.
319-325: Registering unused axis capabilities (ABS_Z, ABS_RZ).The loop registers capabilities for
ABS_XthroughABS_RZ(6 axes), but the input handler only reports 4 axes (ABS_X,ABS_Y,ABS_RX,ABS_RY).ABS_ZandABS_RZare never reported, which could confuse userspace applications expecting input on those axes.Proposed fix
Register only the axes that are actually reported:
- __set_bit(EV_ABS, gamepad_dev->dev_input->evbit); - for (int i = ABS_X; i <= ABS_RZ; i++) - input_set_abs_params(gamepad_dev->dev_input, i, -0x580, 0x580, - 0, 0); + __set_bit(EV_ABS, gamepad_dev->dev_input->evbit); + input_set_abs_params(gamepad_dev->dev_input, ABS_X, -0x580, 0x580, 0, 0); + input_set_abs_params(gamepad_dev->dev_input, ABS_Y, -0x580, 0x580, 0, 0); + input_set_abs_params(gamepad_dev->dev_input, ABS_RX, -0x580, 0x580, 0, 0); + input_set_abs_params(gamepad_dev->dev_input, ABS_RY, -0x580, 0x580, 0, 0);
72-83: Macro with embedded return statement can be error-prone.The
gamepad_serdev_write_seqmacro contains areturnstatement, which can cause unexpected control flow if used outside void functions. Consider documenting this restriction or refactoring to an inline function that returns a status code, letting the caller decide whether to return.Currently all usages are in
gamepad_send_init_sequence(void), so this is safe but could be a maintenance hazard.
108-117: Checksum function assumes minimum data length.
gamepad_data_checksumdirectly accessesdata[4]without validatingcount >= 5. The caller (gamepad_mcu_uart_rx_bytes) currently ensurescount >= 7before calling, but this implicit contract is fragile. Consider adding a defensive check or documenting the precondition.patch/kernel/archive/sm8250-6.18/0028-From-Teguh-Sobirin-teguh-sobir.in-Date-Sun-24-Nov-20.patch (1)
740-752: Static power supply descriptor name is misleading but overridden.The static
smb5_psy_desc.name = "pmi8998_charger"is misleading since this is a PM8150B driver. However, I note that lines 912-920 dynamically override this name usingdevice_get_match_data(), resulting in the correct"pm8150b-charger"name at runtime.Consider updating the static descriptor name for code clarity, even though it's overridden:
Suggested cleanup
static const struct power_supply_desc smb5_psy_desc = { - .name = "pmi8998_charger", + .name = "smb5_charger", /* overridden at probe time */ .type = POWER_SUPPLY_TYPE_USB,
patch/kernel/archive/sm8250-6.18/0001-drm-Add-drm-notifier-support.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0001-drm-Add-drm-notifier-support.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0013-input-nt36xxx-Enable-pen-support.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0014-nt36xxx-add-pen-input-resolution.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0063-usb-gadget-Refactor-NCM-net_device-lifecycle.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0066-leds-Add-driver-for-HEROIC-HTR3212-Signed-off-by-Teg.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0067-Input-driver-for-AYN-Odin2-Gamepad.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0067-Input-driver-for-AYN-Odin2-Gamepad.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0070-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch
Show resolved
Hide resolved
igorpecovnik
left a comment
There was a problem hiding this comment.
Merge when you feel its done.
|
✅ This PR has been reviewed and approved — all set for merge! |
Thanks for the review! I believe it's ready to be merged now, as the main issues pointed out by the AI have been fixed |
Signed-off-by: CodeChenL <2540735020@qq.com>
From https://gitlab.postmarketos.org/soc/qualcomm-sm8250/linux/-/commits/6.17.0?ref_type=HEADS Made some modifications to be compatible with the latest kernel. Signed-off-by: CodeChenL <2540735020@qq.com>
To equip the current kernel version. Signed-off-by: CodeChenL <2540735020@qq.com>
From https://lore.kernel.org/all/20251230-ncm-refactor-v1-0-793e347bc7a7@google.com/ To fix slow startup, and the issue where the system fails to release ncm devices when shutting down after plugging or unplugging a usb hub, which references a null pointer This is important for devices without serial ports, such as the Elixir, because they enable NCM by default for headless debugging, making it easy to trigger related bugs. Signed-off-by: CodeChenL <2540735020@qq.com>
Signed-off-by: CodeChenL <2540735020@qq.com>
Based on the AI review Co-authored-by: retro98boy <retro98boy@qq.com> Signed-off-by: CodeChenL <2540735020@qq.com>
0177a18 to
0e2b0b0
Compare
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 Fix all issues with AI agents
In
`@patch/kernel/archive/sm8250-6.18/0017-ASoC-cs35l45-disable-power-managerment.patch`:
- Line 4: Update the commit subject string "ASoC: cs35l45: disable power
managerment" to correct the typo by replacing "managerment" with "management" so
the subject reads "ASoC: cs35l45: disable power management"; ensure the change
is made in the patch header/title where the Subject line is defined.
In
`@patch/kernel/archive/sm8250-6.18/0020-arm64-dts-qcom-add-device-tree-for-Xiaoxin-Pad-Pro-1.patch`:
- Around line 1642-1654: The touchscreen device-tree node touchscreen@0
currently sets compatible = "goodix,gt9916" but contains an inline comment
suggesting "change to gt6975p"; either remove that conflicting comment if GT9916
is the correct IC, or update the compatible string to the actual controller
(e.g., "goodix,gt9966" or other) and ensure the kernel has matching
driver/binding support. Locate the touchscreen@0 node and either delete the
inline "// change to gt6975p" note to keep compatible = "goodix,gt9916", or
replace the compatible value with the correct vendor/model and verify associated
bindings (avdd-supply, reset-gpios, spi-max-frequency) match that controller's
device-tree binding before committing.
In
`@patch/kernel/archive/sm8250-6.18/0024-power-supply-Add-driver-for-Qualcomm-PMIC-fuel-gauge.patch`:
- Around line 292-307: The code is performing regmap I/O (qcom_fg_masked_write)
while holding a spinlock (sram_request_lock), which may sleep and cause atomic
context violations; replace the spinlock with a mutex (e.g., change
spin_lock/spin_unlock to mutex_lock/mutex_unlock and ensure sram_request_lock is
defined/initialized as a struct mutex) or move the qcom_fg_masked_write call out
of the spin-locked region: call qcom_fg_sram_check_access and update
chip->sram_requests under the lock, release it, then perform
qcom_fg_masked_write (and handle its error) while not holding the spinlock;
update all matching sites that use
spin_lock(&chip->sram_request_lock)/spin_unlock(&chip->sram_request_lock)
(including the similar block around lines 370-375) and adjust initialization of
sram_request_lock accordingly.
In
`@patch/kernel/archive/sm8250-6.18/0025-power-qcom_fg-Add-initial-pm8150b-support.patch`:
- Around line 158-173: The temperature scaling in qcom_fg_gen4_get_temperature
is wrong: PM8150B RRADC is 0.25 K/LSB (code/4 = Kelvin), so replace the current
deci‑C assignment for *val with a conversion that computes Kelvin from the
16-bit raw (temp), converts to Celsius and returns deci‑degrees Celsius; e.g.
compute kelvin_milli = temp * 250 (milli‑K), subtract 273150 (milli to convert
K->C), then divide to get deci‑C (or use 64‑bit intermediate to avoid overflow)
and assign to *val. Use the existing symbols (readval, temp, *val,
ADC_RR_BATT_TEMP_LSB, qcom_fg_gen4_get_temperature) when making this change.
In
`@patch/kernel/archive/sm8250-6.18/0028-From-Teguh-Sobirin-teguh-sobir.in-Date-Sun-24-Nov-20.patch`:
- Around line 375-387: The smb5_get_prop_usb_online function currently assigns
the raw bitmask to *val which yields non-boolean values; change the assignment
in smb5_get_prop_usb_online to normalize the USBIN_PLUGIN_RT_STS_BIT into 0 or 1
by replacing "*val = (stat & USBIN_PLUGIN_RT_STS_BIT);" with a ternary
expression like "*val = (stat & USBIN_PLUGIN_RT_STS_BIT) ? 1 : 0;" so it returns
a proper boolean per the POWER_SUPPLY_PROP_ONLINE ABI.
In
`@patch/kernel/archive/sm8250-6.18/0050-arm64-dts-qcom-sm8250-xiaomi-elish-add-BT-swctrl-gpi.patch`:
- Line 12: Fix the typo in the Signed-off-by line of the patch: replace "Dawid
Wróbel <me@dawidwrobelcom>" with the correct email "Dawid Wróbel
<me@dawidwrobel.com>" in the commit header (look for the Signed-off-by line in
the patch file
sm8250-6.18/0050-arm64-dts-qcom-sm8250-xiaomi-elish-add-BT-swctrl-gpi.patch).
In
`@patch/kernel/archive/sm8250-6.18/0068-input-add-Qualcomm-SPMI-haptics-driver.patch`:
- Around line 933-941: The boost GPIO acquisition uses
devm_gpiod_get_optional(haptics->dev, "qcom,boost", GPIOD_OUT_HIGH) which may
return ERR_PTR; instead of only logging, detect IS_ERR(haptics->boost) and
propagate the error (return PTR_ERR(haptics->boost) from the probe/init
function) or set haptics->boost = NULL after handling so it is not treated as a
valid gpio; apply the same fix for the other boost gpio acquisitions referenced
around the gpiod_set_value_cansleep(haptics->boost, 1) calls (the occurrences
you noted) so you never call gpiod_set_value_cansleep with an ERR_PTR. Ensure
the error handling uses PTR_ERR to return the error code and leave
haptics->boost NULL if you plan to continue without the GPIO.
♻️ Duplicate comments (29)
patch/kernel/archive/sm8250-6.18/0067-Input-driver-for-AYN-Odin2-Gamepad.patch (5)
100-106: Addprev_statesfield tostruct gamepad_device.This is a reminder that
prev_statesingamepad_input_handler(line 144) is declaredstatic, which breaks multi-device support. The fix requires adding this field to the device struct.
141-175: Previously identified issues remain unaddressed.Two issues were flagged in prior reviews:
- Static
prev_states(line 144) breaks multi-device support- Missing bounds check before accessing
data->data[0..13]Both require fixes before merge.
191-224: Previously identified issues remain unaddressed.Two critical issues were flagged in prior reviews:
- Off-by-one at line 198:
count < 7should becount < 8- Buffer overflow at lines 214-219:
data_lennot validated beforememcpyBoth are security-critical and require fixes before merge.
244-277: Previously identified GPIO issue remains unaddressed.When
devm_gpiod_get_optionalreturns an error pointer (e.g.,-EPROBE_DEFER), the code warns but doesn't clear the pointer. Laterif (gamepad_dev->boot_gpio)checks pass (error pointers are non-NULL), causinggpiod_set_value_cansleepto be called with an invalid pointer.This is a critical crash risk that was flagged in prior review.
359-359: Incorrect MODULE_ALIAS for serdev driver.This alias is for platform drivers, not serdev drivers. The
MODULE_DEVICE_TABLE(of, ...)is sufficient for OF-based autoloading. This line should be removed.patch/kernel/archive/sm8250-6.18/0063-usb-gadget-Refactor-NCM-net_device-lifecycle.patch (3)
59-66: Initializeifname_setingether_setup_opts_default.The
ifname_setfield is not initialized. If a caller reuses a non-zeroedstruct gether_opts,ifname_setcan be stale and unintentionally force a name override.void gether_setup_opts_default(struct gether_opts *opts, const char *name) { + opts->ifname_set = false; opts->qmult = QMULT_DEFAULT;
192-199: MAC address parsing lacks error handling for invalid hex characters.The
hex_to_bin()function returns -1 for invalid hex characters, but this error is not checked. Invalid input would silently produce corrupted MAC address bytes that could passis_valid_ether_addr()validation.Consider using
mac_pton()helper which handles validation internally, or validatehex_to_bin()return values:for (int i = 0; i < ETH_ALEN; i++) { \ - unsigned char num; \ + int hi, lo; \ if ((*p == '.') || (*p == ':')) \ p++; \ - num = hex_to_bin(*p++) << 4; \ - num |= hex_to_bin(*p++); \ - new_addr[i] = num; \ + hi = hex_to_bin(*p++); \ + lo = hex_to_bin(*p++); \ + if (hi < 0 || lo < 0) \ + return -EINVAL; \ + new_addr[i] = (hi << 4) | lo; \ } \The same issue exists in
USB_ETHER_OPTS_ATTR_HOST_ADDR(lines 230-237).
577-579: Propagategether_setup_default()error codes.Returning
-ENOMEMunconditionally hides other failure reasons. UsePTR_ERR(netdev)to preserve the actual error.netdev = gether_setup_default(); if (IS_ERR(netdev)) - return -ENOMEM; + return PTR_ERR(netdev);patch/kernel/archive/sm8250-6.18/0028-From-Teguh-Sobirin-teguh-sobir.in-Date-Sun-24-Nov-20.patch (2)
740-742: Power-supply descriptor name still references PMI8998.
This looks identical to the earlier review note; keeping the default name aligned avoids confusion if the override path changes.Suggested fix
-static const struct power_supply_desc smb5_psy_desc = { - .name = "pmi8998_charger", +static const struct power_supply_desc smb5_psy_desc = { + .name = "pm8150b_charger",
589-623: Set health to OVERVOLTAGE when BAT_OV is asserted and return early.
The battery over-voltage condition is detected and logged, but the health value is not updated, allowing the function to continue execution and potentially return GOOD health if no temperature faults are detected.Proposed fix
if (stat & CHARGER_ERROR_STATUS_BAT_OV_BIT) { dev_err(chip->dev, "battery over-voltage\n"); + *val = POWER_SUPPLY_HEALTH_OVERVOLTAGE; + return 0; }patch/kernel/archive/sm8250-6.18/0030-power-supply-qcom_fg-invert-charging-current.patch (1)
6-7: Minor: Typo in commit message."inevrt" should be "invert".
patch/kernel/archive/sm8250-6.18/0042-power-supply-qcom_fg-fix-compile-error.patch (1)
27-30: Charger lookup will silently fail at runtime.The change from
power_supply_get_by_phandle()topower_supply_get_by_name("power-supplies")is semantically incorrect. The string"power-supplies"is the DT property name, not the actual power supply name. The chargers register with names likebq2597x-master,bq2597x-slave, etc., so this lookup will always fail.Since the code gracefully handles
IS_ERR(chip->chg_psy), it won't crash, but charger status checking will be disabled. Ifpower_supply_get_by_phandle()was removed from the kernel API, consider usingpower_supply_get_by_phandle_array()or resolving the actual charger name from the device tree.patch/kernel/archive/sm8250-6.18/0013-input-nt36xxx-Enable-pen-support.patch (2)
21-56: Race condition and locking concerns remain unaddressed.The
disable_pen_input_device()function accesses shared state (bTouchIsAwake,ts->pen_input_dev_enable,ts->pen_is_charge) without synchronization, and is called from contexts with different locking states (firmware update holdsts->lock, resume doesn't). Themsleep(35)is also unexplained.These concerns were raised in previous reviews but appear unaddressed.
77-91: Asymmetric suspend/resume pen handling.In suspend (lines 79-82), pen is disabled only when
ts->pen_input_dev_enableis true. However, in resume (lines 89-90),disable_pen_input_device(false)is called unconditionally. This asymmetry could re-enable the pen on resume even if it wasn't enabled before suspend.This was flagged in previous reviews and remains unaddressed.
patch/kernel/archive/sm8250-6.18/0070-arm64-dts-qcom-add-SM8250-Retroid-Pocket-variant-Sig.patch (1)
4-5: Malformed Signed-off-by header in patch.The Subject line incorrectly contains "Signed-off-by:" embedded within it. This should be on a separate line after the commit message body.
This was flagged in a previous review and remains unaddressed.
patch/kernel/archive/sm8250-6.18/0014-nt36xxx-add-pen-input-resolution.patch (2)
34-37: Avoid hardcoding panel dimensions for pen resolution.
The fixed 148×237 mm values risk incorrect scaling on other devices. Consider reading panel size from DT properties with a fallback to these defaults.Also applies to: 51-53
34-35: Remove the stray space before the comma.🔧 Proposed fix
- input_set_abs_params(ts->pen_input_dev, ABS_Y, 0, y_max , 0, 0); + input_set_abs_params(ts->pen_input_dev, ABS_Y, 0, y_max, 0, 0);patch/kernel/archive/sm8250-6.18/0001-drm-Add-drm-notifier-support.patch (2)
50-67: Add an export header soEXPORT_SYMBOLis defined.
EXPORT_SYMBOLisn’t guaranteed to be available from the current includes and can break builds on some configurations. Add<linux/export.h>(or<linux/module.h>) here.🔧 Proposed fix
+#include <linux/export.h> `#include` <linux/notifier.h> `#include` <drm/drm_notifier.h>
55-86: Fix stalemsm_*identifiers and the “inculde” typo in doc comments.
The comments should match themi_*API and current event names.🔧 Proposed fix
- * to msm_drm_notifier_list, which would be called when + * to mi_drm_notifier_list, which would be called when @@ - * msm_drm_notifier_list. + * mi_drm_notifier_list. @@ - * `@val`: event MSM_DRM_EARLY_EVENT_BLANK or MSM_DRM_EVENT_BLANK - * `@v`: notifier data, inculde display id and display blank + * `@val`: event MI_DRM_EARLY_EVENT_BLANK or MI_DRM_EVENT_BLANK + * `@v`: notifier data, include display id and display blankpatch/kernel/archive/sm8250-6.18/0024-power-supply-Add-driver-for-Qualcomm-PMIC-fuel-gauge.patch (1)
1362-1367: Fix battery info cleanup to usebatt_psy.
power_supply_get_battery_info()is tied tochip->batt_psy, but remove useschip->chg_psy.🔧 Proposed fix
- power_supply_put_battery_info(chip->chg_psy, chip->batt_info); + power_supply_put_battery_info(chip->batt_psy, chip->batt_info);patch/kernel/archive/sm8250-6.18/0016-drm-panel-Add-panel-driver-for-samsung-amsa26zp01.patch (3)
103-109: Don’t advertise 60 Hz unless init is mode-aware.
get_modes()exposes 60 Hz, but the init sequence forces 120 Hz, so a 60 Hz selection will still initialize 120 Hz. Either implement mode-aware init or only advertise 120 Hz.🔧 Minimal fix (advertise only 120 Hz)
- count += drm_connector_helper_get_modes_fixed(connector, &samsung_2k_dsc_120_mode); - count += drm_connector_helper_get_modes_fixed(connector, &samsung_2k_dsc_60_mode); + count += drm_connector_helper_get_modes_fixed(connector, &samsung_2k_dsc_120_mode);Also applies to: 204-212
273-275: Remove regulator enable from probe to avoid refcount imbalance.
Regulators are enabled inprepare(); enabling again in probe has no matching disable until unprepare.🔧 Proposed fix
- ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); - if (ret) - dev_err(dev, "Failed to enable regulators: %d\n", ret);
294-299: Clean up the panel if backlight creation fails.
drm_panel_add()is called before backlight creation; on failure, it should be removed.🔧 Proposed fix
ctx->panel.backlight = samsung_amsa26zp01_create_backlight(dsi); if (IS_ERR(ctx->panel.backlight)) + drm_panel_remove(&ctx->panel); return dev_err_probe(dev, PTR_ERR(ctx->panel.backlight), "Failed to create backlight\n");patch/kernel/archive/sm8250-6.18/0068-input-add-Qualcomm-SPMI-haptics-driver.patch (4)
600-605: Check the auto-res register write before continuing.
spmi_haptics_write_masked()can fail; proceeding without a check risks configuring play mode on a bad state.🔧 Suggested fix
ret = spmi_haptics_write_masked(haptics, haptics->base + HAP_LRA_AUTO_RES_REG, mask, val); + if (ret < 0) + return ret; /* Configure the PLAY MODE register */
732-737: Fix kernel-doc header forspmi_haptics_disable.The doc block still references
spmi_haptics_enableand an@enableparam that doesn’t exist here.✏️ Suggested fix
/** - * spmi_haptics_enable - handler to start/stop vibration + * spmi_haptics_disable - handler to stop vibration * `@haptics`: pointer to haptics struct - * `@enable`: state to set * Returns: 0 on success, < 0 on failure */
857-962: Initializeplay_lock/workbefore any error path.
play_lockis never initialized, andregister_failcan execute beforeINIT_WORK, socancel_work_sync()/mutex_destroy()may act on uninitialized objects. Move initialization earlier (or split cleanup labels).🔧 Suggested fix
haptics->dev = &pdev->dev; + mutex_init(&haptics->play_lock); + INIT_WORK(&haptics->work, spmi_haptics_work); ret = of_property_read_u32(node, "reg", &haptics->base); @@ - INIT_WORK(&haptics->work, spmi_haptics_work); haptics->haptics_input_dev = input_dev;Also applies to: 987-991
1006-1013: Avoid double-unregister of a devm-managed input device.
input_devcomes fromdevm_input_allocate_device(), soinput_unregister_device()can double-free on remove.🔧 Suggested fix
cancel_work_sync(&haptics->work); mutex_destroy(&haptics->play_lock); - input_unregister_device(haptics->haptics_input_dev); if (haptics->boost) gpiod_set_value_cansleep(haptics->boost, 0);patch/kernel/archive/sm8250-6.18/0020-arm64-dts-qcom-add-device-tree-for-Xiaoxin-Pad-Pro-1.patch (2)
66-70: Fix misspelledchassis-typeproperty.Line 69 uses
classis-type, which is not a valid DT property and will be ignored.🐛 Proposed fix
- classis-type = "tablet"; + chassis-type = "tablet";
356-362: Fix misspelledregulator-allow-set-loadproperty.Line 361 uses
regualtor-allow-set-load, so the setting won’t take effect.🐛 Proposed fix
- regualtor-allow-set-load; + regulator-allow-set-load;
🧹 Nitpick comments (7)
patch/kernel/archive/sm8250-6.18/0067-Input-driver-for-AYN-Odin2-Gamepad.patch (2)
22-25: Consider adding Kconfig help text.The config entry lacks a help description. While optional, a brief help text aids users configuring the kernel.
Suggested addition
config JOYSTICK_ODIN2 tristate "AYN Odin2 gamepad" depends on SERIAL_DEV_BUS + help + Say Y here if you have an AYN Odin2 handheld gaming device + and want to use its built-in gamepad controller. + + To compile this driver as a module, choose M here: the + module will be called odin2.
299-299: Trailing whitespace.Line 299 has trailing whitespace after the semicolon.
patch/kernel/archive/sm8250-6.18/0063-usb-gadget-Refactor-NCM-net_device-lifecycle.patch (1)
596-601: Consider adding a comment for the magic number.The check
status < 12represents the minimum length of a MAC address in CDC hex format (e.g., "01234567890a"). A brief comment would improve readability:status = gether_get_host_addr_cdc(netdev, ncm->ethaddr, sizeof(ncm->ethaddr)); - if (status < 12) + if (status < 12) /* strlen("01234567890a") */ return -EINVAL;patch/kernel/archive/sm8250-6.18/0038-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-adds-us.patch (1)
57-58: Tighten the comment wording and fix the typo.
The line reads a bit unclear; quick cleanup improves maintainability.✏️ Suggested tweak
-// downstream uses otg-use_external_boost which do not enable bellow +// Downstream uses otg-use_external_boost; not enabled below.patch/kernel/archive/sm8250-6.18/0036-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-swtich-.patch (1)
4-5: Minor: Typo in patch filename.The filename contains "swtich" which should be "switch". Consider renaming for consistency:
0036-arm64-dts-qcom-sm8250-oneplus-instantnoodlep-switch-fuel-gauge-to-bq27411.patchpatch/kernel/archive/sm8250-6.18/0017-ASoC-cs35l45-disable-power-managerment.patch (1)
20-21: Prefer removing code over commenting it out.Commenting out code with
//is not ideal for kernel patches. This approach:
- Leaves dead code that may cause unused variable warnings for
cs35l45_pm_ops- Creates maintenance burden
Consider either:
- Removing the PM ops assignment entirely with
#ifdefguards if conditional- Adding a commit message explaining why PM is disabled (e.g., known issue, hardware limitation)
If this is a temporary workaround, document the reason in the commit message so future maintainers understand the intent.
♻️ Cleaner approach using preprocessor
static struct i2c_driver cs35l45_i2c_driver = { .driver = { .name = "cs35l45", .of_match_table = cs35l45_of_match, - // .pm = pm_ptr(&cs35l45_pm_ops), +#if 0 /* PM disabled - causes <describe issue> */ + .pm = pm_ptr(&cs35l45_pm_ops), +#endif },Or simply remove the line if PM is not needed:
static struct i2c_driver cs35l45_i2c_driver = { .driver = { .name = "cs35l45", .of_match_table = cs35l45_of_match, - // .pm = pm_ptr(&cs35l45_pm_ops), },Also applies to: 33-34
patch/kernel/archive/sm8250-6.18/0022-arm64-dts-qcom-sm8250-xiaomi-elish-add-bq25970-charg.patch (1)
20-23: Use canonical"okay"instead of"ok"for status.While both are accepted by the DT compiler,
"okay"is the canonical form per the devicetree specification. Using"okay"consistently aligns with upstream kernel style.♻️ Suggested fix
&i2c15 { clock-frequency = <400000>; - status = "ok"; + status = "okay";
patch/kernel/archive/sm8250-6.18/0017-ASoC-cs35l45-disable-power-managerment.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0020-arm64-dts-qcom-add-device-tree-for-Xiaoxin-Pad-Pro-1.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0024-power-supply-Add-driver-for-Qualcomm-PMIC-fuel-gauge.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0025-power-qcom_fg-Add-initial-pm8150b-support.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0028-From-Teguh-Sobirin-teguh-sobir.in-Date-Sun-24-Nov-20.patch
Show resolved
Hide resolved
...h/kernel/archive/sm8250-6.18/0050-arm64-dts-qcom-sm8250-xiaomi-elish-add-BT-swctrl-gpi.patch
Show resolved
Hide resolved
patch/kernel/archive/sm8250-6.18/0068-input-add-Qualcomm-SPMI-haptics-driver.patch
Show resolved
Hide resolved
Yes, I also think it's ready to merge |
Description
Bump sm8250 edge to linux 6.18
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.
./compile.sh kernel BOARD=xiaomi-elish BRANCH=edgeTest with elish:
Checklist:
Please delete options that are not relevant.
Summary by CodeRabbit
New Features
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.