In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Linux How to find and load the corresponding USB device driver
1. overall process
Load USB Device Driver--> Register USB Device (Registered USB Device Structure contains Vendor ID and Product ID of USB Device)
After the USB device is inserted, match the vendor ID and product ID, that is, call the probe function in the USB registration structure to start communicating with the USB device.
2. USB device structure
static struct usb_driver test_usb_driver={
.OWNER = THIS_MODULE,
.name = "test USB device",
.id_table = test_usb_table_id,
.probe = test_usb_probe,
.disconnect = test_usb_disconnect
};
USB device table ID
static struct usb_device_id test_usb_table_id={
{USB_DEVICE(TEST_USB_VENDOR_ID,TEST_USB_PRODUCT_ID)};
{}
};
Extension:
usb device table ID corresponds to usb_device_id
i2c device table ID corresponds to i2c_device_id
The USB device table id is stored in the USB device. After inserting host (master device) as a device slave device, host is read from the USB device through port 0.
The i2c device is defined in the device tree. After the kernel is started, traverse the device tree and load the corresponding i2c device driver.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.