summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Merge branch 'for-next/remove-fsf-address'Sascha Hauer2012-10-035-20/+0
|\ | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-175-20/+0
| | | | | | | | | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mfd mc13xxx: Add devicetree supportSascha Hauer2012-09-231-0/+12
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | I2C: Put I2C devices on their own busSascha Hauer2012-09-148-9/+9
| | | | | | | | | | | | | | | | This patch adds a I2C bus on which the I2C devices and drivers register. This makes it cleaner as I2C devices won't accidently end up probed by a platform_device driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | SPI: Put SPI devices on their own busSascha Hauer2012-09-142-2/+2
| | | | | | | | | | | | | | | | | | This patch adds a SPI bus on which the SPI devices and drivers register. This makes it cleaner as SPI devices won't accidently end up probed by a platform_device driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | mfd mc34708: Separate I2C and SPI probeSascha Hauer2012-09-141-10/+19
| | | | | | | | | | | | | | | | | | | | Upcoming patches will put I2C/SPI on their own busses with spi_register_driver / i2c_register_driver which will only be available if the subsystem is enabled. We could provide static inlines, but it wouldn't make much sense to compile a spi/i2c driver if the corresponding subsystem is disabled. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mfd mc13xxx: Separate I2C and SPI probeSascha Hauer2012-09-111-10/+18
|/ | | | | | | | | | Upcoming patches will put I2C/SPI on their own busses with spi_register_driver / i2c_register_driver which will only be available if the subsystem is enabled. We could provide static inlines, but it wouldn't make much sense to compile a spi/i2c driver if the corresponding subsystem is disabled. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mc13xxx'Sascha Hauer2012-09-051-5/+26
|\
| * mc13xxx: Fixed memory leakAlexander Shiyan2012-09-041-5/+5
| | | | | | | | | | | | | | | | A string allocated by asprintf is not freed, so change it to a sprintf with the preallocated buffer. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mc13xxx: Hide private struct mc13xxx from other unitsAlexander Shiyan2012-09-041-0/+15
| | | | | | | | | | | | | | Board support units must use only the provided functions. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mc13xxx: Added mc13xxx_revision() function.Alexander Shiyan2012-08-101-0/+6
| | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mfd: add stmpe-i2c driverSteffen Trumtrar2012-09-053-0/+158
|/ | | | | | | | | | The stmpe mfds can be connected via i2c and spi. This driver provides the basic infrastructure for the i2c kind. It can be added as a normal i2c-device in the board code. To enable functions a platform_data struct has to be provided, that describes what parts of the chip are to be used. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/randconfig'Sascha Hauer2012-08-013-5/+4
|\
| * mfd TWL4030: Fix Kconfig dependenciesSascha Hauer2012-07-251-1/+0
| | | | | | | | | | | | | | The twl core does not depend on the twl usb support. It's the other way round. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Add missing semicolons at end of EXPORT_SYMBOLSascha Hauer2012-07-252-4/+4
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>