Commit graph

6 commits

Author SHA1 Message Date
Uwe Kleine-König
9816d85923 mfd: Switch i2c drivers back to use .probe()
After commit b8a1a4cd5a ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230515182752.10050-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones <lee@kernel.org>
2023-06-15 09:19:37 +01:00
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
Uwe Kleine-König
959ecba7f5 mfd: rohm-bd9576: Convert to i2c's .probe_new()
The probe function doesn't make use of the i2c_device_id * parameter so
it can be trivially converted.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Matti Vaittinen <mazziesaccount@gmail.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221121102454.15664-1-u.kleine-koenig@pengutronix.de
2022-12-08 12:36:49 +00:00
Julia Lawall
def387a239 mfd: bd9576: fix typos in comments
Various spelling mistakes in comments.
Detected with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Reviewed-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220314115354.144023-29-Julia.Lawall@inria.fr
2022-03-23 14:51:51 +00:00
Matti Vaittinen
0e9692607f mfd: bd9576: Add IRQ support
BD9573 and BD9576 support set of "protection" interrupts for "fatal"
issues. Those lead to SOC reset as PMIC shuts the power outputs. Thus
there is no relevant IRQ handling for them.

Few "detection" interrupts were added to the BD9576 with the idea that
SOC could take some recovery-action before error gets unrecoverable.

Unfortunately the BD9576 interrupt logic was not re-evaluated. IRQs
are not designed to be properly acknowleged - and IRQ line is kept
active for whole duration of error condition (in comparison to
informing only about state change).

For above reason, do not consider missing IRQ as error.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-03-10 10:58:33 +00:00
Matti Vaittinen
b1b3ced389 mfd: Support ROHM BD9576MUF and BD9573MUF
Add core support for ROHM BD9576MUF and BD9573MUF PMICs which are
mainly used to power the R-Car series processors.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-03-10 10:58:17 +00:00