Re: [PATCH v10 6/6] usb: typec: tcpm/tcpci_maxim: deprecate WAR for setting charger mode
From: Heikki Krogerus
Date: Thu Apr 02 2026 - 10:36:33 EST
Hi Amit,
> +static int get_vbus_regulator_handle(struct max_tcpci_chip *chip)
> +{
> + if (IS_ERR_OR_NULL(chip->vbus_reg)) {
> + chip->vbus_reg = devm_regulator_get_exclusive(chip->dev,
> + "vbus");
Sorry to go back to this, but why can't you just get the regulator in
max_tcpci_probe()?
thanks,
> + if (IS_ERR_OR_NULL(chip->vbus_reg)) {
> + dev_err(chip->dev,
> + "Failed to get vbus regulator handle\n");
> + return -ENODEV;
> + }
> + }
> +
> + return 0;
> +}
--
heikki