Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751930AbbDRI1e (ORCPT ); Sat, 18 Apr 2015 04:27:34 -0400 Received: from lb2-smtp-cloud2.xs4all.net ([194.109.24.25]:55752 "EHLO lb2-smtp-cloud2.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751171AbbDRI1a (ORCPT ); Sat, 18 Apr 2015 04:27:30 -0400 Message-ID: <1429345645.16771.139.camel@x220> Subject: Re: [PATCH V1 1/6] mfd: da9062: DA9062 MFD core driver From: Paul Bolle To: S Twiss Cc: LINUXKERNEL , Lee Jones , Samuel Ortiz , Alessandro Zummo , DEVICETREE , David Dajun Chen , Dmitry Torokhov , Ian Campbell , Kumar Gala , LINUXINPUT , LINUXWATCHDOG , Liam Girdwood , Mark Brown , Mark Rutland , Pawel Moll , RTCLINUX , Rob Herring , Support Opensource , Wim Van Sebroeck Date: Sat, 18 Apr 2015 10:27:25 +0200 In-Reply-To: References: 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1957 Lines: 74 On Fri, 2015-04-17 at 15:23 +0100, S Twiss wrote: > --- a/drivers/mfd/Kconfig > +++ b/drivers/mfd/Kconfig > +config MFD_DA9062 > + bool "Dialog Semiconductor DA9062 PMIC Support" > + select MFD_CORE > + select REGMAP_I2C > + select REGMAP_IRQ > + depends on I2C=y > + help > + Say yes here for support for the Dialog Semiconductor DA9062 PMIC. > + This includes the I2C driver and core APIs. > + Additional drivers must be enabled in order to use the functionality > + of the device. > --- a/drivers/mfd/Makefile > +++ b/drivers/mfd/Makefile > +obj-$(CONFIG_MFD_DA9062) += da9062-core.o MFD_DA9062 is a bool symbol. So da9062-core.o can never be part of a module, right? > --- /dev/null > +++ b/drivers/mfd/da9062-core.c > +#include So you might not need this include. > +MODULE_DEVICE_TABLE(of, da9062_dt_ids); This macro will be preprocessed away for built-in code, according to include/linux/module.h. > +MODULE_DEVICE_TABLE(i2c, da9062_i2c_id); Ditto. > +static struct i2c_driver da9062_i2c_driver = { > + .driver = { > + .name = "da9062", > + .of_match_table = of_match_ptr(da9062_dt_ids), > + }, > + .probe = da9062_i2c_probe, > + .remove = da9062_i2c_remove, > + .id_table = da9062_i2c_id, > +}; > + > +module_i2c_driver(da9062_i2c_driver); After looking at a few levels of #defines I think this is equivalent to i2c_register_driver(NULL, da9062_i2c_driver); for built-in code. Did I grep that right? > +MODULE_DESCRIPTION("CORE device driver for Dialog DA9062"); > +MODULE_AUTHOR("S Twiss "); > +MODULE_LICENSE("GPL v2"); These macros will be effectively preprocessed away for built-in only code. Thanks, Paul Bolle -- 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/