[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4683046a-c6b5-30a5-ef02-2f610523ae1c@codeaurora.org>
Date: Fri, 15 May 2020 15:08:59 -0600
From: Jeffrey Hugo <jhugo@...eaurora.org>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: arnd@...db.de, manivannan.sadhasivam@...aro.org,
bjorn.andersson@...aro.org, wufan@...eaurora.org,
pratanan@...eaurora.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 3/8] qaic: Create char dev
On 5/14/2020 10:24 AM, Jeffrey Hugo wrote:
> On 5/14/2020 9:56 AM, Greg KH wrote:
>> Please use misc.
>
> Ok, will investigate.
>
Misc looks like it'll work, and I'm expecting to have that in the next
revision. However, a few of us looked at misc vs chardev, and didn't
see much of a difference.
We were hoping you'd be kind enough to educate us on the considerations
between the two, in-case we missed something that ends up being very
relevant. We attempted to find relevant documentation within the
kernel, and in Linux Device Drivers 3rd edition, but did not find any
besides just reading the misc dev code. If we missed something, please
point us to it.
By going with a misc device, we see two possible limitations -
1. You don't have your own major number, so userspace may have to do a
bit more work to identify your device. However, given that the driver
assigns the device name, one would think that the device name would be
pretty unique. So, it seems like this would have a minor impact to udev
rules.
2. There are a limited number of dynamic minor numbers for misc devs
(64), so if you are expecting more devices than that, a misc dev is not
appropiate. Also, these minors are shared with other misc dev users, so
depending on the system configuration, you might have significantly less
than 64 minors available for use.
--
Jeffrey Hugo
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
Powered by blists - more mailing lists