All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hsin-hsiung Wang <hsin-hsiung.wang@mediatek.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Alessandro Zummo <a.zummo@towertech.it>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	Fei Shao <fshao@chromium.org>,
	Eddie Huang <eddie.huang@mediatek.com>,
	Sean Wang <sean.wang@mediatek.com>,
	Yuchen Huang <yuchen.huang@mediatek.com>,
	Ran Bi <ran.bi@mediatek.com>, <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-rtc@vger.kernel.org>,
	<srv_heupstream@mediatek.com>,
	<Project_Global_Chrome_Upstream_Group@mediatek.com>
Subject: Re: [PATCH RESEND v5 5/8] mfd: Add support for the MediaTek MT6359 PMIC
Date: Sat, 13 Mar 2021 00:13:39 +0800	[thread overview]
Message-ID: <1615565619.27101.2.camel@mtksdaap41> (raw)
In-Reply-To: <20210301102011.GI641347@dell>

Hi,

On Mon, 2021-03-01 at 10:20 +0000, Lee Jones wrote:
> On Fri, 29 Jan 2021, Hsin-Hsiung Wang wrote:
> 
> > This adds support for the MediaTek MT6359 PMIC. This is a
> > multifunction device with the following sub modules:
> > 
> > - Codec
> > - Interrupt
> > - Regulator
> > - RTC
> > 
> > It is interfaced to the host controller using SPI interface
> > by a proprietary hardware called PMIC wrapper or pwrap.
> > MT6359 MFD is a child device of the pwrap.
> > 
> > Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
> > ---
> > changes since v4:
> > - remove unused compatible name in the mt6359 mfd cells.
> > ---
> >  drivers/mfd/mt6358-irq.c             |  24 ++
> >  drivers/mfd/mt6397-core.c            |  26 ++
> >  include/linux/mfd/mt6359/core.h      | 133 +++++++
> >  include/linux/mfd/mt6359/registers.h | 529 +++++++++++++++++++++++++++
> >  include/linux/mfd/mt6397/core.h      |   1 +
> >  5 files changed, 713 insertions(+)
> >  create mode 100644 include/linux/mfd/mt6359/core.h
> >  create mode 100644 include/linux/mfd/mt6359/registers.h
> > 
> > diff --git a/drivers/mfd/mt6358-irq.c b/drivers/mfd/mt6358-irq.c
> > index 4b094e5e51cc..83f3ffbdbb4c 100644
> > --- a/drivers/mfd/mt6358-irq.c
> > +++ b/drivers/mfd/mt6358-irq.c
> > @@ -5,6 +5,8 @@
> >  #include <linux/interrupt.h>
> >  #include <linux/mfd/mt6358/core.h>
> >  #include <linux/mfd/mt6358/registers.h>
> > +#include <linux/mfd/mt6359/core.h>
> > +#include <linux/mfd/mt6359/registers.h>
> >  #include <linux/mfd/mt6397/core.h>
> >  #include <linux/module.h>
> >  #include <linux/of.h>
> > @@ -26,6 +28,17 @@ static const struct irq_top_t mt6358_ints[] = {
> >  	MT6358_TOP_GEN(MISC),
> >  };
> >  
> > +static const struct irq_top_t mt6359_ints[] = {
> > +	MT6359_TOP_GEN(BUCK),
> > +	MT6359_TOP_GEN(LDO),
> > +	MT6359_TOP_GEN(PSC),
> > +	MT6359_TOP_GEN(SCK),
> > +	MT6359_TOP_GEN(BM),
> > +	MT6359_TOP_GEN(HK),
> > +	MT6359_TOP_GEN(AUD),
> > +	MT6359_TOP_GEN(MISC),
> > +};
> > +
> >  static struct pmic_irq_data mt6358_irqd = {
> >  	.num_top = ARRAY_SIZE(mt6358_ints),
> >  	.num_pmic_irqs = MT6358_IRQ_NR,
> > @@ -33,6 +46,13 @@ static struct pmic_irq_data mt6358_irqd = {
> >  	.pmic_ints = mt6358_ints,
> >  };
> >  
> > +static struct pmic_irq_data mt6359_irqd = {
> > +	.num_top = ARRAY_SIZE(mt6359_ints),
> > +	.num_pmic_irqs = MT6359_IRQ_NR,
> > +	.top_int_status_reg = MT6359_TOP_INT_STATUS0,
> > +	.pmic_ints = mt6359_ints,
> > +};
> > +
> >  static void pmic_irq_enable(struct irq_data *data)
> >  {
> >  	unsigned int hwirq = irqd_to_hwirq(data);
> > @@ -195,6 +215,10 @@ int mt6358_irq_init(struct mt6397_chip *chip)
> >  		chip->irq_data = &mt6358_irqd;
> >  		break;
> >  
> > +	case MT6359_CHIP_ID:
> > +		chip->irq_data = &mt6359_irqd;
> > +		break;
> > +
> >  	default:
> >  		dev_err(chip->dev, "unsupported chip: 0x%x\n", chip->chip_id);
> >  		return -ENODEV;
> > diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> > index 7518d74c3b4c..617e4e4d5de0 100644
> > --- a/drivers/mfd/mt6397-core.c
> > +++ b/drivers/mfd/mt6397-core.c
> > @@ -13,9 +13,11 @@
> >  #include <linux/mfd/core.h>
> >  #include <linux/mfd/mt6323/core.h>
> >  #include <linux/mfd/mt6358/core.h>
> > +#include <linux/mfd/mt6359/core.h>
> >  #include <linux/mfd/mt6397/core.h>
> >  #include <linux/mfd/mt6323/registers.h>
> >  #include <linux/mfd/mt6358/registers.h>
> > +#include <linux/mfd/mt6359/registers.h>
> >  #include <linux/mfd/mt6397/registers.h>
> >  
> >  #define MT6323_RTC_BASE		0x8000
> > @@ -99,6 +101,19 @@ static const struct mfd_cell mt6358_devs[] = {
> >  	},
> >  };
> >  
> > +static const struct mfd_cell mt6359_devs[] = {
> > +	{
> > +		.name = "mt6359-regulator",
> > +	}, {
> > +		.name = "mt6359-rtc",
> > +		.num_resources = ARRAY_SIZE(mt6358_rtc_resources),
> > +		.resources = mt6358_rtc_resources,
> > +		.of_compatible = "mediatek,mt6358-rtc",
> > +	}, {
> > +		.name = "mt6359-sound",
> > +	},
> > +};
> 
> Nit: Please put the single-line entries on one line.
> 
> Like this:
> 
> 	{ .name = "mt6359-sound" },
> 

Thanks for the comment. I will update it in the next patch.

> >  static const struct mfd_cell mt6397_devs[] = {
> >  	{
> >  		.name = "mt6397-rtc",
> > @@ -149,6 +164,14 @@ static const struct chip_data mt6358_core = {
> >  	.irq_init = mt6358_irq_init,
> >  };
> >  
> > +static const struct chip_data mt6359_core = {
> > +	.cid_addr = MT6359_SWCID,
> > +	.cid_shift = 8,
> > +	.cells = mt6359_devs,
> > +	.cell_size = ARRAY_SIZE(mt6359_devs),
> > +	.irq_init = mt6358_irq_init,
> > +};
> > +
> >  static const struct chip_data mt6397_core = {
> >  	.cid_addr = MT6397_CID,
> >  	.cid_shift = 0,
> > @@ -218,6 +241,9 @@ static const struct of_device_id mt6397_of_match[] = {
> >  	}, {
> >  		.compatible = "mediatek,mt6358",
> >  		.data = &mt6358_core,
> > +	}, {
> > +		.compatible = "mediatek,mt6359",
> > +		.data = &mt6359_core,
> >  	}, {
> >  		.compatible = "mediatek,mt6397",
> >  		.data = &mt6397_core,
> > diff --git a/include/linux/mfd/mt6359/core.h b/include/linux/mfd/mt6359/core.h
> > new file mode 100644
> > index 000000000000..61872f1ecbe4
> > --- /dev/null
> > +++ b/include/linux/mfd/mt6359/core.h
> > @@ -0,0 +1,133 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/*
> > + * Copyright (c) 2020 MediaTek Inc.
> 
> This is out of date.
> 

Thanks for the comment. I will update it in the next patch.

> > + */
> > +
> > +#ifndef __MFD_MT6359_CORE_H__
> > +#define __MFD_MT6359_CORE_H__
> 
> [...]
> 
> > +#endif /* __MFD_MT6359_CORE_H__ */
> > diff --git a/include/linux/mfd/mt6359/registers.h b/include/linux/mfd/mt6359/registers.h
> > new file mode 100644
> > index 000000000000..4d72f0a7f2b0
> > --- /dev/null
> > +++ b/include/linux/mfd/mt6359/registers.h
> > @@ -0,0 +1,529 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/*
> > + * Copyright (c) 2020 MediaTek Inc.
> 
> This too.
> 

Thanks for the comment. I will update it in the next patch.

> > + */
> > +
> > +#ifndef __MFD_MT6359_REGISTERS_H__
> > +#define __MFD_MT6359_REGISTERS_H__
> 
> [...]
> 
> > +#endif /* __MFD_MT6359_REGISTERS_H__ */
> > diff --git a/include/linux/mfd/mt6397/core.h b/include/linux/mfd/mt6397/core.h
> > index 949268581b36..56f210eebc54 100644
> > --- a/include/linux/mfd/mt6397/core.h
> > +++ b/include/linux/mfd/mt6397/core.h
> > @@ -13,6 +13,7 @@
> >  enum chip_id {
> >  	MT6323_CHIP_ID = 0x23,
> >  	MT6358_CHIP_ID = 0x58,
> > +	MT6359_CHIP_ID = 0x59,
> >  	MT6391_CHIP_ID = 0x91,
> >  	MT6397_CHIP_ID = 0x97,
> >  };
> 
> Once you fixed those issues, feel free to add my:
> 
> For my own reference (apply this as-is to your sign-off block):
> 
>   Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
> 

Thanks a lot.


WARNING: multiple messages have this Message-ID (diff)
From: Hsin-hsiung Wang <hsin-hsiung.wang@mediatek.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Alessandro Zummo <a.zummo@towertech.it>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	Fei Shao <fshao@chromium.org>,
	Eddie Huang <eddie.huang@mediatek.com>,
	Sean Wang <sean.wang@mediatek.com>,
	Yuchen Huang <yuchen.huang@mediatek.com>,
	Ran Bi <ran.bi@mediatek.com>, <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-rtc@vger.kernel.org>,
	<srv_heupstream@mediatek.com>,
	<Project_Global_Chrome_Upstream_Group@mediatek.com>
Subject: Re: [PATCH RESEND v5 5/8] mfd: Add support for the MediaTek MT6359 PMIC
Date: Sat, 13 Mar 2021 00:13:39 +0800	[thread overview]
Message-ID: <1615565619.27101.2.camel@mtksdaap41> (raw)
In-Reply-To: <20210301102011.GI641347@dell>

Hi,

On Mon, 2021-03-01 at 10:20 +0000, Lee Jones wrote:
> On Fri, 29 Jan 2021, Hsin-Hsiung Wang wrote:
> 
> > This adds support for the MediaTek MT6359 PMIC. This is a
> > multifunction device with the following sub modules:
> > 
> > - Codec
> > - Interrupt
> > - Regulator
> > - RTC
> > 
> > It is interfaced to the host controller using SPI interface
> > by a proprietary hardware called PMIC wrapper or pwrap.
> > MT6359 MFD is a child device of the pwrap.
> > 
> > Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
> > ---
> > changes since v4:
> > - remove unused compatible name in the mt6359 mfd cells.
> > ---
> >  drivers/mfd/mt6358-irq.c             |  24 ++
> >  drivers/mfd/mt6397-core.c            |  26 ++
> >  include/linux/mfd/mt6359/core.h      | 133 +++++++
> >  include/linux/mfd/mt6359/registers.h | 529 +++++++++++++++++++++++++++
> >  include/linux/mfd/mt6397/core.h      |   1 +
> >  5 files changed, 713 insertions(+)
> >  create mode 100644 include/linux/mfd/mt6359/core.h
> >  create mode 100644 include/linux/mfd/mt6359/registers.h
> > 
> > diff --git a/drivers/mfd/mt6358-irq.c b/drivers/mfd/mt6358-irq.c
> > index 4b094e5e51cc..83f3ffbdbb4c 100644
> > --- a/drivers/mfd/mt6358-irq.c
> > +++ b/drivers/mfd/mt6358-irq.c
> > @@ -5,6 +5,8 @@
> >  #include <linux/interrupt.h>
> >  #include <linux/mfd/mt6358/core.h>
> >  #include <linux/mfd/mt6358/registers.h>
> > +#include <linux/mfd/mt6359/core.h>
> > +#include <linux/mfd/mt6359/registers.h>
> >  #include <linux/mfd/mt6397/core.h>
> >  #include <linux/module.h>
> >  #include <linux/of.h>
> > @@ -26,6 +28,17 @@ static const struct irq_top_t mt6358_ints[] = {
> >  	MT6358_TOP_GEN(MISC),
> >  };
> >  
> > +static const struct irq_top_t mt6359_ints[] = {
> > +	MT6359_TOP_GEN(BUCK),
> > +	MT6359_TOP_GEN(LDO),
> > +	MT6359_TOP_GEN(PSC),
> > +	MT6359_TOP_GEN(SCK),
> > +	MT6359_TOP_GEN(BM),
> > +	MT6359_TOP_GEN(HK),
> > +	MT6359_TOP_GEN(AUD),
> > +	MT6359_TOP_GEN(MISC),
> > +};
> > +
> >  static struct pmic_irq_data mt6358_irqd = {
> >  	.num_top = ARRAY_SIZE(mt6358_ints),
> >  	.num_pmic_irqs = MT6358_IRQ_NR,
> > @@ -33,6 +46,13 @@ static struct pmic_irq_data mt6358_irqd = {
> >  	.pmic_ints = mt6358_ints,
> >  };
> >  
> > +static struct pmic_irq_data mt6359_irqd = {
> > +	.num_top = ARRAY_SIZE(mt6359_ints),
> > +	.num_pmic_irqs = MT6359_IRQ_NR,
> > +	.top_int_status_reg = MT6359_TOP_INT_STATUS0,
> > +	.pmic_ints = mt6359_ints,
> > +};
> > +
> >  static void pmic_irq_enable(struct irq_data *data)
> >  {
> >  	unsigned int hwirq = irqd_to_hwirq(data);
> > @@ -195,6 +215,10 @@ int mt6358_irq_init(struct mt6397_chip *chip)
> >  		chip->irq_data = &mt6358_irqd;
> >  		break;
> >  
> > +	case MT6359_CHIP_ID:
> > +		chip->irq_data = &mt6359_irqd;
> > +		break;
> > +
> >  	default:
> >  		dev_err(chip->dev, "unsupported chip: 0x%x\n", chip->chip_id);
> >  		return -ENODEV;
> > diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> > index 7518d74c3b4c..617e4e4d5de0 100644
> > --- a/drivers/mfd/mt6397-core.c
> > +++ b/drivers/mfd/mt6397-core.c
> > @@ -13,9 +13,11 @@
> >  #include <linux/mfd/core.h>
> >  #include <linux/mfd/mt6323/core.h>
> >  #include <linux/mfd/mt6358/core.h>
> > +#include <linux/mfd/mt6359/core.h>
> >  #include <linux/mfd/mt6397/core.h>
> >  #include <linux/mfd/mt6323/registers.h>
> >  #include <linux/mfd/mt6358/registers.h>
> > +#include <linux/mfd/mt6359/registers.h>
> >  #include <linux/mfd/mt6397/registers.h>
> >  
> >  #define MT6323_RTC_BASE		0x8000
> > @@ -99,6 +101,19 @@ static const struct mfd_cell mt6358_devs[] = {
> >  	},
> >  };
> >  
> > +static const struct mfd_cell mt6359_devs[] = {
> > +	{
> > +		.name = "mt6359-regulator",
> > +	}, {
> > +		.name = "mt6359-rtc",
> > +		.num_resources = ARRAY_SIZE(mt6358_rtc_resources),
> > +		.resources = mt6358_rtc_resources,
> > +		.of_compatible = "mediatek,mt6358-rtc",
> > +	}, {
> > +		.name = "mt6359-sound",
> > +	},
> > +};
> 
> Nit: Please put the single-line entries on one line.
> 
> Like this:
> 
> 	{ .name = "mt6359-sound" },
> 

Thanks for the comment. I will update it in the next patch.

> >  static const struct mfd_cell mt6397_devs[] = {
> >  	{
> >  		.name = "mt6397-rtc",
> > @@ -149,6 +164,14 @@ static const struct chip_data mt6358_core = {
> >  	.irq_init = mt6358_irq_init,
> >  };
> >  
> > +static const struct chip_data mt6359_core = {
> > +	.cid_addr = MT6359_SWCID,
> > +	.cid_shift = 8,
> > +	.cells = mt6359_devs,
> > +	.cell_size = ARRAY_SIZE(mt6359_devs),
> > +	.irq_init = mt6358_irq_init,
> > +};
> > +
> >  static const struct chip_data mt6397_core = {
> >  	.cid_addr = MT6397_CID,
> >  	.cid_shift = 0,
> > @@ -218,6 +241,9 @@ static const struct of_device_id mt6397_of_match[] = {
> >  	}, {
> >  		.compatible = "mediatek,mt6358",
> >  		.data = &mt6358_core,
> > +	}, {
> > +		.compatible = "mediatek,mt6359",
> > +		.data = &mt6359_core,
> >  	}, {
> >  		.compatible = "mediatek,mt6397",
> >  		.data = &mt6397_core,
> > diff --git a/include/linux/mfd/mt6359/core.h b/include/linux/mfd/mt6359/core.h
> > new file mode 100644
> > index 000000000000..61872f1ecbe4
> > --- /dev/null
> > +++ b/include/linux/mfd/mt6359/core.h
> > @@ -0,0 +1,133 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/*
> > + * Copyright (c) 2020 MediaTek Inc.
> 
> This is out of date.
> 

Thanks for the comment. I will update it in the next patch.

> > + */
> > +
> > +#ifndef __MFD_MT6359_CORE_H__
> > +#define __MFD_MT6359_CORE_H__
> 
> [...]
> 
> > +#endif /* __MFD_MT6359_CORE_H__ */
> > diff --git a/include/linux/mfd/mt6359/registers.h b/include/linux/mfd/mt6359/registers.h
> > new file mode 100644
> > index 000000000000..4d72f0a7f2b0
> > --- /dev/null
> > +++ b/include/linux/mfd/mt6359/registers.h
> > @@ -0,0 +1,529 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/*
> > + * Copyright (c) 2020 MediaTek Inc.
> 
> This too.
> 

Thanks for the comment. I will update it in the next patch.

> > + */
> > +
> > +#ifndef __MFD_MT6359_REGISTERS_H__
> > +#define __MFD_MT6359_REGISTERS_H__
> 
> [...]
> 
> > +#endif /* __MFD_MT6359_REGISTERS_H__ */
> > diff --git a/include/linux/mfd/mt6397/core.h b/include/linux/mfd/mt6397/core.h
> > index 949268581b36..56f210eebc54 100644
> > --- a/include/linux/mfd/mt6397/core.h
> > +++ b/include/linux/mfd/mt6397/core.h
> > @@ -13,6 +13,7 @@
> >  enum chip_id {
> >  	MT6323_CHIP_ID = 0x23,
> >  	MT6358_CHIP_ID = 0x58,
> > +	MT6359_CHIP_ID = 0x59,
> >  	MT6391_CHIP_ID = 0x91,
> >  	MT6397_CHIP_ID = 0x97,
> >  };
> 
> Once you fixed those issues, feel free to add my:
> 
> For my own reference (apply this as-is to your sign-off block):
> 
>   Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
> 

Thanks a lot.

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

WARNING: multiple messages have this Message-ID (diff)
From: Hsin-hsiung Wang <hsin-hsiung.wang@mediatek.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Alessandro Zummo <a.zummo@towertech.it>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	Fei Shao <fshao@chromium.org>,
	Eddie Huang <eddie.huang@mediatek.com>,
	Sean Wang <sean.wang@mediatek.com>,
	Yuchen Huang <yuchen.huang@mediatek.com>,
	Ran Bi <ran.bi@mediatek.com>, <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-rtc@vger.kernel.org>,
	<srv_heupstream@mediatek.com>,
	<Project_Global_Chrome_Upstream_Group@mediatek.com>
Subject: Re: [PATCH RESEND v5 5/8] mfd: Add support for the MediaTek MT6359 PMIC
Date: Sat, 13 Mar 2021 00:13:39 +0800	[thread overview]
Message-ID: <1615565619.27101.2.camel@mtksdaap41> (raw)
In-Reply-To: <20210301102011.GI641347@dell>

Hi,

On Mon, 2021-03-01 at 10:20 +0000, Lee Jones wrote:
> On Fri, 29 Jan 2021, Hsin-Hsiung Wang wrote:
> 
> > This adds support for the MediaTek MT6359 PMIC. This is a
> > multifunction device with the following sub modules:
> > 
> > - Codec
> > - Interrupt
> > - Regulator
> > - RTC
> > 
> > It is interfaced to the host controller using SPI interface
> > by a proprietary hardware called PMIC wrapper or pwrap.
> > MT6359 MFD is a child device of the pwrap.
> > 
> > Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
> > ---
> > changes since v4:
> > - remove unused compatible name in the mt6359 mfd cells.
> > ---
> >  drivers/mfd/mt6358-irq.c             |  24 ++
> >  drivers/mfd/mt6397-core.c            |  26 ++
> >  include/linux/mfd/mt6359/core.h      | 133 +++++++
> >  include/linux/mfd/mt6359/registers.h | 529 +++++++++++++++++++++++++++
> >  include/linux/mfd/mt6397/core.h      |   1 +
> >  5 files changed, 713 insertions(+)
> >  create mode 100644 include/linux/mfd/mt6359/core.h
> >  create mode 100644 include/linux/mfd/mt6359/registers.h
> > 
> > diff --git a/drivers/mfd/mt6358-irq.c b/drivers/mfd/mt6358-irq.c
> > index 4b094e5e51cc..83f3ffbdbb4c 100644
> > --- a/drivers/mfd/mt6358-irq.c
> > +++ b/drivers/mfd/mt6358-irq.c
> > @@ -5,6 +5,8 @@
> >  #include <linux/interrupt.h>
> >  #include <linux/mfd/mt6358/core.h>
> >  #include <linux/mfd/mt6358/registers.h>
> > +#include <linux/mfd/mt6359/core.h>
> > +#include <linux/mfd/mt6359/registers.h>
> >  #include <linux/mfd/mt6397/core.h>
> >  #include <linux/module.h>
> >  #include <linux/of.h>
> > @@ -26,6 +28,17 @@ static const struct irq_top_t mt6358_ints[] = {
> >  	MT6358_TOP_GEN(MISC),
> >  };
> >  
> > +static const struct irq_top_t mt6359_ints[] = {
> > +	MT6359_TOP_GEN(BUCK),
> > +	MT6359_TOP_GEN(LDO),
> > +	MT6359_TOP_GEN(PSC),
> > +	MT6359_TOP_GEN(SCK),
> > +	MT6359_TOP_GEN(BM),
> > +	MT6359_TOP_GEN(HK),
> > +	MT6359_TOP_GEN(AUD),
> > +	MT6359_TOP_GEN(MISC),
> > +};
> > +
> >  static struct pmic_irq_data mt6358_irqd = {
> >  	.num_top = ARRAY_SIZE(mt6358_ints),
> >  	.num_pmic_irqs = MT6358_IRQ_NR,
> > @@ -33,6 +46,13 @@ static struct pmic_irq_data mt6358_irqd = {
> >  	.pmic_ints = mt6358_ints,
> >  };
> >  
> > +static struct pmic_irq_data mt6359_irqd = {
> > +	.num_top = ARRAY_SIZE(mt6359_ints),
> > +	.num_pmic_irqs = MT6359_IRQ_NR,
> > +	.top_int_status_reg = MT6359_TOP_INT_STATUS0,
> > +	.pmic_ints = mt6359_ints,
> > +};
> > +
> >  static void pmic_irq_enable(struct irq_data *data)
> >  {
> >  	unsigned int hwirq = irqd_to_hwirq(data);
> > @@ -195,6 +215,10 @@ int mt6358_irq_init(struct mt6397_chip *chip)
> >  		chip->irq_data = &mt6358_irqd;
> >  		break;
> >  
> > +	case MT6359_CHIP_ID:
> > +		chip->irq_data = &mt6359_irqd;
> > +		break;
> > +
> >  	default:
> >  		dev_err(chip->dev, "unsupported chip: 0x%x\n", chip->chip_id);
> >  		return -ENODEV;
> > diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> > index 7518d74c3b4c..617e4e4d5de0 100644
> > --- a/drivers/mfd/mt6397-core.c
> > +++ b/drivers/mfd/mt6397-core.c
> > @@ -13,9 +13,11 @@
> >  #include <linux/mfd/core.h>
> >  #include <linux/mfd/mt6323/core.h>
> >  #include <linux/mfd/mt6358/core.h>
> > +#include <linux/mfd/mt6359/core.h>
> >  #include <linux/mfd/mt6397/core.h>
> >  #include <linux/mfd/mt6323/registers.h>
> >  #include <linux/mfd/mt6358/registers.h>
> > +#include <linux/mfd/mt6359/registers.h>
> >  #include <linux/mfd/mt6397/registers.h>
> >  
> >  #define MT6323_RTC_BASE		0x8000
> > @@ -99,6 +101,19 @@ static const struct mfd_cell mt6358_devs[] = {
> >  	},
> >  };
> >  
> > +static const struct mfd_cell mt6359_devs[] = {
> > +	{
> > +		.name = "mt6359-regulator",
> > +	}, {
> > +		.name = "mt6359-rtc",
> > +		.num_resources = ARRAY_SIZE(mt6358_rtc_resources),
> > +		.resources = mt6358_rtc_resources,
> > +		.of_compatible = "mediatek,mt6358-rtc",
> > +	}, {
> > +		.name = "mt6359-sound",
> > +	},
> > +};
> 
> Nit: Please put the single-line entries on one line.
> 
> Like this:
> 
> 	{ .name = "mt6359-sound" },
> 

Thanks for the comment. I will update it in the next patch.

> >  static const struct mfd_cell mt6397_devs[] = {
> >  	{
> >  		.name = "mt6397-rtc",
> > @@ -149,6 +164,14 @@ static const struct chip_data mt6358_core = {
> >  	.irq_init = mt6358_irq_init,
> >  };
> >  
> > +static const struct chip_data mt6359_core = {
> > +	.cid_addr = MT6359_SWCID,
> > +	.cid_shift = 8,
> > +	.cells = mt6359_devs,
> > +	.cell_size = ARRAY_SIZE(mt6359_devs),
> > +	.irq_init = mt6358_irq_init,
> > +};
> > +
> >  static const struct chip_data mt6397_core = {
> >  	.cid_addr = MT6397_CID,
> >  	.cid_shift = 0,
> > @@ -218,6 +241,9 @@ static const struct of_device_id mt6397_of_match[] = {
> >  	}, {
> >  		.compatible = "mediatek,mt6358",
> >  		.data = &mt6358_core,
> > +	}, {
> > +		.compatible = "mediatek,mt6359",
> > +		.data = &mt6359_core,
> >  	}, {
> >  		.compatible = "mediatek,mt6397",
> >  		.data = &mt6397_core,
> > diff --git a/include/linux/mfd/mt6359/core.h b/include/linux/mfd/mt6359/core.h
> > new file mode 100644
> > index 000000000000..61872f1ecbe4
> > --- /dev/null
> > +++ b/include/linux/mfd/mt6359/core.h
> > @@ -0,0 +1,133 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/*
> > + * Copyright (c) 2020 MediaTek Inc.
> 
> This is out of date.
> 

Thanks for the comment. I will update it in the next patch.

> > + */
> > +
> > +#ifndef __MFD_MT6359_CORE_H__
> > +#define __MFD_MT6359_CORE_H__
> 
> [...]
> 
> > +#endif /* __MFD_MT6359_CORE_H__ */
> > diff --git a/include/linux/mfd/mt6359/registers.h b/include/linux/mfd/mt6359/registers.h
> > new file mode 100644
> > index 000000000000..4d72f0a7f2b0
> > --- /dev/null
> > +++ b/include/linux/mfd/mt6359/registers.h
> > @@ -0,0 +1,529 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/*
> > + * Copyright (c) 2020 MediaTek Inc.
> 
> This too.
> 

Thanks for the comment. I will update it in the next patch.

> > + */
> > +
> > +#ifndef __MFD_MT6359_REGISTERS_H__
> > +#define __MFD_MT6359_REGISTERS_H__
> 
> [...]
> 
> > +#endif /* __MFD_MT6359_REGISTERS_H__ */
> > diff --git a/include/linux/mfd/mt6397/core.h b/include/linux/mfd/mt6397/core.h
> > index 949268581b36..56f210eebc54 100644
> > --- a/include/linux/mfd/mt6397/core.h
> > +++ b/include/linux/mfd/mt6397/core.h
> > @@ -13,6 +13,7 @@
> >  enum chip_id {
> >  	MT6323_CHIP_ID = 0x23,
> >  	MT6358_CHIP_ID = 0x58,
> > +	MT6359_CHIP_ID = 0x59,
> >  	MT6391_CHIP_ID = 0x91,
> >  	MT6397_CHIP_ID = 0x97,
> >  };
> 
> Once you fixed those issues, feel free to add my:
> 
> For my own reference (apply this as-is to your sign-off block):
> 
>   Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
> 

Thanks a lot.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-03-12 16:14 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-29  9:49 [PATCH RESEND v5 0/8] Add Support for MediaTek PMIC MT6359 Hsin-Hsiung Wang
2021-01-29  9:49 ` Hsin-Hsiung Wang
2021-01-29  9:49 ` [PATCH RESEND v5 1/8] mfd: mt6358: refine interrupt code Hsin-Hsiung Wang
2021-01-29  9:49   ` Hsin-Hsiung Wang
2021-01-29  9:49 ` [PATCH RESEND v5 2/8] rtc: mt6397: refine RTC_TC_MTH Hsin-Hsiung Wang
2021-01-29  9:49   ` Hsin-Hsiung Wang
2021-01-29  9:49 ` [PATCH RESEND v5 3/8] dt-bindings: mfd: Add compatible for the MediaTek MT6359 PMIC Hsin-Hsiung Wang
2021-01-29  9:49   ` Hsin-Hsiung Wang
2021-01-29  9:49   ` Hsin-Hsiung Wang
2021-02-05 22:04   ` Rob Herring
2021-02-05 22:04     ` Rob Herring
2021-02-05 22:04     ` Rob Herring
2021-01-29  9:49 ` [PATCH RESEND v5 4/8] dt-bindings: regulator: Add document for MT6359 regulator Hsin-Hsiung Wang
2021-01-29  9:49   ` Hsin-Hsiung Wang
2021-01-29  9:49   ` Hsin-Hsiung Wang
2021-01-30 17:23   ` Rob Herring
2021-01-30 17:23     ` Rob Herring
2021-01-30 17:23     ` Rob Herring
2021-01-29  9:49 ` [PATCH RESEND v5 5/8] mfd: Add support for the MediaTek MT6359 PMIC Hsin-Hsiung Wang
2021-01-29  9:49   ` Hsin-Hsiung Wang
2021-03-01 10:20   ` Lee Jones
2021-03-01 10:20     ` Lee Jones
2021-03-01 10:20     ` Lee Jones
2021-03-12 16:13     ` Hsin-hsiung Wang [this message]
2021-03-12 16:13       ` Hsin-hsiung Wang
2021-03-12 16:13       ` Hsin-hsiung Wang
2021-01-29  9:49 ` [PATCH RESEND v5 6/8] regulator: mt6359: Add support for MT6359 regulator Hsin-Hsiung Wang
2021-01-29  9:49   ` Hsin-Hsiung Wang
2021-01-29  9:49   ` Hsin-Hsiung Wang
2021-01-29  9:49 ` [PATCH RESEND v5 7/8] regulator: mt6359: Add support for MT6359P regulator Hsin-Hsiung Wang
2021-01-29  9:49   ` Hsin-Hsiung Wang
2021-03-01 10:21   ` Lee Jones
2021-03-01 10:21     ` Lee Jones
2021-03-01 10:21     ` Lee Jones
2021-03-12 16:20     ` Hsin-hsiung Wang
2021-03-12 16:20       ` Hsin-hsiung Wang
2021-03-12 16:20       ` Hsin-hsiung Wang
2021-01-29  9:49 ` [PATCH RESEND v5 8/8] arm64: dts: mt6359: add PMIC MT6359 related nodes Hsin-Hsiung Wang
2021-01-29  9:49   ` Hsin-Hsiung Wang
2021-01-29  9:49   ` Hsin-Hsiung Wang
2021-01-31 11:06   ` Matthias Brugger
2021-02-02  3:51     ` Tzung-Bi Shih
2021-02-02  3:51       ` Tzung-Bi Shih
2021-02-02  3:51       ` Tzung-Bi Shih
2021-02-07 18:48       ` Matthias Brugger
2021-02-07 18:48         ` Matthias Brugger
2021-02-07 18:48         ` Matthias Brugger

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=1615565619.27101.2.camel@mtksdaap41 \
    --to=hsin-hsiung.wang@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=eddie.huang@mediatek.com \
    --cc=fshao@chromium.org \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=ran.bi@mediatek.com \
    --cc=robh+dt@kernel.org \
    --cc=sean.wang@mediatek.com \
    --cc=srv_heupstream@mediatek.com \
    --cc=yuchen.huang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.