Commit graph

5 commits

Author SHA1 Message Date
Matti Vaittinen
cb83cb0dfa mfd: rohm: Use dev_err_probe()
The dev_err_probe() has (at least) following benefits over dev_err()
when printing an error print for a failed function call at a device
driver probe:
	- Omit error level print if error is 'EPRBE_DEFER'
	- Standardized print format for returned error
	- return the error value allowing shortening calls like:

	if (ret) {
		dev_err(...);
		return ret;
	}

	to

	if (ret)
		return dev_err_probe(...);

Convert the ROHM BD71828, ROHM BD718x7 and ROHM BD9576 core drivers to
use the dev_err_probe() when returned error is not hard-coded constant.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/Y33lte0PKd2u6dyR@fedora
2022-12-08 13:52:58 +00:00
Aidan MacDonald
cdbecc4c44 mfd: rohm-bd71828: Replace irqchip mask_invert with unmask_base
Remove use of the deprecated mask_invert flag. Inverted mask
registers (where a '1' bit enables an IRQ) can be described more
directly as an unmask register.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221112151835.39059-11-aidanmacdonald.0x0@gmail.com
2022-12-07 13:28:14 +00:00
Matti Vaittinen
4dcdcfd5ab mfd: Support for ROHM BD71815 PMIC core
Add core support for ROHM BD71815 Power Management IC.

The IC integrates regulators, a battery charger with a coulomb counter,
a real-time clock (RTC), clock gate and general-purpose outputs (GPO).

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-04-14 10:19:08 +01:00
Matti Vaittinen
e795bf725d mfd: bd71828: Add power-key support
Use gpio_keys to send power input-event to user-space when power
button (short) press is detected.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2020-01-24 07:22:43 +00:00
Matti Vaittinen
1c743ad523 mfd: bd71828: Support ROHM BD71828 PMIC - core
BD71828GW is a single-chip power management IC for battery-powered portable
devices. The IC integrates 7 buck converters, 7 LDOs, and a 1500 mA
single-cell linear charger. Also included is a Coulomb counter, a real-time
clock (RTC), 3 GPO/regulator control pins, HALL input and a 32.768 kHz
clock gate.

Add MFD core driver providing interrupt controller facilities and i2c
access to sub device drivers.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2020-01-24 07:22:37 +00:00