linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Cc: devicetree@vger.kernel.org, Josef Friedl <josef.friedl@speed.at>,
	srv_heupstream <srv_heupstream@mediatek.com>,
	Frank Wunderlich <frank-w@public-files.de>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	linux-mediatek@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/8] mfd: mt6358: refine interrupt code
Date: Mon, 27 Jul 2020 16:48:40 +0100	[thread overview]
Message-ID: <20200727154840.GY1850026@dell> (raw)
In-Reply-To: <1595509133-5358-2-git-send-email-hsin-hsiung.wang@mediatek.com>

On Thu, 23 Jul 2020, Hsin-Hsiung Wang wrote:

> This patch refines the interrupt related code to support new chips.

Refines in what way?

What makes this better?

> Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
> ---
>  drivers/mfd/mt6358-irq.c        | 65 ++++++++++++++++++++++++-----------------
>  include/linux/mfd/mt6358/core.h |  8 ++---
>  2 files changed, 41 insertions(+), 32 deletions(-)
> 
> diff --git a/drivers/mfd/mt6358-irq.c b/drivers/mfd/mt6358-irq.c
> index db734f2..4b094e5 100644
> --- a/drivers/mfd/mt6358-irq.c
> +++ b/drivers/mfd/mt6358-irq.c
> @@ -13,7 +13,9 @@
>  #include <linux/platform_device.h>
>  #include <linux/regmap.h>
>  
> -static struct irq_top_t mt6358_ints[] = {
> +#define MTK_PMIC_REG_WIDTH 16
> +
> +static const struct irq_top_t mt6358_ints[] = {
>  	MT6358_TOP_GEN(BUCK),
>  	MT6358_TOP_GEN(LDO),
>  	MT6358_TOP_GEN(PSC),
> @@ -24,6 +26,13 @@ static struct irq_top_t mt6358_ints[] = {
>  	MT6358_TOP_GEN(MISC),
>  };
>  
> +static struct pmic_irq_data mt6358_irqd = {
> +	.num_top = ARRAY_SIZE(mt6358_ints),
> +	.num_pmic_irqs = MT6358_IRQ_NR,
> +	.top_int_status_reg = MT6358_TOP_INT_STATUS0,
> +	.pmic_ints = mt6358_ints,
> +};

Dynamically assigned driver data is usually preferred.

Why have you gone static?

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

  reply	other threads:[~2020-07-27 15:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 12:58 [PATCH 0/8] Add Support for MediaTek PMIC MT6359 Hsin-Hsiung Wang
2020-07-23 12:58 ` [PATCH 1/8] mfd: mt6358: refine interrupt code Hsin-Hsiung Wang
2020-07-27 15:48   ` Lee Jones [this message]
2020-08-03  8:29     ` Hsin-hsiung Wang
2020-08-10  7:31       ` Lee Jones
2020-07-23 12:58 ` [PATCH 2/8] dt-bindings: mfd: Add compatible for the MediaTek MT6359 PMIC Hsin-Hsiung Wang
2020-07-23 21:31   ` Rob Herring
2020-07-28  6:33   ` Lee Jones
2020-07-23 12:58 ` [PATCH 3/8] dt-bindings: regulator: Add document for MT6359 regulator Hsin-Hsiung Wang
2020-07-23 12:58 ` [PATCH 4/8] mfd: Add support for the MediaTek MT6359 PMIC Hsin-Hsiung Wang
2020-07-28  6:42   ` Lee Jones
2020-07-23 12:58 ` [PATCH 5/8] regulator: mt6359: Add support for MT6359 regulator Hsin-Hsiung Wang
2020-07-24 12:21   ` Mark Brown
2020-07-23 12:58 ` [PATCH 6/8] regulator: mt6359: Set the enable time for LDOs Hsin-Hsiung Wang
2020-07-24 12:22   ` Mark Brown
2020-07-23 12:58 ` [PATCH 7/8] regulator: mt6359: Add support for MT6359P regulator Hsin-Hsiung Wang
2020-07-24 12:23   ` Mark Brown
2020-07-23 12:58 ` [PATCH 8/8] arm64: dts: mt6359: add PMIC MT6359 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=20200727154840.GY1850026@dell \
    --to=lee.jones@linaro.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frank-w@public-files.de \
    --cc=hsin-hsiung.wang@mediatek.com \
    --cc=josef.friedl@speed.at \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --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).