mmc: add kerneldoc to mmc_regulator_get_supply()
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Sat, 14 Oct 2017 19:17:09 +0000 (21:17 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 30 Oct 2017 10:50:32 +0000 (11:50 +0100)
Especially, make clear what the return value means.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/core.c

index 12b271c2a912247d8a03b56aed61596bf0b6b5e8..1f0f44f4dd5f3d6ba24c724f3c870064b0bc1560 100644 (file)
@@ -1588,6 +1588,16 @@ EXPORT_SYMBOL_GPL(mmc_regulator_set_vqmmc);
 
 #endif /* CONFIG_REGULATOR */
 
+/**
+ * mmc_regulator_get_supply - try to get VMMC and VQMMC regulators for a host
+ * @mmc: the host to regulate
+ *
+ * Returns 0 or errno. errno should be handled, it is either a critical error
+ * or -EPROBE_DEFER. 0 means no critical error but it does not mean all
+ * regulators have been found because they all are optional. If you require
+ * certain regulators, you need to check separately in your driver if they got
+ * populated after calling this function.
+ */
 int mmc_regulator_get_supply(struct mmc_host *mmc)
 {
        struct device *dev = mmc_dev(mmc);