[PATCH v10 6/6] usb: typec: tcpm/tcpci_maxim: deprecate WAR for setting charger mode

Heikki Krogerus heikki.krogerus at linux.intel.com
Thu Apr 2 07:33:31 PDT 2026


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



More information about the linux-arm-kernel mailing list