From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161543AbbKEOal (ORCPT ); Thu, 5 Nov 2015 09:30:41 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:48482 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030728AbbKEOak (ORCPT ); Thu, 5 Nov 2015 09:30:40 -0500 Date: Thu, 5 Nov 2015 14:30:10 +0000 From: Mark Brown To: Chen Feng Cc: w.f@huawei.com, sameo@linux.intel.com, lee.jones@linaro.org, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, joro@8bytes.org, iommu@lists.linux-foundation.org, haojian.zhuang@linaro.org, devicetree@vger.kernel.org, xuwei5@hisilicon.com, xuyiping@hisilicon.com, kong.kongxinwei@hisilicon.com, z.liuxinliang@hisilicon.com, yudongbin@hisilicon.com, weidong2@hisilicon.com, saberlily.xia@hisilicon.com, haojian.zhuang@outlook.com, leo.yan@linaro.org, linuxarm@huawei.com, dan.zhao@hisilicon.com, peter.panshilin@hisilicon.com, qijiwen@hisilicon.com Message-ID: <20151105143010.GJ18409@sirena.org.uk> References: <1446730488-31930-1-git-send-email-puck.chen@hisilicon.com> <1446730488-31930-5-git-send-email-puck.chen@hisilicon.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LG0Ll82vYr46+VA1" Content-Disposition: inline In-Reply-To: <1446730488-31930-5-git-send-email-puck.chen@hisilicon.com> X-Cookie: Put your trust in those who are worthy. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 92.40.249.56 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 4/7] mfd: hi655x: Add hi665x pmic driver X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --LG0Ll82vYr46+VA1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 05, 2015 at 09:34:45PM +0800, Chen Feng wrote: > +config MFD_HI655X_PMIC > + bool "HiSilicon Hi655X series PMU/Codec IC" Why is this bool and not tristate? > + depends on ARCH_HISI Can we have an || COMPILE_TEST here? > +static irqreturn_t hi655x_pmic_irq_handler(int irq, void *data) > +{ > + struct hi655x_pmic *pmic = (struct hi655x_pmic *)data; > + u32 pending; > + u32 ret = IRQ_NONE; > + unsigned long offset; > + int i; This looks like you should be able to use regmap_irq? > +static int hi655x_pmic_remove(struct platform_device *pdev) > +{ > + struct device *dev = &pdev->dev; > + struct hi655x_pmic *pmic = platform_get_drvdata(pdev); > + > + free_irq(pmic->irq, pmic); > + gpio_free(pmic->gpio); > + devm_release_mem_region(dev, pmic->res->start, > + resource_size(pmic->res)); > + devm_kfree(dev, pmic); > + platform_set_drvdata(pdev, NULL); There is no point in using devm_ cleanup functions in the device removal path unless there's some ordering issue with respect to other stuff which doesn't seem to be the case here. > +static struct platform_driver hi655x_pmic_driver = { > + .driver = { > + .name = "hisi,hi655x-pmic", We don't normally use OF style names in the Linux driver names. --LG0Ll82vYr46+VA1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWO2fyAAoJECTWi3JdVIfQhXQH/RIo7rtxAZ5RgzWByhvia68h h5TtUQIJz2IPKcI21LCPrX0yVAs4vWz8ekT/Ogd0NUVwC/kszq2UOg8VfiI8X4e+ 4xIniMVPeJIBc6NkL1k3V3DQ2bWzlQFUonSTOVzdUtftgAckci0t2zy+pOad9m9Q JdJPUQYq9S2Z7j62MDcPcr+7uBggABD7ry39kooawcz2OrT/r/xbm7ibpXwsDehZ /QauvnvOTKdBdn9K3lE6ejufxzTlGbaLGxvjeLSG6pbDN2UWIsFIOYZuulrl4Cc7 sEH7G5rbG1XHdbTChB7sgKZe8Y/8Hz4ycuP7sYRaizsHIOn1TnSxwQ4QdUzoM0E= =H64R -----END PGP SIGNATURE----- --LG0Ll82vYr46+VA1--