From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755025AbbCEKXy (ORCPT ); Thu, 5 Mar 2015 05:23:54 -0500 Received: from cpsmtpb-ews03.kpnxchange.com ([213.75.39.6]:56154 "EHLO cpsmtpb-ews03.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754999AbbCEKXr (ORCPT ); Thu, 5 Mar 2015 05:23:47 -0500 Message-ID: <1425551024.24292.218.camel@x220> Subject: Re: [PATCH v1 1/6] eeprom: Add a simple EEPROM framework for eeprom providers From: Paul Bolle To: Srinivas Kandagatla Cc: linux-arm-kernel@lists.infradead.org, Maxime Ripard , Rob Herring , Pawel Moll , Kumar Gala , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Stephen Boyd , andrew@lunn.ch, Arnd Bergmann , broonie@kernel.org, Greg Kroah-Hartman Date: Thu, 05 Mar 2015 11:23:44 +0100 In-Reply-To: <1425548741-12930-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1425548685-12887-1-git-send-email-srinivas.kandagatla@linaro.org> <1425548741-12930-1-git-send-email-srinivas.kandagatla@linaro.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 05 Mar 2015 10:23:44.0651 (UTC) FILETIME=[75944DB0:01D0572E] X-RcptDomain: vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-03-05 at 09:45 +0000, Srinivas Kandagatla wrote: > --- /dev/null > +++ b/drivers/eeprom/Kconfig > @@ -0,0 +1,20 @@ > +menuconfig EEPROM > + bool "EEPROM Support" EEPROM is a bool symbol. > + depends on OF > + select REGMAP > + help > + Support for EEPROM alike devices. > + > + This framework is designed to provide a generic interface to EEPROM > + from both the Linux Kernel and the userspace. > + > + If unsure, say no. > + > +if EEPROM > + > +config EEPROM_DEBUG > + bool "EEPROM debug support" > + help > + Say yes here to enable debugging support. > + > +endif > diff --git a/drivers/eeprom/Makefile b/drivers/eeprom/Makefile > new file mode 100644 > index 0000000..e130079 > --- /dev/null > +++ b/drivers/eeprom/Makefile > @@ -0,0 +1,9 @@ > +# > +# Makefile for eeprom drivers. > +# > + > +ccflags-$(CONFIG_EEPROM_DEBUG) += -DDEBUG > + > +obj-$(CONFIG_EEPROM) += core.o So core.o will be built-in (or not built at all, of course). > +# Devices > diff --git a/drivers/eeprom/core.c b/drivers/eeprom/core.c > new file mode 100644 > index 0000000..243e466 > --- /dev/null > +++ b/drivers/eeprom/core.c > @@ -0,0 +1,208 @@ > +/* > + * EEPROM framework core. > + * > + * Copyright (C) 2015 Srinivas Kandagatla > + * Copyright (C) 2013 Maxime Ripard > + * > + * This file is licensed under the terms of the GNU General Public > + * License version 2. This program is licensed "as is" without any > + * warranty of any kind, whether express or implied. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include So I guess this header is not needed. > +#include > +#include > +#include > +module_exit(eeprom_exit); And this will never be called. > +MODULE_AUTHOR("Srinivas Kandagatla +MODULE_AUTHOR("Maxime Ripard +MODULE_DESCRIPTION("EEPROM Driver Core"); > +MODULE_LICENSE("GPL"); And those four macros will basically be preprocessed away. But if you actually want this code to be built modular too, and change EEPROM to tristate, you probably want to use MODULE_LICENSE("GPL v2"); here. Paul Bolle