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

Commit 725e3b7d authored by Linus Walleij's avatar Linus Walleij
Browse files

Merge branch 'devm_gpiochip' of https://github.com/ldewangan/linux-upstream...

Merge branch 'devm_gpiochip' of https://github.com/ldewangan/linux-upstream into devm-gpiochip-add-data
parents ea1361fd 9d113c69
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -252,6 +252,11 @@ GPIO
  devm_gpiod_get_index_optional()
  devm_gpiod_get_optional()
  devm_gpiod_put()
  devm_gpiochip_add_data()
  devm_gpiochip_remove()
  devm_gpio_request()
  devm_gpio_request_one()
  devm_gpio_free()

IIO
  devm_iio_device_alloc()

README.md

0 → 100644
+2 −0
Original line number Diff line number Diff line
# linux-upstream
This is for sharing upstreaming activities.
+1 −10
Original line number Diff line number Diff line
@@ -140,15 +140,7 @@ static int mmio_74xx_gpio_probe(struct platform_device *pdev)

	platform_set_drvdata(pdev, priv);

	return gpiochip_add_data(&priv->gc, priv);
}

static int mmio_74xx_gpio_remove(struct platform_device *pdev)
{
	struct mmio_74xx_gpio_priv *priv = platform_get_drvdata(pdev);

	gpiochip_remove(&priv->gc);
	return 0;
	return devm_gpiochip_add_data(&pdev->dev, &priv->gc, priv);
}

static struct platform_driver mmio_74xx_gpio_driver = {
@@ -157,7 +149,6 @@ static struct platform_driver mmio_74xx_gpio_driver = {
		.of_match_table	= mmio_74xx_gpio_ids,
	},
	.probe	= mmio_74xx_gpio_probe,
	.remove	= mmio_74xx_gpio_remove,
};
module_platform_driver(mmio_74xx_gpio_driver);

+1 −10
Original line number Diff line number Diff line
@@ -265,7 +265,7 @@ static int adnp_gpio_setup(struct adnp *adnp, unsigned int num_gpios)
	chip->of_node = chip->parent->of_node;
	chip->owner = THIS_MODULE;

	err = gpiochip_add_data(chip, adnp);
	err = devm_gpiochip_add_data(&adnp->client->dev, chip, adnp);
	if (err)
		return err;

@@ -520,14 +520,6 @@ static int adnp_i2c_probe(struct i2c_client *client,
	return 0;
}

static int adnp_i2c_remove(struct i2c_client *client)
{
	struct adnp *adnp = i2c_get_clientdata(client);

	gpiochip_remove(&adnp->gpio);
	return 0;
}

static const struct i2c_device_id adnp_i2c_id[] = {
	{ "gpio-adnp" },
	{ },
@@ -546,7 +538,6 @@ static struct i2c_driver adnp_i2c_driver = {
		.of_match_table = adnp_of_match,
	},
	.probe = adnp_i2c_probe,
	.remove = adnp_i2c_remove,
	.id_table = adnp_i2c_id,
};
module_i2c_driver(adnp_i2c_driver);
+1 −12
Original line number Diff line number Diff line
@@ -153,7 +153,7 @@ static int adp5520_gpio_probe(struct platform_device *pdev)
		goto err;
	}

	ret = gpiochip_add_data(&dev->gpio_chip, dev);
	ret = devm_gpiochip_add_data(&pdev->dev, &dev->gpio_chip, dev);
	if (ret)
		goto err;

@@ -164,22 +164,11 @@ static int adp5520_gpio_probe(struct platform_device *pdev)
	return ret;
}

static int adp5520_gpio_remove(struct platform_device *pdev)
{
	struct adp5520_gpio *dev;

	dev = platform_get_drvdata(pdev);
	gpiochip_remove(&dev->gpio_chip);

	return 0;
}

static struct platform_driver adp5520_gpio_driver = {
	.driver	= {
		.name	= "adp5520-gpio",
	},
	.probe		= adp5520_gpio_probe,
	.remove		= adp5520_gpio_remove,
};

module_platform_driver(adp5520_gpio_driver);
Loading