History log of /linux-master/drivers/mfd/tps65090.c
Revision Date Author Comments
# 778eea25 01-Oct-2023 Mark Brown <broonie@kernel.org>

mfd: tps65090: Convert to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20231001-mfd-ti-maple-v1-2-0657862de3f6@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>


# dc0c386e 14-Jul-2023 Rob Herring <robh@kernel.org>

mfd: Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230714174731.4059811-1-robh@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>


# 9816d859 15-May-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

mfd: Switch i2c drivers back to use .probe()

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>


# 50ff095b 12-Nov-2022 Aidan MacDonald <aidanmacdonald.0x0@gmail.com>

mfd: tps65090: 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>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221112151835.39059-18-aidanmacdonald.0x0@gmail.com


# b6325098 18-Nov-2022 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

mfd: tps65090: 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>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221118224540.619276-471-uwe@kleine-koenig.org


# c4a164f4 22-Sep-2020 Rikard Falkeborn <rikard.falkeborn@gmail.com>

mfd: Constify static struct resources

Constify a number of static struct resource. The only usage of the
structs are to assign their address to the resources field in the
mfd_cell struct. This allows the compiler to put them in read-only
memory. Done with the help of Coccinelle.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 9952f691 28-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms and conditions of the gnu general public license
version 2 as published by the free software foundation this program
is distributed in the hope it will be useful but without any
warranty without even the implied warranty of merchantability or
fitness for a particular purpose see the gnu general public license
for more details you should have received a copy of the gnu general
public license along with this program if not see http www gnu org
licenses

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 228 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Steve Winslow <swinslow@gmail.com>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190528171438.107155473@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 26fce5e0 13-Jan-2019 Paul Gortmaker <paul.gortmaker@windriver.com>

mfd: tps65090: Make it explicitly non-modular

The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config MFD_TPS65090
drivers/mfd/Kconfig: bool "TI TPS65090 Power Management chips"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.

Since module_init was not in use by this code, the init ordering
remains unchanged with this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 8a232f0b 08-Mar-2018 Markus Elfring <elfring@users.sourceforge.net>

mfd: tps65090: Delete an error message for a failed memory allocation in tps65090_i2c_probe()

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 5c148890 31-Jan-2016 Maciej S. Szmigiero <mail@maciej.szmigiero.name>

mfd: tps65090: Set regmap config reg counts properly

Regmap config max_register field should contain number of
device last register, however num_reg_defaults_raw field
should be set to register count instead
(usually one register more than max_register).

tps65090 driver had both of these fields set to the same value,
fix this by introducing separate defines for max register
number and total count of registers.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 0e777366 09-Jul-2015 Krzysztof Kozlowski <krzk@kernel.org>

mfd: Drop owner assignment from i2c_drivers

i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 12849b63 09-Nov-2014 Lee Jones <lee.jones@linaro.org>

mfd: tps65090: Fix bonkers indenting strategy

First spotted pointless (incorrect) indent of 'if (ret)', then double
indentations of a struct attribute 'mask'. Decided to go through the
whole file and make amendments instead and this is the result.

Signed-off-by: Lee Jones <lee.jones@linaro.org>


# c42ba72e 16-Apr-2014 Doug Anderson <dianders@chromium.org>

mfd: tps65090: Stop caching most registers

Nearly all of the registers in tps65090 combine control bits and
status bits. Turn off caching of all registers except the select few
that can be cached.

In order to avoid adding more duplicate #defines, we also move some
register offset definitions to the mfd driver (and resolve
inconsistent names).

Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 7d811771 16-Apr-2014 Doug Anderson <dianders@chromium.org>

mfd: tps65090: Don't tell child devices we have an IRQ if we don't

If we weren't given an interrupt we shouldn't tell child devices (like
the tps65090 charger) that they have an interrupt. This is needed so
that we can support polling mode in the tps65090 charger driver.

See also (charger: tps65090: Allow charger module to be used when no
irq).

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 30fe2b5b 18-Nov-2013 Geert Uytterhoeven <geert@linux-m68k.org>

mfd: ti: Constify struct mfd_cell where possible

As of commit 03e361b25ee8dfb1fd9b890072c23c4aae01c6c7 ("mfd: Stop setting
refcounting pointers in original mfd_cell arrays"), the "cell" parameter of
mfd_add_devices() is "const" again. Hence make all cell data passed to
mfd_add_devices() const where possible.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 334a41ce 30-Jul-2013 Jingoo Han <jg1.han@samsung.com>

mfd: Use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# b50cf35b 10-Apr-2013 Rhyland Klein <rklein@nvidia.com>

mfd: tps65090: Add compatible string for charger subnode

This patch adds the of_compatible value for the tps65090 charger
subnode used when loading the driver to find its properties
and of_node.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 36c772e3 12-Mar-2013 Rhyland Klein <rklein@nvidia.com>

mfd: tps65090: Add resources for charger

Add irq resources to pass to the charger mfd sub dev so
the charger can listen for interrupts.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 5fd86d34 29-Jan-2013 Laxman Dewangan <ldewangan@nvidia.com>

mfd: tps65090: remove suspend/resume callbacks

The tps65090 mfd driver implement the suspend/resume callbacks
which just disable and enable irqs in suspend/resume respectively.

This operation is already done in irq suspend and irq_resume and
hence it is not require to implement the same in the driver.

Remove this non-require code.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 4f979ed5 29-Jan-2013 Laxman Dewangan <ldewangan@nvidia.com>

mfd: tps65090: Pass irq domain when adding mfd sub devices

When device is get added through DT then irq_base is 0 (zero)
and in this case regmap_irq_chip_get_base() generates warning.
The interrupt of this device get added through irq_domain_add_linear()
when irq_base is 0.

Hence pass the irq domain in place of base_irq when calling
mfd_add_devices().

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 40719314 29-Jan-2013 Laxman Dewangan <ldewangan@nvidia.com>

mfd: tps65090: add DT support for tps65090

Add device tree support for the TI PMIC TPS65090.
The device can be registered through platform or DT.

Add device tree binding document for this device.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 4740f73f 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu>

mfd: remove use of __devexit

CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f791be49 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu>

mfd: remove use of __devinit

CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 84449216 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu>

mfd: remove use of __devexit_p

CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 759f2598 19-Nov-2012 Laxman Dewangan <ldewangan@nvidia.com>

mfd: tps65090: Use regmap irq framework for interrupt support

Use the regmap irq framework for implementing TPS65090 interrupt
support in place of implementing it locally.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# b9c79323 19-Nov-2012 Laxman Dewangan <ldewangan@nvidia.com>

mfd: tps65090: Move register access APIs to header

Since tps65090 register is accessed via regmap, moving
the register access APIs to header and making it as inline.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 3863db3e 19-Nov-2012 Laxman Dewangan <ldewangan@nvidia.com>

mfd: tps65090: Remove unused member of struct tps65090

Remove unused member from tps65090 data structure as
these are not used.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# e8e6f047 19-Nov-2012 Laxman Dewangan <ldewangan@nvidia.com>

mfd: tps65090: Add error prints when mem alloc failed

Add error prints when memory allocation failed for
tps65090 data. Also cleanups the melloc arguments.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# e2e8ffc9 19-Nov-2012 Laxman Dewangan <ldewangan@nvidia.com>

mfd: Add battery charger in tps65090 sub devs

TPS65090 supports the battery charging and hence adding
the device name in the list of TPS65090 children. Also
remove the tps65090-regulator as it duplicates with
tps65090-pmic for regulator driver.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 99de1cc5 16-Sep-2012 Venu Byravarasu <vbyravarasu@nvidia.com>

mfd: tps65090: Remove redundant check

Remove redundant check in is_volatile_reg().

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 0848c94f 11-Sep-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: core: Push irqdomain mapping out into devices

Currently the MFD core supports remapping MFD cell interrupts using an
irqdomain but only if the MFD is being instantiated using device tree
and only if the device tree bindings use the pattern of registering IPs
in the device tree with compatible properties. This will be actively
harmful for drivers which support non-DT platforms and use this pattern
for their DT bindings as it will mean that the core will silently change
remapping behaviour and it is also limiting for drivers which don't do
DT with this particular pattern. There is also a potential fragility if
there are interrupts not associated with MFD cells and all the cells are
omitted from the device tree for some reason.

Instead change the code to take an IRQ domain as an optional argument,
allowing drivers to take the decision about the parent domain for their
interrupts. The one current user of this feature is ab8500-core, it has
the domain lookup pushed out into the driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 55692af5 11-Sep-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: core: Push irqdomain mapping out into devices

Currently the MFD core supports remapping MFD cell interrupts using an
irqdomain but only if the MFD is being instantiated using device tree
and only if the device tree bindings use the pattern of registering IPs
in the device tree with compatible properties. This will be actively
harmful for drivers which support non-DT platforms and use this pattern
for their DT bindings as it will mean that the core will silently change
remapping behaviour and it is also limiting for drivers which don't do
DT with this particular pattern. There is also a potential fragility if
there are interrupts not associated with MFD cells and all the cells are
omitted from the device tree for some reason.

Instead change the code to take an IRQ domain as an optional argument,
allowing drivers to take the decision about the parent domain for their
interrupts. The one current user of this feature is ab8500-core, it has
the domain lookup pushed out into the driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# b7e53786 18-Jul-2012 Venu Byravarasu <vbyravarasu@nvidia.com>

mfd: Correct tps65090 cell names

mfd cell names are mistyped as TPS65910 instead of TPS65090.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 1d88f7a0 24-Apr-2012 Axel Lin <axel.lin@gmail.com>

mfd: Convert tps65090 to devm_regmap_init_i2c()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# b683a0a6 24-Apr-2012 Axel Lin <axel.lin@gmail.com>

mfd: Return proper error if tps65090 regmap_init_i2c fails

Return proper error instead of 0 if regmap_init_i2c fails.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# b6c9eeef 07-May-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: Don't use I2C-specific suspend and resume operations for tps65090

The legacy suspend operations have been deprecated and printing warnings
on boot for over a year now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 1ca5513af 07-May-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: Fix tps65090 ifdefs for suspend mode

CONFIG_PM also covers runtime only PM.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 06c4998b 17-Apr-2012 Axel Lin <axel.lin@gmail.com>

regulator: tps65090: Use generic regmap enable/disable operations

This patch converts tps65090 regulator driver to use generic regmap
enable/disable operations.

Also move struct tps65090 to include/linux/mfd/tps65090.h because
the regulator driver needs to access the rmap field of struct tps65090.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 3c33be06 15-Mar-2012 Venu Byravarasu <vbyravarasu@nvidia.com>

mfd: Add support for TPS65090

TPS65090 is a Texas Instrument PMIC. It contains 3 Step-Down converters, 2
always on LDO's and 7 current limited load switches.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>