diff options
| author | Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> | 2026-09-09 16:55:56 +0200 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2026-10-21 13:15:28 -0500 |
| commit | 1dc62737b849676eb3af8b2cffa93a3778fa02d0 (patch) | |
| tree | de077f6073f5611c832920aae8c8c8d458b04c4d /include/linux/soc | |
| parent | cf3c9cc3c80da7679d52fadcdcd9bafe5929b117 (diff) | |
PCI/pwrctrl: tc9563: Switch per-port reset to GPIO descriptor API
Remove the local TC9563_GPIO_MASK and TC9563_GPIO_DEASSERT_BITS
definitions, which are no longer used after switching to the GPIO
descriptor API. Move TC9563_GPIO_CONFIG and TC9563_RESET_GPIO
definitions in tc9563.h header file.
Replace the direct regmap-based per-port reset logic in
assert_deassert_reset() with gpiod_direction_output() calls, falling
back to the legacy regmap approach only when no reset-gpios DT
property is present for a given port.
Add the reset GPIO pointer to struct tc9563_pwrctrl_cfg and introduce
tc9563_pwrctrl_parse_reset_line() to look up reset-gpios from each PCI
downstream port child node. The lookup is done lazily at the beginning of
power_on(), returning -EPROBE_DEFER until the GPIO chip is registered.
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Reviewed-by: Alex Elder <elder@riscstar.com>
Link: https://patch.msgid.link/20260909-pci-tc9563-aux-v5-4-c9b33f56c8d3@oss.qualcomm.com
Diffstat (limited to 'include/linux/soc')
| -rw-r--r-- | include/linux/soc/qcom/tc9563.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/soc/qcom/tc9563.h b/include/linux/soc/qcom/tc9563.h index 0dfd25747b9a..086f37a40d80 100644 --- a/include/linux/soc/qcom/tc9563.h +++ b/include/linux/soc/qcom/tc9563.h @@ -13,4 +13,7 @@ #define TC9563_GPIO_EN0_OFFSET 0x801208 #define TC9563_GPIO_OUT0_OFFSET 0x801210 +#define TC9563_GPIO_CONFIG TC9563_GPIO_EN0_OFFSET +#define TC9563_RESET_GPIO TC9563_GPIO_OUT0_OFFSET + #endif /* __QCOM_TC9563_H */ |
