Skip to content

Commit

Permalink
Merge commit 'ec80a3d' (closes #11)
Browse files Browse the repository at this point in the history
  • Loading branch information
neggles committed May 1, 2022
2 parents 520e8bc + ec80a3d commit b9c5881
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

kernel module and device tree overlay to add support for the EMC2301 fan controller on the Raspberry Pi Compute Module 4 IO Board.

*Works with 5.10.y 64-bit kernels only.*
*Works with 5.10+ 64-bit kernels only.*

Uses Traverse Technologies' EMC2301 [hwmon driver](https://gitlab.traverse.com.au/ls1088firmware/traverse-sensors) for their [ten64](https://www.crowdsupply.com/traverse-technologies/ten64) board, which you should definitely check out because it's awesome.

Expand All @@ -22,6 +22,11 @@ sudo dkms install cm4io-fan/0.1.1
```
dtoverlay=cm4io-fan,minrpm=1000,maxrpm=5000
```
5. Some distributions may not automatically load the kernel module despite the devicetree entry; Raspberry Pi OS does, Ubuntu 21.10 does not, etc.
To make the module load, edit `/etc/modules` (or make a new file called `/etc/modules-load.d/cm4io-fan.conf`), adding this line:
```
emc2301
```

## Install from git
1. Install dkms if you haven't already:
Expand Down
3 changes: 2 additions & 1 deletion dkms.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PACKAGE_NAME="cm4io-fan"
PACKAGE_VERSION="0.1.1"
BUILD_EXCLUSIVE_KERNEL="^5.[10-].*"
# allow anything 5.10 thru 5.99, which should be fine...
BUILD_EXCLUSIVE_KERNEL="^5\.([1-9][0-9])\..*"

MAKE="make"
CLEAN="make clean"
Expand Down
3 changes: 2 additions & 1 deletion dkms.post_install
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ install_dt_overlay()
local PWD=$(eval pwd)
local overlay=$1
local base_dir="${PWD%/*}/$kernelver/$arch/module"
local overlays_dir="/boot/overlays"
source /etc/default/rpi-eeprom-update
local overlays_dir="${BOOTFS:-/boot}/overlays"

echo "$overlay:"
echo " - Installation"
Expand Down
3 changes: 2 additions & 1 deletion dkms.post_remove
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
remove_dt_overlay()
{
local overlay=$1
local overlays_dir="/boot/overlays"
source /etc/default/rpi-eeprom-update
local overlays_dir="${BOOTFS:-/boot}/overlays"

echo "${overlay}:"
echo " - Uninstallation"
Expand Down

0 comments on commit b9c5881

Please sign in to comment.