summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/simple-mfd-i2c.c
Commit message (Collapse)AuthorAgeFilesLines
* mfd: Switch i2c drivers back to use .probe()Uwe Kleine-König2023-06-151-1/+1
| | | | | | | | | | | | After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 ("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>
* mfd: max5970: Rename driver and remove wildcardNaresh Solanki2023-06-021-9/+9
| | | | | | | | | | 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>
* mfd: max597x: Add support for MAX5970 and MAX5978Patrick Rudolph2023-04-261-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.com https://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
* mfd: simple-mfd-i2c: Fix incoherent comment regarding DT registrationLee Jones2023-02-221-1/+1
| | | | Signed-off-by: Lee Jones <lee@kernel.org>
* mfd: simple-mfd-i2c: Enable support for the silergy,sy7636aAlistair Francis2022-02-081-0/+11
| | | | | Signed-off-by: Alistair Francis <alistair@alistair23.me> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: simple-mfd-i2c: Add support for registering devices via MFD cellsLee Jones2021-08-161-8/+33
| | | | | | | | | | | | | | | | | | | 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>
* mfd: simple-mfd-i2c: Add sl28cpld supportMichael Walle2020-09-171-0/+1
| | | | | | | | | | | | | 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>
* mfd: Add simple regmap based I2C driverMichael Walle2020-09-171-0/+56
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>