w1-gpio 698 B

12345678910111213141516171819202122232425262728293031323334
  1. Kernel driver w1-gpio
  2. =====================
  3. Author: Ville Syrjala <syrjala@sci.fi>
  4. Description
  5. -----------
  6. GPIO 1-wire bus master driver. The driver uses the GPIO API to control the
  7. wire and the GPIO pin can be specified using platform data.
  8. Example (mach-at91)
  9. -------------------
  10. #include <linux/w1-gpio.h>
  11. static struct w1_gpio_platform_data foo_w1_gpio_pdata = {
  12. .pin = AT91_PIN_PB20,
  13. .is_open_drain = 1,
  14. };
  15. static struct platform_device foo_w1_device = {
  16. .name = "w1-gpio",
  17. .id = -1,
  18. .dev.platform_data = &foo_w1_gpio_pdata,
  19. };
  20. ...
  21. at91_set_GPIO_periph(foo_w1_gpio_pdata.pin, 1);
  22. at91_set_multi_drive(foo_w1_gpio_pdata.pin, 1);
  23. platform_device_register(&foo_w1_device);