No description
  • C 98.2%
  • Assembly 1%
  • Makefile 0.3%
  • Shell 0.2%
  • Python 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tashfin Shakeer Rhythm 695569241b devfreq: bimc-bwmon: Don't free/reallocate IRQ during suspend/resume
In __resume_bw_hwmon(), request_threaded_irq() tries to make a big allocation
before everything is thawed and oom killer is re-enabled, which triggers an
order-2 memory allocation failure from kthreadd. This causes the devfreq device
to fail to create the IRQ thread, and therefore, it can't resume. At this point,
IRQs like qcom,cpu-cpu-llcc-bwmon, qcom,cpu-llcc-ddr-bwmon, qcom,snoop-l3-bwmon
are not allocated. But __suspend_bw_hwmon() tries to free them anyway, causing
the following series of call traces:

[49231.949317] kthreadd: page allocation failure: order:2, mode:0x400d00(GFP_NOIO|__GFP_ZERO|__GFP_ACCOUNT), nodemask=(null),cpuset=/,mems_allowed=0
[49231.949341] CPU: 2 PID: 2 Comm: kthreadd Not tainted 5.4.278-Scarlet-v1.0-beta8 #1
[49231.949345] Hardware name: redwood based Qualcomm Technologies, Inc. SM7325 (DT)
[49231.949349] Call trace:
[49231.949366] dump_backtrace+0x0/0x1a0
[49231.949373] show_stack+0x14/0x20
[49231.949384] dump_stack+0x8c/0xcc
[49231.949394] warn_alloc+0xec/0x110
[49231.949401] __alloc_pages_slowpath+0xe80/0xf00
[49231.949409] __alloc_pages_nodemask+0x150/0x180
[49231.949421] dup_task_struct+0x90/0x1e0
[49231.949427] copy_process+0x150/0xb30
[49231.949433] _do_fork+0x88/0x350
[49231.949439] kernel_thread+0x48/0x70
[49231.949448] kthreadd+0x1ec/0x280
[49231.949454] ret_from_fork+0x10/0x18
[49231.949470] Mem-Info:
[49231.949488] active_anon:348299 inactive_anon:132548 isolated_anon:0
 active_file:97104 inactive_file:98252 isolated_file:0
 unevictable:61330 dirty:0 writeback:0 unstable:0
 slab_reclaimable:23532 slab_unreclaimable:64025
 mapped:208056 shmem:15179 pagetables:31685 bounce:0
 free:36974 free_pcp:0 free_cma:46
[49231.949502] Node 0 active_anon:1393196kB inactive_anon:530192kB active_file:388416kB inactive_file:393008kB unevictable:245320kB isolated(anon):0kB isolated(file):0kB mapped:832224kB dirty:0kB writeback:0kB shmem:60716kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no
[49231.949519] Normal free:147896kB min:9312kB low:44784kB high:50268kB active_anon:1393080kB inactive_anon:530372kB active_file:388236kB inactive_file:392776kB unevictable:245320kB writepending:0kB present:5642556kB managed:5484672kB mlocked:244888kB kernel_stack:82704kB pagetables:126740kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:184kB
[49231.949522] lowmem_reserve[]: 0 0
[49231.949530] Normal: 32941*4kB (UMECH) 2020*8kB (UMEH) 35*16kB (H) 7*32kB (H) 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 148708kB
[49231.949568] 257736 total pagecache pages
[49231.949573] 3431 pages in swap cache
[49231.949578] Swap cache stats: add 7482872, delete 7479455, find 338640/3769326
[49231.949581] Free swap  = 2294120kB
[49231.949584] Total swap = 4194300kB
[49231.949588] 1410639 pages RAM
[49231.949591] 0 pages HighMem/MovableOnly
[49231.949594] 39471 pages reserved
[49231.949597] 72704 pages cma reserved
[49231.949606] cma: cma-0 pages: => 579 used of 5120 total pages
[49231.949613] cma: cma-1 pages: => 512 used of 3072 total pages
[49231.949619] cma: cma-2 pages: => 0 used of 4096 total pages
[49231.949627] cma: cma-3 pages: => 826 used of 8192 total pages
[49231.949635] cma: cma-4 pages: => 0 used of 7168 total pages
[49231.949669] cma: cma-5 pages: => 0 used of 35840 total pages
[49231.949676] cma: cma-6 pages: => 0 used of 4096 total pages
[49231.949683] cma: cma-7 pages: => 0 used of 5120 total pages
[49231.949725] bimc-bwmon 90b9100.qcom,snoop-l3-bwmon: Unable to register interrupt handler! (-12)
[49231.949738] devfreq-icc 18590100.qcom,snoop-l3-bw: Unable to start HW monitor! (-12)
[49231.949741] devfreq-icc 18590100.qcom,snoop-l3-bw: Unable to resume BW HW mon governor (-12)
[49231.949744] devfreq 18590100.qcom,snoop-l3-bw: failed to resume devfreq device
[49231.949880] bimc-bwmon 9091000.qcom,cpu-llcc-ddr-bwmon: Unable to register interrupt handler! (-12)
[49231.949884] devfreq-icc soc:qcom,cpu-llcc-ddr-bw: Unable to start HW monitor! (-12)
[49231.949885] devfreq-icc soc:qcom,cpu-llcc-ddr-bw: Unable to resume BW HW mon governor (-12)
[49231.949888] devfreq soc:qcom,cpu-llcc-ddr-bw: failed to resume devfreq device
[49231.950002] bimc-bwmon 90b6400.qcom,cpu-cpu-llcc-bwmon: Unable to register interrupt handler! (-12)
[49231.950004] devfreq-icc soc:qcom,cpu-cpu-llcc-bw: Unable to start HW monitor! (-12)
[49231.950006] devfreq-icc soc:qcom,cpu-cpu-llcc-bw: Unable to resume BW HW mon governor (-12)
[49231.950009] devfreq soc:qcom,cpu-cpu-llcc-bw: failed to resume devfreq device
[49232.171457] Filesystems sync: 0.005 seconds
[49232.398473] Filesystems sync: 0.008 seconds
[49232.417668] ------------[ cut here ]------------
[49232.417674] Trying to free already-free IRQ 53
[49232.417702] WARNING: CPU: 6 PID: 3656 at kernel/irq/manage.c:1765 __free_irq+0x2fc/0x400
[49232.417710] CPU: 6 PID: 3656 Comm: binder:502_7 Not tainted 5.4.278-Scarlet-v1.0-beta8 #1
[49232.417714] Hardware name: redwood based Qualcomm Technologies, Inc. SM7325 (DT)
[49232.417717] pstate: 60000085 (nZCv daIf -PAN -UAO)
[49232.417722] pc : __free_irq+0x2fc/0x400
[49232.417726] lr : __free_irq+0x2f8/0x400
[49232.417728] sp : ffffffaa166669e0
[49232.417731] x29: ffffffaa166669e0 x28: ffffffa9ae80d400
[49232.417735] x27: 0000000000000000 x26: 0000000000000000
[49232.417739] x25: ffffffa91ff3e268 x24: ffffffa9ae80d400
[49232.417742] x23: ffffffaa1948dc40 x22: 0000000000000035
[49232.417746] x21: ffffffa91ff3e2a0 x20: 0000000000000000
[49232.417749] x19: ffffffa91ff3e200 x18: 00000000ffed03ec
[49232.417753] x17: 00000000000d03ec x16: ffffffda6c1a54e8
[49232.417756] x15: 0000000000000000 x14: 0000000000000082
[49232.417759] x13: 0000000000000034 x12: 0000000000000004
[49232.417761] x11: ffffffda6c1a54e0 x10: 00000000ffffffff
[49232.417764] x9 : 115043787f31d900 x8 : 0000000000000000
[49232.417767] x7 : 0000000000000000 x6 : 7420676e69797254
[49232.417770] x5 : ffffffda6c2d5126 x4 : 0000000000000000
[49232.417773] x3 : 0000000000000000 x2 : ffffffffffffc9ff
[49232.417776] x1 : 0000000000000000 x0 : 0000000000000022
[49232.417780] Call trace:
[49232.417785] __free_irq+0x2fc/0x400
[49232.417789] free_irq+0x30/0x90
[49232.417802] suspend_bw_hwmon2+0xb8/0x140
[49232.417809] devfreq_bw_hwmon_ev_handler+0x1b4/0x520
[49232.417820] devfreq_suspend_device+0x58/0xe0
[49232.417825] devfreq_suspend+0x54/0x90
[49232.417838] dpm_suspend+0x2c/0x340
[49232.417841] dpm_suspend_start+0x7c/0xa0
[49232.417846] suspend_devices_and_enter+0xe0/0x5c0
[49232.417849] pm_suspend+0x258/0x280
[49232.417858] state_store+0x100/0x150
[49232.417869] kobj_attr_store+0x14/0x30
[49232.417883] sysfs_kf_write+0x38/0x50
[49232.417888] kernfs_fop_write+0x168/0x290
[49232.417896] __vfs_write+0x34/0x190
[49232.417899] vfs_write+0x11c/0x2d0
[49232.417903] __arm64_sys_write+0x78/0x110
[49232.417910] el0_svc_common+0xb0/0x120
[49232.417913] do_el0_svc+0x18/0x20
[49232.417918] el0_sync_handler+0x148/0x190
[49232.417922] el0_sync+0x140/0x180
[49232.417925] ---[ end trace b44a82c335d29d61 ]---
[49232.417952] ------------[ cut here ]------------
[49232.417954] Trying to free already-free IRQ 52
[49232.417962] WARNING: CPU: 6 PID: 3656 at kernel/irq/manage.c:1765 __free_irq+0x2fc/0x400
[49232.417966] CPU: 6 PID: 3656 Comm: binder:502_7 Tainted: G        W         5.4.278-Scarlet-v1.0-beta8 #1
[49232.417968] Hardware name: redwood based Qualcomm Technologies, Inc. SM7325 (DT)
[49232.417970] pstate: 60000085 (nZCv daIf -PAN -UAO)
[49232.417974] pc : __free_irq+0x2fc/0x400
[49232.417977] lr : __free_irq+0x2f8/0x400
[49232.417979] sp : ffffffaa166669e0
[49232.417980] x29: ffffffaa166669e0 x28: ffffffa9ae80d400
[49232.417984] x27: 0000000000000000 x26: 0000000000000000
[49232.417987] x25: ffffffa91ff3e068 x24: ffffffa9ae80d400
[49232.417990] x23: ffffffaa1948d840 x22: 0000000000000034
[49232.417992] x21: ffffffa91ff3e0a0 x20: 0000000000000000
[49232.417995] x19: ffffffa91ff3e000 x18: 00000000ffecfa44
[49232.417998] x17: 00000000000cfa44 x16: ffffffda6c1a54e8
[49232.418001] x15: 0000000000000000 x14: 0000000000000082
[49232.418004] x13: 0000000000000034 x12: 0000000000000004
[49232.418006] x11: ffffffda6c1a54e0 x10: 00000000ffffffff
[49232.418009] x9 : 115043787f31d900 x8 : 0000000000000000
[49232.418012] x7 : 0000000000000000 x6 : 7420676e69797254
[49232.418015] x5 : ffffffda6c2d5ace x4 : 0000000000000000
[49232.418018] x3 : 0000000000000000 x2 : ffffffffffffc9d0
[49232.418021] x1 : 0000000000000000 x0 : 0000000000000022
[49232.418023] Call trace:
[49232.418027] __free_irq+0x2fc/0x400
[49232.418030] free_irq+0x30/0x90
[49232.418034] suspend_bw_hwmon3+0x94/0x110
[49232.418038] devfreq_bw_hwmon_ev_handler+0x1b4/0x520
[49232.418043] devfreq_suspend_device+0x58/0xe0
[49232.418047] devfreq_suspend+0x54/0x90
[49232.418050] dpm_suspend+0x2c/0x340
[49232.418053] dpm_suspend_start+0x7c/0xa0
[49232.418056] suspend_devices_and_enter+0xe0/0x5c0
[49232.418058] pm_suspend+0x258/0x280
[49232.418062] state_store+0x100/0x150
[49232.418066] kobj_attr_store+0x14/0x30
[49232.418070] sysfs_kf_write+0x38/0x50
[49232.418074] kernfs_fop_write+0x168/0x290
[49232.418077] __vfs_write+0x34/0x190
[49232.418080] vfs_write+0x11c/0x2d0
[49232.418083] __arm64_sys_write+0x78/0x110
[49232.418085] el0_svc_common+0xb0/0x120
[49232.418087] do_el0_svc+0x18/0x20
[49232.418091] el0_sync_handler+0x148/0x190
[49232.418094] el0_sync+0x140/0x180
[49232.418095] ---[ end trace b44a82c335d29d62 ]---
[49232.418112] ------------[ cut here ]------------
[49232.418113] Trying to free already-free IRQ 51
[49232.418120] WARNING: CPU: 6 PID: 3656 at kernel/irq/manage.c:1765 __free_irq+0x2fc/0x400
[49232.418122] CPU: 6 PID: 3656 Comm: binder:502_7 Tainted: G        W         5.4.278-Scarlet-v1.0-beta8 #1
[49232.418124] Hardware name: redwood based Qualcomm Technologies, Inc. SM7325 (DT)
[49232.418126] pstate: 60000085 (nZCv daIf -PAN -UAO)
[49232.418130] pc : __free_irq+0x2fc/0x400
[49232.418133] lr : __free_irq+0x2f8/0x400
[49232.418135] sp : ffffffaa166669e0
[49232.418136] x29: ffffffaa166669e0 x28: ffffffa9ae80d400
[49232.418139] x27: 0000000000000000 x26: 0000000000000000
[49232.418142] x25: ffffffa91ff3de68 x24: ffffffa9ae80d400
[49232.418146] x23: ffffffaa1948d440 x22: 0000000000000033
[49232.418148] x21: ffffffa91ff3dea0 x20: 0000000000000000
[49232.418151] x19: ffffffa91ff3de00 x18: 00000000ffecf08c
[49232.418154] x17: 00000000000cf08c x16: ffffffda6c1a54e8
[49232.418156] x15: 0000000000000000 x14: 0000000000000082
[49232.418159] x13: 0000000000000034 x12: 0000000000000004
[49232.418162] x11: ffffffda6c1a54e0 x10: 00000000ffffffff
[49232.418165] x9 : 115043787f31d900 x8 : 0000000000000000
[49232.418168] x7 : 0000000000000000 x6 : 7420676e69797254
[49232.418171] x5 : ffffffda6c2d6486 x4 : 0000000000000000
[49232.418174] x3 : 0000000000000000 x2 : ffffffffffffc9a1
[49232.418176] x1 : 0000000000000000 x0 : 0000000000000022
[49232.418179] Call trace:
[49232.418182] __free_irq+0x2fc/0x400
[49232.418186] free_irq+0x30/0x90
[49232.418188] suspend_bw_hwmon2+0xb8/0x140
[49232.418192] devfreq_bw_hwmon_ev_handler+0x1b4/0x520
[49232.418197] devfreq_suspend_device+0x58/0xe0
[49232.418201] devfreq_suspend+0x54/0x90
[49232.418204] dpm_suspend+0x2c/0x340
[49232.418207] dpm_suspend_start+0x7c/0xa0
[49232.418209] suspend_devices_and_enter+0xe0/0x5c0
[49232.418212] pm_suspend+0x258/0x280
[49232.418216] state_store+0x100/0x150
[49232.418219] kobj_attr_store+0x14/0x30
[49232.418223] sysfs_kf_write+0x38/0x50
[49232.418227] kernfs_fop_write+0x168/0x290
[49232.418230] __vfs_write+0x34/0x190
[49232.418233] vfs_write+0x11c/0x2d0
[49232.418236] __arm64_sys_write+0x78/0x110
[49232.418238] el0_svc_common+0xb0/0x120
[49232.418240] do_el0_svc+0x18/0x20
[49232.418243] el0_sync_handler+0x148/0x190
[49232.418246] el0_sync+0x140/0x180
[49232.418247] ---[ end trace b44a82c335d29d63 ]---

There is no need to reallocate and free the IRQs during suspend and resume.
Replace IRQ thread creation with a simpler [enable|disable]_irq() approach
to fix the issue.

Co-authored-by: Sultan Alsawaf <sultan@kerneltoast.com>
Change-Id: Ia12b8d24feddaef75792988ea55a6e8e29bf687a
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
2026-05-07 14:20:06 +00:00
android Merge android11-5.4.302(91d385eb) into msm-5.4 2026-01-30 11:41:11 +05:30
arch UPSTREAM: net: retrieve netns cookie via getsocketopt 2026-05-07 10:18:28 -04:00
block Merge android11-5.4.302(91d385eb) into msm-5.4 2026-01-30 11:41:11 +05:30
certs
crypto BACKPORT: crypto: lib/sha1 - rename "sha" to "sha1" 2025-12-23 13:36:17 -08:00
Documentation UPSTREAM: BACKPORT: procfs/dmabuf: add inode number to /proc/*/fdinfo 2026-05-07 10:19:25 -04:00
drivers devfreq: bimc-bwmon: Don't free/reallocate IRQ during suspend/resume 2026-05-07 14:20:06 +00:00
fs FROMGIT: procfs: prevent unpriveleged processes accessing fdinfo dir 2026-05-07 10:19:32 -04:00
include UPSTREAM: net: retrieve netns cookie via getsocketopt 2026-05-07 10:18:28 -04:00
init UPSTREAM: seccomp: Fix CONFIG tests for Seccomp_filters 2026-05-07 10:17:18 -04:00
ipc ipc: adjust proc_ipc_sem_dointvec definition to match prototype 2026-02-01 20:37:47 -08:00
kernel Revert "UPSTREAM: seccomp: Remove bogus __user annotations" 2026-05-07 10:17:18 -04:00
lib UPSTREAM: lib/strncpy_from_user.c: Mask out bytes after NUL terminator. 2026-02-01 20:44:43 -08:00
LICENSES
mm Merge android11-5.4.302(91d385eb) into msm-5.4 2026-01-30 11:41:11 +05:30
net BACKPORT: net: core: enable SO_BINDTODEVICE for non-root users 2026-05-07 10:18:47 -04:00
samples UPSTREAM: devmap: Adjust tracepoint for map-less queue flush 2025-12-23 13:35:54 -08:00
scripts BACKPORT: kbuild: Switch to 'f' variants of integrated assembler flag 2026-05-05 20:02:23 +03:00
security BACKPORT: bpf: Add lockdown check for probe_write_user helper 2026-02-01 20:44:42 -08:00
sound Merge android11-5.4.302(91d385eb) into msm-5.4 2026-01-30 11:41:11 +05:30
techpack Merge tag 'LA.UM.9.14.1.r1-21100-QCM6490.QISI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver into android13-5.4-lahaina 2026-04-30 21:20:07 +03:00
tools UPSTREAM: selftests/seccomp: Compare bitmap vs filter overhead 2026-05-07 10:17:18 -04:00
usr Merge android11-5.4.302(91d385eb) into msm-5.4 2026-01-30 11:41:11 +05:30
virt KVM: arm64: Ignore PMCNTENSET_EL0 while checking for overflow status 2024-12-19 18:05:04 +01:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore Merge tag 'ASB-2024-12-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2024-12-17 03:24:53 +02:00
.mailmap
Android.mk
Androidbp
build.config.aarch64
build.config.allmodconfig
build.config.allmodconfig.aarch64
build.config.allmodconfig.arm
build.config.allmodconfig.x86_64
build.config.arm
build.config.common
build.config.db845c ANDROID: db845c: Enable device tree overlay support 2024-01-13 10:38:25 +05:30
build.config.gki
build.config.gki-debug.aarch64
build.config.gki-debug.x86_64
build.config.gki.aarch64 ANDROID: GKI: add Trimble symbol list 2025-01-16 06:41:15 -08:00
build.config.gki.x86_64
build.config.gki_kasan
build.config.gki_kasan.aarch64
build.config.gki_kasan.x86_64
build.config.gki_kprobes
build.config.gki_kprobes.aarch64
build.config.gki_kprobes.x86_64
build.config.hikey960
build.config.msm.common
build.config.msm.gki
build.config.msm.lahaina
build.config.x86_64
build.targets
COPYING
CREDITS
gen_headers_arm.bp
gen_headers_arm64.bp
gen_headers_arm64_auto.bp
gen_headers_arm_auto.bp
Kbuild
Kconfig
kernel_headers.py
LICENSE
MAINTAINERS UPSTREAM: bpf: Add sockmap hooks for UDP sockets 2026-02-01 20:39:38 -08:00
Makefile BACKPORT: kbuild: check CONFIG_AS_IS_LLVM instead of LLVM_IAS 2026-05-05 20:02:23 +03:00
modules.list.msm.lahaina
OWNERS ANDROID: Use GKI Dr. No OWNERS file 2023-12-04 13:28:17 +00:00
README
README.md

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

  • All patches must conform to the Linux kernel coding standards and pass script/checkpatch.pl
  • Patches shall not break gki_defconfig or allmodconfig builds for arm, arm64, x86, x86_64 architectures (see https://source.android.com/setup/build/building-kernels)
  • If the patch is not merged from an upstream branch, the subject must be tagged with the type of patch: UPSTREAM:, BACKPORT:, FROMGIT:, FROMLIST:, or ANDROID:.
  • All patches must have a Change-Id: tag (see https://gerrit-review.googlesource.com/Documentation/user-changeid.html)
  • If an Android bug has been assigned, there must be a Bug: tag.
  • All patches must have a Signed-off-by: tag by the author and the submitter

Additional requirements are listed below based on patch type

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

  • If the patch is a cherry-pick from Linux mainline with no changes at all
    • tag the patch subject with UPSTREAM:.
    • add upstream commit information with a (cherry-picked from ...) line
    • Example:
      • if the upstream commit message is
        important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>
    - then Joe Smith would upload the patch for the common kernel as
        UPSTREAM: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        (cherry-picked from c31e73121f4c1ec41143423ac6ce3ce6dafdcec1)
        Signed-off-by: Joe Smith <joe.smith@foo.org>
  • If the patch requires any changes from the upstream version, tag the patch with BACKPORT: instead of UPSTREAM:.
    • use the same tags as UPSTREAM:
    • add comments about the changes under the (cherry-picked from ...) line
    • Example:
        BACKPORT: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        (cherry-picked from c31e73121f4c1ec41143423ac6ce3ce6dafdcec1)
        [ Resolved minor conflict in drivers/foo/bar.c ]
        Signed-off-by: Joe Smith <joe.smith@foo.org>

Requirements for other backports: FROMGIT:, FROMLIST:,

  • If the patch has been merged into an upstream maintainer tree, but has not yet been merged into Linux mainline
    • tag the patch subject with FROMGIT:
    • add info on where the patch came from as (cherry picked from commit <sha1> <repo> <branch>). This must be a stable maintainer branch (not rebased, so don't use linux-next for example).
    • if changes were required, use BACKPORT: FROMGIT:
    • Example:
      • if the commit message in the maintainer tree is
        important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>
    - then Joe Smith would upload the patch for the common kernel as
        FROMGIT: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        (cherry picked from commit 878a2fd9de10b03d11d2f622250285c7e63deace
         https://git.kernel.org/pub/scm/linux/kernel/git/foo/bar.git test-branch)
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        Signed-off-by: Joe Smith <joe.smith@foo.org>
  • If the patch has been submitted to LKML, but not accepted into any maintainer tree
    • tag the patch subject with FROMLIST:
    • add a Link: tag with a link to the submittal on lore.kernel.org
    • if changes were required, use BACKPORT: FROMLIST:
    • Example:
        FROMLIST: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <fred.jones@foo.org>

        Bug: 135791357
        Link: https://lore.kernel.org/lkml/20190619171517.GA17557@someone.com/
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        Signed-off-by: Joe Smith <joe.smith@foo.org>

Requirements for Android-specific patches: ANDROID:

  • If the patch is fixing a bug to Android-specific code
    • tag the patch subject with ANDROID:
    • add a Fixes: tag that cites the patch with the bug
    • Example:
        ANDROID: fix android-specific bug in foobar.c

        This is the detailed description of the important fix

        Fixes: 1234abcd2468 ("foobar: add cool feature")
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        Signed-off-by: Joe Smith <joe.smith@foo.org>
  • If the patch is a new feature
    • tag the patch subject with ANDROID:
    • add a Bug: tag with the Android bug (required for android-specific features)

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