diff options
author | Evgeny Boger <boger@contactless.ru> | 2014-01-23 18:56:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 19:37:04 -0500 |
commit | 3089a4c8d3abc7e2ab105d1d39d415110d1566d6 (patch) | |
tree | 5064f69853949cb8b5d245c932f65a3202d21219 /drivers/w1/w1_int.c | |
parent | 63509beaf7ed7a9dc8c574be61189fce791489f0 (diff) |
drivers/w1/masters/w1-gpio.c: add strong pullup emulation
Strong pullup is emulated by driving pin logic high after write command
when using tri-state push-pull GPIO.
Signed-off-by: Evgeny Boger <boger@contactless.ru>
Cc: Greg KH <greg@kroah.com>
Acked-by: David Fries <david@fries.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/w1/w1_int.c')
-rw-r--r-- | drivers/w1/w1_int.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c index 5a98649f6abc..590bd8a7cd1b 100644 --- a/drivers/w1/w1_int.c +++ b/drivers/w1/w1_int.c | |||
@@ -117,18 +117,6 @@ int w1_add_master_device(struct w1_bus_master *master) | |||
117 | printk(KERN_ERR "w1_add_master_device: invalid function set\n"); | 117 | printk(KERN_ERR "w1_add_master_device: invalid function set\n"); |
118 | return(-EINVAL); | 118 | return(-EINVAL); |
119 | } | 119 | } |
120 | /* While it would be electrically possible to make a device that | ||
121 | * generated a strong pullup in bit bang mode, only hardware that | ||
122 | * controls 1-wire time frames are even expected to support a strong | ||
123 | * pullup. w1_io.c would need to support calling set_pullup before | ||
124 | * the last write_bit operation of a w1_write_8 which it currently | ||
125 | * doesn't. | ||
126 | */ | ||
127 | if (!master->write_byte && !master->touch_bit && master->set_pullup) { | ||
128 | printk(KERN_ERR "w1_add_master_device: set_pullup requires " | ||
129 | "write_byte or touch_bit, disabling\n"); | ||
130 | master->set_pullup = NULL; | ||
131 | } | ||
132 | 120 | ||
133 | /* Lock until the device is added (or not) to w1_masters. */ | 121 | /* Lock until the device is added (or not) to w1_masters. */ |
134 | mutex_lock(&w1_mlock); | 122 | mutex_lock(&w1_mlock); |