drivers/usb/typec/tcpm/tcpci_maxim.h
Source file repositories/reference/linux-study-clean/drivers/usb/typec/tcpm/tcpci_maxim.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/typec/tcpm/tcpci_maxim.h- Extension
.h- Size
- 3507 bytes
- Lines
- 103
- Domain
- Driver Families
- Bucket
- drivers/usb
- 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
struct max_tcpci_chipenum contamiant_statefunction max_tcpci_read16function max_tcpci_write16function max_tcpci_read8function max_tcpci_write8
Annotated Snippet
struct max_tcpci_chip {
struct tcpci_data data;
struct tcpci *tcpci;
struct device *dev;
struct i2c_client *client;
struct tcpm_port *port;
enum contamiant_state contaminant_state;
bool veto_vconn_swap;
struct regulator *vbus_reg;
};
static inline int max_tcpci_read16(struct max_tcpci_chip *chip, unsigned int reg, u16 *val)
{
return regmap_raw_read(chip->data.regmap, reg, val, sizeof(u16));
}
static inline int max_tcpci_write16(struct max_tcpci_chip *chip, unsigned int reg, u16 val)
{
return regmap_raw_write(chip->data.regmap, reg, &val, sizeof(u16));
}
static inline int max_tcpci_read8(struct max_tcpci_chip *chip, unsigned int reg, u8 *val)
{
return regmap_raw_read(chip->data.regmap, reg, val, sizeof(u8));
}
static inline int max_tcpci_write8(struct max_tcpci_chip *chip, unsigned int reg, u8 val)
{
return regmap_raw_write(chip->data.regmap, reg, &val, sizeof(u8));
}
/**
* max_contaminant_is_contaminant - Test if CC was toggled due to contaminant
*
* @chip: Handle to a struct max_tcpci_chip
* @disconnect_while_debounce: Whether the disconnect was detected when CC
* pins were debouncing
* @cc_handled: Returns whether or not update to CC status was handled here
*
* Determine if a contaminant was detected.
*
* Returns: true if a contaminant was detected, false otherwise. cc_handled
* is updated to reflect whether or not further CC handling is required.
*/
bool max_contaminant_is_contaminant(struct max_tcpci_chip *chip, bool disconnect_while_debounce,
bool *cc_handled);
#endif // TCPCI_MAXIM_H_
Annotation
- Detected declarations: `struct max_tcpci_chip`, `enum contamiant_state`, `function max_tcpci_read16`, `function max_tcpci_write16`, `function max_tcpci_read8`, `function max_tcpci_write8`.
- Atlas domain: Driver Families / drivers/usb.
- 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.