History log of /linux-master/drivers/mfd/tc3589x.c
Revision Date Author Comments
# a2ce0002 10-Aug-2023 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

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

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

tc3589x.c:343:13: error: cast to smaller integer type 'enum tc3589x_version' 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-6-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>


# 8e922937 08-Aug-2023 Ruan Jinjie <ruanjinjie@huawei.com>

mfd: tc3589x: Remove redundant of_match_ptr()

The driver depends on CONFIG_OF, it is not necessary to use
of_match_ptr() here.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230808130003.4076702-1-ruanjinjie@huawei.com
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>


# 65edd14d 08-Mar-2023 Nick Alcock <nick.alcock@oracle.com>

mfd: tc3589x: Remove MODULE_LICENSE in non-modules

Since commit 8b41fc4454e ("kbuild: create modules.builtin without
Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations
are used to identify modules. As a consequence, uses of the macro
in non-modules will cause modprobe to misidentify their containing
object file as a module when it is not (false positives), and modprobe
might succeed rather than failing with a suitable error message.

So remove it in the files in this commit, none of which can be built as
modules.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Suggested-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Lee Jones <lee@kernel.org>


# 02313a90 23-Oct-2022 Paul Cercueil <paul@crapouillou.net>

mfd: tc3589x: Remove #ifdef guards for PM related functions

Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros
to handle the .suspend/.resume callbacks.

These macros allow the suspend and resume functions to be automatically
dropped by the compiler when CONFIG_SUSPEND is disabled, without having
to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Lee Jones <lee@kernel.org>


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

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


# ed5c2f5f 15-Aug-2022 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

i2c: Make remove callback return void

The value returned by an i2c driver's remove function is mostly ignored.
(Only an error message is printed if the value is non-zero that the
error is ignored.)

So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour, all callbacks were prepared to
return 0 before.

Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com>
Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au>
Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Marek Behún <kabel@kernel.org> # for leds-turris-omnia
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> # for surface3_power
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> # for bmc150-accel-i2c + kxcjk-1013
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # for media/* + staging/media/*
Acked-by: Miguel Ojeda <ojeda@kernel.org> # for auxdisplay/ht16k33 + auxdisplay/lcd2s
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # for versaclock5
Reviewed-by: Ajay Gupta <ajayg@nvidia.com> # for ucsi_ccg
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # for iio
Acked-by: Peter Rosin <peda@axentia.se> # for i2c-mux-*, max9860
Acked-by: Adrien Grassein <adrien.grassein@gmail.com> # for lontium-lt8912b
Reviewed-by: Jean Delvare <jdelvare@suse.de> # for hwmon, i2c-core and i2c/muxes
Acked-by: Corey Minyard <cminyard@mvista.com> # for IPMI
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> # for drivers/power
Acked-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>


# 9ff80e2d 25-Jul-2021 Marc Zyngier <maz@kernel.org>

mfd: Don't use irq_create_mapping() to resolve a mapping

Although irq_create_mapping() is able to deal with duplicate
mappings, it really isn't supposed to be a substitute for
irq_find_mapping(), and can result in allocations that take place
in atomic context if the mapping didn't exist.

Fix the handful of MFD drivers that use irq_create_mapping() in
interrupt context by using irq_find_mapping() instead.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.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>


# 0dfae4a3 23-Jun-2020 Lee Jones <lee.jones@linaro.org>

mfd: tc3589x: Remove invalid use of kerneldoc syntax

Kerneldoc is for documenting function arguments and return values.

Prevents warnings like:

drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35890' not described in enum 'tc3589x_version'
drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35892' not described in enum 'tc3589x_version'
drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35893' not described in enum 'tc3589x_version'
drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35894' not described in enum 'tc3589x_version'
drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35895' not described in enum 'tc3589x_version'
drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35896' not described in enum 'tc3589x_version'
drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_UNKNOWN' not described in enum 'tc3589x_version'

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


# 1f67b599 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

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

Based on 1 normalized pattern(s):

license terms gnu general public license version 2

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

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

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


# d87814a3 01-Oct-2016 Julia Lawall <Julia.Lawall@lip6.fr>

mfd: tc3589x: Improve function-level documentation

Use the correct function name in one case and adjust a variable name to
that of the corresponding function parameter in another case.

Issue detected using Coccinelle (http://coccinelle.lip6.fr/)

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 9bd09f34 27-Jul-2015 Rob Herring <robh@kernel.org>

mfd: Kill off set_irq_flags usage

set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also modify IRQ_NOPROBE and this has been maintained although it
is not clear that is really needed. There appears to be a great deal of
blind copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
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>


# 7ce7b26f 27-Apr-2015 Krzysztof Kozlowski <krzk@kernel.org>

mfd: Constify regmap and irq configuration data

Constify in various drivers configuration data which is not modified:
- regmap_irq_chip,
- individual regmap_irq's in array,
- regmap_config,
- irq_domain_ops,

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


# 61125591 27-Mar-2015 Linus Walleij <linus.walleij@linaro.org>

mfd: tc3589x: enforce device-tree only mode

All systems using the TC3589x multifunction expander uses
devicetree, so don't clutter the place with a lot of
and assume it is there.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 1422731d 19-Mar-2015 Linus Walleij <linus.walleij@linaro.org>

mfd: tc3589x: Enforce device-tree only mode

All systems using the TC3589x multifunction expander uses
devicetree, so don't clutter the place with a lot of
and assume it is there.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# 90f2d0f7 28-Oct-2014 Linus Walleij <linus.walleij@linaro.org>

mfd: tc3589x: get rid of static base

The TC3589x driver is now a device tree-only driver, so we want
only dynamic IRQs and GPIO numbers from the tc3589x, no static
assignments.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>


# 627918ed 10-Jun-2014 Linus Walleij <linus.walleij@linaro.org>

mfd: tc3589x: Translate onecell, not twocell

Something changed in the OF parser in the v3.16 merge window
making it be strict about passing the number of IRQ cells
correctly and disturbing the irqdomain xlate function guard
to crash when subdevices try to obtain IRQs like this:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at
/home/linus/linux-stericsson/kernel/irq/irqdomain.c:676
irq_domain_xlate_twocell+0x40/0x48()
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted
3.15.0-07915-gf6d059821ce9-dirty #46
[<c0014660>] (unwind_backtrace)
from [<c0011424>] (show_stack+0x10/0x14)
[<c0011424>] (show_stack)
from [<c0432630>] (dump_stack+0x9c/0xd4)
[<c0432630>] (dump_stack)
from [<c001d5c0>] (warn_slowpath_common+0x6c/0x88)
[<c001d5c0>] (warn_slowpath_common)
from [<c001d678>] (warn_slowpath_null+0x1c/0x24)
[<c001d678>] (warn_slowpath_null)
from [<c005acd0>] (irq_domain_xlate_twocell+0x40/0x48)
[<c005acd0>] (irq_domain_xlate_twocell)
from [<c005b658>] (irq_create_of_mapping+0x64/0x110)
[<c005b658>] (irq_create_of_mapping)
from [<c02e147c>] (of_irq_get+0x38/0x48)
[<c02e147c>] (of_irq_get)
from [<c01f8910>] (tc3589x_gpio_probe+0x38/0x1e4)
[<c01f8910>] (tc3589x_gpio_probe)
from [<c022eedc>] (platform_drv_probe+0x18/0x48)
[<c022eedc>] (platform_drv_probe)
from [<c022d80c>] (driver_probe_device+0x118/0x24c)
[<c022d80c>] (driver_probe_device)
from [<c022bf20>] (bus_for_each_drv+0x58/0x8c)
[<c022bf20>] (bus_for_each_drv)
from [<c022d6c4>] (device_attach+0x74/0x88)
[<c022d6c4>] (device_attach)
from [<c022cdac>] (bus_probe_device+0x84/0xa8)
[<c022cdac>] (bus_probe_device)
from [<c022b35c>] (device_add+0x440/0x520)
[<c022b35c>] (device_add)
from [<c022ec50>] (platform_device_add+0xb4/0x218)
[<c022ec50>] (platform_device_add)
from [<c0243508>] (mfd_add_device+0x220/0x31c)
[<c0243508>] (mfd_add_device)
from [<c02436a8>] (mfd_add_devices+0xa4/0x100)
[<c02436a8>] (mfd_add_devices)
from [<c024312c>] (tc3589x_probe+0x334/0x3c0)
[<c024312c>] (tc3589x_probe)
from [<c022d80c>] (driver_probe_device+0x118/0x24c)

The TC3589x device trees specify the MFD core device
as having one interrupt cell (cannot specify flags) so the
twocell translation function is clearly wrong, changing it to
onecell, as it should be, fixes the regression.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# a381b13e 23-Jan-2014 Linus Walleij <linus.walleij@linaro.org>

mfd: tc3589x: Reform device tree probing

This changes the following mechanisms in the TC3589x device tree
probing path:

- Use the .of_match_table in struct device_driver to match the
device in the device tree.
- Add matches for the proper compatible strings "toshiba,..."
and all sub-variants, just as is done for the .id matches.
- Move over all the allocation of platform data etc to the
tc3589x_of_probe() function and follow the pattern of passing
a platform data pointer back, or an error pointer on error,
as found in the STMPE driver.
- Match the new (proper) compatible strings for the GPIO and
keypad MFD cells.
- Use of_device_is_compatible() rather than just !strcmp()
to discover which cells to instantiate.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


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

mfd: toshiba: 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>


# e64c1eb4 18-Oct-2013 Linus Walleij <linus.walleij@linaro.org>

mfd: tc3589x: Detect the precise version

Instead of detecting the "tc3589x" and hard-coding the number of
GPIO pins to 24, encode all the possible subtypes and set the
number of GPIO pins from the type.

Signed-off-by: Linus Walleij <linus.walleij@linaro.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>


# 1383e00f 20-Feb-2013 Jingoo Han <jg1.han@samsung.com>

mfd: tc3589x: Use devm_*() functions

Use devm_*() functions to make cleanup paths more simple.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 1f0529b4 02-Jan-2013 Linus Walleij <linus.walleij@stericsson.com>

mfd: tc3589x: Use simple irqdomain

This fixes a regression in the TC3589x driver introduced in
commit 15e27b1088245a2de3b7d09d39cd209212eb16af
"mfd: Provide the tc3589x with its own IRQ domain"

If a system with a TC3589x expander is booted and a base
IRQ is passed from platform data, a legacy domain will
be used. However, since the Ux500 is now switched to use
SPARSE_IRQ, no descriptors get allocated on-the-fly,
and we get a crash.

Fix this by switching to using the simple irqdomain that
will handle this uniformly and also allocates descriptors
explicitly.

Also fix two small whitespace errors in the vicinity while
we're at it.

Cc: stable@kernel.org
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.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>


# a435ae1d 06-Sep-2012 Lee Jones <lee.jones@linaro.org>

mfd: Enable the tc3589x for Device Tree

Here we provide a means to probe and extract vital information
from Device Tree when booting with it enabled. Without this
patch sub-devices wouldn't be able to reference the tc3589x
from Device Tree.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 15e27b10 06-Sep-2012 Lee Jones <lee.jones@linaro.org>

mfd: Provide the tc3589x with its own IRQ domain

In preparation for Device Tree enablement all IRQ controllers
should control their own IRQ domain. This patch provides just
that.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
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>


# 930bf022 02-Jul-2012 Axel Lin <axel.lin@gmail.com>

mfd: Guard tc3589x PM methods with CONFIG_PM_SLEEP

Guard PM methods with CONFIG_PM_SLEEP and get rid of some unneeded #ifdefs.
This fixes below build warnings:

CC drivers/mfd/tc3589x.o
drivers/mfd/tc3589x.c:361:12: warning: 'tc3589x_suspend' defined but not used [-Wunused-function]
drivers/mfd/tc3589x.c:375:12: warning: 'tc3589x_resume' defined but not used [-Wunused-function]

SIMPLE_DEV_PM_OPS already defines constant dev_pm_ops, thus also fix
'duplicate const' sparse warning.

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


# 54d8e2c3 09-Aug-2011 Linus Walleij <linus.walleij@linaro.org>

mfd: Add missing #ifdef around tc3589x PM block

The CONFIG_PM code was unconditionally compiled in despite
the dev_pm_ops only being included into the driver struct
if used. Fix this by adding the missing #ifdef.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# d5bb1221 25-Mar-2011 Thomas Gleixner <tglx@linutronix.de>

mfd: Cleanup irq namespace

Converted with coccinelle.

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


# 09c730a4 21-Dec-2010 Sundar Iyer <sundar.iyer@stericsson.com>

input/tc3589x: add tc3589x keypad support

Add support for the keypad controller module found on the
TC3589X devices. This driver default adds the support for
TC35893 device.

Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
[Some minor fixups for compilation]
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>


# abda3a24 20-Dec-2010 Samuel Ortiz <sameo@linux.intel.com>

mfd: Use dummy_irq_chip for tc3589x

This also converts tc3589x to the new irq API.

Cc: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>


# 593e9d70 12-Dec-2010 Sundar Iyer <sundar.iyer@stericsson.com>

mfd/tc3589x: add suspend/resume support

Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>


# 523bc382 12-Dec-2010 Sundar Iyer <sundar.iyer@stericsson.com>

mfd/tc3589x: undo gpio module reset during chip init

Skip putting the GPIO module into a reset during the chip init. This makes
sure to preserve any existing GPIO configurations done by pre-kernel boot code.

Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>


# bd77efd0 12-Dec-2010 Sundar Iyer <sundar.iyer@stericsson.com>

mfd/tc3589x: fix random interrupt misses

On the TC35892, a random delayed interrupt clear (GPIO IC) write locks up the
child interrupts. In such a case, the original interrupt is active and not yet
acknowledged. Re-check the IRQST bit for any pending interrupts and handle
those.

Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>


# 611b7590 12-Dec-2010 Sundar Iyer <sundar.iyer@stericsson.com>

mfd/tc3589x: add block identifier for multiple child devices

Add block identifier to be able to add multiple mfd clients
to the mfd core

Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>


# 20406ebf 12-Dec-2010 Sundar Iyer <sundar.iyer@stericsson.com>

mfd/tc3589x: rename tc35892 structs/registers to tc359x

Most of the register layout, client IRQ numbers on the TC35892 is shared also
by other variants. Make this generic as tc3589x

Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>


# f4e8afdc 12-Dec-2010 Sundar Iyer <sundar.iyer@stericsson.com>

mfd/tc35892: rename tc35892 core driver to tc3589x

Rename the tc35892 core/gpio drivers to tc3589x to include
new variants in the same mfd core

Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>