drivers/nvmem/stm32-bsec-optee-ta.h
Source file repositories/reference/linux-study-clean/drivers/nvmem/stm32-bsec-optee-ta.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/nvmem/stm32-bsec-optee-ta.h- Extension
.h- Size
- 2194 bytes
- Lines
- 81
- Domain
- Driver Families
- Bucket
- drivers/nvmem
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
function stm32_bsec_optee_ta_openfunction stm32_bsec_optee_ta_closefunction stm32_bsec_optee_ta_write
Annotated Snippet
#if IS_ENABLED(CONFIG_NVMEM_STM32_BSEC_OPTEE_TA)
/**
* stm32_bsec_optee_ta_open() - initialize the STM32 BSEC TA
* @ctx: the OP-TEE context on success
*
* Return:
* On success, 0. On failure, -errno.
*/
int stm32_bsec_optee_ta_open(struct tee_context **ctx);
/**
* stm32_bsec_optee_ta_close() - release the STM32 BSEC TA
* @ctx: the OP-TEE context
*
* This function used to clean the OP-TEE resources initialized in
* stm32_bsec_optee_ta_open(); it can be used as callback to
* devm_add_action_or_reset()
*/
void stm32_bsec_optee_ta_close(void *ctx);
/**
* stm32_bsec_optee_ta_read() - nvmem read access using TA client driver
* @ctx: the OP-TEE context provided by stm32_bsec_optee_ta_open
* @offset: nvmem offset
* @buf: buffer to fill with nvem values
* @bytes: number of bytes to read
*
* Return:
* On success, 0. On failure, -errno.
*/
int stm32_bsec_optee_ta_read(struct tee_context *ctx, unsigned int offset,
void *buf, size_t bytes);
/**
* stm32_bsec_optee_ta_write() - nvmem write access using TA client driver
* @ctx: the OP-TEE context provided by stm32_bsec_optee_ta_open
* @lower: number of lower OTP, not protected by ECC
* @offset: nvmem offset
* @buf: buffer with nvem values
* @bytes: number of bytes to write
*
* Return:
* On success, 0. On failure, -errno.
*/
int stm32_bsec_optee_ta_write(struct tee_context *ctx, unsigned int lower,
unsigned int offset, void *buf, size_t bytes);
#else
static inline int stm32_bsec_optee_ta_open(struct tee_context **ctx)
{
return -EOPNOTSUPP;
}
static inline void stm32_bsec_optee_ta_close(void *ctx)
{
}
static inline int stm32_bsec_optee_ta_read(struct tee_context *ctx,
unsigned int offset, void *buf,
size_t bytes)
{
return -EOPNOTSUPP;
}
static inline int stm32_bsec_optee_ta_write(struct tee_context *ctx,
unsigned int lower,
unsigned int offset, void *buf,
size_t bytes)
{
return -EOPNOTSUPP;
}
#endif /* CONFIG_NVMEM_STM32_BSEC_OPTEE_TA */
Annotation
- Detected declarations: `function stm32_bsec_optee_ta_open`, `function stm32_bsec_optee_ta_close`, `function stm32_bsec_optee_ta_write`.
- Atlas domain: Driver Families / drivers/nvmem.
- Implementation status: source 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.