Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25a03bb6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "USB: HSIC SMSC HUB: Add support for standalone HSIC configuration"

parents 184076b4 58221709
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -134,7 +134,8 @@ SMSC HSIC HUB

Required properties :
- compatible : should be "qcom,hsic-smsc-hub"
- smsc,model-id : should be either <3503> or <4604> depending on hub model
- smsc,model-id : should be either <3503> or <4604> depending on hub model. It
  will be 0 for standalone HSIC controller configuration.
- smsc,reset-gpio: this output gpio is used to assert/de-assert the hub reset
- Sub node for "MSM HSIC EHCI controller".
  Sub node has the required properties mentioned above.
+17 −0
Original line number Diff line number Diff line
@@ -368,6 +368,8 @@ struct smsc_hub_platform_data *msm_hub_dt_to_pdata(
		return ERR_PTR(rc);
	} else {
		pdata->model_id = temp_val;
		if (pdata->model_id == 0)
			return pdata;
	}

	pdata->hub_reset = of_get_named_gpio(node, "smsc,reset-gpio", 0);
@@ -409,6 +411,12 @@ static int smsc_hub_probe(struct platform_device *pdev)
		return -ENODEV;
	}

	if (pdata->model_id == 0) {
		dev_dbg(&pdev->dev, "standalone HSIC config enabled\n");
		return of_platform_populate(node, NULL,
				hsic_host_auxdata, &pdev->dev);
	}

	if (!pdata->hub_reset)
		return -EINVAL;

@@ -530,6 +538,9 @@ static int smsc_hub_remove(struct platform_device *pdev)
{
	const struct smsc_hub_platform_data *pdata;

	if (!smsc_hub)
		return 0;

	pdata = smsc_hub->pdata;
	if (smsc_hub->client) {
		i2c_unregister_device(smsc_hub->client);
@@ -559,6 +570,9 @@ static int smsc_hub_lpm_enter(struct device *dev)
{
	int ret = 0;

	if (!smsc_hub)
		return 0;

	if (smsc_hub->xo_handle) {
		ret = msm_xo_mode_vote(smsc_hub->xo_handle, MSM_XO_MODE_OFF);
		if (ret) {
@@ -573,6 +587,9 @@ static int smsc_hub_lpm_exit(struct device *dev)
{
	int ret = 0;

	if (!smsc_hub)
		return 0;

	if (smsc_hub->xo_handle) {
		ret = msm_xo_mode_vote(smsc_hub->xo_handle, MSM_XO_MODE_ON);
		if (ret) {