History log of /linux-master/include/linux/mfd/max8997.h
Revision Date Author Comments
# 84618d5e 20-Feb-2024 Linus Walleij <linus.walleij@linaro.org>

regulator: max8997: Convert to GPIO descriptors

This rewrites the max8997 regulator driver to fetch the dvs
regulators as descriptors. This will likely mostly come from
the device tree since there are no in-tree users of the platform
data, but supplying GPIO descriptor tables from board files is
also possible if needed.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://msgid.link/r/20240220-descriptors-regulators-v1-4-097f608694be@linaro.org
Acked-by: Lee Jones <lee@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>


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

Input: max8997 - convert to modern way to get a reference to a PWM

pwm_request() isn't recommended to be used any more because it relies on
global IDs for the PWM which comes with different difficulties.

The new way to do things is to find the right PWM using a reference from
the platform device. (This can be created either using a device-tree
or a platform lookup table, see e.g. commit 5a4412d4a82f ("ARM: pxa:
tavorevb: Use PWM lookup table") how to do this.)

There are no in-tree users, so there are no other code locations that need
adaption.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221117073543.3790449-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 0b79c53e 27-Jan-2021 Timon Baetz <timon.baetz@protonmail.com>

mfd: max8997: Replace 8998 with 8997

The max8997 header is using "max8998" in some identifiers.
Fix it by replacing 8998 with 8997 in enum and macro.

Signed-off-by: Timon Baetz <timon.baetz@protonmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# efddff27 05-Sep-2018 Marek Szyprowski <m.szyprowski@samsung.com>

mfd: max8997: Enale irq-wakeup unconditionally

IRQ wake up support for MAX8997 driver was initially configured by
respective property in pdata. However, after the driver conversion to
device-tree, setting it was left as 'todo'. Nowadays most of other PMIC MFD
drivers initialized from device-tree assume that they can be an irq wakeup
source, so enable it also for MAX8997. This fixes support for wakeup from
MAX8997 RTC alarm.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# d7d8d7a2 07-Aug-2018 Krzysztof Kozlowski <krzk@kernel.org>

mfd: maxim: Add SPDX license identifiers

Replace GPL v2.0+ license statements with SPDX license identifiers.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>


# af5eb1a1 12-Feb-2013 Chanwoo Choi <cw00.choi@samsung.com>

extcon: max8997: Use workqueue to check cable state after completing boot of platform

This patch use delayed workqueue to check cable state after a certain
time. If extcon-max8997 driver check cable state during booting of
platform, this couldn't send the correct notification of cable state
to extcon consumer. Alwasys, this driver should check cable state
after the completion of platform initialization

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>


# 685dc9a7 12-Feb-2013 Chanwoo Choi <cw00.choi@samsung.com>

extcon: max8997: Set default UART/USB path on probe

This patch set default H/W line path according to platfomr data.
The MAX8997 MUIC device can possibly set UART/USB or UART_AUX
/USB_AUX to internal H/W line path of MUIC device. Namely, only
one H/W line is used for two operation.

For example,
if H/W line path of MAX8997 device set UART/USB, micro usb cable
is connected to AP(Application Processor) and if H/W line path
set UART_AUX/USB_AUX, micro usb cable is connected to CP(Coprocessor).

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>


# f73f6232 12-Feb-2013 Chanwoo Choi <cw00.choi@samsung.com>

extcon: max8997: Consolidate duplicate code for checking ADC/CHG cable type

This patch make max8997_muic_get_cable_type() function to remove
duplicate code for checking ADC/Charger cable type because almost
internal function need to read adc/chg_type value of MUIC register.

Also, remove *_detach() function, extcon-max8997 driver treat
attach/detach operation of cable in max8997_*_handler() function.
Lastly, this patch move defined constant in header file(include/
linux/mfd/max8997.h, max8997-private.h) because defined constant
is only used in the 'extcon-max8997.c'.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>


# 77b71b37 27-Nov-2012 Thomas Abraham <thomas.abraham@linaro.org>

regulator: add device tree support for max8997

Add device tree based discovery support for max8997.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# b41511f7 01-Jul-2012 Thomas Abraham <thomas.abraham@linaro.org>

mfd: Add irq domain support for max8997 interrupts

Add irq domain support for max8997 interrupts. The reverse mapping method
used is linear mapping since the sub-drivers of max8997 such as regulator
and charger drivers can use the max8997 irq_domain to get the linux irq
number for max8997 interrupts. All uses of irq_base in platform data and
max8997 driver private data are removed.

Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 6a7e2618 08-May-2012 Chanwoo Choi <cw00.choi@samsung.com>

misc: MAX8997: Remove max8997-muic driver

This patch remove old max8997-muic drvier because of newly Extcon framework.
Extcon framework manages the external connector, so add extcon-max8997 driver
by using Extcon interface to support MUIC feature of Maxim 8997 PMIC instead
of max8997-muic driver(drivers/misc/max8997-muic.c).

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 82b719b1 17-Apr-2012 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: Revert "mfd: add irq domain support for max8997 interrupts"

This reverts commit 98d8618af37728f6e18e84110ddb99987b47dd12 as it
breaks the build of the muic driver.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 98d8618a 24-Mar-2012 Thomas Abraham <thomas.abraham@linaro.org>

mfd: add irq domain support for max8997 interrupts

Add irq domain support for max8997 interrupts. The reverse mapping method
used is linear mapping since the sub-drivers of max8997 such as regulator
and charger drivers can use the max8997 irq_domain to get the linux irq
number for max8997 interrupts. All uses of irq_base in platform data and
max8997 driver private data are removed.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# fd7cdddf 21-Mar-2012 Samuel Ortiz <sameo@linux.intel.com>

Revert "mfd: Add platform data for MAX8997 haptic driver"

This reverts commit 02b09703e7a411f80e5ec037b3abf14061a61933.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 104594b0 16-Mar-2012 Donggeun Kim <dg77.kim@samsung.com>

Input: add driver support for MAX8997-haptic

The MAX8997-haptic function can be used to control motor. User can
control the haptic driver by using force feedback framework.

Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 02b09703 07-Mar-2012 Chanwoo Choi <cw00.choi@samsung.com>

mfd: Add platform data for MAX8997 haptic driver

MAX8997 device does not support haptic function of it.
This patch adds platform data for for MAX8997 haptic driver.

Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# f6dd2db9 14-Dec-2011 Donggeun Kim <dg77.kim@samsung.com>

mfd: Add platform data and devices for MAX8997 LED control

MAX8997 device does not support LED control function of it.
To enable MAX8997-LED driver, platform data and devices for LED are updated.

Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 2439d971 24-Nov-2011 Donggeun Kim <dg77.kim@samsung.com>

mfd: Add platform data for MAX8997 MUIC driver

Currently, MAX8997 device does not support MUIC function of it.
To add MAX8997 MUIC driver, header file should be updated.

Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 149c077b 22-Jun-2011 Donggeun Kim <dg77.kim@samsung.com>

power_supply: Add charger driver for MAX8997/8966

MAX8997/8966 chip is a multi-function device which includes
PMIC, RTC, Fuel Gauge, MUIC, Haptic, Flash control, and
Battery charging control.
The driver for it is located at drivers/mfd.

This patch supports battery charging control of MAX8997/8966 chip and
provides power supply class information to userspace.

Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: KyungMin Park <kyungmin.park@samsung.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>


# 8de6bc7f 24-Mar-2011 MyungJoo Ham <myungjoo.ham@samsung.com>

mfd: Add MAX8997/8966 IRQ control

This patch enables IRQ handling for MAX8997/8966 chips.

Please note that Fuel-Gauge-related IRQs are not implemented in this
initial release. The fuel gauge module in MAX8997 is identical to
MAX17042, which is already in Linux kernel. In order to use the
already-existing MAX17042 driver for fuel gauge module in MAX8997, the
main interrupt handler of MAX8997 should relay related interrupts to
MAX17042 driver. However, in order to do this, we need to modify
MAX17042 driver as well because MAX17042 driver does not have any
interrupt handlers for now. We are not going to implement this in this
initial release as it is not crucial in basic operations of MAX8997.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# bd6ca2cf 10-Mar-2011 MyungJoo Ham <myungjoo.ham@samsung.com>

regulator: MAX8997/8966 support

This patch supports PMIC/Regulator part of MAX8997/MAX8966 MFD.
In this initial release, selecting voltages or current-limit
and switching on/off the regulators are supported.

Controlling voltages for DVS with GPIOs is not implemented fully
and requires more considerations: it controls multiple bucks (selection
of 1, 2, and 5) at the same time with SET1~3 gpios. Thus, when DVS-GPIO
is activated, we lose the ability to control the voltage of a single
buck regulator independently; i.e., contolling a buck affects other two
bucks. Therefore, using the conventional regulator framework directly
might be problematic. However, in this driver, we try to choose
a setting without such side effect of affecting other regulators and
then try to choose a setting with the minimum side effect (the sum of
voltage changes in other regulators).

On the other hand, controlling all the three bucks simultenously based
on the voltage set table may help build cpufreq and similar system
more robust; i.e., all the three voltages are consistent every time
without glitches during transition.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 527e7e9a 03-Mar-2011 MyungJoo Ham <myungjoo.ham@samsung.com>

mfd: MAX8997/8966 support

MAX8997/MAX8966 chip is a multi-function device with I2C bussses. The
chip includes PMIC, RTC, Fuel Gauge, MUIC, Haptic, Flash control, and
Battery (charging) control.

This patch is an initial release of a MAX8997/8966 driver that supports
to enable the chip with its primary I2C bus that connects every device
mentioned above except for Fuel Gauge, which uses another I2C bus. The
fuel gauge is not supported by this mfd driver and is supported by a
seperated driver of MAX17042 Fuel Gauge (yes, the fuel gauge part is
compatible with MAX17042).

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>