summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
Commit message (Collapse)AuthorAgeFilesLines
* da9053: add dt_ids to be probed by devicetreeMichael Grzeschik2017-01-101-0/+9
| | | | | | | | We add the da9052 compatible to get this driver probed by devicetree users. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* da9053: reset FAULTLOG after readMichael Grzeschik2017-01-101-0/+4
| | | | | | | | | | The driver has to reset the FAULTLOG register after every read by writing the value back. In the current case the FALUTLOG register keep its value over every software reset and will only reset on power-off. This drives the reset-source value unreliable. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> 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 mc13xxx: add MC13892_REVISION_2_4Alexander Kurz2016-08-181-0/+1
| | | | | | | | An MC13892CJ having REV[4:0]=0x14 can be found in the kindle-d01100. Add the revision to the list to support this device. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/syscon'Sascha Hauer2016-08-031-21/+62
|\
| * 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>
* | Merge branch 'for-next/imx'Sascha Hauer2016-08-031-1/+2
|\ \ | |/ |/|
| * mc13xxx: make driver-provided SPI frequency overridableAlexander Kurz2016-08-031-1/+2
| | | | | | | | | | | | | | | | | | | | The preset SPI frequency for mc13xxx PMIC introduced with patch 6e18b3a48ee4 ("mc13xxx: Define maximum SPI clock frequency global to driver") is not desirable or working on all boards. Provide a possibility to override the default SPI max_speed_hz from board code. Signed-off-by: Alexander Kurz <akurz@blala.de> 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>
* string: Fix (v)asprintf prototypesSascha Hauer2016-04-151-2/+2
| | | | | | | | | | Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: mc13xxx: Switch to regmap supportSascha Hauer2016-02-051-71/+56
| | | | | | This moves the mc13xxx driver over to regmap. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: da9053: remove references to nonexistent cdev memberLucas Stach2015-09-041-2/+1
| | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: da9053: add da9053 watchdog and system restart driverJuergen Borleis2015-08-283-0/+316
| | | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: da9063: add da9063 watchdog and system restart driverPhilipp Zabel2015-08-283-0/+174
| | | | Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* of: use 'const void *' for struct of_device_id.dataAntony Pavlov2015-04-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 2011 barebox' of_device_id struct uses unsigned long type for data field: struct of_device_id { char *compatible; unsigned long data; }; Almost always struct of_device_id.data field are used as pointer and need 'unsigned long' casting. E.g. see 'git grep -A 4 of_device_id drivers/' output: drivers/ata/sata-imx.c:static __maybe_unused struct of_device_id imx_sata_dt_ids[] = { drivers/ata/sata-imx.c- { drivers/ata/sata-imx.c- .compatible = "fsl,imx6q-ahci", drivers/ata/sata-imx.c- .data = (unsigned long)&data_imx6, drivers/ata/sata-imx.c- }, { Here is of_device_id struct in linux kernel v4.0: struct of_device_id { char name[32]; char type[32]; char compatible[128]; const void *data; }; Changing of_device_id.data type to 'const void *data' will increase barebox' linux kernel compatibility and decrease number of 'unsigned long' casts. Part of the patch was done using the 'coccinelle' tool with the following semantic patch: @rule1@ identifier dev; identifier type; identifier func; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type) + dev_get_drvdata(dev, (const void **)&type) ...> } @rule2@ identifier dev; identifier type; identifier func; identifier data; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type->data) + dev_get_drvdata(dev, (const void **)&type->data) ...> } Signed-off-by: Antony Pavlov <antonynpavlov@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>
* mfd: mc34704: Add DT supportMarkus Pargmann2014-07-291-0/+6
| | | | | | | Add a compatible to this driver so it can be added through devicetree. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: mc13xxx: move to coredevice_initcallSascha Hauer2014-05-191-11/+21
| | | | | | | | The PMIC is often a dependency for other devices, so make sure it's initialized early. While at it, merge the spi/i2c registration into a single initcall and use IS_ENABLED instead of ifdefs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: mc13xxx: Allow to set callback for mc13xxxSascha Hauer2014-05-191-0/+18
| | | | | | | | | | | | | Some boards have to initialize the PMIC before other devices can be initialized. This requires three levels of initcalls: one level in which the PMIC is probed, one in which the board can call mc13xxx_get() and the third one to initialize the PMIC dependent devices. Allow to register a callback which is called once the PMIC is initialized. This way mc13xxx_get() is no longer necessary and the number of required initcalls levels is reduced to two. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/rockchip'Sascha Hauer2014-05-053-0/+159
|\
| * mfd: add act8846 driverBeniamino Galvani2014-04-293-0/+159
| | | | | | | | | | 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>
* treewide: Add missing includesSascha Hauer2013-11-082-0/+2
| | | | | | | | A lot of files rely on include/driver.h including include/of.h (and this including include/errno.h. include the files explicitly so we can eventually get rid of including of.h from driver.h 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>
* mfd: mc13xxx: Add support for MC34708Alexander Shiyan2013-07-154-301/+21
| | | | | | | This patch moves support for MC34708 PMIC into mc13xxx driver. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: mc13xxx: Separate query_revision function for each supported ICAlexander Shiyan2013-07-151-68/+97
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd: mc13xxx: Determine used bus by "bus_type" fieldAlexander Shiyan2013-07-151-42/+21
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next-manual/oftree-linux-sync'Sascha Hauer2013-07-021-1/+1
|\
* | mfd: stmpe: Add devicetree probe supportSascha Hauer2013-06-061-2/+30
|/ | | | | | | | Our driver matches stmpe-i2c and stmpe-spi. It seems the device we really support is the stmpe1601, so use this one for matching the devicetree compatible. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/device-driver-macros'Sascha Hauer2013-04-048-22/+10
|\
| * Introduce device_spi_driver() macro and use it for SPI driversAlexander Shiyan2013-03-142-14/+2
| | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * I2C: Rename i2c_register_driver() for using with register_driver_macro()Alexander Shiyan2013-03-148-8/+8
| | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * SPI: Rename spi_register_driver() for using with register_driver_macro()Alexander Shiyan2013-03-142-2/+2
| | | | | | | | | | 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-113-0/+98
|/ | | | | | | | 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>
* mfd: Using MFD_xx prefix for symbolsAlexander Shiyan2013-02-182-22/+22
| | | | | | | | This patch provides rename MFD-related symbols for using MFD-prefix. Additionally, sorting mfd/Kconfig and mfd/Makefile records. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MFD MC34708: Add dependence on SPIWjatscheslaw Stoljarski (Slawa)2012-12-212-3/+3
| | | | | | | | MC34708 depend on I2C or SPI, so let driver depend on SPI too and rename config option name to MFD_MC34708. Signed-off-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd stmpe: fix test for featuresSascha Hauer2012-11-291-1/+1
| | | | | | Use '&' to test for the bit as it was intended. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mfd stmpe: add index to devicenameSascha Hauer2012-11-291-1/+2
| | | | | | Otherwise it's not possible to register multiple stmpe devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mfd'Sascha Hauer2012-11-161-0/+21
|\
| * twl6030: add debug infoVicente2012-10-081-0/+21
| | | | | | | | | | Signed-off-by: Vicente <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mfd stmpe: Add missing semicolons at end of EXPORT_SYMBOLSascha Hauer2012-10-261-2/+2
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>