History log of /linux-master/drivers/mfd/wm831x-i2c.c
Revision Date Author Comments
# 0db434f5 17-Oct-2023 Rob Herring <robh@kernel.org>

mfd: Use i2c_get_match_data() in a selection of drivers

Use preferred i2c_get_match_data() instead of of_match_device() and
i2c driver_data to get the driver match data. With this, adjust the
includes to explicitly include the correct headers.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Link: https://lore.kernel.org/r/20231017203603.2700864-1-robh@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>


# 4e57d142 10-Aug-2023 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

mfd: wm31x: Fix Wvoid-pointer-to-enum-cast warning

'type' is an enum, thus cast of pointer on 64-bit compile test with
W=1 causes:

wm831x-spi.c:36:10: error: cast to smaller integer type 'enum wm831x_parent' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810095849.123321-8-krzysztof.kozlowski@linaro.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>


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

mfd: wm831x-i2c: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221118224540.619276-479-uwe@kleine-koenig.org


# 2874c5fd 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

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

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

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

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


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

mfd: wm831x-i2c: Make it explicitly non-modular

The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config MFD_WM831X_I2C
drivers/mfd/Kconfig: bool "Wolfson Microelectronics WM831x/2x PMICs with I2C"

...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.

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


# 800e5455 24-May-2017 Gustavo A. R. Silva <garsilva@embeddedor.com>

mfd: wm831x-i2c: Add NULL check before pointer dereference

Add NULL check before dereferencing pointer of_id in order to avoid
a potential NULL pointer dereference.

Addresses-Coverity-ID: 1408829
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# f6dd8449 17-Mar-2017 Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

mfd: wm831x: Add basic device tree binding

Add the basic ability to register the device through device tree, more
work is needed to get each individual sub-driver functioning correctly
but this is enough to get the device to probe from device tree.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
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>


# b9736a16 08-Nov-2013 Mark Brown <broonie@linaro.org>

mfd: wm831x: Use PM ops for shutdown

This helps move us towards removing the bus custom operations.

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 130a7032 30-Jan-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: wm831x: Convert to devm_regmap_init()

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


# d48cbb74 25-Oct-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: Convert wm831x core driver to devm_kzalloc()

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


# 5da721c8 15-Sep-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: Support software initiated shutdown of WM831x PMICs

In systems where there is no hardware signal from the processor to the
PMIC to initiate the final power off sequence we must initiate the
shutdown with a register write to the PMIC. Support such systems in the
driver. Since this may prevent a full shutdown of the system platform
data is used to enable the feature.

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


# 523d9cfb 15-Sep-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: Support software initiated shutdown of WM831x PMICs

In systems where there is no hardware signal from the processor to the
PMIC to initiate the final power off sequence we must initiate the
shutdown with a register write to the PMIC. Support such systems in the
driver. Since this may prevent a full shutdown of the system platform
data is used to enable the feature.

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


# 1df5981b 10-Jun-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: Convert WM831x to use regmap API

Factor out the register read/write code to use the register map API. We
still need some wm831x specific code and locking in place to check that
the user key is handled correctly but only on the write side, reads are
not affected by the key.

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


# 4c4d8878 17-Mar-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: Remove copy from WM831x I2C write function

This saves us allocating an array on the stack, giving a meaningless
performance improvement and ensuring that if drivers ever do large writes
we'll not allocate large arrays on the stack.

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


# c538ddbe 05-Jan-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: Convert WM831x away from legacy I2C PM operations

Since the legacy bus PM operations are deprecated move the suspend
method over to dev_pm_ops.

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


# 412dc11d 24-Nov-2010 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: Add WM8326 support

The WM8326 is a high performance variant of the WM832x series with
no software visible differences.

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


# e5b48684 19-Oct-2010 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: Factor out WM831x I2C I/O from the core driver

In preparation for the addition of SPI support for the WM831x move the I2C
specific code into a separate file with a separate Kconfig option so the
I2C support can be excluded from the build.

Also update the 1133-EV1 PMIC module support for SMDK6410 to use the new
symbol.

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