LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] HISI LPC: Add Kconfig MFD_CORE dependency
@ 2018-04-19 11:55 John Garry
  2018-04-19 12:00 ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: John Garry @ 2018-04-19 11:55 UTC (permalink / raw)
  To: xuwei5
  Cc: arnd, geert+renesas, horms+renesas, gregkh, paul.gortmaker,
	robin.murphy, sebastien.bourdelin, bogdan.purcareata, tony,
	linux-kernel, linuxarm, helgaas, olof, khilman, tanxiaojun,
	John Garry

For ACPI support of the HiSilicon LPC driver we depend
on MFD_CORE config.

Currently the HiSi LPC Kconfig entry does not define this
dependency, so add it.

Fixes: e0aa1563f894 ("HISI LPC: Add ACPI support")
Reported-and-tested-by: Tan Xiaojun <tanxiaojun@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>

diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index d1c0b60..6dc177b 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -33,6 +33,7 @@ config HISILICON_LPC
 	bool "Support for ISA I/O space on HiSilicon Hip06/7"
 	depends on ARM64 && (ARCH_HISI || COMPILE_TEST)
 	select INDIRECT_PIO
+	select MFD_CORE if ACPI
 	help
 	  Driver to enable I/O access to devices attached to the Low Pin
 	  Count bus on the HiSilicon Hip06/7 SoC.
-- 
1.9.1

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

* Re: [PATCH] HISI LPC: Add Kconfig MFD_CORE dependency
  2018-04-19 11:55 [PATCH] HISI LPC: Add Kconfig MFD_CORE dependency John Garry
@ 2018-04-19 12:00 ` Arnd Bergmann
  2018-04-19 13:08   ` John Garry
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2018-04-19 12:00 UTC (permalink / raw)
  To: John Garry
  Cc: xuwei (O),
	Geert Uytterhoeven, Simon Horman, gregkh, Paul Gortmaker,
	Robin Murphy, Sebastien Bourdelin, bogdan.purcareata,
	Tony Lindgren, Linux Kernel Mailing List, Linuxarm,
	Bjorn Helgaas, Olof Johansson, Kevin Hilman, tanxiaojun

On Thu, Apr 19, 2018 at 1:55 PM, John Garry <john.garry@huawei.com> wrote:
> For ACPI support of the HiSilicon LPC driver we depend
> on MFD_CORE config.
>
> Currently the HiSi LPC Kconfig entry does not define this
> dependency, so add it.
>
> Fixes: e0aa1563f894 ("HISI LPC: Add ACPI support")
> Reported-and-tested-by: Tan Xiaojun <tanxiaojun@huawei.com>
> Signed-off-by: John Garry <john.garry@huawei.com>

Can you explain the specific dependency? Normally MFD_CORE gets
selected by an MFD driver but not other drivers.

       Arnd

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

* Re: [PATCH] HISI LPC: Add Kconfig MFD_CORE dependency
  2018-04-19 12:00 ` Arnd Bergmann
@ 2018-04-19 13:08   ` John Garry
  2018-04-19 13:29     ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: John Garry @ 2018-04-19 13:08 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: xuwei (O),
	Geert Uytterhoeven, Simon Horman, gregkh, Paul Gortmaker,
	Robin Murphy, Sebastien Bourdelin, bogdan.purcareata,
	Tony Lindgren, Linux Kernel Mailing List, Linuxarm,
	Bjorn Helgaas, Olof Johansson, Kevin Hilman, tanxiaojun

On 19/04/2018 13:00, Arnd Bergmann wrote:
> On Thu, Apr 19, 2018 at 1:55 PM, John Garry <john.garry@huawei.com> wrote:
>> For ACPI support of the HiSilicon LPC driver we depend
>> on MFD_CORE config.
>>
>> Currently the HiSi LPC Kconfig entry does not define this
>> dependency, so add it.
>>
>> Fixes: e0aa1563f894 ("HISI LPC: Add ACPI support")
>> Reported-and-tested-by: Tan Xiaojun <tanxiaojun@huawei.com>
>> Signed-off-by: John Garry <john.garry@huawei.com>
>
> Can you explain the specific dependency? Normally MFD_CORE gets
> selected by an MFD driver but not other drivers.
>

For each device on the LPC bus we create an MFD.

The reason we do this is that we need to set the resources of the 
derived MFD, as we should not modify the original ACPI device created in 
ACPI scan. Details are in the log for e0aa1563f894.

Shall I update commit message updated with this info? Or were you just 
interested in the motivation for using MFD?

Thanks,
John

>        Arnd
>
> .
>

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

* Re: [PATCH] HISI LPC: Add Kconfig MFD_CORE dependency
  2018-04-19 13:08   ` John Garry
@ 2018-04-19 13:29     ` Arnd Bergmann
  2018-04-19 13:42       ` John Garry
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2018-04-19 13:29 UTC (permalink / raw)
  To: John Garry
  Cc: xuwei (O),
	Geert Uytterhoeven, Simon Horman, gregkh, Paul Gortmaker,
	Robin Murphy, Sebastien Bourdelin, bogdan.purcareata,
	Tony Lindgren, Linux Kernel Mailing List, Linuxarm,
	Bjorn Helgaas, Olof Johansson, Kevin Hilman, tanxiaojun

On Thu, Apr 19, 2018 at 3:08 PM, John Garry <john.garry@huawei.com> wrote:
> On 19/04/2018 13:00, Arnd Bergmann wrote:
>>
>> On Thu, Apr 19, 2018 at 1:55 PM, John Garry <john.garry@huawei.com> wrote:
>>>
>>> For ACPI support of the HiSilicon LPC driver we depend
>>> on MFD_CORE config.
>>>
>>> Currently the HiSi LPC Kconfig entry does not define this
>>> dependency, so add it.
>>>
>>> Fixes: e0aa1563f894 ("HISI LPC: Add ACPI support")
>>> Reported-and-tested-by: Tan Xiaojun <tanxiaojun@huawei.com>
>>> Signed-off-by: John Garry <john.garry@huawei.com>
>>
>>
>> Can you explain the specific dependency? Normally MFD_CORE gets
>> selected by an MFD driver but not other drivers.
>>
>
> For each device on the LPC bus we create an MFD.
>
> The reason we do this is that we need to set the resources of the derived
> MFD, as we should not modify the original ACPI device created in ACPI scan.
> Details are in the log for e0aa1563f894.
>
> Shall I update commit message updated with this info? Or were you just
> interested in the motivation for using MFD?

I think it would be good to update the description. I had missed the part
where an LPC device becomes a platform_device through an mfd_cell
rather than becoming a device with bus_type=&isa_bus_type as I think
was the case in earlier versions of your patch series.

     Arnd

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

* Re: [PATCH] HISI LPC: Add Kconfig MFD_CORE dependency
  2018-04-19 13:29     ` Arnd Bergmann
@ 2018-04-19 13:42       ` John Garry
  0 siblings, 0 replies; 5+ messages in thread
From: John Garry @ 2018-04-19 13:42 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: xuwei (O),
	Geert Uytterhoeven, Simon Horman, gregkh, Paul Gortmaker,
	Robin Murphy, Sebastien Bourdelin, bogdan.purcareata,
	Tony Lindgren, Linux Kernel Mailing List, Linuxarm,
	Bjorn Helgaas, Olof Johansson, Kevin Hilman, tanxiaojun

On 19/04/2018 14:29, Arnd Bergmann wrote:
> On Thu, Apr 19, 2018 at 3:08 PM, John Garry <john.garry@huawei.com> wrote:
>> On 19/04/2018 13:00, Arnd Bergmann wrote:
>>>
>>> On Thu, Apr 19, 2018 at 1:55 PM, John Garry <john.garry@huawei.com> wrote:
>>>>
>>>> For ACPI support of the HiSilicon LPC driver we depend
>>>> on MFD_CORE config.
>>>>
>>>> Currently the HiSi LPC Kconfig entry does not define this
>>>> dependency, so add it.
>>>>
>>>> Fixes: e0aa1563f894 ("HISI LPC: Add ACPI support")
>>>> Reported-and-tested-by: Tan Xiaojun <tanxiaojun@huawei.com>
>>>> Signed-off-by: John Garry <john.garry@huawei.com>
>>>
>>>
>>> Can you explain the specific dependency? Normally MFD_CORE gets
>>> selected by an MFD driver but not other drivers.
>>>
>>
>> For each device on the LPC bus we create an MFD.
>>
>> The reason we do this is that we need to set the resources of the derived
>> MFD, as we should not modify the original ACPI device created in ACPI scan.
>> Details are in the log for e0aa1563f894.
>>
>> Shall I update commit message updated with this info? Or were you just
>> interested in the motivation for using MFD?
>
> I think it would be good to update the description. I had missed the part
> where an LPC device becomes a platform_device through an mfd_cell
> rather than becoming a device with bus_type=&isa_bus_type as I think
> was the case in earlier versions of your patch series.
>

OK, fine. FYI, this was originally discussed here: 
https://lkml.org/lkml/2017/6/13/602

BTW, as for merging patches for this driver, it would seem the right 
place for it to go through arm/soc tree (obviously depending on 
dependencies). Since xuwei is away this week, could you kindly pick up 
v2 for fixes?

Thanks,
John


>      Arnd
>
> .
>

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

end of thread, other threads:[~2018-04-19 13:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-19 11:55 [PATCH] HISI LPC: Add Kconfig MFD_CORE dependency John Garry
2018-04-19 12:00 ` Arnd Bergmann
2018-04-19 13:08   ` John Garry
2018-04-19 13:29     ` Arnd Bergmann
2018-04-19 13:42       ` John Garry

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).