summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/syscon.c
Commit message (Collapse)AuthorAgeFilesLines
* mfd: syscon: add syscon_regmap_lookup_by_phandle()Marcin Niestroj2019-07-021-0/+19
| | | | | | | | This function is handy when syscon is passed as phandle to device_node property. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regmap: Implement syscon_regmap_lookup_by_compatible()Ahmad Fatoum2019-02-251-0/+14
| | | | | | | | | Implement syscon_regmap_lookup_by_compatible() to simplify porting kernel code. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: syscon: Switch to using %pa to print memory addressesAndrey Smirnov2019-01-091-1/+1
| | | | | | | | Switch to using %pa to print memory addresses in order to be able to support both 64 and 32 bit builds. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regmap: Implement syscon_node_to_regmap()Andrey Smirnov2017-03-091-1/+53
| | | | | | | Implement syscon_node_to_regmap() to simplify porting kernel code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: syscon: drop EXPORT_SYMBOL for static functionLucas Stach2016-10-041-2/+0
| | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: syscon: Use IOMEM instead of explicit castAndrey Smirnov2016-07-191-1/+1
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: syscon: Don't check xzalloc return for NULLAndrey Smirnov2016-07-191-2/+0
| | | | | | | Xzalloc never returns NULL, so this check does not bring any value. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: syscon: Decouple syscon interface from platform devicesAndrey Smirnov2016-07-191-18/+61
| | | | | | | | | | | | Follow Linux Kernel change introduced in bdb0066df96e74a4002125467ebe459feff1ebef and avoid device/driver model for DT-based platforms. See the original kernel commit for the rationale. Also make syscon_base_lookup_by_pdevname() behave the same way as its kernel counterpart in the case whern "property" argument is NULL. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: syscon: Don't call request_iomem_region()Andrey Smirnov2016-07-191-6/+0
| | | | | | | | | | | | | | On platforms that mix dedicated IP block register space with miscellaneous registers it is necessary to share register window between syscon and dedicated IP block driver. Calling request_iomem_region() implies exclusive ownership of the region, which, in the case above could not happen. This change also makes this driver's behaviour to that of its Linux kernel counterpart. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Revert "syscon: Decrease driver registration priority"Andrey Smirnov2016-07-191-1/+1
| | | | | | | | | | | Fixing the i.MX6 specific issue this way breaks things on CLPS711x target. Better fix for the problem is to follow this patch. This reverts commit c203958f3bbf25fc3d612497057b962e96ad1c52. Reported-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* syscon: Decrease driver registration priorityAndrey Smirnov2016-05-181-1/+1
| | | | | | | | | | | | | | | A number of devices on i.MX6 list "syscon" as second compatibility string, among them, most importantly, is "iomuxv3" pinmux driver, which gets probed at "postcore_initcall". Probing this driver at "core_initcall" results in "syscon" driver usurping pinmux device and preventing "iomuxv3" driver from loading and correctly initializing pinmux of the system (which in turn results in a lot of sadness). Moving this driver to be initialized at "device_initcall" time resolves the issue. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let dev_get_resource return an error pointerSascha Hauer2014-09-161-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let request_iomem_region return an error pointerSascha Hauer2014-09-161-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: syscon: add device tree supportBeniamino Galvani2014-09-011-0/+6
| | | | | | | | This patch defines a OF compatible property for the syscon driver to allow it to be probed from device tree. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common: Allow for I/O mapped I/OMichel Stam2014-04-081-1/+1
| | | | | | | | Rework the current framework so that I/O mapped I/O resources are also possible. Signed-off-by: Michel Stam <michel@reverze.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: clps711x: Remove the special name for the syscon driverAlexander Shiyan2014-01-241-3/+0
| | | | | | | No reason to make SYSCON driver name unique to that processor. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: syscon: Introduce syscon_base_lookup_by_phandle() functionAlexander Shiyan2014-01-241-0/+20
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: syscon: Replace dev_info with dev_dbgAlexander Shiyan2013-08-121-1/+1
| | | | | | | There is no reason to print used region each time. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: clps711x: Export system-wide registers through SYSCON driverAlexander Shiyan2013-03-111-0/+3
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add system controller register driver (SYSCON)Alexander Shiyan2013-03-111-0/+92
This patch adds support for system controller register driver (SYSCON). Code taken from Linux Kernel and adapted for using in barebox. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>