Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755571Ab3IYP6m (ORCPT ); Wed, 25 Sep 2013 11:58:42 -0400 Received: from exprod5og118.obsmtp.com ([64.18.0.160]:38107 "HELO exprod5og118.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753505Ab3IYP6l (ORCPT ); Wed, 25 Sep 2013 11:58:41 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 25 Sep 2013 08:58:40 -0700 Message-ID: Subject: Re: General placement of platform drivers and header files From: Feng Kan To: Olof Johansson Cc: Catalin Marinas , Arnd Bergmann , Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1710 Lines: 45 On Tue, Sep 24, 2013 at 9:37 PM, Olof Johansson wrote: > Hi, > > On Tue, Sep 24, 2013 at 8:33 PM, Feng Kan wrote: >> Hi all: >> >> I have some drivers like Queue Manager and co-processor driver that >> are used by other >> drivers like Ethernet. Would it be appropriate to locate these drivers >> under one folder under >> drivers/misc/arch_name/xxx. > > drivers/misc is almost always the wrong answer to where to add a driver. > > It would help to also know how the devices interact to answer the > question of best location. Are the drivers for the coprocessor and for > the queue manager mostly a pass-through for some operations (and some > shared allocation of resources), i.e. more of a library, or is it a > full-fledged driver that will service interrupts, etc? Lets take QM for an example, the driver is used to allocate queues for the Ethernet driver and there are ISRs for QM to take care of errors and change in status. > >> My other question is on common header files (belonging to Queue >> Manager) but is sourced >> by Ethernet, where should those reside. Should they go under >> linux/include/misc/arch_name >> or directly sourced using the ../../../misc/arch_name/headerfile method. > > This depends somewhat on where the driver ends up, but somewhere under > include/linux is likely the right place for the in-kernel interface > header files. Given the above, how should the header file be handled? > > > -Olof -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/