Re: [PATCH v4 17/20] extcon: intel-cht-wc: Support devs with Micro-B / USB-2 only Type-C connectors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 30, 2022 at 09:45:54PM +0100, Hans de Goede wrote:
> So far the extcon-intel-cht-wc code has only been tested on devices with
> a Type-C connector with USB-PD, USB3 (superspeed) and DP-altmode support
> through a FUSB302 Type-C controller.
> 
> Some devices with the intel-cht-wc PMIC however come with an USB-micro-B
> connector, or an USB-2 only Type-C connector without USB-PD.
> 
> Which device-model we are running on can be identified with the new
> cht_wc_model intel_soc_pmic field. On models without a Type-C controller
> the extcon code must control the Vbus 5V boost converter and the USB role
> switch depending on the detected cable-type.

...

> +	if (ext->vbus_boost && ext->vbus_boost_enabled != enable) {
> +		if (enable)
> +			ret = regulator_enable(ext->vbus_boost);
> +		else
> +			ret = regulator_disable(ext->vbus_boost);

> +		if (ret == 0)
> +			ext->vbus_boost_enabled = enable;
> +		else
> +			dev_err(ext->dev, "Error updating Vbus boost regulator: %d\n", ret);

Can we go with

		if (ret)
			dev_err(ext->dev, "Error updating Vbus boost regulator: %d\n", ret);
		else
			ext->vbus_boost_enabled = enable;

?

> +	}


-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux