aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/da9063-core.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-14mfd: da9063: Remove platform_data supportWolfram Sang1-18/+2
There are no in-kernel users anymore, so remove this outdated interface. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Steve Twiss <stwiss.opensource@diasemi.com> Tested-by: Steve Twiss <stwiss.opensource@diasemi.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-05-14mfd: da9063: Convert headers to SPDXWolfram Sang1-6/+2
Covnert the headers of the source and include files to SPDX. And fix some typos in the descriptions ("interrupt" instead of "I2C"). Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Steve Twiss <stwiss.opensource@diasemi.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-07-04mfd: da9063: Register RTC only on DA9063LMarek Vasut1-7/+24
The DA9063L does not contain RTC block, unlike the full DA9063. Split the RTC block into separate mfd cell and register it only on DA9063. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-07-04mfd: da9063: Replace model with typeMarek Vasut1-1/+0
The model number stored in the struct da9063 is the same for all variants of the da9063 since it is the chip ID, which is always the same. Replace that with a separate identifier instead, which allows us to discern the DA9063 variants by setting the type based on either DT match or otherwise. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-07-04mfd: da9063: Rename PMIC_DA9063 to PMIC_CHIP_ID_DA9063Marek Vasut1-1/+1
The PMIC_DA9063 is a complete misnomer, it denotes the value of the DA9063 chip ID register, so rename it as such. It is also the value of chip ID register of DA9063L though, so drop the enum as all the DA9063 "models" share the same chip ID and thus the distinction will have to be made using DT or otherwise. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-07-04mfd: da9063: Use PLATFORM_DEVID_NONEMarek Vasut1-3/+3
Use PLATFORM_DEVID_NONE instead of -1 in mfd_add_devices. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-07-04mfd: da9063: Replace mfd_add_devices with devm counterpartMarek Vasut1-8/+3
Use devm_mfd_add_devices() instead of plain mfd_add_devices(), which removes the need for da9063_device_exit() altogether and also for the .remove callback in da9063-i2c.c . Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-07-04mfd: da9063: Replace regmap_add_irq_chip with devm counterpartMarek Vasut1-1/+0
Use devm_regmap_add_irq_chip() instead of plain regmap_add_irq_chip(), which removes the need for da9063_irq_exit() altogether and also fixes a bug in da9063_device_init() where the da9063_irq_exit() was not called in a failpath. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-10-04mfd: da9063: Update author information to remove incorrect e-mail addressesSteve Twiss1-3/+4
Remove incorrect e-mail addresses from the copyright header and MODULE_AUTHOR() macro. These e-mail addresses are no longer in use. The author names have not been changed, only the e-mail addresses have been deleted from the source files. Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-06-22mfd: da9063: Add support for OnKey driverSteve Twiss1-0/+54
Add MFD support for the DA9063 OnKey driver The function da9063_clear_fault_log() is added to mitigate the case of a hardware power-cut after a long-long OnKey press. Although there is no software intervention in this case (by definition) such a shutdown would cause persistent information within the DA9063 FAULT_LOG that would be available during the next device restart. Clearance of this persistent register must be completed after such a hardware power-cut operation has happened so that the FAULT_LOG does not continue with previous values. The clearance function has been added here in the kernel driver because wiping the fault-log cannot be counted on outside the Linux kernel. Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> [Lee: Removed 'key_power' for Dmitry to take through the Input Tree] Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-01-22mfd: da9063: Add device tree supportSteve Twiss1-0/+2
Add device tree support for DA9063 regulators; Real-Time Clock and Watchdog. Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: da9063: Get irq base dynamically before registering deviceDmitry Lavnikevich1-1/+3
After registering mfd device with proper irq_base platform_get_irq_byname() calls will return VIRQ instead of local IRQ. This fixes da9063 rtc registration issue: da9063-rtc da9063-rtc: Failed to request ALARM IRQ 1: -22 Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-07-28mfd: da9063: Add support for AD silicon variantOpensource [Steve Twiss]1-3/+3
Add register definitions for DA9063 AD (0x3) silicon variant ID the ability to choose the silicon variant at run-time using regmap configuration. This patch also adds RTC support for the AD silicon changes. It adds both BB and AD support as regmap ranges and then makes the distinction between the two tables at run-time. This allows both AD and BB silicon variants to be supported at the same time. Suggested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Opensource [Steve Twiss] <stwiss.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-19mfd: da9063: Add support for production silicon variant codeOpensource [Steve Twiss]1-11/+14
Add the correct silicon variant code ID (0x5) to the driver. This new code is the 'production' variant code ID for DA9063. This patch will remove the older variant code ID which matches the pre-production silicon ID (0x3) for the DA9063 chip. There is also some small amount of correction done in this patch: it splits the revision code and correctly names it according to the hardware specification and moves the dev_info() call before the variant ID test. Signed-off-by: Opensource [Steve Twiss] <stwiss.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-06mfd: dialog: Constify struct mfd_cell where possibleGeert Uytterhoeven1-1/+1
As of commit 03e361b25ee8dfb1fd9b890072c23c4aae01c6c7 ("mfd: Stop setting refcounting pointers in original mfd_cell arrays"), the "cell" parameter of mfd_add_devices() is "const" again. Hence make all cell data passed to mfd_add_devices() const where possible. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-20mfd: da9063: Add IRQ supportKrystian Garbaciak1-0/+56
This patch adds a regmap irqchip for DA9063 IRQs. It depends on git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git tags/regmap-irq-ack-mask Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Mark Brown <broonie@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20mfd: da9063: Add Dialog DA9063 core driverKrystian Garbaciak1-0/+129
This is MFD module providing access to registers and interrupts of DA906x series PMIC. It is used by other functional modules, registered as MFD cells. Driver uses regmap with paging to access extended register list. Register map is divided into two pages, where the second page is used during initialisation. This module provides support to following functional cells: - Regulators - RTC - HWMON - OnKey (power key misc input device) - Vibration (force-feedback input device) - Watchdog - LEDs Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Mark Brown <broonie@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>