Home
last modified time | relevance | path

Searched hist:daad134d (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/regulator/
H A Dcore.cdaad134d Mon Feb 22 02:24:00 CST 2016 Krzysztof Adamski <krzysztof.adamski@tieto.com> regulator: core: Request GPIO before creating sysfs entries

regulator_attr_is_visible (which is a .is_visible callback of
regulator_dev_group attribute_grpup) checks rdev->ena_pin to decide if
"status" file should be present in sysfs. This field is set at the end
of regulator_ena_gpio_request so it has to be called before
device_register() otherwise this test will always fail, causing "status"
file to not be visible.

Since regulator_attr_is_visible also tests for is_enabled() op, this
problem is only visible for regulators that does not define this
callback, like regulator-fixed.c.

Signed-off-by: Krzysztof Adamski <krzysztof.adamski@tieto.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
daad134d Mon Feb 22 02:24:00 CST 2016 Krzysztof Adamski <krzysztof.adamski@tieto.com> regulator: core: Request GPIO before creating sysfs entries

regulator_attr_is_visible (which is a .is_visible callback of
regulator_dev_group attribute_grpup) checks rdev->ena_pin to decide if
"status" file should be present in sysfs. This field is set at the end
of regulator_ena_gpio_request so it has to be called before
device_register() otherwise this test will always fail, causing "status"
file to not be visible.

Since regulator_attr_is_visible also tests for is_enabled() op, this
problem is only visible for regulators that does not define this
callback, like regulator-fixed.c.

Signed-off-by: Krzysztof Adamski <krzysztof.adamski@tieto.com>
Signed-off-by: Mark Brown <broonie@kernel.org>