include/linux/mhi_ep.h
Source file repositories/reference/linux-study-clean/include/linux/mhi_ep.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/mhi_ep.h- Extension
.h- Size
- 10889 bytes
- Lines
- 306
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/dma-direction.hlinux/mhi.h
Detected Declarations
struct mhi_ep_channel_configstruct mhi_ep_cntrl_configstruct mhi_ep_db_infostruct mhi_ep_buf_infostruct mhi_ep_cntrlstruct mhi_ep_devicestruct mhi_ep_driver
Annotated Snippet
struct device_driver driver;
int (*probe)(struct mhi_ep_device *mhi_ep,
const struct mhi_device_id *id);
void (*remove)(struct mhi_ep_device *mhi_ep);
void (*ul_xfer_cb)(struct mhi_ep_device *mhi_dev,
struct mhi_result *result);
void (*dl_xfer_cb)(struct mhi_ep_device *mhi_dev,
struct mhi_result *result);
};
#define to_mhi_ep_device(dev) container_of(dev, struct mhi_ep_device, dev)
#define to_mhi_ep_driver(drv) container_of_const(drv, struct mhi_ep_driver, driver)
/*
* module_mhi_ep_driver() - Helper macro for drivers that don't do
* anything special other than using default mhi_ep_driver_register() and
* mhi_ep_driver_unregister(). This eliminates a lot of boilerplate.
* Each module may only use this macro once.
*/
#define module_mhi_ep_driver(mhi_drv) \
module_driver(mhi_drv, mhi_ep_driver_register, \
mhi_ep_driver_unregister)
/*
* Macro to avoid include chaining to get THIS_MODULE
*/
#define mhi_ep_driver_register(mhi_drv) \
__mhi_ep_driver_register(mhi_drv, THIS_MODULE)
/**
* __mhi_ep_driver_register - Register a driver with MHI Endpoint bus
* @mhi_drv: Driver to be associated with the device
* @owner: The module owner
*
* Return: 0 if driver registrations succeeds, a negative error code otherwise.
*/
int __mhi_ep_driver_register(struct mhi_ep_driver *mhi_drv, struct module *owner);
/**
* mhi_ep_driver_unregister - Unregister a driver from MHI Endpoint bus
* @mhi_drv: Driver associated with the device
*/
void mhi_ep_driver_unregister(struct mhi_ep_driver *mhi_drv);
/**
* mhi_ep_register_controller - Register MHI Endpoint controller
* @mhi_cntrl: MHI Endpoint controller to register
* @config: Configuration to use for the controller
*
* Return: 0 if controller registrations succeeds, a negative error code otherwise.
*/
int mhi_ep_register_controller(struct mhi_ep_cntrl *mhi_cntrl,
const struct mhi_ep_cntrl_config *config);
/**
* mhi_ep_unregister_controller - Unregister MHI Endpoint controller
* @mhi_cntrl: MHI Endpoint controller to unregister
*/
void mhi_ep_unregister_controller(struct mhi_ep_cntrl *mhi_cntrl);
/**
* mhi_ep_power_up - Power up the MHI endpoint stack
* @mhi_cntrl: MHI Endpoint controller
*
* Return: 0 if power up succeeds, a negative error code otherwise.
*/
int mhi_ep_power_up(struct mhi_ep_cntrl *mhi_cntrl);
/**
* mhi_ep_power_down - Power down the MHI endpoint stack
* @mhi_cntrl: MHI controller
*/
void mhi_ep_power_down(struct mhi_ep_cntrl *mhi_cntrl);
/**
* mhi_ep_queue_is_empty - Determine whether the transfer queue is empty
* @mhi_dev: Device associated with the channels
* @dir: DMA direction for the channel
*
* Return: true if the queue is empty, false otherwise.
*/
bool mhi_ep_queue_is_empty(struct mhi_ep_device *mhi_dev, enum dma_data_direction dir);
/**
* mhi_ep_queue_skb - Send SKBs to host over MHI Endpoint
* @mhi_dev: Device associated with the DL channel
* @skb: SKBs to be queued
*
* Return: 0 if the SKBs has been sent successfully, a negative error code otherwise.
*/
Annotation
- Immediate include surface: `linux/dma-direction.h`, `linux/mhi.h`.
- Detected declarations: `struct mhi_ep_channel_config`, `struct mhi_ep_cntrl_config`, `struct mhi_ep_db_info`, `struct mhi_ep_buf_info`, `struct mhi_ep_cntrl`, `struct mhi_ep_device`, `struct mhi_ep_driver`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: pattern implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.