defined more GPIO numbers by defined constants; added some comments on how power control of the W2CBW003 works

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
renamed private stuct gpio_chip variable to make the code better readable

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
restored old behaviour to return -EPROBE_DEFER if the chip is not yet probed

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
added some printk statements for debugging

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
clarified location of call to omap_hsmmc_late_init(mmc);

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Revert "restored old behaviour to return -EPROBE_DEFER if the chip is not yet probed"

This reverts commit a3663ee7e897c970a93b0f95ef8cbaacb009f298.
gpiolib: safer implementation of desc_to_gpio()

The current implementation of desc_to_gpio() relies on the chip pointer
to be set to a valid value in order to compute the GPIO number. This
was done in the hope that we can get rid of the gpio_desc global array,
but this is not happening anytime soon.

This patch reimplements desc_to_gpio() in a fashion similar to that of
gpio_to_desc(). As a result, desc_to_gpio(gpio_to_desc(gpio)) == gpio is
now always true. This allows to call desc_to_gpio() on non-initialized
descriptors as some error-handling code currently does.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reported-by: Dr. H. Nikolaus Schaller <hns@goldelico.com>
gpiolib: let gpiod_request() return -EPROBE_DEFER

Patch be1a4b brought some improvements to the GPIO error handling code,
but also changed the return value of gpiod_request() when called on a
not yet initialized GPIO descriptor: it now returns -EINVAL instead of
-EPROBE_DEFER, and this affects some drivers.

This patch restores the original behavior for gpiod_request(). It is
safe to do so now that desc_to_gpio() does not rely on the GPIO
descriptor to be initialized. Other functions changed by patch be1a4b
do not see their return value affected, so these are not reverted.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reported-by: Dr. H. Nikolaus Schaller <hns@goldelico.com>
reverted a bug introduced by trying something

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Merge branch '3.12-wip-power' into 3.12-wip