diff mbox series

[net] ptp: ocp: add EEPROM_AT24 dependency

Message ID 20220623233141.31251-1-vfedorenko@novek.ru (mailing list archive)
State Rejected
Delegated to: Netdev Maintainers
Headers show
Series [net] ptp: ocp: add EEPROM_AT24 dependency | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers fail 1 blamed authors not CCed: davem@davemloft.net; 2 maintainers not CCed: richardcochran@gmail.com davem@davemloft.net
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Vadim Fedorenko June 23, 2022, 11:31 p.m. UTC
Various information which is provided via devlink is stored in
EEPROM and is not accessible unless at24 eeprom is supported.

Fixes: 773bda964921 ("ptp: ocp: Expose various resources on the timecard.")
Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
---
 drivers/ptp/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jonathan Lemon June 23, 2022, 11:53 p.m. UTC | #1
On Fri, Jun 24, 2022 at 02:31:41AM +0300, Vadim Fedorenko wrote:
> Various information which is provided via devlink is stored in
> EEPROM and is not accessible unless at24 eeprom is supported.
> 
> Fixes: 773bda964921 ("ptp: ocp: Expose various resources on the timecard.")
> Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
> ---
>  drivers/ptp/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig
> index 458218f88c5e..c86be47e69ed 100644
> --- a/drivers/ptp/Kconfig
> +++ b/drivers/ptp/Kconfig
> @@ -171,7 +171,7 @@ config PTP_1588_CLOCK_OCP
>  	tristate "OpenCompute TimeCard as PTP clock"
>  	depends on PTP_1588_CLOCK
>  	depends on HAS_IOMEM && PCI
> -	depends on I2C && MTD
> +	depends on I2C && EEPROM_AT24 && MTD
>  	depends on SERIAL_8250
>  	depends on !S390
>  	depends on COMMON_CLK

The intent was to list the minimum dependencies for the PTP clock to
operate and for the module to compile.

While EEPROM_AT24 is needed to read the chip, it can operate without it.

Full access to all features needs addtional configuration options, for
example, MTD_SPI_NOR, SPI_XILINX, I2C_XILINX.  These are not required
for the basic ptp clock operation.  

I think listing these configuration options would be more appropriate
in the Documentation entry.
Jakub Kicinski June 25, 2022, 5:45 a.m. UTC | #2
On Thu, 23 Jun 2022 16:53:08 -0700 Jonathan Lemon wrote:
> On Fri, Jun 24, 2022 at 02:31:41AM +0300, Vadim Fedorenko wrote:
> > Various information which is provided via devlink is stored in
> > EEPROM and is not accessible unless at24 eeprom is supported.
> > 
> > Fixes: 773bda964921 ("ptp: ocp: Expose various resources on the timecard.")
> > Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
> > ---
> >  drivers/ptp/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig
> > index 458218f88c5e..c86be47e69ed 100644
> > --- a/drivers/ptp/Kconfig
> > +++ b/drivers/ptp/Kconfig
> > @@ -171,7 +171,7 @@ config PTP_1588_CLOCK_OCP
> >  	tristate "OpenCompute TimeCard as PTP clock"
> >  	depends on PTP_1588_CLOCK
> >  	depends on HAS_IOMEM && PCI
> > -	depends on I2C && MTD
> > +	depends on I2C && EEPROM_AT24 && MTD
> >  	depends on SERIAL_8250
> >  	depends on !S390
> >  	depends on COMMON_CLK  
> 
> The intent was to list the minimum dependencies for the PTP clock to
> operate and for the module to compile.
> 
> While EEPROM_AT24 is needed to read the chip, it can operate without it.
> 
> Full access to all features needs addtional configuration options, for
> example, MTD_SPI_NOR, SPI_XILINX, I2C_XILINX.  These are not required
> for the basic ptp clock operation.  
> 
> I think listing these configuration options would be more appropriate
> in the Documentation entry.

You can try "imply".
Jonathan Lemon June 25, 2022, 8:36 p.m. UTC | #3
On Fri, Jun 24, 2022 at 10:45:30PM -0700, Jakub Kicinski wrote:
> On Thu, 23 Jun 2022 16:53:08 -0700 Jonathan Lemon wrote:
> > On Fri, Jun 24, 2022 at 02:31:41AM +0300, Vadim Fedorenko wrote:
> > > Various information which is provided via devlink is stored in
> > > EEPROM and is not accessible unless at24 eeprom is supported.
> > > 
> > > Fixes: 773bda964921 ("ptp: ocp: Expose various resources on the timecard.")
> > > Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
> > > ---
> > >  drivers/ptp/Kconfig | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig
> > > index 458218f88c5e..c86be47e69ed 100644
> > > --- a/drivers/ptp/Kconfig
> > > +++ b/drivers/ptp/Kconfig
> > > @@ -171,7 +171,7 @@ config PTP_1588_CLOCK_OCP
> > >  	tristate "OpenCompute TimeCard as PTP clock"
> > >  	depends on PTP_1588_CLOCK
> > >  	depends on HAS_IOMEM && PCI
> > > -	depends on I2C && MTD
> > > +	depends on I2C && EEPROM_AT24 && MTD
> > >  	depends on SERIAL_8250
> > >  	depends on !S390
> > >  	depends on COMMON_CLK  
> > 
> > The intent was to list the minimum dependencies for the PTP clock to
> > operate and for the module to compile.
> > 
> > While EEPROM_AT24 is needed to read the chip, it can operate without it.
> > 
> > Full access to all features needs addtional configuration options, for
> > example, MTD_SPI_NOR, SPI_XILINX, I2C_XILINX.  These are not required
> > for the basic ptp clock operation.  
> > 
> > I think listing these configuration options would be more appropriate
> > in the Documentation entry.
> 
> You can try "imply".

We have been down this road before.

https://lore.kernel.org/netdev/CAK8P3a3QGF2=WZz6N8wQo2ZQxmVqKToHGmhT4wEtB7tAL+-ruQ@mail.gmail.com/

https://lore.kernel.org/netdev/20210825211733.264844-1-jonathan.lemon@gmail.com/
diff mbox series

Patch

diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig
index 458218f88c5e..c86be47e69ed 100644
--- a/drivers/ptp/Kconfig
+++ b/drivers/ptp/Kconfig
@@ -171,7 +171,7 @@  config PTP_1588_CLOCK_OCP
 	tristate "OpenCompute TimeCard as PTP clock"
 	depends on PTP_1588_CLOCK
 	depends on HAS_IOMEM && PCI
-	depends on I2C && MTD
+	depends on I2C && EEPROM_AT24 && MTD
 	depends on SERIAL_8250
 	depends on !S390
 	depends on COMMON_CLK