lucidm / lcdi2c

Linux Kernel Module for HD44780 with I2C Expander
Other
21 stars 18 forks source link

automatic load during boot not working ? #4

Open mibcat opened 5 years ago

mibcat commented 5 years ago

Hi !

I'm trying to load the module during boot by adding the module name to /etc/modules right after i2c-dev

>  cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

i2c-dev
lcdi2c

But after booting there is no /dev/lcdi2c device. dmesg shows:

> dmesg |grep lcd
[    3.763602] lcdi2c: loading out-of-tree module taints kernel.

If i load the module manually: > sudo modprobe lcdi2c

dmesg shows

> dmesg |grep lcd
[    3.763602] lcdi2c: loading out-of-tree module taints kernel.
[   83.829014] lcdi2c 1-0027: 16x2 LCD using bus 0x1, at address 0x27
[   83.829306] lcdi2c 1-0027: registered with major 241

and the module is working fine.

> ll /dev/lcdi2c
crw-rw---- 1 root dialout 241, 0 Jun 12 13:02 /dev/lcdi2c

Do I miss something ??

mibcat commented 5 years ago

journalctl shows:

Jun 12 13:30:19 raspi3bplus systemd-modules-load[111]: Failed to insert 'lcdi2c': Invalid argument
Jun 12 13:30:19 raspi3bplus systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
Jun 12 13:30:19 raspi3bplus systemd[1]: Failed to start Load Kernel Modules.
Jun 12 13:30:19 raspi3bplus systemd[1]: systemd-modules-load.service: Unit entered failed state.
Jun 12 13:30:19 raspi3bplus systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.

Invalid arguments ? Loading lcdi2c manually with modprobe works without arguments but also with arguments ! e.g. sudo modprobe lcdi2c topo=1 initialize the connected LCD as 20x4 instead of the default configuration

Claudenw commented 4 years ago

I have the same problem.

The work around I have is to call modprobe lcdi2c in my scripts before I need the driver.