492 Commits

Author SHA1 Message Date
Jim Huang
16e1b72851
Merge pull request #301 from charliechiou/master
Some checks failed
build-deploy-assets / build (push) Has been cancelled
deploy-github-page / build (push) Has been cancelled
status-checks / validate (push) Has been cancelled
Align version check
latest
2025-04-18 15:45:53 +08:00
Jim Huang
7f4bca9ad5
Merge pull request #304 from EricccTaiwan/master
Drop .owner for kernel >= 6.4
2025-04-18 13:53:12 +08:00
Jim Huang
26988ef5de
Merge pull request #306 from EricccTaiwan/fix
Clarify tasklet limitations and deprecation plans
2025-04-18 09:42:46 +08:00
Cheng-Yang Chou
58990f6b45 Clarify tasklet limitations and deprecation plans
Improve wording and grammar in the tasklet section. Reflect current
discussion on tasklet deprecation and correct Linux kernel casing.
2025-04-18 06:57:59 +08:00
Jim Huang
5ce6b0024a
Merge pull request #305 from wurrrrrrrrrr/master
Some checks failed
build-deploy-assets / build (push) Has been cancelled
deploy-github-page / build (push) Has been cancelled
status-checks / validate (push) Has been cancelled
Fix grammar in the /proc file system section
2025-04-15 22:08:23 +08:00
wurrrrrrrrrr
64353ac7ef Fix incorrect tense in sentence.
Replaced "when a user read" with "when a user reads" for correct grammar.
2025-04-15 18:09:15 +08:00
Cheng-Yang Chou
2b22c6bba7 Drop .owner for kernel >= 6.4
Kernel 6.4+ sets .owner automatically. Remove manual assignment
to avoid build issues and keep compatibility with older versions.
2025-04-14 21:06:26 +08:00
Jim Huang
96768bd672
Merge pull request #303 from Jordymalone/fix_grammatical_error
Some checks are pending
build-deploy-assets / build (push) Waiting to run
deploy-github-page / build (push) Waiting to run
status-checks / validate (push) Waiting to run
Fix grammar in virtual input device driver section
2025-04-14 17:54:06 +08:00
Chia-Hao Chiu
bf7afe8ca6 Fix grammar in virtual input device driver section
Change "The drivers needs" to "The driver needs" to correct a
subject-verb disagreement and improve readability.
2025-04-14 17:09:20 +08:00
Jim Huang
bc785b64d1 Update contributor list
Some checks failed
build-deploy-assets / build (push) Has been cancelled
deploy-github-page / build (push) Has been cancelled
status-checks / validate (push) Has been cancelled
2025-04-12 15:38:36 +08:00
Po-Ying Chiu
86b9b23c47 Align version check
The condition ">=" is used to align all version checks, improving code
consistency and readability.
2025-04-12 13:41:18 +08:00
Jim Huang
29504e9229
Merge pull request #302 from EricccTaiwan/irq
Fix incorrect plural form of IRQ
2025-04-12 13:09:01 +08:00
Cheng-Yang Chou
45f58318ba Fix incorrect plural form of IRQ
Replaced "IRQ's" with "IRQs" to use correct grammar.
2025-04-12 13:01:47 +08:00
Jim Huang
fc3d9c679e
Merge pull request #300 from EricccTaiwan/fix
Rephrase informal example in module section
2025-04-12 12:36:51 +08:00
Cheng-Yang Chou
2ac8dacee6 Rephrase informal example in module section
Replaced the informal message with a formal description to improve
tone and maintain consistency in documentation.
2025-04-12 12:26:16 +08:00
Jim Huang
fea832b9d1
Merge pull request #299 from EricccTaiwan/master
Update kernel header install command for clarity
2025-04-12 12:09:36 +08:00
Cheng-Yang Chou
2d3ec07a63 Update kernel header install command for clarity
Remove the redundant 'kmod' installation since it is already
installed earlier. Also replace the hardcoded kernel version
with 'uname -r' to improve portability and compatibility with
modern Linux distributions.
2025-04-12 02:12:25 +08:00
Jim Huang
9ca77904b8
Merge pull request #297 from EricccTaiwan/sda
Some checks failed
build-deploy-assets / build (push) Has been cancelled
deploy-github-page / build (push) Has been cancelled
status-checks / validate (push) Has been cancelled
Update device file example from hda to sda
2025-04-10 14:50:14 +08:00
Jim Huang
5f6e83b7d1
Merge pull request #298 from EricccTaiwan/cpp
Fix formatting of 'unsigned int major'
2025-04-10 12:21:47 +08:00
Cheng-Yang Chou
9e4311d755 Fix formatting of unsigned int major
Wrap the type and name in \cpp|...| for consistency with
other parameters in the sentence.
2025-04-10 11:37:11 +08:00
Cheng-Yang Chou
b1a444883b Update device file example from hda to sda
Update outdated /dev/hda[1-3] device file example to /dev/sda[1-3]
to match modern Linux systems. Adjust major number from 3 to 8
accordingly and remove outdated reference to IDE devices.
2025-04-09 20:56:13 +08:00
Jim Huang
918e87e078
Merge pull request #296 from EricccTaiwan/fix-2
Some checks failed
build-deploy-assets / build (push) Has been cancelled
deploy-github-page / build (push) Has been cancelled
status-checks / validate (push) Has been cancelled
Fix grammar in IRQ flag usage description
2025-04-09 06:36:54 +08:00
Jim Huang
c65f633975
Merge pull request #295 from EricccTaiwan/fix-1
Remove duplicate word in IRQ flag comment
2025-04-09 06:36:06 +08:00
Cheng-Yang Chou
75071ec7e1 Fix grammar in IRQ flag usage description
Replaced "for specify" with "to specify" in the explanation of
IRQ flags.
2025-04-09 04:48:08 +08:00
Cheng-Yang Chou
f68ceb947b Remove duplicate word in IRQ flag comment
A repeated "the" appeared in a sentence describing legacy IRQ
flags.
2025-04-09 04:43:42 +08:00
Jim Huang
c2162ec742
Merge pull request #294 from eleanorLYJ/spinlock-add-desc
Some checks failed
build-deploy-assets / build (push) Has been cancelled
deploy-github-page / build (push) Has been cancelled
status-checks / validate (push) Has been cancelled
Clarify usage differences between spinlock functions
2025-04-04 11:55:52 +08:00
Yu-Chun Lin
11e1064883 Clarify usage differences between spinlock functions
Explain the behavior and use cases of spin_lock(), spin_lock_irq(),
, spin_lock_irqsave() and spin_lock_bh().
2025-04-04 09:52:00 +08:00
Jim Huang
ef553aabd2
Merge pull request #293 from jeremy90307/master
Some checks failed
build-deploy-assets / build (push) Has been cancelled
deploy-github-page / build (push) Has been cancelled
status-checks / validate (push) Has been cancelled
Remove redundant code
2025-03-10 22:33:20 +08:00
jeremy90307
d1d76f7efd Remove redundant code
Remove unnecessary definition of SUCCESS, as returning 0 already
indicates successful execution.
2025-03-10 22:29:24 +08:00
Jim Huang
e061eaf5e3
Merge pull request #290 from jeremy90307/master
Add an LED driver example using GPIO
2025-03-10 21:50:57 +08:00
Jeremy90307
0beffd5b70 Add an LED driver example using GPIO
Use GPIO to control LED on/off and add related GPIO knowledge.

Test detail:

- Tested on Raspberry Pi 5B with Raspberry Pi OS (Debian 12, Linux
  version 6.12.1-v8-16k+)

- Verify that LED example compiles and loads successfully

- Verify that LED turns on and off sucessfully
2025-03-10 21:40:58 +08:00
Jim Huang
eccaa3b9de
Merge pull request #292 from nicehorse06/master
Some checks failed
build-deploy-assets / build (push) Has been cancelled
deploy-github-page / build (push) Has been cancelled
status-checks / validate (push) Has been cancelled
Fix bottom-half processing by transitioning to workqueue
2025-02-18 01:27:14 +08:00
Jimmy Ma
3682d9e6d5 Move bottom-half to workqueue for safe sleep
Based on issue #191 (@trulykyle)'s feedback, the original bottomhalf.c
example was calling msleep() inside a tasklet, which runs in atomic
context and can lead to a kernel crash. This patch moves the time-
consuming work to a workqueue, which runs in process context and allows
sleeping, while preserving the immediate LED control logic in the ISR.

Close #191
2025-02-17 23:46:30 +08:00
Jim Huang
a035231815
Merge pull request #291 from algonell/master
Some checks failed
build-deploy-assets / build (push) Has been cancelled
status-checks / validate (push) Has been cancelled
deploy-github-page / build (push) Has been cancelled
Fix a typo
2025-02-05 03:10:38 +08:00
Andrew Kreimer
1bb3f64bc1
Fix a typo
There is an extra "the", remove it.
2025-02-04 21:03:19 +02:00
Jim Huang
3cb12d65a5
Merge pull request #289 from jeremy90307/master
Some checks failed
build-deploy-assets / build (push) Has been cancelled
deploy-github-page / build (push) Has been cancelled
status-checks / validate (push) Has been cancelled
Allow devicemodel built with Linux v6.11+
2024-12-12 15:00:33 +08:00
Jeremy90307
e3e11431fc Allow devicemodel built with Linux v6.11+
Since commit 0edb555 ("platform: Make platform_driver::remove() return
void"), the original `platform_driver::remove()` function returned an
integer value, usually an error code. This made driver developers think
that errors were properly handled. However, the driver core does not
stop the device removal process based on the error code, so the error
code did not serve its intended purpose. Therefore, the return type was
changed to `void` to avoid potential issues.

Make the devicemodel example run successfully on Linux v6.11+.

Testing detail:

- Tested on Raspberry Pi 5B with Raspberry Pi OS (Debian 12, Linux
  version 6.12.1-v8-16k+)

- Verified the devicemodel examples compile and load successfully
2024-12-11 19:35:47 +08:00
Jim Huang
e442916055
Merge pull request #287 from jeremy90307/master
Some checks are pending
build-deploy-assets / build (push) Waiting to run
deploy-github-page / build (push) Waiting to run
status-checks / validate (push) Waiting to run
Allow GPIO example built with Linux v6.10+
2024-12-11 17:21:46 +08:00
Jeremy90307
bde77a155e Allow GPIO example built with Linux v6.10+
Since the commit dbcedec ("gpiolib: legacy: Remove unused
gpio_request_array() and gpio_free_array()"), these functions had no
users in kernel and were subsequently removed to simplify the library.

These functions have been removed from GPIO examples for Linux
v6.10+ to ensure compatibility across all kernel versions.

Testing detail:

- Tested on Raspberry Pi 5B with Raspberry Pi OS (Debian 12, Linux
  version 6.12.1-v8-16k+)

- Verified the GPIO examples compile and load successfully

- Verified GPIO17 interrupt turns on the LED (GPIO4)

- Verified GPIO18 interrupt turns off the LED (GPIO4)

Close #285
2024-12-11 17:16:15 +08:00
Jim Huang
0b455a21a7
Merge pull request #288 from sysprog21/fix-style
CI: Fix recent Cppcheck and Sparse usage
2024-12-11 16:39:02 +08:00
Jim Huang
a16a278556 Mark 'syscall-steal' as non-working module
We might have to rework this kernel module.
2024-12-11 16:37:00 +08:00
Jim Huang
9543ca4e40 CI: Install libsqlite3 required by Sparse 2024-12-11 16:35:55 +08:00
Jim Huang
519033d2cc CI: Skip style with Cppcheck
For callback functions, we may not expect to changes their prototypes,
and this commit skips the corresponding checks.
2024-12-11 16:18:47 +08:00
Jim Huang
6e3aee651a
Merge pull request #286 from Integral-Tech/update-ci
Some checks failed
build-deploy-assets / build (push) Has been cancelled
deploy-github-page / build (push) Has been cancelled
status-checks / validate (push) Has been cancelled
CI: Update Ubuntu, gcc & clang-format
2024-11-13 05:57:49 +08:00
Integral
2c29aef35f
CI: Update Ubuntu, gcc & clang-format 2024-11-12 17:09:24 +08:00
Integral
885da47d5b
Add missing close() and use EXIT_FAILURE macro (#284)
In cat_nonblock.c, function call of close() is missing, which could
lead to resource leak. Besides, using EXIT_FAILURE macro defined in
stdlib.h provides better readability.
2024-11-12 14:14:20 +08:00
Jim Huang
60d391509f
Merge pull request #283 from Integral-Tech/simplify-enum
Remove unnecessary enum assignments
2024-11-11 19:53:56 +08:00
Jim Huang
af8a3e6572
Merge pull request #282 from Integral-Tech/remove-unused-sudo
Remove unnecessary sudo
2024-11-11 19:52:11 +08:00
Integral
980d8f3b30
Remove unnecessary enum assignments 2024-11-11 18:51:47 +08:00
Integral
6d9d12717a
Remove unnecessary sudo
In some commands such as "lsmod", root permission is not required.
2024-11-11 18:32:47 +08:00