Skip to content

Conversation

gastmaier
Copy link
Contributor

@gastmaier gastmaier commented Sep 8, 2025

PR Description

As a bool, the driver cannot be compile as a module, even though the driver supports it.

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have tested the changes on the relevant hardware
  • I have updated the documentation outside this repo accordingly (if there is the case)

@gastmaier
Copy link
Contributor Author

gastmaier commented Sep 8, 2025

@pamolloy easy-review, just a driver that supports as a module but wrong kconfig type.
(the infer symbol thing inferred correctly again {'ADI_AXI_DATA_OFFLOAD', 'CF_AXI_DDS'} 🤩 )

The drivers depends on the following methods:

- axi_data_offload_ctrl_bypass
- axi_data_offload_ctrl_oneshot
- devm_axi_data_offload_get_optional

If optional, a proper ops interface needs to be added.

Signed-off-by: Jorge Marques <[email protected]>
As a bool, the driver cannot be compile as a module, even though the
driver supports it.

Signed-off-by: Jorge Marques <[email protected]>
@gastmaier gastmaier force-pushed the staging/adi-axi-data-offload branch from d73a8e2 to dc65546 Compare September 8, 2025 17:22
@gastmaier
Copy link
Contributor Author

Updated defconfigs.
Note to self:
Add defconfig changed test:

diff --git a/arch/arm/configs/zynq_m2k_defconfig b/arch/arm/configs/zynq_m2k_defconfig
index 5ec86bdb4e9..0349d2a6474 100644
--- a/arch/arm/configs/zynq_m2k_defconfig
+++ b/arch/arm/configs/zynq_m2k_defconfig
@@ -260,8 +260,6 @@ CONFIG_AD9963=y
 CONFIG_ADM1177=y
 CONFIG_XILINX_XADC=y
 CONFIG_AD5064=y
-CONFIG_CF_AXI_DDS=y
-CONFIG_M2K_DAC=y
 CONFIG_ADF4360=y
 CONFIG_M2K_LOGIC_ANALYZER=y
 # CONFIG_DNOTIFY is not set
Defconfig file should be updated: 'arch/arm/configs/zynq_m2k_defconfig'
Run 'make savedefconfig', overwrite it and commit 

tristate "Analog Devices CoreFPGA AXI DDS driver"
depends on SPI
depends on COMMON_CLK
depends on ADI_AXI_DATA_OFFLOAD
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I think this is only because we dropped the stubs for the methods you mention in the commit message. AFAIR, data offloading is an optional feature so I think depending on it is "too much".

We might need something better than #ifdef CONFIG_ADI_AXI_DATA_OFFLOAD though

Copy link
Contributor Author

@gastmaier gastmaier Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this is only required because we made this way, we added the methods directly in the axi dds driver and used a define in the include of the offload to make it optional, but this approach doesn't work with tristates.
it needs to be done through ops, where the offload pointer is acquired during runtime.
the focus of the pr is to allow the offload to be compiled as a module

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I guess the original author indeed did not wanted it to be compiled as a module :).

but this approach doesn't work with tristates

Why not? Can't we use IS_REACHABLE() or something like that? And compromise that it won't be available if the DDS is builtin but OFFLOAD is a module?

Anyways, I'm not 100% happy that we now depend on an "optional" feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree we can use IS_REACHABLE in this driver to fallback . making it only compatible with built-in offload for now, or discard this pr and keep built-in only
.

CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=16384
CONFIG_ADI_AXI_DATA_OFFLOAD=y
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I feel this is required because we "made" it that way

@gastmaier gastmaier marked this pull request as draft September 9, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants