From: Paul Bolle <pebolle@tiscali.nl>
To: Yi Zhang <yizhang@marvell.com>
Cc: sameo@linux.intel.com, lee.jones@linaro.org,
zhouqiao@marvell.com, zhenzh@marvell.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mfd: 88pm88x: initial 88pm886/88pm880 base support
Date: Tue, 09 Jun 2015 14:14:11 +0200 [thread overview]
Message-ID: <1433852051.16887.94.camel@x220> (raw)
In-Reply-To: <1433768106-8212-2-git-send-email-yizhang@marvell.com>
On Mon, 2015-06-08 at 20:55 +0800, Yi Zhang wrote:
> --- /dev/null
> +++ b/drivers/mfd/88pm880-table.c
> +#include <linux/module.h>
I'm _guessing_ this could as well be <linux/export.h>.
> +EXPORT_SYMBOL_GPL(pm880_base_i2c_regmap);
> +EXPORT_SYMBOL_GPL(pm880_power_i2c_regmap);
> +EXPORT_SYMBOL_GPL(pm880_gpadc_i2c_regmap);
> +EXPORT_SYMBOL_GPL(pm880_battery_i2c_regmap);
> +EXPORT_SYMBOL_GPL(pm880_test_i2c_regmap);
> +EXPORT_SYMBOL_GPL(pm880_cell_devs);
> +EXPORT_SYMBOL_GPL(pm880_cell_info);
> +EXPORT_SYMBOL_GPL(pm880_apply_patch);
> --- /dev/null
> +++ b/drivers/mfd/88pm886-table.c
> +#include <linux/module.h>
See above.
> +EXPORT_SYMBOL_GPL(pm886_base_i2c_regmap);
> +EXPORT_SYMBOL_GPL(pm886_power_i2c_regmap);
> +EXPORT_SYMBOL_GPL(pm886_gpadc_i2c_regmap);
> +EXPORT_SYMBOL_GPL(pm886_battery_i2c_regmap);
> +EXPORT_SYMBOL_GPL(pm886_test_i2c_regmap);
> +EXPORT_SYMBOL_GPL(pm886_cell_devs);
> +EXPORT_SYMBOL_GPL(pm886_cell_info);
> +EXPORT_SYMBOL_GPL(pm886_apply_patch);
All of the exports until now are all made public via
drivers/mfd/88pm88x.h. So they're not available for code outside of the
files this patch adds. I think the EXPORT_SYMBOL_GPL() lines are not
needed. Is that right?
> --- /dev/null
> +++ b/drivers/mfd/88pm88x-core.c
> +#include <linux/module.h>
See above.
> +EXPORT_SYMBOL_GPL(pm88x_of_match);
This export is made available through include/linux/mfd/88pm88x.h. Do
you expect pm88x_of_match to be used by some other module?
> --- /dev/null
> +++ b/drivers/mfd/88pm88x-i2c.c
> +#include <linux/module.h>
> +MODULE_DEVICE_TABLE(i2c, pm88x_i2c_id);
> +static int pm88x_i2c_init(void)
No __init here?
> +{
> + int ret;
> +
> + ret = i2c_add_driver(&pm88x_i2c_driver);
> + if (ret != 0) {
> + pr_err("88pm88x I2C registration failed %d\n", ret);
> + return ret;
> + }
> +
> + return 0;
> +}
> +subsys_initcall(pm88x_i2c_init);
> +
> +static void pm88x_i2c_exit(void)
No __exit here?
> +{
> + i2c_del_driver(&pm88x_i2c_driver);
> +}
> +module_exit(pm88x_i2c_exit);
But if this code stays built-in only than pm88x_i2c_exit() would never
be called. (I think it will be thrown away during the build, actually.)
So then the entire function should be dropped.
> +MODULE_DESCRIPTION("88pm88x I2C bus interface");
> +MODULE_AUTHOR("Yi Zhang<yizhang@marvell.com>");
> +MODULE_LICENSE("GPL v2");
> --- /dev/null
> +++ b/drivers/mfd/88pm88x-irq.c
> +#include <linux/module.h>
Needed?
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> +config MFD_88PM88X
> + bool "Marvell 88PM886/880 PMIC"
> + depends on I2C=y
> + select REGMAP_I2C
> + select MFD_CORE
> + help
> + This supports for Marvell 88PM88X Series Power Management IC:
> + 88pm886 and 88pm880;
> + This includes the I2C driver, the interrupt resource distribution
> + and the core APIs, for individual sub-device as voltage regulators,
> + RTC, charger, fuelgauge, etc please select under the corresponding menus.
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> +88pm88x-objs := 88pm88x-core.o 88pm88x-i2c.o 88pm88x-irq.o 88pm886-table.o 88pm880-table.o
> +obj-$(CONFIG_MFD_88PM88X) += 88pm88x.o
MFD_88PM88X is bool, but the patch adds module specific code too (ie,
code that serves no purpose when built-in). Did you perhaps intend for
MFD_88PM88X to be tristate?
Thanks,
Paul Bolle
next prev parent reply other threads:[~2015-06-09 12:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 12:55 [PATCH 1/2] mfd: add Marvell 88pm88x description Yi Zhang
2015-06-08 12:55 ` [PATCH 2/2] mfd: 88pm88x: initial 88pm886/88pm880 base support Yi Zhang
2015-06-09 12:14 ` Paul Bolle [this message]
2015-06-11 10:05 ` Yi Zhang
2015-06-11 13:52 ` Paul Bolle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1433852051.16887.94.camel@x220 \
--to=pebolle@tiscali.nl \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=yizhang@marvell.com \
--cc=zhenzh@marvell.com \
--cc=zhouqiao@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox