On Wed, Aug 25, 2021 at 12:55:25PM +0200, Arnd Bergmann wrote:
On Tue, Aug 24, 2021 at 11:48 PM Randy Dunlap [off-list ref] wrote:
quoted
On 8/20/21 8:31 AM, Richard Cochran wrote:
quoted
On Fri, Aug 20, 2021 at 12:45:42PM +0200, Arnd Bergmann wrote:
quoted
I would also suggest removing all the 'imply' statements, they
usually don't do what the original author intended anyway.
If there is a compile-time dependency with those drivers,
it should be 'depends on', otherwise they can normally be
left out.
+1
Hi,
Removing the "imply" statements is simple enough and the driver
still builds cleanly without them, so Yes, they aren't needed here.
Removing the SPI dependency is also clean.
The driver does use I2C, MTD, and SERIAL_8250 interfaces, so they
can't be removed without some other driver changes, like using
#ifdef/#endif (or #if IS_ENABLED()) blocks and some function stubs.
If the SERIAL_8250 dependency is actually required, then using
'depends on' for this is probably better than an IS_ENABLED() check.
The 'select' is definitely misplaced here, that doesn't even work when
the dependencies fo 8250 itself are not met, and it does force-enable
the entire TTY subsystem.
So, something like the following (untested) patch?
I admit to not fully understanding all the nuances around Kconfig.
--
Jonathan
diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig
index 32660dc11354..c3372efd1bb7 100644
--- a/drivers/ptp/Kconfig
+++ b/drivers/ptp/Kconfig
@@ -171,15 +171,10 @@ config PTP_1588_CLOCK_OCP
tristate "OpenCompute TimeCard as PTP clock"
depends on PTP_1588_CLOCK
depends on HAS_IOMEM && PCI
- depends on SPI && I2C && MTD
+ depends on I2C && MTD
+ depends on SERIAL_8250
depends on !S390
- imply SPI_MEM
- imply SPI_XILINX
- imply MTD_SPI_NOR
- imply I2C_XILINX
- select SERIAL_8250
select NET_DEVLINK
-
default n
help
This driver adds support for an OpenCompute time card.