https://github.com/FrankBuss/linux-1/tree/rpi-w1
At the moment it is fixed at GPIO 4, maybe the new Linux pinctrl concept will change this and then this patch is not needed anymore, but if you want to access some one-wire chips, you can use this patch until then.
You need to set the following Linux .config variables: W1_MASTER_GPIO W1 W1_SLAVE_THERM (just tested with "y", but "m" should work, too). See http://elinux.org/RPi_Kernel_Compilation for Linux kernel compile instruction. If you don't want to compile your own kernel, you can install my pre-compiled kernel and modules like this on the Debian image (login as root, or do a "sudo bash" if logged in as "pi") :
This is based on bootc's kernel version and contains also the SPI and I2C driver.cd /boot
wget http://www.frank-buss.de/raspberrypi/kernel-rpi-w1.tgz
tar -xzf kernel-rpi-w1.tgz
rm -f kernel-rpi-w1.tgz
cd /lib/modules
wget http://www.frank-buss.de/raspberrypi/modules-rpi-w1.tgz
tar -xzf modules-rpi-w1.tgz
rm -f modules-rpi-w1.tgz
sync
reboot
You can use it like this:
With the "ls" command you can see the detected devices, "22-0000001d84f2" in this case (I've tested it with a DS1822 temperature sensor). The output "t=25812" means that the measured temperature is 25.812 °C.root@raspberrypi:~# modprobe w1-gpio
root@raspberrypi:~# ls /sys/bus/w1/devices/w1_bus_master1/
22-0000001d84f2 w1_master_attempts w1_master_search
driver w1_master_max_slave_count w1_master_slave_count
power w1_master_name w1_master_slaves
subsystem w1_master_pointer w1_master_timeout
uevent w1_master_pullup
w1_master_add w1_master_remove
root@raspberrypi:~# cat /sys/bus/w1/devices/w1_bus_master1/22-0000001d84f2/w1_slave
9d 01 4b 46 7f ff 03 10 57 : crc=57 YES
9d 01 4b 46 7f ff 03 10 57 t=25812
There is a tutorial at this page with some Python example code: http://www.acmesystems.it/1wire