Atom-X-Devs / android_kernel_xiaomi_sm7325

AtomX Kernel POCO X5 PRO 5G (redwood) kernel Sources
GNU General Public License v2.0
26 stars 25 forks source link
atomx hacktoberfest hacktoberfest-accepted hacktoberfest2022 hacktoberfest2023 hacktoberfest2024 kernel lisa poco redwood xiaomi

How do I submit patches to Android Common Kernels

  1. BEST: Make all of your changes to upstream Linux. If appropriate, backport to the stable releases. These patches will be merged automatically in the corresponding common kernels. If the patch is already in upstream Linux, post a backport of the patch that conforms to the patch requirements below.

  2. LESS GOOD: Develop your patches out-of-tree (from an upstream Linux point-of-view). Unless these are fixing an Android-specific bug, these are very unlikely to be accepted unless they have been coordinated with kernel-team@android.com. If you want to proceed, post a patch that conforms to the patch requirements below.

Common Kernel patch requirements

Additional requirements are listed below based on patch type

Requirements for backports from mainline Linux: UPSTREAM:, BACKPORT:

Requirements for other backports: FROMGIT:, FROMLIST:,

Requirements for Android-specific patches: ANDROID:

Vibrator driver for HHG device

How to merge the driver into kernel source tree

  1. Copy \${this_project}/drivers/hid/hid-aksys.c into \${your_kernel_root}/drivers/hid/

  2. Compare and merge \${this_project}/drivers/hid/hid-ids.h into \${your_kernel_root}/drivers/hid/hid-ids.h : Add the following code before the last line of this file

        #define USB_VENDER_ID_QUALCOMM  0x0a12
        #define USB_VENDER_ID_TEMP_HHG_AKSY 0x1234
        #define USB_PRODUCT_ID_AKSYS_HHG  0x1000
  3. Merge \${this_project}/drivers/hid/Kconfig into \${your_kernel_root}/drivers/hid/Kconfig : Add the following code before the last line of this file

    config HID_AKSYS_QRD
        tristate "AKSys gamepad USB adapter support"
        depends on HID
        ---help---
        Support for AKSys gamepad USB adapter
    
    config AKSYS_QRD_FF
        bool "AKSys gamepad USB adapter force feedback support"
        depends on HID_AKSYS_QRD
        select INPUT_FF_MEMLESS
        ---help---
        Say Y here if you have a AKSys gamepad USB adapter and want to
        enable force feedback support for it.
  4. Merge \${this_project}/drivers/hid/Makefile into \${your_kernel_root}/drivers/hid/Makefile : Add the following code at the end of this file

    obj-$(CONFIG_HID_AKSYS_QRD) += hid-aksys.o
  5. Modify your kernel's default build configuration file. Add the following two lines:

    CONFIG_HID_AKSYS_QRD=m
    CONFIG_AKSYS_QRD_FF=y