aboutsummaryrefslogtreecommitdiffstats
BranchCommit messageAuthorAge
archive/unc-master-3.0P-FP: fix BUG_ON releated to priority inheritanceBjoern Brandenburg13 years
archived-2013.1uncachedev: mmap memory that is not cached by CPUsGlenn Elliott12 years
archived-private-masterMerge branch 'wip-2.6.34' into old-private-masterAndrea Bastoni15 years
archived-semi-partMerge branch 'wip-semi-part' of ssh://cvs/cvs/proj/litmus/repo/litmus2010 int...Andrea Bastoni15 years
demoFurther refinementsJonathan Herman14 years
ecrts-pgm-finalMerge branch 'wip-ecrts14-pgm' of ssh://rtsrv.cs.unc.edu/home/litmus/litmus-r...Glenn Elliott12 years
ecrts14-pgm-finalMerge branch 'wip-ecrts14-pgm' of ssh://rtsrv.cs.unc.edu/home/litmus/litmus-r...Glenn Elliott12 years
gpusync-rtss12Final GPUSync implementation.Glenn Elliott12 years
gpusync/stagingRename IKGLP R2DGLP.Glenn Elliott12 years
linux-tipMerge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/p...Linus Torvalds15 years
litmus2008-patch-seriesadd i386 feather-trace implementationBjoern B. Brandenburg16 years
masterPSN-EDF: use inferred_sporadic_job_release_atBjoern Brandenburg9 years
pgmmake it compileGlenn Elliott12 years
prop/litmus-signalsInfrastructure for Litmus signals.Glenn Elliott13 years
prop/robust-tie-breakFixed bug in edf_higher_prio().Glenn Elliott13 years
stagingFix tracepoint compilation errorFelipe Cerqueira13 years
test9/23/2016Namhoon Kim9 years
tracing-develTest kernel tracing events capabilitiesAndrea Bastoni16 years
v2.6.34-with-arm-patchessmsc911x: Add spinlocks around registers accessCatalin Marinas15 years
v2015.1Add ARM syscall def for get_current_budgetBjoern Brandenburg10 years
wip-2011.2-bbbLitmus core: simplify np-section protocolBjoern B. Brandenburg14 years
wip-2011.2-bbb-traceRefactor sched_trace_log_message() -> debug_trace_log_message()Andrea Bastoni14 years
wip-2012.3-gpuSOBLIV draining support for C-EDF.Glenn Elliott12 years
wip-2012.3-gpu-preportpick up last C-RM fileGlenn Elliott12 years
wip-2012.3-gpu-rtss13Fix critical bug in GPU tracker.Glenn Elliott12 years
wip-2012.3-gpu-sobliv-budget-w-ksharkProper sobliv draining and many bug fixes.Glenn Elliott12 years
wip-aedzl-finalMake it easier to compile AEDZL interfaces in liblitmus.Glenn Elliott15 years
wip-aedzl-revisedAdd sched_trace data for Apative EDZLGlenn Elliott15 years
wip-arbit-deadlineFix compilation bug.Glenn Elliott13 years
wip-aux-tasksDescription of refined aux task inheritance.Glenn Elliott13 years
wip-bbbGSN-EDF & Core: improve debug TRACE'ing for NP sectionsBjoern B. Brandenburg14 years
wip-bbb-prio-donuse correct timestampBjoern B. Brandenburg14 years
wip-better-breakImplement hash-based EDF tie-breaking.Glenn Elliott13 years
wip-binary-heapMake C-EDF work with simplified binheap_deleteGlenn Elliott13 years
wip-budgetAdded support for choices in budget policy enforcement.Glenn Elliott15 years
wip-colorSummarize schedulability with final recordJonathan Herman13 years
wip-color-jlhsched_color: Fixed two bugs causing crashing on experiment restart and a rare...Jonathan Herman13 years
wip-d10-hz1000Enable HZ=1000 on District 10Bjoern B. Brandenburg15 years
wip-default-clusteringFeature: Make default C-EDF clustering compile-time configurable.Glenn Elliott15 years
wip-dissipation-jericksoUpdate from 2.6.36 to 2.6.36.4Jeremy Erickson11 years
wip-dissipation2-jericksoUpdate 2.6.36 to 2.6.36.4Jeremy Erickson11 years
wip-ecrts14-pgmMerge branch 'wip-ecrts14-pgm' of ssh://rtsrv.cs.unc.edu/home/litmus/litmus-r...Glenn Elliott12 years
wip-edf-hsblast tested versionJonathan Herman14 years
wip-edf-osLookup table EDF-osJeremy Erickson12 years
wip-edf-tie-breakMerge branch 'wip-edf-tie-break' of ssh://rtsrv.cs.unc.edu/home/litmus/litmus...Glenn Elliott13 years
wip-edzl-critiqueUse hr_timer's active checks instead of having own flag.Glenn Elliott15 years
wip-edzl-finalImplementation of the EDZL scheduler.Glenn Elliott15 years
wip-edzl-revisedClean up comments.Glenn Elliott15 years
wip-eventsAdded support for tracing arbitrary actions.Jonathan Herman15 years
wip-extra-debugDBG: add additional tracingBjoern B. Brandenburg15 years
wip-fix-switch-jericksoAttempt to fix race condition with plugin switchingJeremy Erickson15 years
wip-fix3sched: show length of runqueue clock deactivation in /proc/sched_debugBjoern B. Brandenburg15 years
wip-fmlp-dequeueImprove FMLP queue management.Glenn Elliott14 years
wip-ft-irq-flagFeather-Trace: keep track of interrupt-related interference.Bjoern B. Brandenburg14 years
wip-gpu-cleanupEnable sched_trace log injection from userspaceGlenn Elliott13 years
wip-gpu-interruptsRemove option for threading of all softirqs.Glenn Elliott14 years
wip-gpu-rtas12Generalized GPU cost predictors + EWMA. (untested)Glenn Elliott13 years
wip-gpu-rtss12Final GPUSync implementation.Glenn Elliott13 years
wip-gpu-rtss12-srpexperimental changes to support GPUs under SRPGlenn Elliott13 years
wip-gpusync-mergeCleanup priority tracking for budget enforcement.Glenn Elliott11 years
wip-ikglpMove RSM and IKGLP imp. to own .c filesGlenn Elliott13 years
wip-k-fmlpMerge branch 'mpi-master' into wip-k-fmlpGlenn Elliott14 years
wip-kernel-coloringAdded recolor syscallNamhoon Kim7 years
wip-kernthreadsKludge work-queue processing into klitirqd.Glenn Elliott15 years
wip-klmirqd-to-auxAllow klmirqd threads to be given names.Glenn Elliott13 years
wip-ksharkMerge branch 'mpi-staging' into wip-ksharkJonathan Herman13 years
wip-litmus-3.2Merge commit 'v3.2' into litmus-stagingAndrea Bastoni13 years
wip-litmus2011.2Cleanup: Coding conformance for affinity stuff.Glenn Elliott14 years
wip-litmus3.0-2011.2Feather-Trace: keep track of interrupt-related interference.Bjoern B. Brandenburg14 years
wip-master-2.6.33-rtAvoid deadlock when switching task policy to BACKGROUND (ugly)Andrea Bastoni15 years
wip-mcRemoved ARM-specific hacks which disabled less common mixed-criticality featu...Jonathan Herman12 years
wip-mc-bipasaMC-EDF addedbipasa chattopadhyay13 years
wip-mc-jericksoSplit C/D queuesJeremy Erickson15 years
wip-mc2-cache-slackManually patched mc^2 related codeMing Yang10 years
wip-mcrit-maccosmeticMac Mollison15 years
wip-merge-3.0Prevent Linux to send IPI and queue tasks on remote CPUs.Andrea Bastoni14 years
wip-merge-v3.0Prevent Linux to send IPI and queue tasks on remote CPUs.Andrea Bastoni14 years
wip-migration-affinityNULL affinity dereference in C-EDF.Glenn Elliott14 years
wip-mmap-uncacheshare branch with othersGlenn Elliott13 years
wip-modechangeRTSS 2017 submissionNamhoon Kim8 years
wip-nested-lockingAppears to be working.Bryan Ward12 years
wip-omlp-gedfFirst implementation of G-OMLP.Glenn Elliott15 years
wip-paiSome cleanup of PAIGlenn Elliott14 years
wip-percore-lib9/21/2016Namhoon Kim9 years
wip-performanceCONFIG_DONT_PREEMPT_ON_TIE: Don't preeempt a scheduled task on priority tie.Glenn Elliott14 years
wip-pgmAdd PGM support to C-FLGlenn Elliott12 years
wip-pgm-splitFirst draft of C-FL-splitNamhoon Kim12 years
wip-pm-ovdAdd preemption-and-migration overhead tracing supportAndrea Bastoni15 years
wip-prio-inhP-EDF updated to use the generic pi framework.Glenn Elliott15 years
wip-prioq-dglBUG FIX: Support DGLs with PRIOQ_MUTEXGlenn Elliott13 years
wip-refactored-gedfGeneralizd architecture for GEDF-style scheduelrs to reduce code redundancy.Glenn Elliott15 years
wip-release-master-fixbugfix: release master CPU must signal task was pickedBjoern B. Brandenburg14 years
wip-robust-tie-breakEDF priority tie-breaks.Glenn Elliott13 years
wip-rt-ksharkMove task time accounting into the complete_job method.Jonathan Herman13 years
wip-rtas12-pgmScheduling of PGM jobs.Glenn Elliott13 years
wip-semi-partFix compile error with newer GCCJeremy Erickson12 years
wip-semi-part-edfos-jericksoUse initial CPU set by clientJeremy Erickson12 years
wip-shared-libTODO: Fix condition checks in replicate_page_move_mapping()Namhoon Kim9 years
wip-shared-lib2RTAS 2017 Submission ver.Namhoon Kim9 years
wip-shared-memInitial commit for shared libraryNamhoon Kim9 years
wip-splitting-jericksoFix release behaviorJeremy Erickson13 years
wip-splitting-omlp-jericksoBjoern's Dissertation Code with Priority DonationJeremy Erickson13 years
wip-stage-binheapAn efficient binary heap implementation.Glenn Elliott13 years
wip-sun-portDynamic memory allocation and clean exit for FeatherTraceChristopher Kenna15 years
wip-timer-tracebugfix: C-EDF, clear scheduled field of the correct CPU upon task_exitAndrea Bastoni15 years
wip-tracepointsAdd kernel-style events for sched_trace_XXX() functionsAndrea Bastoni14 years
 
TagDownloadAuthorAge
2015.1commit 8e51b37822...Bjoern Brandenburg10 years
2013.1commit bcaacec1ca...Glenn Elliott12 years
2012.3commit c158b5fbe4...Jonathan Herman13 years
2012.2commit b53c479a0f...Glenn Elliott13 years
2012.1commit 83b11ea1c6...Bjoern B. Brandenburg14 years
rtas12-mc-beta-expcommit 8e236ee20f...Christopher Kenna14 years
2011.1commit d11808b5c6...Christopher Kenna15 years
v2.6.37-rc4commit e8a7e48bb2...Linus Torvalds15 years
v2.6.37-rc3commit 3561d43fd2...Linus Torvalds15 years
v2.6.37-rc2commit e53beacd23...Linus Torvalds15 years
v2.6.37-rc1commit c8ddb2713c...Linus Torvalds15 years
v2.6.36commit f6f94e2ab1...Linus Torvalds15 years
2010.2commit 5c5456402d...Bjoern B. Brandenburg15 years
v2.6.36-rc8commit cd07202cc8...Linus Torvalds15 years
v2.6.36-rc7commit cb655d0f3d...Linus Torvalds15 years
v2.6.36-rc6commit 899611ee7d...Linus Torvalds15 years
v2.6.36-rc5commit b30a3f6257...Linus Torvalds15 years
v2.6.36-rc4commit 49553c2ef8...Linus Torvalds15 years
v2.6.36-rc3commit 2bfc96a127...Linus Torvalds15 years
v2.6.36-rc2commit 76be97c1fc...Linus Torvalds15 years
v2.6.36-rc1commit da5cabf80e...Linus Torvalds15 years
v2.6.35commit 9fe6206f40...Linus Torvalds15 years
v2.6.35-rc6commit b37fa16e78...Linus Torvalds15 years
v2.6.35-rc5commit 1c5474a65b...Linus Torvalds15 years
v2.6.35-rc4commit 815c4163b6...Linus Torvalds15 years
v2.6.35-rc3commit 7e27d6e778...Linus Torvalds15 years
v2.6.35-rc2commit e44a21b726...Linus Torvalds15 years
v2.6.35-rc1commit 67a3e12b05...Linus Torvalds15 years
2010.1commit 7c1ff4c544...Andrea Bastoni15 years
v2.6.34commit e40152ee1e...Linus Torvalds15 years
v2.6.33.4commit 4640b4e7d9...Greg Kroah-Hartman15 years
v2.6.34-rc7commit b57f95a382...Linus Torvalds15 years
v2.6.34-rc6commit 66f41d4c5c...Linus Torvalds15 years
v2.6.33.3commit 3e7ad8ed97...Greg Kroah-Hartman15 years
v2.6.34-rc5commit 01bf0b6457...Linus Torvalds15 years
v2.6.34-rc4commit 0d0fb0f9c5...Linus Torvalds15 years
v2.6.33.2commit 19f00f070c...Greg Kroah-Hartman15 years
v2.6.34-rc3commit 2eaa9cfdf3...Linus Torvalds15 years
v2.6.34-rc2commit 220bf991b0...Linus Torvalds15 years
v2.6.33.1commit dbdafe5ccf...Greg Kroah-Hartman16 years
v2.6.34-rc1commit 57d54889cd...Linus Torvalds16 years
v2.6.33commit 60b341b778...Linus Torvalds16 years
v2.6.33-rc8commit 724e6d3fe8...Linus Torvalds16 years
v2.6.33-rc7commit 29275254ca...Linus Torvalds16 years
v2.6.33-rc6commit abe94c756c...Linus Torvalds16 years
v2.6.33-rc5commit 92dcffb916...Linus Torvalds16 years
v2.6.33-rc4commit 7284ce6c9f...Linus Torvalds16 years
v2.6.33-rc3commit 74d2e4f8d7...Linus Torvalds16 years
v2.6.33-rc2commit 6b7b284958...Linus Torvalds16 years
v2.6.33-rc1commit 55639353a0...Linus Torvalds16 years
v2.6.32commit 22763c5cf3...Linus Torvalds16 years
v2.6.32-rc8commit 648f4e3e50...Linus Torvalds16 years
v2.6.32-rc7commit 156171c71a...Linus Torvalds16 years
v2.6.32-rc6commit b419148e56...Linus Torvalds16 years
v2.6.32-rc5commit 012abeea66...Linus Torvalds16 years
v2.6.32-rc4commit 161291396e...Linus Torvalds16 years
v2.6.32-rc3commit 374576a8b6...Linus Torvalds16 years
v2.6.32-rc1commit 17d857be64...Linus Torvalds16 years
v2.6.32-rc2commit 17d857be64...Linus Torvalds16 years
v2.6.31commit 74fca6a428...Linus Torvalds16 years
v2.6.31-rc9commit e07cccf404...Linus Torvalds16 years
v2.6.31-rc8commit 326ba5010a...Linus Torvalds16 years
v2.6.31-rc7commit 422bef879e...Linus Torvalds16 years
v2.6.31-rc6commit 64f1607ffb...Linus Torvalds16 years
v2.6.31-rc5commit ed680c4ad4...Linus Torvalds16 years
v2.6.31-rc4commit 4be3bd7849...Linus Torvalds16 years
v2.6.31-rc3commit 6847e154e3...Linus Torvalds16 years
v2.6.31-rc2commit 8e4a718ff3...Linus Torvalds16 years
v2.6.31-rc1commit 28d0325ce6...Linus Torvalds16 years
v2.6.30commit 07a2039b8e...Linus Torvalds16 years
v2.6.30-rc8commit 9fa7eb283c...Linus Torvalds16 years
v2.6.30-rc7commit 59a3759d0f...Linus Torvalds16 years
v2.6.30-rc6commit 1406de8e11...Linus Torvalds16 years
v2.6.30-rc5commit 091bf7624d...Linus Torvalds16 years
v2.6.30-rc4commit 091438dd56...Linus Torvalds16 years
v2.6.30-rc3commit 0910697403...Linus Torvalds16 years
v2.6.30-rc2commit 0882e8dd3a...Linus Torvalds16 years
v2.6.30-rc1commit 577c9c456f...Linus Torvalds16 years
v2.6.29commit 8e0ee43bc2...Linus Torvalds16 years
v2.6.29-rc8commit 041b62374c...Linus Torvalds17 years
v2.6.29-rc7commit fec6c6fec3...Linus Torvalds17 years
v2.6.29-rc6commit 20f4d6c3a2...Linus Torvalds17 years
v2.6.29-rc5commit d2f8d7ee1a...Linus Torvalds17 years
v2.6.29-rc4commit 8e4921515c...Linus Torvalds17 years
v2.6.29-rc3commit 18e352e4a7...Linus Torvalds17 years
v2.6.29-rc2commit 1de9e8e70f...Linus Torvalds17 years
v2.6.29-rc1commit c59765042f...Linus Torvalds17 years
v2.6.28commit 4a6908a3a0...Linus Torvalds17 years
v2.6.28-rc9commit 929096fe9f...Linus Torvalds17 years
v2.6.28-rc8commit 8b1fae4e42...Linus Torvalds17 years
v2.6.28-rc7commit 061e41fdb5...Linus Torvalds17 years
v2.6.28-rc6commit 13d428afc0...Linus Torvalds17 years
v2.6.28-rc5commit 9bf1a2445f...Linus Torvalds17 years
v2.6.28-rc4commit f7160c7573...Linus Torvalds17 years
v2.6.28-rc3commit 45beca08dd...Linus Torvalds17 years
v2.6.28-rc2commit 0173a3265b...Linus Torvalds17 years
v2.6.28-rc1commit 57f8f7b60d...Linus Torvalds17 years
v2.6.27commit 3fa8749e58...Linus Torvalds17 years
v2.6.27-rc9commit 4330ed8ed4...Linus Torvalds17 years
v2.6.27-rc8commit 94aca1dac6...Linus Torvalds17 years
v2.6.27-rc7commit 72d31053f6...Linus Torvalds17 years
v2.6.27-rc6commit adee14b2e1...Linus Torvalds17 years
v2.6.27-rc5commit 24342c34a0...Linus Torvalds17 years
v2.6.27-rc4commit 6a55617ed5...Linus Torvalds17 years
v2.6.27-rc3commit 30a2f3c60a...Linus Torvalds17 years
v2.6.27-rc2commit 0967d61ea0...Linus Torvalds17 years
v2.6.27-rc1commit 6e86841d05...Linus Torvalds17 years
v2.6.26commit bce7f793da...Linus Torvalds17 years
v2.6.26-rc9commit b7279469d6...Linus Torvalds17 years
v2.6.26-rc8commit 543cf4cb3f...Linus Torvalds17 years
v2.6.26-rc7commit d70ac829b7...Linus Torvalds17 years
v2.6.26-rc6commit 5dd34572ad...Linus Torvalds17 years
v2.6.26-rc5commit 53c8ba9540...Linus Torvalds17 years
v2.6.26-rc4commit e490517a03...Linus Torvalds17 years
v2.6.26-rc3commit b8291ad07a...Linus Torvalds17 years
v2.6.26-rc2commit 492c2e476e...Linus Torvalds17 years
v2.6.26-rc1commit 2ddcca36c8...Linus Torvalds17 years
v2.6.25commit 4b119e21d0...Linus Torvalds17 years
v2.6.25-rc9commit 120dd64cac...Linus Torvalds17 years
v2.6.25-rc8commit 0e81a8ae37...Linus Torvalds17 years
v2.6.25-rc7commit 05dda977f2...Linus Torvalds17 years
v2.6.25-rc6commit a978b30af3...Linus Torvalds17 years
v2.6.25-rc5commit cdeeeae056...Linus Torvalds18 years
v2.6.25-rc4commit 29e8c3c304...Linus Torvalds18 years
v2.6.25-rc3commit bfa274e243...Linus Torvalds18 years
v2.6.25-rc2commit 101142c37b...Linus Torvalds18 years
v2.6.25-rc1commit 19af35546d...Linus Torvalds18 years
v2.6.24commit 49914084e7...Linus Torvalds18 years
v2.6.24-rc8commit cbd9c88369...Linus Torvalds18 years
v2.6.24-rc7commit 3ce5445046...Linus Torvalds18 years
v2.6.24-rc6commit ea67db4cdb...Linus Torvalds18 years
v2.6.24-rc5commit 82d29bf6dc...Linus Torvalds18 years
v2.6.24-rc4commit 09b56adc98...Linus Torvalds18 years
v2.6.24-rc3commit d9f8bcbf67...Linus Torvalds18 years
v2.6.24-rc2commit dbeeb816e8...Linus Torvalds18 years
v2.6.24-rc1commit c9927c2bf4...Linus Torvalds18 years
v2.6.23commit bbf25010f1...Linus Torvalds18 years
v2.6.23-rc9commit 3146b39c18...Linus Torvalds18 years
v2.6.23-rc8commit 4942de4a0e...Linus Torvalds18 years
v2.6.23-rc7commit 81cfe79b9c...Linus Torvalds18 years
v2.6.23-rc6commit 0d4cbb5e7f...Linus Torvalds18 years
v2.6.23-rc5commit 40ffbfad6b...Linus Torvalds18 years
v2.6.23-rc4commit b07d68b5ca...Linus Torvalds18 years
v2.6.23-rc3commit 39d3520c92...Linus Torvalds18 years
v2.6.23-rc2commit d4ac2477fa...Linus Torvalds18 years
v2.6.23-rc1commit f695baf2df...Linus Torvalds18 years
v2.6.22commit 7dcca30a32...Linus Torvalds18 years
v2.6.22-rc7commit a38d6181ff...Linus Torvalds18 years
v2.6.22-rc6commit 189548642c...Linus Torvalds18 years
v2.6.22-rc5commit 188e1f81ba...Linus Torvalds18 years
v2.6.22-rc4commit 5ecd3100e6...Linus Torvalds18 years
v2.6.22-rc3commit c420bc9f09...Linus Torvalds18 years
v2.6.22-rc2commit 55b637c6a0...Linus Torvalds18 years
v2.6.22-rc1commit 39403865d2...Linus Torvalds18 years
v2.6.21commit de46c33745...Linus Torvalds18 years
v2.6.21-rc7commit 94a05509a9...Linus Torvalds18 years
v2.6.21-rc6commit a21bd69e15...Linus Torvalds18 years
v2.6.21-rc5commit e0f2e3a06b...Linus Torvalds18 years
v2.6.21-rc4commit db98e0b434...Linus Torvalds19 years
v2.6.21-rc3commit 08e15e81a4...Linus Torvalds19 years
v2.6.21-rc2commit 606135a308...Linus Torvalds19 years
v2.6.21-rc1commit c8f71b01a5...Linus Torvalds19 years
v2.6.20commit 62d0cfcb27...Linus Torvalds19 years
v2.6.20-rc7commit f56df2f4db...Linus Torvalds19 years
v2.6.20-rc6commit 99abfeafb5...Linus Torvalds19 years
v2.6.20-rc5commit a8b3485287...Linus Torvalds19 years
v2.6.20-rc4commit bf81b46482...Linus Torvalds19 years
v2.6.20-rc3commit 669df1b478...Linus Torvalds19 years
v2.6.20-rc2commit 3bf8ba38f3...Linus Torvalds19 years
v2.6.20-rc1commit cc016448b0...Linus Torvalds19 years
v2.6.19commit 0215ffb08c...Linus Torvalds19 years
v2.6.19-rc6commit 44597f65f6...Linus Torvalds19 years
v2.6.19-rc5commit 80c2188127...Linus Torvalds19 years
v2.6.19-rc4commit ae99a78af3...Linus Torvalds19 years
v2.6.19-rc3commit 7059abedd2...Linus Torvalds19 years
v2.6.19-rc2commit b4bd8c6643...Linus Torvalds19 years
v2.6.19-rc1commit d223a60106...Linus Torvalds19 years
v2.6.18commit e478bec0ba...Linus Torvalds19 years
v2.6.18-rc7commit 95064a75eb...Linus Torvalds19 years
v2.6.18-rc6commit c336923b66...Linus Torvalds19 years
v2.6.18-rc5commit 60d4684068...Linus Torvalds19 years
v2.6.18-rc4commit 9f737633e6...Linus Torvalds19 years
v2.6.18-rc3commit b6ff50833a...Linus Torvalds19 years
v2.6.18-rc2commit 82d6897fef...Linus Torvalds19 years
v2.6.18-rc1commit 120bda20c6...Linus Torvalds19 years
v2.6.17commit 427abfa28a...Linus Torvalds19 years
v2.6.17-rc6commit 1def630a6a...Linus Torvalds19 years
v2.6.17-rc5commit a8bd60705a...Linus Torvalds19 years
v2.6.17-rc4commit d8c3291c73...Linus Torvalds19 years
v2.6.17-rc3commit 2be4d50295...Linus Torvalds19 years
v2.6.17-rc2commit 8bbde0e6d5...Linus Torvalds19 years
v2.6.17-rc1commit 6246b6128b...Linus Torvalds19 years
v2.6.16commit 7705a8792b...Linus Torvalds19 years
v2.6.16-rc6commit 535744878e...Linus Torvalds20 years
v2.6.16-rc5commit b9a33cebac...Linus Torvalds20 years
v2.6.16-rc4commit bd71c2b174...Linus Torvalds20 years
v2.6.16-rc3commit e9bb4c9929...Linus Torvalds20 years
v2.6.16-rc2commit 826eeb53a6...Linus Torvalds20 years
v2.6.16-rc1commit 2664b25051...Linus Torvalds20 years
v2.6.15commit 88026842b0...Linus Torvalds20 years
v2.6.15-rc7commit f89f5948fc...Linus Torvalds20 years
v2.6.15-rc6commit df7addbb45...Linus Torvalds20 years
v2.6.15-rc5commit 436b0f76f2...Linus Torvalds20 years
v2.6.15-rc4commit 5666c0947e...Linus Torvalds20 years
v2.6.15-rc3commit 624f54be20...Linus Torvalds20 years
v2.6.15-rc2commit 3bedff1d73...Linus Torvalds20 years
v2.6.15-rc1commit cd52d1ee9a...Linus Torvalds20 years
v2.6.14commit 741b2252a5...Linus Torvalds20 years
v2.6.14-rc5commit 93918e9afc...Linus Torvalds20 years
v2.6.14-rc4commit 907a426179...Linus Torvalds20 years
v2.6.14-rc3commit 1c9426e8a5...Linus Torvalds20 years
v2.6.14-rc2commit 676d55ae30...Linus Torvalds20 years
v2.6.14-rc1commit 2f4ba45a75...Linus Torvalds20 years
v2.6.13commit 02b3e4e2d7...Linus Torvalds20 years
v2.6.13-rc7commit 0572e3da3f...Linus Torvalds20 years
v2.6.13-rc6commit 6fc32179de...Linus Torvalds20 years
v2.6.13-rc5commit 9a351e30d7...Linus Torvalds20 years
v2.6.13-rc4commit 6395352334...Linus Torvalds20 years
v2.6.11tree c39ae07f39...
v2.6.11-treetree c39ae07f39...
v2.6.12commit 9ee1c939d1...
v2.6.12-rc2commit 1da177e4c3...
v2.6.12-rc3commit a2755a80f4...
v2.6.12-rc4commit 88d7bd8cb9...
v2.6.12-rc5commit 2a24ab628a...
v2.6.12-rc6commit 7cef5677ef...
v2.6.13-rc1commit 4c91aedb75...
v2.6.13-rc2commit a18bcb7450...
v2.6.13-rc3commit c32511e271...
span class="hl opt">.probe = wiimod_led_probe, .remove = wiimod_led_remove, }, { .flags = 0, .arg = 2, .probe = wiimod_led_probe, .remove = wiimod_led_remove, }, { .flags = 0, .arg = 3, .probe = wiimod_led_probe, .remove = wiimod_led_remove, }, }; /* * Accelerometer * 3 axis accelerometer data is part of nearly all DRMs. If not supported by a * device, it's mostly cleared to 0. This module parses this data and provides * it via a separate input device. */ static void wiimod_accel_in_accel(struct wiimote_data *wdata, const __u8 *accel) { __u16 x, y, z; if (!(wdata->state.flags & WIIPROTO_FLAG_ACCEL)) return; /* * payload is: BB BB XX YY ZZ * Accelerometer data is encoded into 3 10bit values. XX, YY and ZZ * contain the upper 8 bits of each value. The lower 2 bits are * contained in the buttons data BB BB. * Bits 6 and 7 of the first buttons byte BB is the lower 2 bits of the * X accel value. Bit 5 of the second buttons byte is the 2nd bit of Y * accel value and bit 6 is the second bit of the Z value. * The first bit of Y and Z values is not available and always set to 0. * 0x200 is returned on no movement. */ x = accel[2] << 2; y = accel[3] << 2; z = accel[4] << 2; x |= (accel[0] >> 5) & 0x3; y |= (accel[1] >> 4) & 0x2; z |= (accel[1] >> 5) & 0x2; input_report_abs(wdata->accel, ABS_RX, x - 0x200); input_report_abs(wdata->accel, ABS_RY, y - 0x200); input_report_abs(wdata->accel, ABS_RZ, z - 0x200); input_sync(wdata->accel); } static int wiimod_accel_open(struct input_dev *dev) { struct wiimote_data *wdata = input_get_drvdata(dev); unsigned long flags; spin_lock_irqsave(&wdata->state.lock, flags); wiiproto_req_accel(wdata, true); spin_unlock_irqrestore(&wdata->state.lock, flags); return 0; } static void wiimod_accel_close(struct input_dev *dev) { struct wiimote_data *wdata = input_get_drvdata(dev); unsigned long flags; spin_lock_irqsave(&wdata->state.lock, flags); wiiproto_req_accel(wdata, false); spin_unlock_irqrestore(&wdata->state.lock, flags); } static int wiimod_accel_probe(const struct wiimod_ops *ops, struct wiimote_data *wdata) { int ret; wdata->accel = input_allocate_device(); if (!wdata->accel) return -ENOMEM; input_set_drvdata(wdata->accel, wdata); wdata->accel->open = wiimod_accel_open; wdata->accel->close = wiimod_accel_close; wdata->accel->dev.parent = &wdata->hdev->dev; wdata->accel->id.bustype = wdata->hdev->bus; wdata->accel->id.vendor = wdata->hdev->vendor; wdata->accel->id.product = wdata->hdev->product; wdata->accel->id.version = wdata->hdev->version; wdata->accel->name = WIIMOTE_NAME " Accelerometer"; set_bit(EV_ABS, wdata->accel->evbit); set_bit(ABS_RX, wdata->accel->absbit); set_bit(ABS_RY, wdata->accel->absbit); set_bit(ABS_RZ, wdata->accel->absbit); input_set_abs_params(wdata->accel, ABS_RX, -500, 500, 2, 4); input_set_abs_params(wdata->accel, ABS_RY, -500, 500, 2, 4); input_set_abs_params(wdata->accel, ABS_RZ, -500, 500, 2, 4); ret = input_register_device(wdata->accel); if (ret) { hid_err(wdata->hdev, "cannot register input device\n"); goto err_free; } return 0; err_free: input_free_device(wdata->accel); wdata->accel = NULL; return ret; } static void wiimod_accel_remove(const struct wiimod_ops *ops, struct wiimote_data *wdata) { if (!wdata->accel) return; input_unregister_device(wdata->accel); wdata->accel = NULL; } static const struct wiimod_ops wiimod_accel = { .flags = 0, .arg = 0, .probe = wiimod_accel_probe, .remove = wiimod_accel_remove, .in_accel = wiimod_accel_in_accel, }; /* * IR Cam * Up to 4 IR sources can be tracked by a normal Wii Remote. The IR cam needs * to be initialized with a fairly complex procedure and consumes a lot of * power. Therefore, as long as no application uses the IR input device, it is * kept offline. * Nearly no other device than the normal Wii Remotes supports the IR cam so * you can disable this module for these devices. */ static void wiimod_ir_in_ir(struct wiimote_data *wdata, const __u8 *ir, bool packed, unsigned int id) { __u16 x, y; __u8 xid, yid; bool sync = false; if (!(wdata->state.flags & WIIPROTO_FLAGS_IR)) return; switch (id) { case 0: xid = ABS_HAT0X; yid = ABS_HAT0Y; break; case 1: xid = ABS_HAT1X; yid = ABS_HAT1Y; break; case 2: xid = ABS_HAT2X; yid = ABS_HAT2Y; break; case 3: xid = ABS_HAT3X; yid = ABS_HAT3Y; sync = true; break; default: return; } /* * Basic IR data is encoded into 3 bytes. The first two bytes are the * lower 8 bit of the X/Y data, the 3rd byte contains the upper 2 bits * of both. * If data is packed, then the 3rd byte is put first and slightly * reordered. This allows to interleave packed and non-packed data to * have two IR sets in 5 bytes instead of 6. * The resulting 10bit X/Y values are passed to the ABS_HAT? input dev. */ if (packed) { x = ir[1] | ((ir[0] & 0x03) << 8); y = ir[2] | ((ir[0] & 0x0c) << 6); } else { x = ir[0] | ((ir[2] & 0x30) << 4); y = ir[1] | ((ir[2] & 0xc0) << 2); } input_report_abs(wdata->ir, xid, x); input_report_abs(wdata->ir, yid, y); if (sync) input_sync(wdata->ir); } static int wiimod_ir_change(struct wiimote_data *wdata, __u16 mode) { int ret; unsigned long flags; __u8 format = 0; static const __u8 data_enable[] = { 0x01 }; static const __u8 data_sens1[] = { 0x02, 0x00, 0x00, 0x71, 0x01, 0x00, 0xaa, 0x00, 0x64 }; static const __u8 data_sens2[] = { 0x63, 0x03 }; static const __u8 data_fin[] = { 0x08 }; spin_lock_irqsave(&wdata->state.lock, flags); if (mode == (wdata->state.flags & WIIPROTO_FLAGS_IR)) { spin_unlock_irqrestore(&wdata->state.lock, flags); return 0; } if (mode == 0) { wdata->state.flags &= ~WIIPROTO_FLAGS_IR; wiiproto_req_ir1(wdata, 0); wiiproto_req_ir2(wdata, 0); wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); spin_unlock_irqrestore(&wdata->state.lock, flags); return 0; } spin_unlock_irqrestore(&wdata->state.lock, flags); ret = wiimote_cmd_acquire(wdata); if (ret) return ret; /* send PIXEL CLOCK ENABLE cmd first */ spin_lock_irqsave(&wdata->state.lock, flags); wiimote_cmd_set(wdata, WIIPROTO_REQ_IR1, 0); wiiproto_req_ir1(wdata, 0x06); spin_unlock_irqrestore(&wdata->state.lock, flags); ret = wiimote_cmd_wait(wdata); if (ret) goto unlock; if (wdata->state.cmd_err) { ret = -EIO; goto unlock; } /* enable IR LOGIC */ spin_lock_irqsave(&wdata->state.lock, flags); wiimote_cmd_set(wdata, WIIPROTO_REQ_IR2, 0); wiiproto_req_ir2(wdata, 0x06); spin_unlock_irqrestore(&wdata->state.lock, flags); ret = wiimote_cmd_wait(wdata); if (ret) goto unlock; if (wdata->state.cmd_err) { ret = -EIO; goto unlock; } /* enable IR cam but do not make it send data, yet */ ret = wiimote_cmd_write(wdata, 0xb00030, data_enable, sizeof(data_enable)); if (ret) goto unlock; /* write first sensitivity block */ ret = wiimote_cmd_write(wdata, 0xb00000, data_sens1, sizeof(data_sens1)); if (ret) goto unlock; /* write second sensitivity block */ ret = wiimote_cmd_write(wdata, 0xb0001a, data_sens2, sizeof(data_sens2)); if (ret) goto unlock; /* put IR cam into desired state */ switch (mode) { case WIIPROTO_FLAG_IR_FULL: format = 5; break; case WIIPROTO_FLAG_IR_EXT: format = 3; break; case WIIPROTO_FLAG_IR_BASIC: format = 1; break; } ret = wiimote_cmd_write(wdata, 0xb00033, &format, sizeof(format)); if (ret) goto unlock; /* make IR cam send data */ ret = wiimote_cmd_write(wdata, 0xb00030, data_fin, sizeof(data_fin)); if (ret) goto unlock; /* request new DRM mode compatible to IR mode */ spin_lock_irqsave(&wdata->state.lock, flags); wdata->state.flags &= ~WIIPROTO_FLAGS_IR; wdata->state.flags |= mode & WIIPROTO_FLAGS_IR; wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); spin_unlock_irqrestore(&wdata->state.lock, flags); unlock: wiimote_cmd_release(wdata); return ret; } static int wiimod_ir_open(struct input_dev *dev) { struct wiimote_data *wdata = input_get_drvdata(dev); return wiimod_ir_change(wdata, WIIPROTO_FLAG_IR_BASIC); } static void wiimod_ir_close(struct input_dev *dev) { struct wiimote_data *wdata = input_get_drvdata(dev); wiimod_ir_change(wdata, 0); } static int wiimod_ir_probe(const struct wiimod_ops *ops, struct wiimote_data *wdata) { int ret; wdata->ir = input_allocate_device(); if (!wdata->ir) return -ENOMEM; input_set_drvdata(wdata->ir, wdata); wdata->ir->open = wiimod_ir_open; wdata->ir->close = wiimod_ir_close; wdata->ir->dev.parent = &wdata->hdev->dev; wdata->ir->id.bustype = wdata->hdev->bus; wdata->ir->id.vendor = wdata->hdev->vendor; wdata->ir->id.product = wdata->hdev->product; wdata->ir->id.version = wdata->hdev->version; wdata->ir->name = WIIMOTE_NAME " IR"; set_bit(EV_ABS, wdata->ir->evbit); set_bit(ABS_HAT0X, wdata->ir->absbit); set_bit(ABS_HAT0Y, wdata->ir->absbit); set_bit(ABS_HAT1X, wdata->ir->absbit); set_bit(ABS_HAT1Y, wdata->ir->absbit); set_bit(ABS_HAT2X, wdata->ir->absbit); set_bit(ABS_HAT2Y, wdata->ir->absbit); set_bit(ABS_HAT3X, wdata->ir->absbit); set_bit(ABS_HAT3Y, wdata->ir->absbit); input_set_abs_params(wdata->ir, ABS_HAT0X, 0, 1023, 2, 4); input_set_abs_params(wdata->ir, ABS_HAT0Y, 0, 767, 2, 4); input_set_abs_params(wdata->ir, ABS_HAT1X, 0, 1023, 2, 4); input_set_abs_params(wdata->ir, ABS_HAT1Y, 0, 767, 2, 4); input_set_abs_params(wdata->ir, ABS_HAT2X, 0, 1023, 2, 4); input_set_abs_params(wdata->ir, ABS_HAT2Y, 0, 767, 2, 4); input_set_abs_params(wdata->ir, ABS_HAT3X, 0, 1023, 2, 4); input_set_abs_params(wdata->ir, ABS_HAT3Y, 0, 767, 2, 4); ret = input_register_device(wdata->ir); if (ret) { hid_err(wdata->hdev, "cannot register input device\n"); goto err_free; } return 0; err_free: input_free_device(wdata->ir); wdata->ir = NULL; return ret; } static void wiimod_ir_remove(const struct wiimod_ops *ops, struct wiimote_data *wdata) { if (!wdata->ir) return; input_unregister_device(wdata->ir); wdata->ir = NULL; } static const struct wiimod_ops wiimod_ir = { .flags = 0, .arg = 0, .probe = wiimod_ir_probe, .remove = wiimod_ir_remove, .in_ir = wiimod_ir_in_ir, }; /* * Nunchuk Extension * The Nintendo Wii Nunchuk was the first official extension published by * Nintendo. It provides two additional keys and a separate accelerometer. It * can be hotplugged to standard Wii Remotes. */ enum wiimod_nunchuk_keys { WIIMOD_NUNCHUK_KEY_C, WIIMOD_NUNCHUK_KEY_Z, WIIMOD_NUNCHUK_KEY_NUM, }; static const __u16 wiimod_nunchuk_map[] = { BTN_C, /* WIIMOD_NUNCHUK_KEY_C */ BTN_Z, /* WIIMOD_NUNCHUK_KEY_Z */ }; static void wiimod_nunchuk_in_ext(struct wiimote_data *wdata, const __u8 *ext) { __s16 x, y, z, bx, by; /* Byte | 8 7 | 6 5 | 4 3 | 2 | 1 | * -----+----------+---------+---------+----+-----+ * 1 | Button X <7:0> | * 2 | Button Y <7:0> | * -----+----------+---------+---------+----+-----+ * 3 | Speed X <9:2> | * 4 | Speed Y <9:2> | * 5 | Speed Z <9:2> | * -----+----------+---------+---------+----+-----+ * 6 | Z <1:0> | Y <1:0> | X <1:0> | BC | BZ | * -----+----------+---------+---------+----+-----+ * Button X/Y is the analog stick. Speed X, Y and Z are the * accelerometer data in the same format as the wiimote's accelerometer. * The 6th byte contains the LSBs of the accelerometer data. * BC and BZ are the C and Z buttons: 0 means pressed * * If reported interleaved with motionp, then the layout changes. The * 5th and 6th byte changes to: * -----+-----------------------------------+-----+ * 5 | Speed Z <9:3> | EXT | * -----+--------+-----+-----+----+----+----+-----+ * 6 |Z <2:1> |Y <1>|X <1>| BC | BZ | 0 | 0 | * -----+--------+-----+-----+----+----+----+-----+ * All three accelerometer values lose their LSB. The other data is * still available but slightly moved. * * Center data for button values is 128. Center value for accelerometer * values it 512 / 0x200 */ bx = ext[0]; by = ext[1]; bx -= 128; by -= 128; x = ext[2] << 2; y = ext[3] << 2; z = ext[4] << 2; if (wdata->state.flags & WIIPROTO_FLAG_MP_ACTIVE) { x |= (ext[5] >> 3) & 0x02; y |= (ext[5] >> 4) & 0x02; z &= ~0x4; z |= (ext[5] >> 5) & 0x06; } else { x |= (ext[5] >> 2) & 0x03; y |= (ext[5] >> 4) & 0x03; z |= (ext[5] >> 6) & 0x03; } x -= 0x200; y -= 0x200; z -= 0x200; input_report_abs(wdata->extension.input, ABS_HAT0X, bx); input_report_abs(wdata->extension.input, ABS_HAT0Y, by); input_report_abs(wdata->extension.input, ABS_RX, x); input_report_abs(wdata->extension.input, ABS_RY, y); input_report_abs(wdata->extension.input, ABS_RZ, z); if (wdata->state.flags & WIIPROTO_FLAG_MP_ACTIVE) { input_report_key(wdata->extension.input, wiimod_nunchuk_map[WIIMOD_NUNCHUK_KEY_Z], !(ext[5] & 0x04)); input_report_key(wdata->extension.input, wiimod_nunchuk_map[WIIMOD_NUNCHUK_KEY_C], !(ext[5] & 0x08)); } else { input_report_key(wdata->extension.input, wiimod_nunchuk_map[WIIMOD_NUNCHUK_KEY_Z], !(ext[5] & 0x01)); input_report_key(wdata->extension.input, wiimod_nunchuk_map[WIIMOD_NUNCHUK_KEY_C], !(ext[5] & 0x02)); } input_sync(wdata->extension.input); } static int wiimod_nunchuk_open(struct input_dev *dev) { struct wiimote_data *wdata = input_get_drvdata(dev); unsigned long flags; spin_lock_irqsave(&wdata->state.lock, flags); wdata->state.flags |= WIIPROTO_FLAG_EXT_USED; wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); spin_unlock_irqrestore(&wdata->state.lock, flags); return 0; } static void wiimod_nunchuk_close(struct input_dev *dev) { struct wiimote_data *wdata = input_get_drvdata(dev); unsigned long flags; spin_lock_irqsave(&wdata->state.lock, flags); wdata->state.flags &= ~WIIPROTO_FLAG_EXT_USED; wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); spin_unlock_irqrestore(&wdata->state.lock, flags); } static int wiimod_nunchuk_probe(const struct wiimod_ops *ops, struct wiimote_data *wdata) { int ret, i; wdata->extension.input = input_allocate_device(); if (!wdata->extension.input) return -ENOMEM; input_set_drvdata(wdata->extension.input, wdata); wdata->extension.input->open = wiimod_nunchuk_open; wdata->extension.input->close = wiimod_nunchuk_close; wdata->extension.input->dev.parent = &wdata->hdev->dev; wdata->extension.input->id.bustype = wdata->hdev->bus; wdata->extension.input->id.vendor = wdata->hdev->vendor; wdata->extension.input->id.product = wdata->hdev->product; wdata->extension.input->id.version = wdata->hdev->version; wdata->extension.input->name = WIIMOTE_NAME " Nunchuk"; set_bit(EV_KEY, wdata->extension.input->evbit); for (i = 0; i < WIIMOD_NUNCHUK_KEY_NUM; ++i) set_bit(wiimod_nunchuk_map[i], wdata->extension.input->keybit); set_bit(EV_ABS, wdata->extension.input->evbit); set_bit(ABS_HAT0X, wdata->extension.input->absbit); set_bit(ABS_HAT0Y, wdata->extension.input->absbit); input_set_abs_params(wdata->extension.input, ABS_HAT0X, -120, 120, 2, 4); input_set_abs_params(wdata->extension.input, ABS_HAT0Y, -120, 120, 2, 4); set_bit(ABS_RX, wdata->extension.input->absbit); set_bit(ABS_RY, wdata->extension.input->absbit); set_bit(ABS_RZ, wdata->extension.input->absbit); input_set_abs_params(wdata->extension.input, ABS_RX, -500, 500, 2, 4); input_set_abs_params(wdata->extension.input, ABS_RY, -500, 500, 2, 4); input_set_abs_params(wdata->extension.input, ABS_RZ, -500, 500, 2, 4); ret = input_register_device(wdata->extension.input); if (ret) goto err_free; return 0; err_free: input_free_device(wdata->extension.input); wdata->extension.input = NULL; return ret; } static void wiimod_nunchuk_remove(const struct wiimod_ops *ops, struct wiimote_data *wdata) { if (!wdata->extension.input) return; input_unregister_device(wdata->extension.input); wdata->extension.input = NULL; } static const struct wiimod_ops wiimod_nunchuk = { .flags = 0, .arg = 0, .probe = wiimod_nunchuk_probe, .remove = wiimod_nunchuk_remove, .in_ext = wiimod_nunchuk_in_ext, }; /* * Classic Controller * Another official extension from Nintendo. It provides a classic * gamecube-like controller that can be hotplugged on the Wii Remote. * It has several hardware buttons and switches that are all reported via * a normal extension device. */ enum wiimod_classic_keys { WIIMOD_CLASSIC_KEY_A, WIIMOD_CLASSIC_KEY_B, WIIMOD_CLASSIC_KEY_X, WIIMOD_CLASSIC_KEY_Y, WIIMOD_CLASSIC_KEY_ZL, WIIMOD_CLASSIC_KEY_ZR, WIIMOD_CLASSIC_KEY_PLUS, WIIMOD_CLASSIC_KEY_MINUS, WIIMOD_CLASSIC_KEY_HOME, WIIMOD_CLASSIC_KEY_LEFT, WIIMOD_CLASSIC_KEY_RIGHT, WIIMOD_CLASSIC_KEY_UP, WIIMOD_CLASSIC_KEY_DOWN, WIIMOD_CLASSIC_KEY_LT, WIIMOD_CLASSIC_KEY_RT, WIIMOD_CLASSIC_KEY_NUM, }; static const __u16 wiimod_classic_map[] = { BTN_A, /* WIIMOD_CLASSIC_KEY_A */ BTN_B, /* WIIMOD_CLASSIC_KEY_B */ BTN_X, /* WIIMOD_CLASSIC_KEY_X */ BTN_Y, /* WIIMOD_CLASSIC_KEY_Y */ BTN_TL2, /* WIIMOD_CLASSIC_KEY_ZL */ BTN_TR2, /* WIIMOD_CLASSIC_KEY_ZR */ KEY_NEXT, /* WIIMOD_CLASSIC_KEY_PLUS */ KEY_PREVIOUS, /* WIIMOD_CLASSIC_KEY_MINUS */ BTN_MODE, /* WIIMOD_CLASSIC_KEY_HOME */ KEY_LEFT, /* WIIMOD_CLASSIC_KEY_LEFT */ KEY_RIGHT, /* WIIMOD_CLASSIC_KEY_RIGHT */ KEY_UP, /* WIIMOD_CLASSIC_KEY_UP */ KEY_DOWN, /* WIIMOD_CLASSIC_KEY_DOWN */ BTN_TL, /* WIIMOD_CLASSIC_KEY_LT */ BTN_TR, /* WIIMOD_CLASSIC_KEY_RT */ }; static void wiimod_classic_in_ext(struct wiimote_data *wdata, const __u8 *ext) { __s8 rx, ry, lx, ly, lt, rt; /* Byte | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | * -----+-----+-----+-----+-----+-----+-----+-----+-----+ * 1 | RX <5:4> | LX <5:0> | * 2 | RX <3:2> | LY <5:0> | * -----+-----+-----+-----+-----------------------------+ * 3 |RX<1>| LT <5:4> | RY <5:1> | * -----+-----+-----------+-----------------------------+ * 4 | LT <3:1> | RT <5:1> | * -----+-----+-----+-----+-----+-----+-----+-----+-----+ * 5 | BDR | BDD | BLT | B- | BH | B+ | BRT | 1 | * -----+-----+-----+-----+-----+-----+-----+-----+-----+ * 6 | BZL | BB | BY | BA | BX | BZR | BDL | BDU | * -----+-----+-----+-----+-----+-----+-----+-----+-----+ * All buttons are 0 if pressed * RX and RY are right analog stick * LX and LY are left analog stick * LT is left trigger, RT is right trigger * BLT is 0 if left trigger is fully pressed * BRT is 0 if right trigger is fully pressed * BDR, BDD, BDL, BDU form the D-Pad with right, down, left, up buttons * BZL is left Z button and BZR is right Z button * B-, BH, B+ are +, HOME and - buttons * BB, BY, BA, BX are A, B, X, Y buttons * LSB of RX, RY, LT, and RT are not transmitted and always 0. * * With motionp enabled it changes slightly to this: * Byte | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | * -----+-----+-----+-----+-----+-----+-----+-----+-----+ * 1 | RX <5:4> | LX <5:1> | BDU | * 2 | RX <3:2> | LY <5:1> | BDL | * -----+-----+-----+-----+-----------------------+-----+ * 3 |RX<1>| LT <5:4> | RY <5:1> | * -----+-----+-----------+-----------------------------+ * 4 | LT <3:1> | RT <5:1> | * -----+-----+-----+-----+-----+-----+-----+-----+-----+ * 5 | BDR | BDD | BLT | B- | BH | B+ | BRT | EXT | * -----+-----+-----+-----+-----+-----+-----+-----+-----+ * 6 | BZL | BB | BY | BA | BX | BZR | 0 | 0 | * -----+-----+-----+-----+-----+-----+-----+-----+-----+ * Only the LSBs of LX and LY are lost. BDU and BDL are moved, the rest * is the same as before. */ if (wdata->state.flags & WIIPROTO_FLAG_MP_ACTIVE) { lx = ext[0] & 0x3e; ly = ext[1] & 0x3e; } else { lx = ext[0] & 0x3f; ly = ext[1] & 0x3f; } rx = (ext[0] >> 3) & 0x18; rx |= (ext[1] >> 5) & 0x06; rx |= (ext[2] >> 7) & 0x01; ry = ext[2] & 0x1f; rt = ext[3] & 0x1f; lt = (ext[2] >> 2) & 0x18; lt |= (ext[3] >> 5) & 0x07; rx <<= 1; ry <<= 1; rt <<= 1; lt <<= 1; input_report_abs(wdata->extension.input, ABS_HAT1X, lx - 0x20); input_report_abs(wdata->extension.input, ABS_HAT1Y, ly - 0x20); input_report_abs(wdata->extension.input, ABS_HAT2X, rx - 0x20); input_report_abs(wdata->extension.input, ABS_HAT2Y, ry - 0x20); input_report_abs(wdata->extension.input, ABS_HAT3X, rt); input_report_abs(wdata->extension.input, ABS_HAT3Y, lt); input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_RIGHT], !(ext[4] & 0x80)); input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_DOWN], !(ext[4] & 0x40)); input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_LT], !(ext[4] & 0x20)); input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_MINUS], !(ext[4] & 0x10)); input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_HOME], !(ext[4] & 0x08)); input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_PLUS], !(ext[4] & 0x04)); input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_RT], !(ext[4] & 0x02)); input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_ZL], !(ext[5] & 0x80)); input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_B], !(ext[5] & 0x40)); input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_Y], !(ext[5] & 0x20)); input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_A], !(ext[5] & 0x10)); input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_X], !(ext[5] & 0x08)); input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_ZR], !(ext[5] & 0x04)); if (wdata->state.flags & WIIPROTO_FLAG_MP_ACTIVE) { input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_LEFT], !(ext[1] & 0x01)); input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_UP], !(ext[0] & 0x01)); } else { input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_LEFT], !(ext[5] & 0x02)); input_report_key(wdata->extension.input, wiimod_classic_map[WIIMOD_CLASSIC_KEY_UP], !(ext[5] & 0x01)); } input_sync(wdata->extension.input); } static int wiimod_classic_open(struct input_dev *dev) { struct wiimote_data *wdata = input_get_drvdata(dev); unsigned long flags; spin_lock_irqsave(&wdata->state.lock, flags); wdata->state.flags |= WIIPROTO_FLAG_EXT_USED; wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); spin_unlock_irqrestore(&wdata->state.lock, flags); return 0; } static void wiimod_classic_close(struct input_dev *dev) { struct wiimote_data *wdata = input_get_drvdata(dev); unsigned long flags; spin_lock_irqsave(&wdata->state.lock, flags); wdata->state.flags &= ~WIIPROTO_FLAG_EXT_USED; wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); spin_unlock_irqrestore(&wdata->state.lock, flags); } static int wiimod_classic_probe(const struct wiimod_ops *ops, struct wiimote_data *wdata) { int ret, i; wdata->extension.input = input_allocate_device(); if (!wdata->extension.input) return -ENOMEM; input_set_drvdata(wdata->extension.input, wdata); wdata->extension.input->open = wiimod_classic_open; wdata->extension.input->close = wiimod_classic_close; wdata->extension.input->dev.parent = &wdata->hdev->dev; wdata->extension.input->id.bustype = wdata->hdev->bus; wdata->extension.input->id.vendor = wdata->hdev->vendor; wdata->extension.input->id.product = wdata->hdev->product; wdata->extension.input->id.version = wdata->hdev->version; wdata->extension.input->name = WIIMOTE_NAME " Classic Controller"; set_bit(EV_KEY, wdata->extension.input->evbit); for (i = 0; i < WIIMOD_CLASSIC_KEY_NUM; ++i) set_bit(wiimod_classic_map[i], wdata->extension.input->keybit); set_bit(EV_ABS, wdata->extension.input->evbit); set_bit(ABS_HAT1X, wdata->extension.input->absbit); set_bit(ABS_HAT1Y, wdata->extension.input->absbit); set_bit(ABS_HAT2X, wdata->extension.input->absbit); set_bit(ABS_HAT2Y, wdata->extension.input->absbit); set_bit(ABS_HAT3X, wdata->extension.input->absbit); set_bit(ABS_HAT3Y, wdata->extension.input->absbit); input_set_abs_params(wdata->extension.input, ABS_HAT1X, -30, 30, 1, 1); input_set_abs_params(wdata->extension.input, ABS_HAT1Y, -30, 30, 1, 1); input_set_abs_params(wdata->extension.input, ABS_HAT2X, -30, 30, 1, 1); input_set_abs_params(wdata->extension.input, ABS_HAT2Y, -30, 30, 1, 1); input_set_abs_params(wdata->extension.input, ABS_HAT3X, -30, 30, 1, 1); input_set_abs_params(wdata->extension.input, ABS_HAT3Y, -30, 30, 1, 1); ret = input_register_device(wdata->extension.input); if (ret) goto err_free; return 0; err_free: input_free_device(wdata->extension.input); wdata->extension.input = NULL; return ret; } static void wiimod_classic_remove(const struct wiimod_ops *ops, struct wiimote_data *wdata) { if (!wdata->extension.input) return; input_unregister_device(wdata->extension.input); wdata->extension.input = NULL; } static const struct wiimod_ops wiimod_classic = { .flags = 0, .arg = 0, .probe = wiimod_classic_probe, .remove = wiimod_classic_remove, .in_ext = wiimod_classic_in_ext, }; /* * Balance Board Extension * The Nintendo Wii Balance Board provides four hardware weight sensor plus a * single push button. No other peripherals are available. However, the * balance-board data is sent via a standard Wii Remote extension. All other * data for non-present hardware is zeroed out. * Some 3rd party devices react allergic if we try to access normal Wii Remote * hardware, so this extension module should be the only module that is loaded * on balance boards. * The balance board needs 8 bytes extension data instead of basic 6 bytes so * it needs the WIIMOD_FLAG_EXT8 flag. */ static void wiimod_bboard_in_keys(struct wiimote_data *wdata, const __u8 *keys) { input_report_key(wdata->extension.input, BTN_A, !!(keys[1] & 0x08)); input_sync(wdata->extension.input); } static void wiimod_bboard_in_ext(struct wiimote_data *wdata, const __u8 *ext) { __s32 val[4], tmp, div; unsigned int i; struct wiimote_state *s = &wdata->state; /* * Balance board data layout: * * Byte | 8 7 6 5 4 3 2 1 | * -----+--------------------------+ * 1 | Top Right <15:8> | * 2 | Top Right <7:0> | * -----+--------------------------+ * 3 | Bottom Right <15:8> | * 4 | Bottom Right <7:0> | * -----+--------------------------+ * 5 | Top Left <15:8> | * 6 | Top Left <7:0> | * -----+--------------------------+ * 7 | Bottom Left <15:8> | * 8 | Bottom Left <7:0> | * -----+--------------------------+ * * These values represent the weight-measurements of the Wii-balance * board with 16bit precision. * * The balance-board is never reported interleaved with motionp. */ val[0] = ext[0]; val[0] <<= 8; val[0] |= ext[1]; val[1] = ext[2]; val[1] <<= 8; val[1] |= ext[3]; val[2] = ext[4]; val[2] <<= 8; val[2] |= ext[5]; val[3] = ext[6]; val[3] <<= 8; val[3] |= ext[7]; /* apply calibration data */ for (i = 0; i < 4; i++) { if (val[i] <= s->calib_bboard[i][0]) { tmp = 0; } else if (val[i] < s->calib_bboard[i][1]) { tmp = val[i] - s->calib_bboard[i][0]; tmp *= 1700; div = s->calib_bboard[i][1] - s->calib_bboard[i][0]; tmp /= div ? div : 1; } else { tmp = val[i] - s->calib_bboard[i][1]; tmp *= 1700; div = s->calib_bboard[i][2] - s->calib_bboard[i][1]; tmp /= div ? div : 1; tmp += 1700; } val[i] = tmp; } input_report_abs(wdata->extension.input, ABS_HAT0X, val[0]); input_report_abs(wdata->extension.input, ABS_HAT0Y, val[1]); input_report_abs(wdata->extension.input, ABS_HAT1X, val[2]); input_report_abs(wdata->extension.input, ABS_HAT1Y, val[3]); input_sync(wdata->extension.input); } static int wiimod_bboard_open(struct input_dev *dev) { struct wiimote_data *wdata = input_get_drvdata(dev); unsigned long flags; spin_lock_irqsave(&wdata->state.lock, flags); wdata->state.flags |= WIIPROTO_FLAG_EXT_USED; wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); spin_unlock_irqrestore(&wdata->state.lock, flags); return 0; } static void wiimod_bboard_close(struct input_dev *dev) { struct wiimote_data *wdata = input_get_drvdata(dev); unsigned long flags; spin_lock_irqsave(&wdata->state.lock, flags); wdata->state.flags &= ~WIIPROTO_FLAG_EXT_USED; wiiproto_req_drm(wdata, WIIPROTO_REQ_NULL); spin_unlock_irqrestore(&wdata->state.lock, flags); } static ssize_t wiimod_bboard_calib_show(struct device *dev, struct device_attribute *attr, char *out) { struct wiimote_data *wdata = dev_to_wii(dev); int i, j, ret; __u16 val; __u8 buf[24], offs; ret = wiimote_cmd_acquire(wdata); if (ret) return ret; ret = wiimote_cmd_read(wdata, 0xa40024, buf, 12); if (ret != 12) { wiimote_cmd_release(wdata); return ret < 0 ? ret : -EIO; } ret = wiimote_cmd_read(wdata, 0xa40024 + 12, buf + 12, 12); if (ret != 12) { wiimote_cmd_release(wdata); return ret < 0 ? ret : -EIO; } wiimote_cmd_release(wdata); spin_lock_irq(&wdata->state.lock); offs = 0; for (i = 0; i < 3; ++i) { for (j = 0; j < 4; ++j) { wdata->state.calib_bboard[j][i] = buf[offs]; wdata->state.calib_bboard[j][i] <<= 8; wdata->state.calib_bboard[j][i] |= buf[offs + 1]; offs += 2; } } spin_unlock_irq(&wdata->state.lock); ret = 0; for (i = 0; i < 3; ++i) { for (j = 0; j < 4; ++j) { val = wdata->state.calib_bboard[j][i]; if (i == 2 && j == 3) ret += sprintf(&out[ret], "%04x\n", val); else ret += sprintf(&out[ret], "%04x:", val); } } return ret; } static DEVICE_ATTR(bboard_calib, S_IRUGO, wiimod_bboard_calib_show, NULL); static int wiimod_bboard_probe(const struct wiimod_ops *ops, struct wiimote_data *wdata) { int ret, i, j; __u8 buf[24], offs; wiimote_cmd_acquire_noint(wdata); ret = wiimote_cmd_read(wdata, 0xa40024, buf, 12); if (ret != 12) { wiimote_cmd_release(wdata); return ret < 0 ? ret : -EIO; } ret = wiimote_cmd_read(wdata, 0xa40024 + 12, buf + 12, 12); if (ret != 12) { wiimote_cmd_release(wdata); return ret < 0 ? ret : -EIO; } wiimote_cmd_release(wdata); offs = 0; for (i = 0; i < 3; ++i) { for (j = 0; j < 4; ++j) { wdata->state.calib_bboard[j][i] = buf[offs]; wdata->state.calib_bboard[j][i] <<= 8; wdata->state.calib_bboard[j][i] |= buf[offs + 1]; offs += 2; } } wdata->extension.input = input_allocate_device(); if (!wdata->extension.input) return -ENOMEM; ret = device_create_file(&wdata->hdev->dev, &dev_attr_bboard_calib); if (ret) { hid_err(wdata->hdev, "cannot create sysfs attribute\n"); goto err_free; } input_set_drvdata(wdata->extension.input, wdata); wdata->extension.input->open = wiimod_bboard_open; wdata->extension.input->close = wiimod_bboard_close; wdata->extension.input->dev.parent = &wdata->hdev->dev; wdata->extension.input->id.bustype = wdata->hdev->bus; wdata->extension.input->id.vendor = wdata->hdev->vendor; wdata->extension.input->id.product = wdata->hdev->product; wdata->extension.input->id.version = wdata->hdev->version; wdata->extension.input->name = WIIMOTE_NAME " Balance Board"; set_bit(EV_KEY, wdata->extension.input->evbit); set_bit(BTN_A, wdata->extension.input->keybit); set_bit(EV_ABS, wdata->extension.input->evbit); set_bit(ABS_HAT0X, wdata->extension.input->absbit); set_bit(ABS_HAT0Y, wdata->extension.input->absbit); set_bit(ABS_HAT1X, wdata->extension.input->absbit); set_bit(ABS_HAT1Y, wdata->extension.input->absbit); input_set_abs_params(wdata->extension.input, ABS_HAT0X, 0, 65535, 2, 4); input_set_abs_params(wdata->extension.input, ABS_HAT0Y, 0, 65535, 2, 4); input_set_abs_params(wdata->extension.input, ABS_HAT1X, 0, 65535, 2, 4); input_set_abs_params(wdata->extension.input, ABS_HAT1Y, 0, 65535, 2, 4); ret = input_register_device(wdata->extension.input); if (ret) goto err_file; return 0; err_file: device_remove_file(&wdata->hdev->dev, &dev_attr_bboard_calib); err_free: input_free_device(wdata->extension.input); wdata->extension.input = NULL; return ret; } static void wiimod_bboard_remove(const struct wiimod_ops *ops, struct wiimote_data *wdata) { if (!wdata->extension.input) return; input_unregister_device(wdata->extension.input); wdata->extension.input = NULL; device_remove_file(&wdata->hdev->dev, &dev_attr_bboard_calib); } static const struct wiimod_ops wiimod_bboard = { .flags = WIIMOD_FLAG_EXT8, .arg = 0, .probe = wiimod_bboard_probe, .remove = wiimod_bboard_remove, .in_keys = wiimod_bboard_in_keys, .in_ext = wiimod_bboard_in_ext, }; /* * Pro Controller * Released with the Wii U was the Nintendo Wii U Pro Controller. It does not * work together with the classic Wii, but only with the new Wii U. However, it * uses the same protocol and provides a builtin "classic controller pro" * extension, few standard buttons, a rumble motor, 4 LEDs and a battery. * We provide all these via a standard extension device as the device doesn't * feature an extension port. */ enum wiimod_pro_keys { WIIMOD_PRO_KEY_A, WIIMOD_PRO_KEY_B, WIIMOD_PRO_KEY_X, WIIMOD_PRO_KEY_Y, WIIMOD_PRO_KEY_PLUS, WIIMOD_PRO_KEY_MINUS, WIIMOD_PRO_KEY_HOME, WIIMOD_PRO_KEY_LEFT, WIIMOD_PRO_KEY_RIGHT, WIIMOD_PRO_KEY_UP, WIIMOD_PRO_KEY_DOWN, WIIMOD_PRO_KEY_TL, WIIMOD_PRO_KEY_TR, WIIMOD_PRO_KEY_ZL, WIIMOD_PRO_KEY_ZR, WIIMOD_PRO_KEY_THUMBL, WIIMOD_PRO_KEY_THUMBR, WIIMOD_PRO_KEY_NUM, }; static const __u16 wiimod_pro_map[] = { BTN_EAST, /* WIIMOD_PRO_KEY_A */ BTN_SOUTH, /* WIIMOD_PRO_KEY_B */ BTN_NORTH, /* WIIMOD_PRO_KEY_X */ BTN_WEST, /* WIIMOD_PRO_KEY_Y */ BTN_START, /* WIIMOD_PRO_KEY_PLUS */ BTN_SELECT, /* WIIMOD_PRO_KEY_MINUS */ BTN_MODE, /* WIIMOD_PRO_KEY_HOME */ BTN_DPAD_LEFT, /* WIIMOD_PRO_KEY_LEFT */ BTN_DPAD_RIGHT, /* WIIMOD_PRO_KEY_RIGHT */ BTN_DPAD_UP, /* WIIMOD_PRO_KEY_UP */ BTN_DPAD_DOWN, /* WIIMOD_PRO_KEY_DOWN */ BTN_TL, /* WIIMOD_PRO_KEY_TL */ BTN_TR, /* WIIMOD_PRO_KEY_TR */ BTN_TL2, /* WIIMOD_PRO_KEY_ZL */ BTN_TR2, /* WIIMOD_PRO_KEY_ZR */ BTN_THUMBL, /* WIIMOD_PRO_KEY_THUMBL */ BTN_THUMBR, /* WIIMOD_PRO_KEY_THUMBR */ }; static void wiimod_pro_in_ext(struct wiimote_data *wdata, const __u8 *ext) { __s16 rx, ry, lx, ly; /* Byte | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | * -----+-----+-----+-----+-----+-----+-----+-----+-----+ * 1 | LX <7:0> | * -----+-----------------------+-----------------------+ * 2 | 0 0 0 0 | LX <11:8> | * -----+-----------------------+-----------------------+ * 3 | RX <7:0> | * -----+-----------------------+-----------------------+ * 4 | 0 0 0 0 | RX <11:8> | * -----+-----------------------+-----------------------+ * 5 | LY <7:0> | * -----+-----------------------+-----------------------+ * 6 | 0 0 0 0 | LY <11:8> | * -----+-----------------------+-----------------------+ * 7 | RY <7:0> | * -----+-----------------------+-----------------------+ * 8 | 0 0 0 0 | RY <11:8> | * -----+-----+-----+-----+-----+-----+-----+-----+-----+ * 9 | BDR | BDD | BLT | B- | BH | B+ | BRT | 1 | * -----+-----+-----+-----+-----+-----+-----+-----+-----+ * 10 | BZL | BB | BY | BA | BX | BZR | BDL | BDU | * -----+-----+-----+-----+-----+-----+-----+-----+-----+ * 11 | 1 | BATTERY | USB |CHARG|LTHUM|RTHUM| * -----+-----+-----------------+-----------+-----+-----+ * All buttons are low-active (0 if pressed) * RX and RY are right analog stick * LX and LY are left analog stick * BLT is left trigger, BRT is right trigger. * BDR, BDD, BDL, BDU form the D-Pad with right, down, left, up buttons * BZL is left Z button and BZR is right Z button * B-, BH, B+ are +, HOME and - buttons * BB, BY, BA, BX are A, B, X, Y buttons * * Bits marked as 0/1 are unknown and never changed during tests. * * Not entirely verified: * CHARG: 1 if uncharging, 0 if charging * USB: 1 if not connected, 0 if connected * BATTERY: battery capacity from 000 (empty) to 100 (full) */