summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2019-05-16 23:13:09 +0200
committerWolfram Sang <wsa@the-dreams.de>2019-05-17 19:29:40 +0200
commitb8f5fe3bc5b9318d95770a09a480c31aced20cd2 (patch)
treeab82f4749c413824b6fe39bf0b763abaca19ad87 /Documentation
parent7159dbdae3c58d0200ae2550fab977a19a3c497a (diff)
downloadlinux-b8f5fe3bc5b9318d95770a09a480c31aced20cd2.tar.gz
linux-b8f5fe3bc5b9318d95770a09a480c31aced20cd2.tar.bz2
linux-b8f5fe3bc5b9318d95770a09a480c31aced20cd2.zip
i2c: core: add device-managed version of i2c_new_dummy
i2c_new_dummy is typically called from the probe function of the driver for the primary i2c client. It requires calls to i2c_unregister_device in the error path of the probe function and in the remove function. This can be simplified by introducing a device-managed version. Note the changed error case return value type: i2c_new_dummy returns NULL whilst devm_i2c_new_dummy_device returns an ERR_PTR. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> [wsa: rename new functions and fix minor kdoc issues] Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Peter Rosin <peda@axentia.se> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/driver-model/devres.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt
index 99994a461359..69c7fa7f616c 100644
--- a/Documentation/driver-model/devres.txt
+++ b/Documentation/driver-model/devres.txt
@@ -271,6 +271,9 @@ GPIO
devm_gpio_request_one()
devm_gpio_free()
+I2C
+ devm_i2c_new_dummy_device()
+
IIO
devm_iio_device_alloc()
devm_iio_device_free()