diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/w1/w1.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index c3749782385..9761950697b 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c @@ -892,6 +892,16 @@ void w1_search(struct w1_master *dev, u8 search_type, w1_slave_found_callback cb break; } + /* Do fast search on single slave bus */ + if (dev->max_slave_count == 1) { + w1_write_8(dev, W1_READ_ROM); + + if (w1_read_block(dev, (u8 *)&rn, 8) == 8 && rn) + cb(dev, rn); + + break; + } + /* Start the search */ w1_write_8(dev, search_type); for (i = 0; i < 64; ++i) { |