diff options
| author | Abhijit Gangurde <[email protected]> | 2023-10-17 16:05:03 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2023-10-27 11:23:24 +0000 |
| commit | e3cfd49cb9491ac1cc233a4b9e098688b4ab281d (patch) | |
| tree | 15029eab27a1d6205226fa16d723222bb7363d84 /drivers/cdx/controller/mcdi_functions.h | |
| parent | cdx: Register cdx bus as a device on cdx subsystem (diff) | |
| download | kernel-e3cfd49cb9491ac1cc233a4b9e098688b4ab281d.tar.gz kernel-e3cfd49cb9491ac1cc233a4b9e098688b4ab281d.zip | |
cdx: add support for bus enable and disable
CDX bus needs to be disabled before updating/writing devices
in the FPGA. Once the devices are written, the bus shall be
rescanned. This change provides sysfs entry to enable/disable the
CDX bus.
Co-developed-by: Nipun Gupta <[email protected]>
Signed-off-by: Nipun Gupta <[email protected]>
Signed-off-by: Abhijit Gangurde <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/cdx/controller/mcdi_functions.h')
| -rw-r--r-- | drivers/cdx/controller/mcdi_functions.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/cdx/controller/mcdi_functions.h b/drivers/cdx/controller/mcdi_functions.h index 7440ace5539a..28973d5ec3ab 100644 --- a/drivers/cdx/controller/mcdi_functions.h +++ b/drivers/cdx/controller/mcdi_functions.h @@ -48,6 +48,24 @@ int cdx_mcdi_get_dev_config(struct cdx_mcdi *cdx, struct cdx_dev_params *dev_params); /** + * cdx_mcdi_bus_enable - Enable CDX bus represented by bus_num + * @cdx: pointer to MCDI interface. + * @bus_num: Bus number. + * + * Return: 0 on success, <0 on failure + */ +int cdx_mcdi_bus_enable(struct cdx_mcdi *cdx, u8 bus_num); + +/** + * cdx_mcdi_bus_disable - Disable CDX bus represented by bus_num + * @cdx: pointer to MCDI interface. + * @bus_num: Bus number. + * + * Return: 0 on success, <0 on failure + */ +int cdx_mcdi_bus_disable(struct cdx_mcdi *cdx, u8 bus_num); + +/** * cdx_mcdi_reset_device - Reset cdx device represented by bus_num:dev_num * @cdx: pointer to MCDI interface. * @bus_num: Bus number. |
