Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8437127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:21:00+00:00 2026-06-10T07:21:00+00:00

I have a driver that supports multiple devices that aren’t identical but are similar.

  • 0

I have a driver that supports multiple devices that aren’t identical but are similar. I’m doing this so that the same library APIs can be used when writing apps for the devices.

Is there a way to specify which particular device to use in an app?

Is it possible to make an ioctl call before an open call in order to set which particular device gets used the next time open is called?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:21:02+00:00Added an answer on June 10, 2026 at 7:21 am

    The common way to deal with this issue is to have a separate device node in /dev/ for each device and have your driver provide an ioctl() that would return identification information for the corresponding device such as vendor, model and serial number. That would allow a userspace application to tell different devices apart. Depending on your exact needs, a few accompanying entries in sysfs (/sys) might also make sense.

    You might want to have a look at some common existing APIs for ideas. For example, the V4L2 API contains the VIDIOC_QUERYCAP ioctl() that provides enough information for an application to be able to tell discrete devices apart.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have to make a device driver that returns a random number between 1
I have a printer that doesn't have the driver for my windows server 2008,
I have written a driver, that extracts a value from IRP buffer. Now based
I have noticed that when I call lseek64 on my block device driver file
I have a selenium test that looks like require 'spec_helper' driver = Selenium::WebDriver.for :firefox
I am looking for a mySQL driver for nodejs that supports stored procedures. http://nodejsdb.org/db-mysql/
The background to this query was this question . I have installed this driver
I am looking for a DBI (or similar) proxy that supports both SQL restrictions
We have a Windows application that can use multiple PCI adapters. These adapters all
I have an application that will support multiple sites. The site will be determined

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.