The pmic 8921 charger has a limit of 2Amp of charge current. This limit
makes it inadequate to charge multi-cell batteries.
The pm8921 charger supports a configuration where an external charger
with more current capacity may be used to charge the battery while the
pm8921 itself can charge from a USB source. In such a configuration
the external charger source is connected to the DCIN pins, this makes the
pmic detect insertion and removal of the external charger source. In turn
this enables automatic switching on or off the usb charging path when an
external charger is plugged out or in respectively. The pm8921 charger
driver has to call start and stop on external charger. The internal
FSM and logic correctly indicates that it is charging from a DC source.
The resume charging of a fully charged battery when an external source
is present needs to start charging from an external source. The driver
relies on VBATDET comparator to signal a low.
Change-Id: Iab5439ac2408ab061bce477f4d41d7b6a8de9b38
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
irq_domain_generate_simple() is an easy way to generate an irq translation
domain for simple irq controllers. It assumes a flat 1:1 mapping from
hardware irq number to an offset of the first linux irq number assigned
to the controller
Change-Id: I0820754314a0c15b1cc9881bc38b75b0de2509b2
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Sathish Ambley <sambley@codeaurora.org>
This patch adds irq_domain infrastructure for translating from
hardware irq numbers to linux irqs. This is particularly important
for architectures adding device tree support because the current
implementation (excluding PowerPC and SPARC) cannot handle
translation for more than a single interrupt controller. irq_domain
supports device tree translation for any number of interrupt
controllers.
This patch converts x86, Microblaze, ARM and MIPS to use irq_domain
for device tree irq translation. x86 is untested beyond compiling it,
irq_domain is enabled for MIPS and Microblaze, but the old behaviour is
preserved until the core code is modified to actually register an
irq_domain yet. On ARM it works and is required for much of the new
ARM device tree board support.
PowerPC has /not/ been converted to use this new infrastructure. It
is still missing some features before it can replace the virq
infrastructure already in powerpc (see documentation on
irq_domain_map/unmap for details). Followup patches will add the
missing pieces and migrate PowerPC to use irq_domain.
SPARC has its own method of managing interrupts from the device tree
and is unaffected by this change.
Change-Id: Ia5fa674a97c85e2fc8e30275753b1494a97bd1d9
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Sathish Ambley <sambley@codeaurora.org>
Remove blen, tchthr, x_line, y_line, orient and voltage from platform
data to not to overwrite the config data with these values. Update
config array to have the proper values.
Turn on i2c_pull_up in platform data.
Change-Id: Ic926e96886f52cea3dad29e9a44559b26c717259
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
Add support for writing data to EEPROM.
Change-Id: Id6b5096f2d59d21773c06ba3803151c2f3248956
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
[sboyd@codeaurora.org: use usleep_range() instead of msleep()]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Some devices need to know if the data is to be output or read, so add a
data direction into the eeprom structure to tell the driver whether the
data line should be driven.
The user in this case is the Micrel KS8851 which has a direction
control for the EEPROM data line and thus needs to know whether
to drive it (writing) or to tristate it for receiving.
Change-Id: Ic8bd7e13ce9bde423001ca23f3de02e76e1dbdaf
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
With this change, we do the average run queue statistics calculation
in the scheduler tick itself. This helps avoid any extra timers to
do the same. Also doing this calculation in the scheduler tick avoids
any bias if the calculation is done in a workqueue
Change-Id: I854d90acc05cc7a7226487be5555976826d8c837
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
As part of HSIC initialization, in addition to enabling HSIC host
mode and periodic pad calibration, need to configure GPIO150 and
GPIO151 pins for HSIC strobe and data lines respectively for
proper data communication between HSIC devices.
Change-Id: I7cdf8e4532045d813ac6c6e3f53455d0a640245b
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
This patch adds support for EHCI compliant USB Host Controller
present in MSM chips. This Controller uses an HSIC PHY which
communicates with downstream devices using STROBE/DATA lines.
HSIC is a supplement to USB 2.0 specification and is preferred
for chip-to-chip interconnect (having maximum circuit length of
10cm) as it removes the analog transceivers.
Change-Id: Id54dcc802e606e0ff7dd31bc64671a797cd8bc09
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
CSC Matrix update support is added for MDP4 VG pipes
to convert Ycbcr -> RGB format
CRs-fixed: 313601
Change-Id: Ib6fb8f2eab4b1e871a406a3a2d7274fcfdcdd9d1
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
This change will add DIAG support for new target APQ8064.
Change-Id: Ic8d21dc39e42fc254f71ee62df8160641c8068f8
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
PM8921 and PM8018 have a common ADC module. Difference's
are in the channel supported on individual PMIC's and
in the MPP mapping to the ADC device.
MPP configuration on PM8018 is not required. The MPP
is directly connected to the AMUX pre-mux channel.
Change-Id: I9aed3366f20e3985962119274d8b2865b7054a79
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Alarm interrupt causes automatic wakeup even when the phone is in
powerdown state.
Change-Id: If3ae30304adba4f07284a3dc496956d67a1ae1b0
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Make sure the header file for Ion gets exported to userspace.
Also make sure userspace can actually use the header.
Change-Id: I44f436005a6a503811c85d4fb0f89264ba160571
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Added changes to support YV12 input format in the Rotator.
Output will be Pseudoplanar in this case.
Change-Id: Ic77ad2b6a3aaa66ad923494fb6c96e07738d674b
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
Instead of hard coding the flag into led driver, pass it
from board file.
While at it, re-factor the code to separate led upstream
core data with board specific data.
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
Conflicts:
drivers/mfd/pm8921-core.c
DIAG traffic has been supported over USB and SD card. This
change adds capability to route DIAG traffic over UART.
Change-Id: I0d6732fcbb19950700218140d581b5759e676b74
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
Add platform data for the KS8851 SPI Ethernet device to
enable proper GPIO configuration for the reset and
interrupt pins.
Change-Id: I79adae4628f38a2ca5bc17825258c41ab5e1623d
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
These new APIs allow a driver to specify its PWM period,
and raw PWM values separately using chip specific
parameters.
Change-Id: I3e9860f30a50d4f3d9c556133761d51858d2a2e3
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
Pmic 8921, has configurable hot and cold battery thresholds as
percent of VREF_THERM. Provide means to configure these via
platform data.
One has to set the config values in the charger platform data defined
in the board file.
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
real_fcc is the remaining capacity in the battery when the charger
driver indicates that the battery is fully charged. This value needs
to be calculated when charging ends with a fully charged battery.
The userspace can read this value via module parameter and preserve it
between restarts.
The real reason for calculating this is to indicate how much the battery
capacity has dropped w.r.t the profiled battery data use this deviation
in calculations.
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
kgsl now supports the use of 2 types of MMU. One is
the GPU's internal MMU and the other is IOMMU. Both
MMU cannot be active at the same time. The MMU type
can be selected at compile time via config option.
A boot command line parameter can be used to override
the type of MMU selected at compile time.
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
-Add sysfs interface to read PM8921 HK/XOADC
and thermistor temperature measurements mapped
through MPP's.
-Move PM8921 ADC from directory /drivers/mfd to
/drivers/hwmon for userspace clients to read ADC
through hwmon.
CRs-Fixed: 302365
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Conflicts:
drivers/mfd/Kconfig
This change add usb system clock support to OTG Driver.
System clock is a 60MHZ input clock to the USB ChipIdea core.
This clock is required starting from MDM9615.
This change also removes the enforcement for using a phy_reset_clk
for reseting the PHY. Starting from MDM9615, PHY reset is not implemented.
The core is reset together with the PHY using "usb_hs_clk" signal.
Signed-off-by: Amit Blay <ablay@codeaurora.org>
Add a new IOCTL call to the driver to properly
abort all threads blocked on wait queues. Updated
release call for proper cleanup.
CRs-fixed: 303637, 304152
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
Use device id passed from platform data to register
for sysfs.
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
Conflicts:
drivers/mfd/pm8xxx-irq.c