summaryrefslogtreecommitdiff
path: root/drivers/mfd/rohm-bd718x7.c
AgeCommit message (Collapse)Author
2021-04-14mfd: bd718x7: simplify by cleaning unnecessary device dataMatti Vaittinen
Most ROHM PMIC sub-devices only use the regmap pointer from parent device. They can obtain this by dev_get_regamap so in most cases the MFD device does not need to allocate and populate the driver data. Simplify drivers by removing this. The BD70528 still needs the access to watchdog mutex so keep rohm_regmap_dev in use on BD70528 RTC and WDG drivers for now. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2020-01-24mfd: bd718x7: Add compatible for BD71850Matti Vaittinen
ROHM BD71850 PMIC is almost identical to BD71847. Main difference is some initial voltage values for regulators. The BD71850 can be handled by BD71847 driver but adding own compatible makes it clearer for one who creates the DT for board containing this PMIC and allows SW to be differentiating PMICs if needed. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2020-01-24mfd: Rohm PMICs: Use platform_device_id to match MFD sub-devicesMatti Vaittinen
Thanks to Stephen Boyd I today learned we can use platform_device_id to do device and module matching for MFD sub-devices! Do device matching using the platform_device_id instead of using explicit module_aliases to load modules and custom parent-data field to do module loading and sub-device matching. Cc: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-07-02mfd: bd718x7: Make power button press duration configurableLeonard Crestez
Allow overwriting the values in BD718XX_REG_PWRONCONFIG0 and BD718XX_REG_PWRONCONFIG1 via devicetree. Read values in milliseconds and attempt to round them to something supported by the hardware. Keep existing values (from bootloader or OTP) if property is not present. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-By: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> [Lee: Fixed-up merge/API conflict] Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-07-02mfd: bd718x7: Remove hardcoded config for button press durationLeonard Crestez
The reset button on imx8mm-evk is tied to PWRON_B pin of bd71847 and the long press duration is set to zero from OTP. The linux driver overrides those values and breaks reset from button. Overwriting OTP or bootloader configuration with some hardcoded defaults is not desirable, keep already programmed values instead. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Acked-By: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-06-27mfd: regulator: clk: Split rohm-bd718x7.hMatti Vaittinen
Split the bd718x7.h to ROHM common and bd718x7 specific parts so that we do not need to add same things in every new ROHM PMIC header. Please note that this change requires changes also in bd718x7 sub-device drivers for regulators and clk. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-10-02regulator: bd718xx: fix build warning on x86_64Matti Vaittinen
Casting address to unsigned int causes a warning on some 64 bit architectures. Fix the cast. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-28regulator/mfd: bd718xx: rename bd71837/bd71847 common instancesMatti Vaittinen
Rename parts of code that support both BD71837 and BD71847 to BD718XX. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-28regulator/mfd: Support ROHM BD71847 power management ICMatti Vaittinen
BD71847 is reduced version of BD71837. DVS bucks 3 and 4 are removed as is LDO7. Voltage ranges of some regulators are expanded. Add initial support for BD71847 with BD71837 driver. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-16mfd: bd71837: Core driver for ROHM BD71837 PMICMatti Vaittinen
ROHM BD71837 PMIC MFD driver providing interrupts and support for three subsystems: - clk - Regulators - input/power-key Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>