Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module w1_therm no longer exist #338

Closed
mati75 opened this issue Dec 23, 2014 · 9 comments
Closed

Module w1_therm no longer exist #338

mati75 opened this issue Dec 23, 2014 · 9 comments

Comments

@mati75
Copy link

mati75 commented Dec 23, 2014

Hello,

After update to branch next with kernel:

Linux malina 3.18.1+ #731 PREEMPT Fri Dec 19 19:16:36 GMT 2014 armv6l GNU/Linux

In load module w1-term modprobe return:

modprobe: FATAL: Module w1-term not found.

On 3.18.0+ problem doesn't exist.

@pelwell
Copy link
Contributor

pelwell commented Dec 23, 2014

I couldn't find a reference to "w1-term" anywhere.Do you perhaps mean "w1-therm", which does exist?

pi@raspberrypi:~$ uname -a
Linux raspberrypi 3.18.0+ #333 PREEMPT Thu Dec 18 16:38:30 GMT 2014 armv6l GNU/Linux
pi@raspberrypi:~$ sudo modprobe w1-therm
pi@raspberrypi:~$ lsmod
Module                  Size  Used by
w1_therm                3325  0
wire                   31280  1 w1_therm
cn                      5756  1 wire
snd_bcm2835            21342  0
...

@mati75
Copy link
Author

mati75 commented Jan 5, 2015

Yes, I make a typo:

mati75@malina ~ % lsmod | grep w1
w1_therm                3325  0 
w1_gpio                 4068  0 
wire                   31280  2 w1_gpio,w1_therm
mati75@malina ~ % uname -a
Linux malina 3.18.0+ #726 PREEMPT Mon Dec 8 16:01:09 GMT 2014 armv6l GNU/Linux

and after update this like this:

w1_therm                3325  0 
w1_gpio                 4068  0 
wire                   31280  2 w1_gpio,w1_therm
mati75@malina ~ % uname -a
Linux malina 3.18.1+ #731 PREEMPT Fri Dec 19 19:16:36 GMT 2014 armv6l GNU/Linux

but the w1 devices is no longer exists. After the downgrade to stable branch is correct.

@mati75 mati75 changed the title Module w1-term no longer exist Module w1_therm no longer exist Jan 5, 2015
@pelwell
Copy link
Contributor

pelwell commented Jan 5, 2015

Can you please give proper before and after examples showing how it used to be and how it is now? I can't understand what has changed.

@mati75
Copy link
Author

mati75 commented Jan 7, 2015

For example on 3.12.35+ I see:

mati75@malina /sys/bus/w1/devices % ls -la
total 0
drwxr-xr-x 2 root root 0 Jan  5 22:59 ./
drwxr-xr-x 4 root root 0 Jan  5 22:41 ../
lrwxrwxrwx 1 root root 0 Jan  5 22:59 28-00000463d0ed -> ../../../devices/w1_bus_master1/28-00000463d0ed/
lrwxrwxrwx 1 root root 0 Jan  7 18:30 w1_bus_master1 -> ../../../devices/w1_bus_master1/

On 3.18.1+ is nothing here, nothing hardware was changes. On 3.18.0+ is the same like 3.12.35+. I think is problem with upstream kernel, on the version compiled by myself is exactly the same problem.

@mati75
Copy link
Author

mati75 commented Jan 14, 2015

On 3.18.2+ is the same problem.

@pelwell
Copy link
Contributor

pelwell commented Jan 15, 2015

This is probably because the newer kernels are using device tree by default. In this mode, the board support code doesn't create the platform devices for the optional interfaces to avoid fighting over GPIO pins. You can revert to the old non-DT behaviour by adding "device_tree=" to your config.txt file, but you should really switch over to using device tree (if you haven't already) as future modules and devices may rely on it.

The correct solution is to add an overlay that enables w1-gpio support. I think I have this working, but:

  1. the general solution requires updated firmware that, although imminent, isn't released yet, and
  2. I haven't tested it with real onewire devices (although it ought to be OK because I haven't changed the driver at all).

If you tell me which pins you are using (the "gpiopin" and "pullup" module parameters) then I can give you a custom overlay .dtb file to test.

There is a Pi Forum thread discussing the device tree support here, and documentation here.

@pelwell
Copy link
Contributor

pelwell commented Jan 20, 2015

The latest firmware release on the "next" branch includes the w1-gpio overlays and the loader that supports them.

To use the overlay, add:

dtoverlay=w1-gpio,gpiopin=4

to config.txt (where 4 should be replaced with your chosen pin). If you are using the external pull-up feature you will need to use the other overlay:

dtoverlay=w1-gpio-pullup,gpiopin=4,pullup=5

again using numbers appropriate for your setup.

If you experience problems with device tree and overlays, add:

dtdebug=1

to your config.txt, then use sudo vcdbg log msg to read the debug messages.

@mati75
Copy link
Author

mati75 commented Jan 28, 2015

Add to /boot/config.txt line:

device_tree_overlay=overlays/w1-gpio-pullup-overlay.dtb

solved this issue.

@mati75 mati75 closed this as completed Jan 28, 2015
@pelwell
Copy link
Contributor

pelwell commented Jan 28, 2015

dtoverlay=w1-gpio-pullup

is the concise version of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants