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

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

Merge "input: synaptics_i2c_rmi4: configure gpio using pinctrl"

parents 8c6915f7 466c90bf
Loading
Loading
Loading
Loading
+20 −22
Original line number Diff line number Diff line
@@ -3254,13 +3254,13 @@ static int synaptics_rmi4_probe(struct i2c_client *client,
		retval = synpatics_rmi4_pinctrl_select(rmi4_data, true);
		if (retval < 0)
			goto err_gpio_config;
	} else {
	}

	retval = synaptics_rmi4_gpio_configure(rmi4_data, true);
	if (retval < 0) {
		dev_err(&client->dev, "Failed to configure gpios\n");
		goto pinctrl_sleep;
	}
	}

	init_waitqueue_head(&rmi4_data->wait);
	mutex_init(&(rmi4_data->rmi4_io_ctrl_mutex));
@@ -3952,15 +3952,14 @@ static int synaptics_rmi4_suspend(struct device *dev)
								 false);
			if (retval < 0)
				dev_err(dev, "Cannot get idle pinctrl state\n");
		} else {
			retval = synaptics_rmi4_gpio_configure(rmi4_data,
								 false);
		}

		retval = synaptics_rmi4_gpio_configure(rmi4_data, false);
		if (retval < 0) {
			dev_err(dev, "failed to put gpios in suspend state\n");
			goto err_gpio_configure;
		}
	}
	}
	rmi4_data->suspended = true;

	return 0;
@@ -4017,15 +4016,14 @@ static int synaptics_rmi4_resume(struct device *dev)
			retval = synpatics_rmi4_pinctrl_select(rmi4_data, true);
			if (retval < 0)
				dev_err(dev, "Cannot get default pinctrl state\n");
			msleep(rmi4_data->board->reset_delay);
		} else {
		}

		retval = synaptics_rmi4_gpio_configure(rmi4_data, true);
		if (retval < 0) {
			dev_err(dev, "Failed to put gpios in active state\n");
			goto err_gpio_configure;
		}
	}
	}

	synaptics_rmi4_sensor_wake(rmi4_data);
	rmi4_data->touch_stopped = false;
@@ -4051,9 +4049,9 @@ err_check_configuration:
								false);
			if (retval < 0)
				dev_err(dev, "Cannot get idle pinctrl state\n");
		} else {
			synaptics_rmi4_gpio_configure(rmi4_data, false);
		}

		synaptics_rmi4_gpio_configure(rmi4_data, false);
	}
	synaptics_rmi4_regulator_lpm(rmi4_data, true);
	wake_up(&rmi4_data->wait);