drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
Source file repositories/reference/linux-study-clean/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c- Extension
.c- Size
- 16431 bytes
- Lines
- 663
- Domain
- Representative Device Path
- Bucket
- PCIe NVMe Storage Path
- Inferred role
- Representative Device Path: implementation source
- Status
- source implementation candidate
Why This File Exists
Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/array_size.hlinux/bitfield.hlinux/bits.hlinux/delay.hlinux/device.hlinux/gpio/consumer.hlinux/i2c.hlinux/mod_devicetable.hlinux/module.hlinux/of.hlinux/of_platform.hlinux/pci.hlinux/pci-pwrctrl.hlinux/platform_device.hlinux/regulator/consumer.hlinux/string.hlinux/types.hlinux/unaligned.h../pci.h
Detected Declarations
struct tc9563_pwrctrl_reg_settingstruct tc9563_pwrctrl_cfgstruct tc9563_pwrctrlenum tc9563_pwrctrl_portsfunction tc9563_pwrctrl_i2c_writefunction tc9563_pwrctrl_i2c_readfunction tc9563_pwrctrl_i2c_bulk_writefunction tc9563_pwrctrl_disable_portfunction tc9563_pwrctrl_set_l0s_l1_entry_delayfunction tc9563_pwrctrl_set_tx_amplitudefunction tc9563_pwrctrl_disable_dfefunction tc9563_pwrctrl_set_nftsfunction tc9563_pwrctrl_assert_deassert_resetfunction tc9563_pwrctrl_parse_device_dtfunction tc9563_pwrctrl_power_offfunction tc9563_pwrctrl_power_onfunction tc9563_pwrctrl_probefunction tc9563_pwrctrl_remove
Annotated Snippet
struct tc9563_pwrctrl_reg_setting {
unsigned int offset;
unsigned int val;
};
enum tc9563_pwrctrl_ports {
TC9563_USP,
TC9563_DSP1,
TC9563_DSP2,
TC9563_DSP3,
TC9563_ETHERNET,
TC9563_MAX
};
struct tc9563_pwrctrl_cfg {
u32 l0s_delay;
u32 l1_delay;
u32 tx_amp;
u8 nfts[2]; /* GEN1 & GEN2 */
bool disable_dfe;
bool disable_port;
};
#define TC9563_PWRCTL_MAX_SUPPLY 6
static const char *const tc9563_supply_names[TC9563_PWRCTL_MAX_SUPPLY] = {
"vddc",
"vdd18",
"vdd09",
"vddio1",
"vddio2",
"vddio18",
};
struct tc9563_pwrctrl {
struct pci_pwrctrl pwrctrl;
struct regulator_bulk_data supplies[TC9563_PWRCTL_MAX_SUPPLY];
struct tc9563_pwrctrl_cfg cfg[TC9563_MAX];
struct gpio_desc *reset_gpio;
struct i2c_adapter *adapter;
struct i2c_client *client;
};
/*
* downstream port power off sequence, hardcoding the address
* as we don't know register names for these register offsets.
*/
static const struct tc9563_pwrctrl_reg_setting common_pwroff_seq[] = {
{0x82900c, 0x1},
{0x829010, 0x1},
{0x829018, 0x0},
{0x829020, 0x1},
{0x82902c, 0x1},
{0x829030, 0x1},
{0x82903c, 0x1},
{0x829058, 0x0},
{0x82905c, 0x1},
{0x829060, 0x1},
{0x8290cc, 0x1},
{0x8290d0, 0x1},
{0x8290d8, 0x1},
{0x8290e0, 0x1},
{0x8290e8, 0x1},
{0x8290ec, 0x1},
{0x8290f4, 0x1},
{0x82910c, 0x1},
{0x829110, 0x1},
{0x829114, 0x1},
};
static const struct tc9563_pwrctrl_reg_setting dsp1_pwroff_seq[] = {
{TC9563_PORT_ACCESS_ENABLE, 0x2},
{TC9563_PORT_LANE_ACCESS_ENABLE, 0x3},
{TC9563_POWER_CONTROL, 0x014f4804},
{TC9563_POWER_CONTROL_OVREN, 0x1},
{TC9563_PORT_ACCESS_ENABLE, 0x4},
};
static const struct tc9563_pwrctrl_reg_setting dsp2_pwroff_seq[] = {
{TC9563_PORT_ACCESS_ENABLE, 0x8},
{TC9563_PORT_LANE_ACCESS_ENABLE, 0x1},
{TC9563_POWER_CONTROL, 0x014f4804},
{TC9563_POWER_CONTROL_OVREN, 0x1},
{TC9563_PORT_ACCESS_ENABLE, 0x8},
};
/*
* Since all transfers are initiated by the probe, no locks are necessary,
* as there are no concurrent calls.
*/
Annotation
- Immediate include surface: `linux/array_size.h`, `linux/bitfield.h`, `linux/bits.h`, `linux/delay.h`, `linux/device.h`, `linux/gpio/consumer.h`, `linux/i2c.h`, `linux/mod_devicetable.h`.
- Detected declarations: `struct tc9563_pwrctrl_reg_setting`, `struct tc9563_pwrctrl_cfg`, `struct tc9563_pwrctrl`, `enum tc9563_pwrctrl_ports`, `function tc9563_pwrctrl_i2c_write`, `function tc9563_pwrctrl_i2c_read`, `function tc9563_pwrctrl_i2c_bulk_write`, `function tc9563_pwrctrl_disable_port`, `function tc9563_pwrctrl_set_l0s_l1_entry_delay`, `function tc9563_pwrctrl_set_tx_amplitude`.
- Atlas domain: Representative Device Path / PCIe NVMe Storage Path.
- 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.