Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp806131ybk; Fri, 15 May 2020 14:10:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkWbjJx4yVSFPjmy0KvywuTM4jTNkHpg9AQTq7FGN4/1XQdBWiWeQB41OLjdWGN3fadXUb X-Received: by 2002:a17:906:6b05:: with SMTP id q5mr4562519ejr.329.1589577054747; Fri, 15 May 2020 14:10:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589577054; cv=none; d=google.com; s=arc-20160816; b=0vEqW0syfmCGDHYhNiucFTyYMLfVRs9vojobH7ZkWlsW1dqYNb7oHR37csiAXUUCqH ElWl5g4542Zfl0zHHGXiv0uHJDZaez63iqsoUGAlbvW6Hujp0CiOTyuP6LkiP4cK2mxL z6wDtt/ZZWvypmlU+oZfQbqC5p3GiH8BHwmBFyGllZZDeC1bF3iH0pl3bCrnfI3ed5bO Og/of5CaiJactJ+ICib96mgxLEA9pS/Ji0Onviojbus3a3SXRHoZGk0oDgOHwlFNeWOM uwYdvzNZdM6RhVt3vSEWtAw8y8gisB7sbHoCPYonDrVqYuIHm7qeSfEvdibPGhDIr93/ ogNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dmarc-filter :dkim-signature; bh=tMa0XjTHFu9sNkikzcNxomTk26A/Z3fbNKIPFzqYgHI=; b=Ul4Vde1G0iXipxGNmqxJqM4WUhS0I94OAck9QZ8MCLK9oCwPtwlalA1NuJvq7IoO1X ol2kTLQQKM/3A6sD8EegqlnFZcuKr5Jhp54VEYu90rqCI8UrClFSXrRWN643nUn9IqRI A3l83bBs58TJOCLXdXET2KKeuUmyY8KrwwTxSkn9JwRFsO3gqRi74dNQCQDz7XVQ2EzX Age4usxbovU6sLSJWlf5iFD0ynE+ixWcM1c1tF/YyR2xcxyT+g9Wr6xS6VEvxKzdBGqW OXz/gFz/MMK5N2TNRRlUVnpB96VRH4o31M2kScznZvDZb54cn2aXQWUvZFXoC8zjvIW2 xQ9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b="Z/39Jpll"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j22si1872729edt.526.2020.05.15.14.10.32; Fri, 15 May 2020 14:10:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b="Z/39Jpll"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726553AbgEOVJL (ORCPT + 99 others); Fri, 15 May 2020 17:09:11 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:39349 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726238AbgEOVJK (ORCPT ); Fri, 15 May 2020 17:09:10 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1589576949; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: References: Cc: To: From: Subject: Sender; bh=tMa0XjTHFu9sNkikzcNxomTk26A/Z3fbNKIPFzqYgHI=; b=Z/39Jpll4mjCqh5OZqUX0Uak4PgDbdyrCFDxkziwR4VwOZV1MVACdBt8jzpMdID2RqF9prQg LPqSATHN3kptSrttoOTU1IMCaDcDTex3JWTPFBEq2bsH+Cuq5ObDHAyMlPkluW3kQ9bk/p7x K0y8gKo+cljKStnuk6QV/PWbF5c= X-Mailgun-Sending-Ip: 104.130.122.27 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5ebf04ee.7f628e639538-smtp-out-n02; Fri, 15 May 2020 21:09:02 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id E2E1FC43636; Fri, 15 May 2020 21:09:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from [10.226.58.28] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jhugo) by smtp.codeaurora.org (Postfix) with ESMTPSA id B082CC433F2; Fri, 15 May 2020 21:09:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B082CC433F2 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=jhugo@codeaurora.org Subject: Re: [RFC PATCH 3/8] qaic: Create char dev From: Jeffrey Hugo To: Greg KH Cc: arnd@arndb.de, manivannan.sadhasivam@linaro.org, bjorn.andersson@linaro.org, wufan@codeaurora.org, pratanan@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <1589465266-20056-1-git-send-email-jhugo@codeaurora.org> <1589465266-20056-4-git-send-email-jhugo@codeaurora.org> <20200514141211.GA2643665@kroah.com> <0421a64a-10f3-08df-9ef1-14fdb570db0d@codeaurora.org> <20200514155615.GA2963499@kroah.com> <4be546d3-b571-0659-0140-f34ec88f95ff@codeaurora.org> Message-ID: <4683046a-c6b5-30a5-ef02-2f610523ae1c@codeaurora.org> Date: Fri, 15 May 2020 15:08:59 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <4be546d3-b571-0659-0140-f34ec88f95ff@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.