23 Mar, 2011
40 commits
-
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
Signed-off-by: Kyungmin Park
Acked-by: Mark Brown
Signed-off-by: Samuel Ortiz -
Signed-off-by: Mark Brown
Signed-off-by: Samuel Ortiz -
Append the additional read/write operation on 88pm860x for accessing
test page in 88PM860x.Signed-off-by: Haojian Zhuang
Signed-off-by: Samuel Ortiz -
Copy 88pm860x platform data into different mfd_data structure for
onkey/touch/codec/power driver. So move the identification of
device node from those drivers to mfd driver.Signed-off-by: Haojian Zhuang
Signed-off-by: Samuel Ortiz -
Copy 88pm860x platform data into different mfd_data structure for
regulator driver. So move the identification of device node from
regulator driver to mfd driver.Signed-off-by: Haojian Zhuang
Acked-by: Mark Brown
Signed-off-by: Samuel Ortiz -
Copy 88pm860x platform data into different mfd_data structure for
led driver. So move the identification of device node from led
driver to mfd driver.Signed-off-by: Haojian Zhuang
Signed-off-by: Samuel Ortiz -
Copy 88pm860x platform data into different mfd_data structure for
backlight driver. So move the identification of device node from
backlight driver to mfd driver.Signed-off-by: Haojian Zhuang
Signed-off-by: Samuel Ortiz -
Signed-off-by: Samuel Ortiz
-
Since 43cc71eed1250755986da4c0f9898f9a635cb3bf (platform: prefix MODALIAS
with "platform:"), the platform modalias is prefixed with "platform:".Signed-off-by: Axel Lin
Signed-off-by: Samuel Ortiz -
The GPADC in the AB8500 was incorrectly configured when a charger
current channel was selected.Signed-off-by: Karl Komierowski
Signed-off-by: Linus Walleij
Signed-off-by: Samuel Ortiz -
The GPADC found in the AB8500 needs to be calibrated to work
properly. This is done by writing a number of special OTP
(one-time-programmable) registers at production. This patch
makes sure that these values are used to calibrate the returned
value from the GPADC so that it is correct.Signed-off-by: Johan Palsson
Signed-off-by: Linus Walleij
Signed-off-by: Samuel Ortiz -
Signed-off-by: Daniel Willerud
Signed-off-by: Linus Walleij
Signed-off-by: Samuel Ortiz -
This revamps the interface so that AB8500 GPADCs are fetched by
name. Probed GPADCs are added to a list and this list is searched
for a matching GPADC. This makes it possible to have multiple
AB8500 GPADC instances instead of it being a singleton, and
rids the need to keep a GPADC pointer around in the core AB8500
MFD struct.Currently the match is made to the device name which is by default
numbered from the device instance such as "ab8500-gpadc.0" but
by using the .init_name field of the device a more intiutive
naming for the GPADC blocks can be achieved if desired.Signed-off-by: Daniel Willerud
Signed-off-by: Linus Walleij
Signed-off-by: Samuel Ortiz -
This moves the ab8500-gpadc.h header down into the ab8500/
subdir in include/linux/mfd and fixes some whitespace in the
header in the process.Signed-off-by: Daniel Willerud
Signed-off-by: Linus Walleij
Signed-off-by: Samuel Ortiz -
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
Signed-off-by: Kyungmin Park
Reviewed-by: Mark Brown
Signed-off-by: Samuel Ortiz -
As requested by Samuel, there's not really any reason to have "shared"
in the name.This also modifies the only user of the function, as well.
Signed-off-by: Andres Salomon
Signed-off-by: Samuel Ortiz -
mfd_get_cell returns a const, so change the ds1wm client to store
a const mfd cell. This silences type mismatch warnings.Since we're guaranteed to have the mfd_cell, we can also simplify
the code a bit to get rid of a temporary variable and NULL check.Signed-off-by: Andres Salomon
Signed-off-by: Samuel Ortiz -
This patch adds a sysfs file with the ab8500 switch off status.
The switch off status contains information of what caused the ab8500
chip to power off. A print during boot is also added.Signed-off-by: Mattias Wallin
Acked-by: Linus Walleij
Signed-off-by: Samuel Ortiz -
This patch adds support for ab8500 chip revision cut 3.0.
Also rephrased from Changes to Author in the header.Signed-off-by: Mattias Wallin
Acked-by: Linus Walleij
Signed-off-by: Samuel Ortiz -
mfd_get_cell returns a const, so change the jz4740 clients to store
a const mfd cell. This silences type mismatch warnings.Signed-off-by: Andres Salomon
Acked-by: Anton Vorontsov
Signed-off-by: Samuel Ortiz -
This silences warnings such as
drivers/video/tmiofb.c: In function 'tmiofb_hw_init':
drivers/video/tmiofb.c:270: warning: initialization discards qualifiers from pointer target typeThese were added by me in commit 2a79bb1d.
Signed-off-by: Andres Salomon
Signed-off-by: Samuel Ortiz -
If a system contains multiple WM831x devices we need to pass a device
number through to the MFD so that we use unique device IDs when we
instantiate child devices. In order to get support for this into 2.6.39
add some platform data to support the configuration, but no implementation
as yet.Signed-off-by: Mark Brown
Signed-off-by: Samuel Ortiz -
The WM8994/58 interrupt masking support is a much better match for the genirq
enable and disable operations than for the mask and unmask operations. The
latter are intended to used during interrupt handling for temporary changes
which isn't really practical on a slow bus. Convert the operations over to
match this.Signed-off-by: Mark Brown
Signed-off-by: Samuel Ortiz -
The WM831x interrupt masking support is a much better match for the genirq
enable and disable operations than for the mask and unmask operations. The
latter are intended to used during interrupt handling for temporary changes
which isn't really practical on a slow bus. Convert the operations over to
match this.Signed-off-by: Mark Brown
Signed-off-by: Samuel Ortiz -
This driver exposes the sysfs nodes of the TWL4030 MADC module.
All the voltage channel values are expressed in terms of mV. Channel 13
and channel 14 are reserved. There are channels which represent
temperature and current the output is represented by celcius
and mA respectively.Signed-off-by: Keerthy
Acked-by: Guenter Roeck
Signed-off-by: Samuel Ortiz -
Introducing a driver for MADC on TWL4030 powerIC. MADC stands for monitoring
ADC. This driver monitors the real time conversion of analog signals like
battery temperature, battery cuurent etc.Signed-off-by: Keerthy
Signed-off-by: Samuel Ortiz -
The device table is required to load modules based on modaliases.
After adding the MODULE_DEVICE_TABLE, below entries will be added to
modules.pcimap:
vx855 0x00001106 0x00008409 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0Signed-off-by: Axel Lin
Acked-by: Harald Welte
Signed-off-by: Samuel Ortiz -
The device table is required to load modules based on modaliases.
After adding the MODULE_DEVICE_TABLE, below entries will be added to
modules.alias:
alias i2c:pcf50633 pcf50633Signed-off-by: Axel Lin
Acked-by: Harald Welte
Signed-off-by: Samuel Ortiz -
The device table is required to load modules based on modaliases.
After adding the MODULE_DEVICE_TABLE, below entries will be added to
modules.alias:
alias spi:mc13892 mc13xxx_core
alias spi:mc13783 mc13xxx_coreSigned-off-by: Axel Lin
Acked-by: Uwe Kleine-König
Signed-off-by: Samuel Ortiz -
This enables sharing of cs5535-mfd cells via the new mfd_shared_* API.
Hooks for enable/disble of resources are added, with refcounting of
resources being automatically handled so that cs5535_mfd_res_enable/disable
are only called when necessary.Clients of cs5535-mfd (in this case, olpc-xo1.c) are also modified to
use the mfd_shared API. The platform drivers are also renamed to
olpc-xo1-{pms,acpi}, and resource enabling/disabling is replaced
with mfd_shared API calls.Signed-off-by: Andres Salomon
Signed-off-by: Samuel Ortiz -
This adds functions to enable platform_device sharing for mfd clients.
Each platform driver (mfd client) that wants to share an mfd_cell's
platform_device uses the mfd_shared_platform_driver_{un,}register()
functions instead of platform_driver_{un,}register(). Along with
registering the platform driver, these also register a new platform
device with the same characteristics as the original cell, but a different
name. Given an mfd_cell with the name "foo", drivers that want to
share access to its resources can call mfd_shared_platform_driver_register
with platform drivers named (for example) "bar" and "baz". This
will register two platform devices and drivers named "bar" and "baz"
that share the same cell as the platform device "foo". The drivers
can then call "foo" cell's enable hooks (or mfd_shared_cell_enable)
to enable resources, and obtain platform resources as they normally
would.This deals with platform handling only; mfd driver-specific details,
hardware handling, refcounting, etc are all dealt with separately.Signed-off-by: Andres Salomon
Signed-off-by: Samuel Ortiz -
This provides convenience functions for sharing of cells across
multiple mfd clients. Mfd drivers can provide enable/disable hooks
to actually tweak the hardware, and clients can call
mfd_shared_cell_{en,dis}able without having to worry about whether
or not another client happens to have enabled or disabled the
cell/hardware.Note that this is purely optional; drivers can continue to use
the mfd_cell's enable/disable hooks for their own purposes, if
desired.Signed-off-by: Andres Salomon
Signed-off-by: Samuel Ortiz -
All users of this have now been switched over to using mfd_data;
it can go away now.Signed-off-by: Andres Salomon
Signed-off-by: Samuel Ortiz -
Use mfd_data for passing information from mfd drivers to soc
clients. The mfd_cell's driver_data field is being phased out.Clients that were using driver_data now access .mfd_data
via mfd_get_data().Signed-off-by: Andres Salomon
Signed-off-by: Samuel Ortiz -
Use mfd_data for passing information from mfd drivers to mfd
clients. The mfd_cell's driver_data field is being phased out.Clients that were using driver_data now access .mfd_data
via mfd_get_data(). This changes tmio-fb only; mfd drivers with
other cells are not modified.Signed-off-by: Andres Salomon
Signed-off-by: Samuel Ortiz -
Use mfd_data for passing information from mfd drivers to mfd
clients. The mfd_cell's driver_data field is being phased out.Clients that were using driver_data now access .mfd_data
via mfd_get_data(). This changes tmio-nand only; mfd drivers with
other cells are not modified.Signed-off-by: Andres Salomon
Signed-off-by: Samuel Ortiz -
Use mfd_data for passing information from mfd drivers to mfd
clients. The mfd_cell's driver_data field is being phased out.Clients that were using driver_data now access .mfd_data
via mfd_get_data(). This changes tmio-mmc only; mfd drivers with
other cells are not modified.Signed-off-by: Andres Salomon
Signed-off-by: Samuel Ortiz -
Use mfd_data for passing information from mfd drivers to mfd
clients. The mfd_cell's driver_data field is being phased out.Clients that were using driver_data now access .mfd_data
via mfd_get_data(). This changes ds1wm only; mfd drivers with
other cells are not modified, with the exception of led_cell.The led_cell.driver_data line is dropped from htc-pasic3.c in this
patch as well. It's not used in mainline (there's no leds-pasic3
platform driver), so it should be safe to take care of that here.Signed-off-by: Andres Salomon
Signed-off-by: Samuel Ortiz -
Use mfd_data for passing information from mfd drivers to soc
clients. The mfd_cell's driver_data field is being phased out.Clients that were using driver_data now access .mfd_data
via mfd_get_data().Signed-off-by: Andres Salomon
Acked-by: Mark Brown
Signed-off-by: Samuel Ortiz -
Use mfd_data for passing information from mfd drivers to soc
clients. The mfd_cell's driver_data field is being phased out.Clients that were using driver_data now access .mfd_data
via mfd_get_data().Signed-off-by: Andres Salomon
Acked-by: Mark Brown
Signed-off-by: Samuel Ortiz