diff options
author | Daniel Mack <daniel@caiaq.de> | 2009-06-18 01:28:15 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-18 22:03:58 +0200 |
commit | c8a06c1ef0bc45915fc45a170c7c60426971304c (patch) | |
tree | 9e8f5d3890766bca481c15aac69ef96f52612874 /include | |
parent | dma-mapping: ia64: add CONFIG_DMA_API_DEBUG support (diff) | |
download | linux-c8a06c1ef0bc45915fc45a170c7c60426971304c.tar.xz linux-c8a06c1ef0bc45915fc45a170c7c60426971304c.zip |
w1-gpio: add external pull-up enable callback
On embedded devices, sleep mode conditions can be tricky to handle,
Especially when processors tend to pull-down the w1 bus during sleep. Bus
slaves (such as the ds2760) may interpret this as a reason for power-down
conditions and entirely switch off the device.
This patch adds a callback function pointer to let users switch on and off
the external pull-up resistor. This lets the outside world know whether
the processor is currently actively driving the bus or not.
When this callback is not provided, the code behaviour won't change.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Ville Syrjala <syrjala@sci.fi>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/w1-gpio.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/w1-gpio.h b/include/linux/w1-gpio.h index 9797fec7748a..3adeff82212f 100644 --- a/include/linux/w1-gpio.h +++ b/include/linux/w1-gpio.h @@ -18,6 +18,7 @@ struct w1_gpio_platform_data { unsigned int pin; unsigned int is_open_drain:1; + void (*enable_external_pullup)(int enable); }; #endif /* _LINUX_W1_GPIO_H */ |