summaryrefslogtreecommitdiffstats
path: root/drivers/core/syscon-uclass.c
Commit message (Collapse)AuthorAgeFilesLines
* syscon: Avoid returning a device on failureSimon Glass2016-03-171-0/+1
| | | | | | | | | If the device cannot be probed, syscon_get_by_driver_data() will still return a useful value in its devp parameter. Ensure that it returns NULL instead. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: syscon: Allow finding devices by driver dataSimon Glass2016-01-241-12/+19
| | | | | | | | We have a way to find a regmap by its syscon driver data value. Add the same for syscon itself. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: core: Add device checking to syscon_get_regmap()Simon Glass2015-07-211-2/+5
| | | | | | | | | | This function can only handle a syscon device. It is possible that someone will make a mistake, so add a check for this. Also we should return -ENODEV when a device cannot be found, so update the syscon_get_regmap_by_driver_data() to follow this convention. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: Add support for generic system controllers (syscon)Simon Glass2015-07-211-0/+73
Many SoCs have a number of system controllers which are dealt with as a group by a single driver. It is a pain to have to add lots of compatible strings and/or separate drivers for each. Instead we can identify the controllers by a number and request the address of the one we want. Add a simple implementation of this which can be used by SoC driver code. Signed-off-by: Simon Glass <sjg@chromium.org>
OpenPOWER on IntegriCloud