Commit 690de290 authored by Wojciech Siudy's avatar Wojciech Siudy Committed by Wolfram Sang
Browse files

i2c: muxes: pca954x: Use reset controller only



Fallback to legacy reset-gpios is no more needed, because the framework
can use reset-gpios properity now as well.

Signed-off-by: default avatarWojciech Siudy <wojciech.siudy@nokia.com>
[wsa: fixed whitespace issue]
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
parent 8f5ae30d
Loading
Loading
Loading
Loading
+1 −15
Original line number Diff line number Diff line
@@ -118,7 +118,6 @@ struct pca954x {
	raw_spinlock_t lock;
	struct regulator *supply;

	struct gpio_desc *reset_gpio;
	struct reset_control *reset_cont;
};

@@ -527,17 +526,6 @@ static int pca954x_get_reset(struct device *dev, struct pca954x *data)
	if (IS_ERR(data->reset_cont))
		return dev_err_probe(dev, PTR_ERR(data->reset_cont),
				     "Failed to get reset\n");
	else if (data->reset_cont)
		return 0;

	/*
	 * fallback to legacy reset-gpios
	 */
	data->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
	if (IS_ERR(data->reset_gpio)) {
		return dev_err_probe(dev, PTR_ERR(data->reset_gpio),
				     "Failed to get reset gpio");
	}

	return 0;
}
@@ -546,8 +534,6 @@ static void pca954x_reset_deassert(struct pca954x *data)
{
	if (data->reset_cont)
		reset_control_deassert(data->reset_cont);
	else
		gpiod_set_value_cansleep(data->reset_gpio, 0);
}

/*
@@ -589,7 +575,7 @@ static int pca954x_probe(struct i2c_client *client)
	if (ret)
		goto fail_cleanup;

	if (data->reset_cont || data->reset_gpio) {
	if (data->reset_cont) {
		udelay(1);
		pca954x_reset_deassert(data);
		/* Give the chip some time to recover. */