Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/2] mfd: mt6397: Use PLATFORM_DEVID_NONE macro instead of -1
@ 2019-06-18 15:43 Fabien Parent
  2019-06-18 15:43 ` [PATCH 2/2] mfd: mt6397: use DEFINE_RES_* helpers to define RTC resources Fabien Parent
  2019-06-18 21:16 ` [PATCH 1/2] mfd: mt6397: Use PLATFORM_DEVID_NONE macro instead of -1 Matthias Brugger
  0 siblings, 2 replies; 4+ messages in thread
From: Fabien Parent @ 2019-06-18 15:43 UTC (permalink / raw)
  To: lee.jones, matthias.bgg
  Cc: Fabien Parent, linux-mediatek, linux-kernel, linux-arm-kernel

Use the correct macro when adding the MFD devices instead of using
directly '-1' value.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 drivers/mfd/mt6397-core.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index 337bcccdb914..190ed86ad93e 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -299,9 +299,9 @@ static int mt6397_probe(struct platform_device *pdev)
 		if (ret)
 			return ret;
 
-		ret = devm_mfd_add_devices(&pdev->dev, -1, mt6323_devs,
-					   ARRAY_SIZE(mt6323_devs), NULL,
-					   0, pmic->irq_domain);
+		ret = devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE,
+					   mt6323_devs, ARRAY_SIZE(mt6323_devs),
+					   NULL, 0, pmic->irq_domain);
 		break;
 
 	case MT6397_CID_CODE:
@@ -314,9 +314,9 @@ static int mt6397_probe(struct platform_device *pdev)
 		if (ret)
 			return ret;
 
-		ret = devm_mfd_add_devices(&pdev->dev, -1, mt6397_devs,
-					   ARRAY_SIZE(mt6397_devs), NULL,
-					   0, pmic->irq_domain);
+		ret = devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE,
+					   mt6397_devs, ARRAY_SIZE(mt6397_devs),
+					   NULL, 0, pmic->irq_domain);
 		break;
 
 	default:
-- 
2.20.1


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] mfd: mt6397: use DEFINE_RES_* helpers to define RTC resources
  2019-06-18 15:43 [PATCH 1/2] mfd: mt6397: Use PLATFORM_DEVID_NONE macro instead of -1 Fabien Parent
@ 2019-06-18 15:43 ` Fabien Parent
  2019-06-18 21:18   ` Matthias Brugger
  2019-06-18 21:16 ` [PATCH 1/2] mfd: mt6397: Use PLATFORM_DEVID_NONE macro instead of -1 Matthias Brugger
  1 sibling, 1 reply; 4+ messages in thread
From: Fabien Parent @ 2019-06-18 15:43 UTC (permalink / raw)
  To: lee.jones, matthias.bgg
  Cc: Fabien Parent, linux-mediatek, linux-kernel, linux-arm-kernel

Use the DEFINE_RES_{MEM,IRQ} to define the RTC reosurce for the MT6397
PMIC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 drivers/mfd/mt6397-core.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index 190ed86ad93e..1e315712870b 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -23,16 +23,8 @@
 #define MT6397_CID_CODE		0x97
 
 static const struct resource mt6397_rtc_resources[] = {
-	{
-		.start = MT6397_RTC_BASE,
-		.end   = MT6397_RTC_BASE + MT6397_RTC_SIZE,
-		.flags = IORESOURCE_MEM,
-	},
-	{
-		.start = MT6397_IRQ_RTC,
-		.end   = MT6397_IRQ_RTC,
-		.flags = IORESOURCE_IRQ,
-	},
+	DEFINE_RES_MEM(MT6397_RTC_BASE, MT6397_RTC_SIZE),
+	DEFINE_RES_IRQ(MT6397_IRQ_RTC),
 };
 
 static const struct resource mt6323_keys_resources[] = {
-- 
2.20.1


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] mfd: mt6397: Use PLATFORM_DEVID_NONE macro instead of -1
  2019-06-18 15:43 [PATCH 1/2] mfd: mt6397: Use PLATFORM_DEVID_NONE macro instead of -1 Fabien Parent
  2019-06-18 15:43 ` [PATCH 2/2] mfd: mt6397: use DEFINE_RES_* helpers to define RTC resources Fabien Parent
@ 2019-06-18 21:16 ` Matthias Brugger
  1 sibling, 0 replies; 4+ messages in thread
From: Matthias Brugger @ 2019-06-18 21:16 UTC (permalink / raw)
  To: Fabien Parent, lee.jones; +Cc: linux-mediatek, linux-kernel, linux-arm-kernel



On 18/06/2019 17:43, Fabien Parent wrote:
> Use the correct macro when adding the MFD devices instead of using
> directly '-1' value.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

> ---
>  drivers/mfd/mt6397-core.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> index 337bcccdb914..190ed86ad93e 100644
> --- a/drivers/mfd/mt6397-core.c
> +++ b/drivers/mfd/mt6397-core.c
> @@ -299,9 +299,9 @@ static int mt6397_probe(struct platform_device *pdev)
>  		if (ret)
>  			return ret;
>  
> -		ret = devm_mfd_add_devices(&pdev->dev, -1, mt6323_devs,
> -					   ARRAY_SIZE(mt6323_devs), NULL,
> -					   0, pmic->irq_domain);
> +		ret = devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE,
> +					   mt6323_devs, ARRAY_SIZE(mt6323_devs),
> +					   NULL, 0, pmic->irq_domain);
>  		break;
>  
>  	case MT6397_CID_CODE:
> @@ -314,9 +314,9 @@ static int mt6397_probe(struct platform_device *pdev)
>  		if (ret)
>  			return ret;
>  
> -		ret = devm_mfd_add_devices(&pdev->dev, -1, mt6397_devs,
> -					   ARRAY_SIZE(mt6397_devs), NULL,
> -					   0, pmic->irq_domain);
> +		ret = devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE,
> +					   mt6397_devs, ARRAY_SIZE(mt6397_devs),
> +					   NULL, 0, pmic->irq_domain);
>  		break;
>  
>  	default:
> 

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] mfd: mt6397: use DEFINE_RES_* helpers to define RTC resources
  2019-06-18 15:43 ` [PATCH 2/2] mfd: mt6397: use DEFINE_RES_* helpers to define RTC resources Fabien Parent
@ 2019-06-18 21:18   ` Matthias Brugger
  0 siblings, 0 replies; 4+ messages in thread
From: Matthias Brugger @ 2019-06-18 21:18 UTC (permalink / raw)
  To: Fabien Parent, lee.jones; +Cc: linux-mediatek, linux-kernel, linux-arm-kernel



On 18/06/2019 17:43, Fabien Parent wrote:
> Use the DEFINE_RES_{MEM,IRQ} to define the RTC reosurce for the MT6397
> PMIC.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

> ---
>  drivers/mfd/mt6397-core.c | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> index 190ed86ad93e..1e315712870b 100644
> --- a/drivers/mfd/mt6397-core.c
> +++ b/drivers/mfd/mt6397-core.c
> @@ -23,16 +23,8 @@
>  #define MT6397_CID_CODE		0x97
>  
>  static const struct resource mt6397_rtc_resources[] = {
> -	{
> -		.start = MT6397_RTC_BASE,
> -		.end   = MT6397_RTC_BASE + MT6397_RTC_SIZE,
> -		.flags = IORESOURCE_MEM,
> -	},
> -	{
> -		.start = MT6397_IRQ_RTC,
> -		.end   = MT6397_IRQ_RTC,
> -		.flags = IORESOURCE_IRQ,
> -	},
> +	DEFINE_RES_MEM(MT6397_RTC_BASE, MT6397_RTC_SIZE),
> +	DEFINE_RES_IRQ(MT6397_IRQ_RTC),
>  };
>  
>  static const struct resource mt6323_keys_resources[] = {
> 

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-18 15:43 [PATCH 1/2] mfd: mt6397: Use PLATFORM_DEVID_NONE macro instead of -1 Fabien Parent
2019-06-18 15:43 ` [PATCH 2/2] mfd: mt6397: use DEFINE_RES_* helpers to define RTC resources Fabien Parent
2019-06-18 21:18   ` Matthias Brugger
2019-06-18 21:16 ` [PATCH 1/2] mfd: mt6397: Use PLATFORM_DEVID_NONE macro instead of -1 Matthias Brugger

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org infradead-linux-arm-kernel@archiver.kernel.org
	public-inbox-index linux-arm-kernel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox