From: Lee Jones <lee.jones@linaro.org>
To: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Mark Brown <broonie@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Liam Girdwood <lgirdwood@gmail.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
srv_heupstream@mediatek.com
Subject: Re: [PATCH 1/6] mfd: mt6397: extract irq related code from core driver
Date: Thu, 7 Feb 2019 09:08:30 +0000 [thread overview]
Message-ID: <20190207090830.GG4672@dell> (raw)
In-Reply-To: <1548839891-20932-2-git-send-email-hsin-hsiung.wang@mediatek.com>
On Wed, 30 Jan 2019, Hsin-Hsiung Wang wrote:
> In order to support different types of irq design,
> we decide to add separate irq drivers for different
> design and keep mt6397 mfd core simple and reusable
> to all generations of PMICs so far.
Why have you cut these lines so short?
In all cases:
s/irq/IRQ/
s/mfd/MFD
s/mt6397/MT6397/
> Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
> ---
> drivers/mfd/Makefile | 2 +-
> drivers/mfd/mt6397-core.c | 235 +++++++---------------------------------
> drivers/mfd/mt6397-irq.c | 214 ++++++++++++++++++++++++++++++++++++
> include/linux/mfd/mt6397/core.h | 12 ++
> 4 files changed, 265 insertions(+), 198 deletions(-)
> create mode 100644 drivers/mfd/mt6397-irq.c
>
> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> index 12980a4..088e249 100644
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> @@ -230,7 +230,7 @@ obj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o
> obj-$(CONFIG_INTEL_SOC_PMIC_BXTWC) += intel_soc_pmic_bxtwc.o
> obj-$(CONFIG_INTEL_SOC_PMIC_CHTWC) += intel_soc_pmic_chtwc.o
> obj-$(CONFIG_INTEL_SOC_PMIC_CHTDC_TI) += intel_soc_pmic_chtdc_ti.o
> -obj-$(CONFIG_MFD_MT6397) += mt6397-core.o
> +obj-$(CONFIG_MFD_MT6397) += mt6397-core.o mt6397-irq.o
>
> obj-$(CONFIG_MFD_ALTERA_A10SR) += altera-a10sr.o
> obj-$(CONFIG_MFD_SUN4I_GPADC) += sun4i-gpadc.o
> diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> index 77b64bd..a72524d 100644
> --- a/drivers/mfd/mt6397-core.c
> +++ b/drivers/mfd/mt6397-core.c
> @@ -12,23 +12,19 @@
> * GNU General Public License for more details.
> */
>
> -#include <linux/interrupt.h>
> #include <linux/module.h>
> #include <linux/of_device.h>
> #include <linux/of_irq.h>
> #include <linux/regmap.h>
> #include <linux/mfd/core.h>
> -#include <linux/mfd/mt6397/core.h>
> #include <linux/mfd/mt6323/core.h>
> -#include <linux/mfd/mt6397/registers.h>
> +#include <linux/mfd/mt6397/core.h>
> #include <linux/mfd/mt6323/registers.h>
> +#include <linux/mfd/mt6397/registers.h>
I will ignore these unrelated changes!
> #define MT6397_RTC_BASE 0xe000
> #define MT6397_RTC_SIZE 0x3e
>
> -#define MT6323_CID_CODE 0x23
> -#define MT6391_CID_CODE 0x91
> -#define MT6397_CID_CODE 0x97
CID_CODE is a bit cryptic.
Why not use *_CHIP_ID instead?
[...]
> +static const struct chip_data mt6323_core = {
> + .cid_addr = MT6323_CID,
> +};
Does the chip ID address change from device to device?
If not, you can get rid of all of this hoop jumping.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2019-02-07 9:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-30 9:18 [PATCH 0/6] Add Support for MediaTek PMIC MT6358 MFD Core and Regulator Hsin-Hsiung Wang
2019-01-30 9:18 ` [PATCH 1/6] mfd: mt6397: extract irq related code from core driver Hsin-Hsiung Wang
2019-02-07 9:08 ` Lee Jones [this message]
[not found] ` <1548839891-20932-1-git-send-email-hsin-hsiung.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2019-01-30 9:18 ` [PATCH 2/6] dt-bindings: mfd: Add compatible for the MediaTek MT6358 PMIC Hsin-Hsiung Wang
2019-02-25 14:54 ` Rob Herring
2019-01-30 9:18 ` [PATCH 3/6] regulator: Add document for MT6358 regulator Hsin-Hsiung Wang
2019-02-25 16:03 ` Rob Herring
2019-01-30 9:18 ` [PATCH 4/6] mfd: Add support for the MediaTek MT6358 PMIC Hsin-Hsiung Wang
2019-01-31 3:56 ` Pi-Hsun Shih
2019-01-31 8:33 ` Hsin-hsiung Wang
2019-01-31 10:01 ` Lee Jones
[not found] ` <1548839891-20932-5-git-send-email-hsin-hsiung.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2019-02-07 9:34 ` Lee Jones
2019-02-07 10:04 ` Marc Zyngier
2019-02-07 12:03 ` Mark Brown
2019-02-08 20:09 ` Matthias Kaehlcke
2019-01-30 9:18 ` [PATCH 5/6] regulator: mt6358: Add support for MT6358 regulator Hsin-Hsiung Wang
2019-01-30 15:18 ` Mark Brown
2019-02-01 2:13 ` Hsin-hsiung Wang
2019-01-30 9:18 ` [PATCH 6/6] arm64: dts: mt6358: add PMIC MT6358 related nodes Hsin-Hsiung Wang
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=20190207090830.GG4672@dell \
--to=lee.jones@linaro.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hsin-hsiung.wang@mediatek.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
--cc=srv_heupstream@mediatek.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;
as well as URLs for NNTP newsgroup(s).