Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752945AbbFKKGc (ORCPT ); Thu, 11 Jun 2015 06:06:32 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:56075 "EHLO mx0a-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750921AbbFKKGZ (ORCPT ); Thu, 11 Jun 2015 06:06:25 -0400 Date: Thu, 11 Jun 2015 18:05:17 +0800 From: Yi Zhang To: Paul Bolle CC: , , , , Subject: Re: [PATCH 2/2] mfd: 88pm88x: initial 88pm886/88pm880 base support Message-ID: <20150611100517.GA20596@yizhang> References: <1433768106-8212-1-git-send-email-yizhang@marvell.com> <1433768106-8212-2-git-send-email-yizhang@marvell.com> <1433852051.16887.94.camel@x220> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1433852051.16887.94.camel@x220> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-06-11_06:2015-06-10,2015-06-11,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1506110125 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4465 Lines: 175 On Tue, Jun 09, 2015 at 02:14:11PM +0200, Paul Bolle wrote: Hi, Paul: Thanks very much for your review; > On Mon, 2015-06-08 at 20:55 +0800, Yi Zhang wrote: > > --- /dev/null > > +++ b/drivers/mfd/88pm880-table.c > > > +#include > > I'm _guessing_ this could as well be . Yes, you are right; > > > +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 > > See above. OK, got it; > > > +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? I think so, yes, thanks for pointing this out; > > > --- /dev/null > > +++ b/drivers/mfd/88pm88x-core.c > > > +#include > > See above. OK, got it; > > > +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? my fault, I am not expecting it's used by other modules, I'll change it; thanks; > > > --- /dev/null > > +++ b/drivers/mfd/88pm88x-i2c.c > > > +#include > > > +MODULE_DEVICE_TABLE(i2c, pm88x_i2c_id); > > > +static int pm88x_i2c_init(void) > > No __init here? Thanks for pointing this out; > > > +{ > > + 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? Thanks for pointing this out, I'll add; > > > +{ > > + 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. I agree with you; but actually, my intention is supporting this chip to work as module, so it is still needed, am I right? thanks; > > > +MODULE_DESCRIPTION("88pm88x I2C bus interface"); > > +MODULE_AUTHOR("Yi Zhang"); > > +MODULE_LICENSE("GPL v2"); > > > --- /dev/null > > +++ b/drivers/mfd/88pm88x-irq.c > > > +#include > > Needed? I will remove it; > > > --- 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? > Yes, I should use tristate; thanks for pointing this out; > 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/