lkml.org 
[lkml]   [2015]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V1 1/6] mfd: da9062: DA9062 MFD core driver
From
Date
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 <linux/module.h>

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 <stwiss.opensource@diasemi.com>");
> +MODULE_LICENSE("GPL v2");

These macros will be effectively preprocessed away for built-in only
code.

Thanks,


Paul Bolle



\
 
 \ /
  Last update: 2015-04-18 10:41    [W:0.195 / U:4.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site