• Yu Chen's avatar
    usb: gadget: Add configfs attribuite for controling match_existing_only · 48cf0b5a
    Yu Chen authored and Ionela Voinescu's avatar Ionela Voinescu committed
    
    
    Currently the "match_existing_only" of usb_gadget_driver in configfs is
    set to one which is not flexible.
    Dwc3 udc will be removed when usb core switch to host mode. This causes
    failure of writing name of dwc3 udc to configfs's UDC attribuite.
    To fix this we need to add a way to change the config of
    "match_existing_only".
    There are systems like Android do not support udev, so adding
    "match_existing_only" attribute to allow configuration by user is cost little.
    This patch adds a configfs attribuite for controling match_existing_only
    which allow user to config "match_existing_only".
    
    Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
    Cc: Felipe Balbi <balbi@kernel.org>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: John Stultz <john.stultz@linaro.org>
    Cc: Binghui Wang <wangbinghui@hisilicon.com>
    Signed-off-by: default avatarYu Chen <chenyu56@huawei.com>
    Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
    Change-Id: I49862a4de4e56b235278cddf7a5ec6e30c5f2ec4
    48cf0b5a
configfs.c 42.1 KB