Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1096457ybl; Thu, 12 Dec 2019 09:33:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwNz87q5xfHVWR85x+GkQa4Ek3FG9A2qjnQYhX27/CQSBeRh4EvE6EzjX0RA6sxsa0LVtYH X-Received: by 2002:aca:2b1a:: with SMTP id i26mr5555520oik.64.1576172028074; Thu, 12 Dec 2019 09:33:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576172028; cv=none; d=google.com; s=arc-20160816; b=hOKbX+lxwns8G4RiEK7pVBLC2DH8TFDaG+/IWYQa7+UUNYcJR2ZQbaLlSH4bkTYa3G Wi8nsBx8GeysDILiVDsJdBr+Ik22d9mSvQnvI/lb7qoQCQ/tgUbdz7f1qPpVhFOXFz9c HVT0yk7Bi5iDnQFcJEHBj9nNQy8CG9arWS7uBcjry19MNsjU2xBFLAqI1WAz9OwKkO4N mQenhgSQ2XaO2+KgCpFaX//NeChz5CQqjjOH4OUFJZD94ltAJD4NKdl7093k1076i9NG vFx7UgU/QrweuF6dD4FtzSF2UUyQUX4rrQfHqdBpoPVk1LTezaaHOB5++RtGWxzxwfSn pZ9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=KMrqb5zMpRkud88p/sFkbNCA317N13AlvnLJZru8lJU=; b=ZA2L/I4UGyAQfvOYrcdJWP3JXrfl8ZkNhUBOtF8XiYbpB3U2GJM/kftKpTN646SrG1 Cmmf/phRA5aUGzqvIzHL4hnkGvZ74bNBuGl7IDTuvJ5E0E2mojFg7m3LNqWWw76Z5TpO zA++q71GROEGGuYktVJKw/A+7mOnWYSUGh4UxAioWQ6v/wdnJdX6jS4/prY6ttrn0Tjs 5o8kvqXXRuwgMjlVCcpgYyvvw79kYiZMKKxw9HONU6BTGuFmgWOV+Xm1YFXhBTZuQMJd xFQ7uuy4LHZ94tNoJVWShFvEU7UzC9RDdRKTi1QnXySh7jLqsL7Z3ARvqhrTMwl0WDNG +TGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f3WTTM5e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a12si3630070oie.87.2019.12.12.09.33.33; Thu, 12 Dec 2019 09:33:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f3WTTM5e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730114AbfLLRcz (ORCPT + 99 others); Thu, 12 Dec 2019 12:32:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:37502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730023AbfLLRcy (ORCPT ); Thu, 12 Dec 2019 12:32:54 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C21FA21655; Thu, 12 Dec 2019 17:32:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576171974; bh=d8T+W80ohSAutSwyvwOIJCoFk70VslbyWmhLhSjuY/o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=f3WTTM5ez2jJGTd/r4ZgkBqS0RQv+WurCDZfPVTAe9IMbQVFSXPGEZ/4/oPfA+PLc 1HpYJVtHaQxCrhoZlvds+/CWRZStluyP0fTC8gN5/TQhnuz7SLcb54YCtcBgRW/ZqR k95AzqrkG069hz1bwHqMckyPeMKhD7tdGsmsMR6M= Date: Thu, 12 Dec 2019 18:32:51 +0100 From: Greg KH To: Vitor Soares Cc: "linux-kernel@vger.kernel.org" , "linux-i3c@lists.infradead.org" , Joao Pinto , "bbrezillon@kernel.org" , "wsa@the-dreams.de" , "arnd@arndb.de" , "broonie@kernel.org" Subject: Re: [RFC 5/5] i3c: add i3cdev module to expose i3c dev in /dev Message-ID: <20191212173251.GA1702856@kroah.com> References: <20191212144459.GB1668196@kroah.com> <20191212160045.GA1672362@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 12, 2019 at 05:25:28PM +0000, Vitor Soares wrote: > From: Greg KH > Date: Thu, Dec 12, 2019 at 16:00:45 > > > On Thu, Dec 12, 2019 at 02:56:56PM +0000, Vitor Soares wrote: > > > Hi Greg, > > > > > > From: Greg KH > > > Date: Thu, Dec 12, 2019 at 14:44:59 > > > > > > > On Tue, Dec 10, 2019 at 04:37:33PM +0100, Vitor Soares wrote: > > > > > +static int __init i3cdev_init(void) > > > > > +{ > > > > > + int res; > > > > > + > > > > > + pr_info("i3c /dev entries driver\n"); > > > > > > > > Please remove debugging information, kernel code should be quiet unless > > > > something goes wrong. > > > > > > I will remove it. > > > > > > > > > > > > + /* Dynamically request unused major number */ > > > > > + res = alloc_chrdev_region(&i3cdev_number, 0, N_I3C_MINORS, "i3c"); > > > > > > > > Do you really need a whole major, or will a few minors work? > > > > > > > > thanks, > > > > > > > > greg k-h > > > > > > I'm reserving one per device. What do you suggest? > > > > How many devices do you have in a system? > > According to MIPI I3C spec, the maximum number of devices on a bus will > depend on trace length, bus load, and clock requirements. > > Frankly, I don't know what is the best compromise because it depends from > system to system and the end-use of it. In my case, I started developing > this to help me during the HC controller driver development. > Even If I choose a fixed major, I wouldn't know in which one i3c fits. Ok, a full major will be fine, I was worried you only wanted 1 or 2 minor numbers, which would mean you could have used a misc device instead. This is fine. thanks, greg k-h