Skip to content
  • David Fries's avatar
    W1: feature, enable hardware strong pullup · 6a158c0d
    David Fries authored
    
    
    Add a strong pullup option to the w1 system.  This supplies extra power
    for parasite powered devices.  There is a w1_master_pullup sysfs entry and
    enable_pullup module parameter to enable or disable the strong pullup.
    
    The one wire bus requires at a minimum one wire and ground.  The common
    wire is used for sending and receiving data as well as supplying power to
    devices that are parasite powered of which temperature sensors can be one
    example.  The bus must be idle and left high while a temperature
    conversion is in progress, in addition the normal pullup resister on
    larger networks or even higher temperatures might not supply enough power.
     The pullup resister can't provide too much pullup current, because
    devices need to pull the bus down to write a value.  This enables the
    strong pullup for supported hardware, which can supply more current when
    requested.  Unsupported hardware will just delay with the bus high.
    
    The hardware USB 2490 one wire bus master has a bit on some commands which
    will enable the strong pullup as soon as the command finishes executing.
    To use strong pullup, call the new w1_next_pullup function to register the
    duration.  The next write command will call set_pullup before sending the
    data, and reset the duration to zero once it returns.
    
    Switched from simple_strtol to strict_strtol.
    
    Signed-off-by: default avatarDavid Fries <david@fries.net>
    Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    6a158c0d