Skip to content
  • Magnus Damm's avatar
    Driver core: Add BUS_NOTIFY_BIND_DRIVER · 45daef0f
    Magnus Damm authored
    
    
    Add BUS_NOTIFY_BIND_DRIVER as a bus notifier event.
    
    For driver binding/unbinding we with this in
    place have the following bus notifier events:
     - BUS_NOTIFY_BIND_DRIVER - before ->probe()
     - BUS_NOTIFY_BOUND_DRIVER - after ->probe()
     - BUS_NOTIFY_UNBIND_DRIVER - before ->remove()
     - BUS_NOTIFY_UNBOUND_DRIVER - after ->remove()
    
    The event BUS_NOTIFY_BIND_DRIVER allows bus code
    to be notified that ->probe() is about to be called.
    
    Useful for bus code that needs to setup hardware before
    the driver gets to run. With this in place platform
    drivers can be loaded and unloaded as modules and the
    new BIND event allows bus code to control for instance
    device clocks that must be enabled before the driver
    can be executed.
    
    Without this patch there is no way for the bus code to
    get notified that a modular driver is about to be probed.
    
    Signed-off-by: default avatarMagnus Damm <damm@opensource.se>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    45daef0f