History log of /linux-master/include/linux/mfd/pcf50633/core.h
Revision Date Author Comments
# 245cb473 23-Oct-2022 Paul Cercueil <paul@crapouillou.net>

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

Use the new EXPORT_GPL_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>


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


# 6e3ad118 08-Aug-2011 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: Convert pcf50633 to use new register map API

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# f337134f 17-Aug-2010 Mark Brown <broonie@opensource.wolfsonmicro.com>

mfd: Move PCF50633 IRQ protoypes where the definitions can see them

Fixed warnings about unprototyped global functions.

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


# f5bf403a 11-May-2010 Lars-Peter Clausen <lars@metafoo.de>

backlight: pcf50633: Register a pcf50633-backlight device in pcf50633 core driver.

Register a device newly added pcf50633-backlight driver as a child device in
the pcf50633 core driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>


# 68d641ef 13-Oct-2009 Lars-Peter Clausen <lars@metafoo.de>

mfd: Fix memleak in pcf50633_client_dev_register

Since platform_device_add_data copies the passed data, the allocated
subdev_pdata is never freed. A simple fix would be to either free subdev_pdata
or put it onto the stack. But since the pcf50633 child devices can rely on
beeing children of the pcf50633 core device it's much more elegant to get access
to pcf50633 core structure through that link. This allows to get completly rid
of pcf5033_subdev_pdata.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# e98c73a2 04-Nov-2009 Paul Fertser <fercerpav@gmail.com>

pcf50633: Get rid of charging restart software auto-triggering

After reaching Battery Full condition MBC state machine switches back
into charging mode when the battery voltage falls below 96% of a
battery float voltage. The voltage drop in Li-Ion batteries is
marginal (1-2%) till about 80% of its capacity - which means, after a
BATFULL, charging won't be restarted until 75-80%.

That is a desired behaviour recommended by battery manufacturers,
don't mess with it.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>


# 31b4ff06 04-Nov-2009 Balaji Rao <balajirrao@openmoko.org>

pcf50633: introduces battery charging current control

Implement a new sysfs attribute to allow changing MBC charging limit on
the fly independently of usb current limit. It also gets set
automatically every time usb current limit is changed.

Limiting charging current also prevents violating USB specification in
the case when the whole device is shut down and usb current limit is
reset to the factory default by the pcf50633 state transition.

Signed-off-by: Balaji Rao <balajirrao@openmoko.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>


# ed52e62e 27-Jul-2009 Paul Fertser <fercerpav@gmail.com>

mfd: use a dedicated workqueue for pcf50633 irq processing

Using the default kernel "events" workqueue causes problems with
synchronous adc readings if initiated from some task on the same
workqueue.

I had a deadlock trying to use pcf50633_adc_sync_read from a
power_supply class driver because the reading was initiated from the
workqueue and it waited for the irq processing to complete (to get the
result) and that was put on the same workqueue.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>


# 9705ecc5 27-Jan-2009 Balaji Rao <balajirrao@openmoko.org>

pcf50633_charger: Enable periodic charging restart

The battery charger state machine switches into charging mode when
the battery voltage falls below 96% of a battery float voltage. But
the voltage drop in Li-ion batteries is marginal(1~2 %) till about
80% of its capacity - which means, after a BATFULL, charging won't
be restarted until 80%.

This work_struct function restarts charging at regular intervals to
make sure the battery doesn't discharge too much.

Signed-off-by: Balaji Rao <balajirrao@openmoko.org>
Cc: Andy Green <andy@openmoko.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>


# f52046b1 08-Jan-2009 Balaji Rao <balajirrao@openmoko.org>

mfd: PCF50633 core driver

This patch implements the core of the PCF50633 driver. This core driver has
generic register read/write functions and does interrupt management for its
sub devices.

Signed-off-by: Balaji Rao <balajirrao@openmoko.org>
Cc: Andy Green <andy@openmoko.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>