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>
The previous version of this driver included wildcards in file names
and descriptions. This patch renames the driver to only support MAX5970
and MAX5978, which are the only chips that the driver actually supports.
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Link: https://lore.kernel.org/r/20230427113046.3971425-1-Naresh.Solanki@9elements.com
Signed-off-by: Lee Jones <lee@kernel.org>
Implement a regulator driver with IRQ support for fault management.
Written against documentation [1] and [2] and tested on real hardware.
Every channel has it's own regulator supply nammed 'vss1-supply' and
'vss2-supply'. The regulator supply is used to determine the output
voltage, as the smart switch provides no output regulation.
The driver requires the 'shunt-resistor-micro-ohms' to be present in
the devicetree to properly calculate current related values.
You must specify compatible devictree layout:
regulator@3a {
reg = <0x3a>;
vss1-supply = <&p3v3>;
compatible = "maxim,max5978";
...
regulators {
sw0_ref: SW0 {
regulator-compatible = "SW0";
shunt-resistor-micro-ohms = <12000>;
...
}
}
}
1: https://datasheets.maximintegrated.com/en/ds/MAX5970.pdf
2: https://datasheets.maximintegrated.com/en/ds/MAX5978.pdf
...
Changes in V12:
- Use simple_mfd_i2c driver and remove previous implementation.
- Remove newline
- Use _MFD_MAX597X_H in header file
- Successfull build need following patch from regulator:
https://lore.kernel.org/r/20230216075302.68935-1-Naresh.Solanki@9elements.comhttps://lore.kernel.org/r/20230210163225.1208035-1-Naresh.Solanki@9elements.com
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Marcello Sylvester Bauer <sylv@sylv.io>
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230307121246.127425-2-Naresh.Solanki@9elements.com
More devices are cropping up requiring only Regmap initialisation and
child registration functionality. We currently only support that if
all required devices are represented by their own Device Tree nodes
complete with compatible strings.
However, not everyone is happy with adding empty nodes that provide no
additional device information into the Device Tree.
Rather than have a plethora of mostly empty, function-less drivers in
MFD, we'll support those simple cases in here instead via MFD cells.
Cc: Mark Brown <broonie@kernel.org>
Tested-by: Michael Walle <michael@walle.cc>
Reviewed-by: Alistair Francis <alistair@alistair23.me>
Tested-by: Alistair Francis <alistair@alistair23.me>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Add the core support for the board management controller found on the
SMARC-sAL28 board.
Also add a virtual symbol which pulls in the simple-mfd-i2c driver and
provide a common symbol on which the subdevice drivers can depend on.
At the moment, this controller is used on the Kontron SMARC-sAL28 board.
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
There are I2C devices which contain several different functions but
doesn't require any special access functions. For these kind of drivers
an I2C regmap should be enough.
Create an I2C driver which creates an I2C regmap and enumerates its
children. If a device wants to use this as its MFD core driver, it has
to add an individual compatible string. It may provide its own regmap
configuration.
Subdevices can use dev_get_regmap() on the parent to get their regmap
instance.
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Lee Jones <lee.jones@linaro.org>