Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3524771yba; Tue, 7 May 2019 02:41:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDk4dQaGfeQCXWgqIfzyLfChnVfHzvKgHgBUB2abG6huDBgbsJxEk3vDCFKzpRuTfxJpEQ X-Received: by 2002:a17:902:a988:: with SMTP id bh8mr38699348plb.243.1557222078420; Tue, 07 May 2019 02:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557222078; cv=none; d=google.com; s=arc-20160816; b=FkkwwxVpgLZucx9PIwwVbwiTk5txNK2NvdpE0pDxH+2+IEFbYTyTnCEUm9D+7MvWBq s1svjd68viN1ZsUyuvP1tKAoReYD/swC5KdVIL27tn13hG/myg580051OwnuTQSuwW/r N/TIA04k5cwcnZQTfcp2N8fxKnGNk/u4lQQ3O9EW+egEDjqlj8YjHyRj78J8gQf818Je GsW2VVfcnw8lP62DfJ4CpwcdmeEY4WWyI0z1G/z9Bg44b6jI3ma/99bsg4Rlk4dJgNs6 ++e7iU4KzuBz26d/4PpYYPbqJey5W8h86V+BfoiJSA4Rzf6bFGlISY46k2ZjOvxQcs3I am1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Np8E719MyYQIUvG/4kfMbcRdn2SCYELd1bvhelg+BBc=; b=kpqC+ZhC7whiQ5t8Rk3Cnq1CIG7kE3f566/ng/GOza2LTbz8tkHQvsR0kcTlEoRC9s QsgnXaOwkbptyMq3om+KYy2nsX8las3bjlfIDNXpSFmnmHvl9Z5529QKG01InD5ZqyTG bb08GYZXffNUiC2rSskF2XgLZN6Gc3WUoq8KWp185p2Acgg9eomR9x5w8cXvlRtERfXd n1Wi15Mdv0ZtAQXvafnnVFCp2Vm3AKjhMTtU/y6Hk12T54fGXqbO8oeUveOa/rV6tibo Ek5XNSG2F6QrAgXyjN4bqkcI8m1CZSYAQOXpl902y42kKo/2sJy/1Cq7MxERjVGsiOx3 6LQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qPEBnk56; 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 r77si18328679pgr.140.2019.05.07.02.41.03; Tue, 07 May 2019 02:41:18 -0700 (PDT) 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=qPEBnk56; 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 S1726889AbfEGJjp (ORCPT + 99 others); Tue, 7 May 2019 05:39:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:59076 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726399AbfEGJjp (ORCPT ); Tue, 7 May 2019 05:39:45 -0400 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 94DA820675; Tue, 7 May 2019 09:39:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557221984; bh=oXRKVHlZHDamJiPpfj36vVQjP9gWgXkIVXvvUy/gBho=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qPEBnk56bPCyo9NFwqkasLn5N18ZRBOfXBTZNk8ltq1OK5Wc3wNOJmcvU/wc2KnBP 8a8ouUroyRoxPFWe5QgaWTyQ1P/vt46oTvnNewYaCKmZYWr5lIDRSdXENo5iaMS1o8 WMQOmbEcR9CbwtLCmbgbkdwzCTMDtvUqL2Uvr750= Date: Tue, 7 May 2019 11:39:41 +0200 From: Greg KH To: Dragan Cvetic Cc: "arnd@arndb.de" , Michal Simek , "linux-arm-kernel@lists.infradead.org" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Derek Kiernan Subject: Re: [PATCH V3 02/12] misc: xilinx-sdfec: add core driver Message-ID: <20190507093941.GC20355@kroah.com> References: <1556402706-176271-1-git-send-email-dragan.cvetic@xilinx.com> <1556402706-176271-3-git-send-email-dragan.cvetic@xilinx.com> <20190502172007.GA1874@kroah.com> <20190504075502.GA11133@kroah.com> <20190506123425.GA26360@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 07, 2019 at 08:48:41AM +0000, Dragan Cvetic wrote: > > > > -----Original Message----- > > From: Greg KH [mailto:gregkh@linuxfoundation.org] > > Sent: Monday 6 May 2019 13:34 > > To: Dragan Cvetic > > Cc: arnd@arndb.de; Michal Simek ; linux-arm-kernel@lists.infradead.org; robh+dt@kernel.org; > > mark.rutland@arm.com; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Derek Kiernan > > Subject: Re: [PATCH V3 02/12] misc: xilinx-sdfec: add core driver > > > > On Mon, May 06, 2019 at 12:23:56PM +0000, Dragan Cvetic wrote: > > > > > > > > > > -----Original Message----- > > > > From: Greg KH [mailto:gregkh@linuxfoundation.org] > > > > Sent: Saturday 4 May 2019 08:55 > > > > To: Dragan Cvetic > > > > Cc: arnd@arndb.de; Michal Simek ; linux-arm-kernel@lists.infradead.org; robh+dt@kernel.org; > > > > mark.rutland@arm.com; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Derek Kiernan > > > > Subject: Re: [PATCH V3 02/12] misc: xilinx-sdfec: add core driver > > > > > > > > On Fri, May 03, 2019 at 04:41:21PM +0000, Dragan Cvetic wrote: > > > > > Hi Greg, > > > > > > > > > > Please find my inline comments below, > > > > > > > > > > Regards > > > > > Dragan > > > > > > > > > > > -----Original Message----- > > > > > > From: Greg KH [mailto:gregkh@linuxfoundation.org] > > > > > > Sent: Thursday 2 May 2019 18:20 > > > > > > To: Dragan Cvetic > > > > > > Cc: arnd@arndb.de; Michal Simek ; linux-arm-kernel@lists.infradead.org; robh+dt@kernel.org; > > > > > > mark.rutland@arm.com; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Derek Kiernan > > > > > > Subject: Re: [PATCH V3 02/12] misc: xilinx-sdfec: add core driver > > > > > > > > > > > > On Sat, Apr 27, 2019 at 11:04:56PM +0100, Dragan Cvetic wrote: > > > > > > > +#define DRIVER_NAME "xilinx_sdfec" > > > > > > > +#define DRIVER_VERSION "0.3" > > > > > > > > > > > > Version means nothing with the driver in the kernel tree, please remove > > > > > > it. > > > > > > > > > > Will be removed. Thank you. > > > > > > > > > > > > > > > > > > +#define DRIVER_MAX_DEV BIT(MINORBITS) > > > > > > > > > > > > Why this number? Why limit yourself to any number? > > > > > > > > > > > > > > > > There can be max 8 devices for this driver. I'll change to 8. > > > > > > > > > > > > + > > > > > > > +static struct class *xsdfec_class; > > > > > > > > > > > > Do you really need your own class? > > > > > > > > > > When writing a character device driver, my goal is to create and register an instance > > > > > of that structure associated with a struct file_operations, exposing a set of operations > > > > > to the user-space. One of the steps to make this goal is Create a class for a devices, > > > > > visible in /sys/class/. > > > > > > > > Why do you need a class? Again, why not just use the misc_device api, > > > > that seems much more relevant here and will make the code a lot simpler. > > > > > > > > > > The driver can have 8 devices in SoC plus more in Programming Logic. > > > It looked logical to group them under the same MAJOR, although they > > > are independent of each other. Is this argument strong enough to use > > > class? > > > > Not really :) > > > > 8 devices is pretty small. What tool will be trying to talk to all of > > these devices and how was it going to find out what devices were in the > > system? > > > > These devices are Forward Error Correction encoder/decoder > and will be part of the RF communication chain. They will be included > in the system through DT. Also, described in DT. Userspace doesn't mess with DT. I am asking what userspace tool/program is going to be interacting with these devices through your now-custom api you are creating. Do you have a link to that software, and how is that code doing the "determine what device nodes are associated with what devices" logic? thanks, greg k-h