From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lb1-smtp-cloud2.xs4all.net (lb1-smtp-cloud2.xs4all.net. [194.109.24.21]) by gmr-mx.google.com with ESMTPS id bc3si271324wib.2.2015.04.18.01.27.28 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 18 Apr 2015 01:27:28 -0700 (PDT) Message-ID: <1429345645.16771.139.camel@x220> Subject: [rtc-linux] 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 Mime-Version: 1.0 Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , 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 -- -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.