• D
    HID: wiimote: add device detection · c57ff761
    David Herrmann 提交于
    Nintendo produced many different devices that are internally based on the
    Wii Remote protocol but provide different peripherals. To support these
    devices, we need to schedule a device detection during initialization.
    
    Device detection includes requesting a status report, reading extension
    information and then evaluating which device we may be dealing with.
    
    We currently detect gen1 and gen2 Wii Remote devices. All other devices
    are marked as generic devices. More detections will be added later.
    
    In followup patches we will be using these device IDs to control which
    peripherals to initialize. For instance if a device is known to have no IR
    camera, there is no need to provide the IR input device nor trying to
    access IR registers. In fact, there are 3rd party devices that break if we
    try things like this (hurray!).
    
    The init_worker will be scheduled whenever we get hotplug events. This
    isn't implemented, yet and will be added later. However, we need to make
    sure that this worker can be called multiple times.
    Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
    Signed-off-by: NJiri Kosina <jkosina@suse.cz>
    c57ff761
hid-wiimote-core.c 37.8 KB