The wcnss driver currently supports a sysfs-based mechanism which
allows the Thermal Mitigation function in userspace to read and write
the current thermal mitigation level. An API is added to allow other
drivers (specifically the WLAN Driver) to register a notifier to be
invoked when the thermal mitigation level is changed.
CRs-Fixed: 317376
Change-Id: Ieda320b618a0a08186db791168e586a86b54d173
Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
In MSM architecture, the DBM, Device Bus Manager, is a HW module within
the USB3.0 core wrapper, implementing BAM interface support for USB3.0 IP.
The DBM HW unit requires for its operation a special transfer to be
started, with special TRBs structure. These usb requests will operate in
BAM2BAM mode.
This change adds to the dwc3-msm.c driver a support for queuing
a special transfers to endpoints which serve the DBM.
A function driver can now call to msm_ep_config(*ep) with some
endpoint which will serve the DBM. After this, the function
driver can queue a request to this endpoint as usual ep->queue(*ep,*req).
The function driver may need to add a few more parameters in req->udc_priv
field according to the bit mask fields defined in msm_hsudb.h file.
Change-Id: Iad530dabc68414c61d44e9eaef4402f868b2b12f
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
The req->udc_priv value is used to transfer parameters from a function
driver to a udc, for enabling sps/bam mode for MSM architecture.
This change moves the definitions of the bit fields inside the udc_priv to
msm_hsusb.h in order to avoid duplicate definitions in u_bam.c and
ci13xxx_udc.h. Also this will allow other function drivers and other udcs
to use this definitions, for example, debug class over dwc3 udc.
Change-Id: I37a011524f7ba6d06029d1f3ab3f58d4cb248e4d
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
Add SMSC hub registers that can be changed over I2C bus
for changing the default configuration.
Change-Id: Ib1cd158fdd3c3f58d7211428984ca424563c4f14
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Expand the previous histogram collection implementation to support the
addition of other MDP blocks that allow for histogram data collection.
Support the VG1, VG2, DMA-P, and DMA-S histograms using this new
framework (VG pipes only supplying the histogram of luminance).
Change-Id: I94088c1f714fa5d91256ae7b0f5548f8a0b81763
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
Fix Lineout and DMIC configurations. The configurations are similar
to tabla codec driver and hence pull in changes to sitar driver.
Change-Id: Ia00359e6f8888c08365b85423197821fc16f963b
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Currently default configuration will be active
during SMSC hub enumeration. For changing the default
configuration, requires I2C support for configuring
the configurable parameters of SMSC hub like VID,PID.
Change-Id: Ie0449b166ddaae990b9a69c3a75f8059250faf0e
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
* changes:
power: pm8921-bms: account for capacitive drop
power: pm8921-bms: Add connector resistance
power: pm8921-bms: fix the units of batt_temp for rbatt
Add new ioctls for per context timestamps.
Timestamp functions (read/write/wait) will now be context
specific rather than only using the global timestamp.
Per context timestamps is a requirement for priority
based queueing.
Change-Id: I5fdfb816480241b9552ecf90ed1bb22db3a652b5
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
As the battery discharges, we need to account for the voltage drop across
capacitance in the battery. This voltage drop can be simulated using
a resistance in series with the battery such that it increases as state of
charge of the battery decreases.
Add parameter to account for this resistance in the profile tables.
Change-Id: Ic67b798ae8f480d8f42d9321e3847c4294bf7db3
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
The current software does not take in to account the resistance
introduced because of the battery connectors and rsense. This
needs to be accounted for when the battery resistance is
calculated.
Change-Id: I0f2b440bae8168868b26f35c8ec59a21d4906f0f
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Add a resource managed clk_get() to simplify clock usage in
drivers. This allows driver authors to "get and forget" about
their clocks by automatically calling clk_put() when the driver
is detached. This also encourages clock consumers to use the
clk_get() API correctly by passing in a struct device as an
argument.
Change-Id: I1ed53cd3c26c0390fa30cd3c3dca14bcdd59939f
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Adds API to request for a particular performance
level from video core. This is needed for Wi-fi
display (WFD) to reduce end to end latency.
Change-Id: Ib4133b8cd62ccad286be1984f944911754b887c5
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
Drivers need to specify their bandwidth requirements to
bus-scaling driver to get guaranteed bandwidth on fabrics.
HSIC USB performance depends upon system fabric frequency
as HSIC USB controller has to support high bi-directional
data transfers. Hence, request for high bus bandwidth as
long as HSIC is active.
Also add debugfs entry to enable/disable the bus voting:-
echo enable > /sys/kernel/debug/ehci_hsic_msm_dbg/bus_voting
echo disable > /sys/kernel/debug/ehci_hsic_msm_dbg/bus_voting
CRs-Fixed: 342032
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Change-Id: I7e208d67ef1c0168cd7621aeae4e8b123adef255
Add the qpnp-regulator driver to support regulators found in
Qualcomm plug-and-play (QPNP) PMIC chips. QPNP chips make use of
Qualcomm's SPMI register convention. The particular hardware
characteristics of a given regulator can be derived from the
values present in the type and subtype registers.
The qpnp-regulator driver supports probing with either device tree
device specification or with board file specified platform data.
Change-Id: I4f74431a50949763d651faf992b5d2567d05758e
Signed-off-by: David Collins <collinsd@codeaurora.org>
This driver implements Mobile Broadband Interface Model protocol.
Control messages are transferred through QBI module
running in user space and communicating with mbim
using file operations interface android_mbim.
Data is transferred on SPS, Bam-to-Bam.
Change-Id: Ifc4b3f7e21b1a0dac377af272f9ae922ec9c7e2e
Signed-off-by: Anna Perel <aperel@codeaurora.org>
Allow drivers to report at probe time that they cannot get all the resources
required by the device, and should be retried at a later time.
This should completely solve the problem of getting devices
initialized in the right order. Right now this is mostly handled by
mucking about with initcall ordering which is a complete hack, and
doesn't even remotely handle the case where device drivers are in
modules. This approach completely sidesteps the issues by allowing
driver registration to occur in any order, and any driver can request
to be retried after a few more other drivers get probed.
v4: - Integrate Manjunath's addition of a separate workqueue
- Change -EAGAIN to -EPROBE_DEFER for drivers to trigger deferral
- Update comment blocks to reflect how the code really works
v3: - Hold off workqueue scheduling until late_initcall so that the bulk
of driver probes are complete before we start retrying deferred devices.
- Tested with simple use cases. Still needs more testing though.
Using it to get rid of the gpio early_initcall madness, or to replace
the ASoC internal probe deferral code would be ideal.
v2: - added locking so it should no longer be utterly broken in that regard
- remove device from deferred list at device_del time.
- Still completely untested with any real use case, but has been
boot tested.
Change-Id: Iaf6bb62f70c2d82c6cccbe468bc5007b1989af93
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dilan Lee <dilee@nvidia.com>
Cc: Manjunath GKondaiah <manjunath.gkondaiah@linaro.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: David Daney <david.daney@cavium.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
Add KGSL_IOCTL_SETPROPERTY to allow certain features to be enabled in
the kernel driver via userspace.
Change-Id: Ic0dedbadcbf3bfd451db947cec5d997261b12915
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
A possibility to preallocate and initialise buffers of different sizes
in V4L2 is required for an efficient implementation of a snapshot
mode. This patch adds two new ioctl()s: VIDIOC_CREATE_BUFS and
VIDIOC_PREPARE_BUF and defines respective data structures.
Change-Id: Idb6c1e11f1665201f77c73168bb5a8de84b538eb
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Ashray Kulkarni <ashrayk@codeaurora.org>
Add revision ID values to identify PM8901 rev 2.2 and rev 2.3.
Also modify the version printing in the pmic8901 driver to utilize
a human readable format.
Change-Id: I1fbefb35584ec19dfe0983eaff3c5192f1762392
Signed-off-by: David Collins <collinsd@codeaurora.org>
This pwrscale policy provides per-core idle information to the
msm_dcvs driver. It accepts frequency updates from the msm_dcvs
driver and updates the core frequency as needed.
Change-Id: I201cfcb6ceedc19c27f7848781813d9c477f9f83
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Change the histogram IOCTLS to accept new data structures as well as read
from userspace when required. These changes are required so that other
histogram blocks can be read instead of the current DMA-P only
implementation.
Change-Id: Icaf23dd53c3b9e2106e1518d647197d7b87800d0
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
pm8038 is the first PMIC chip to support RGB led, so
driver framework must be added to support it.
Change-Id: I8103f1e5ec37cdd8718a3daa10587f56a44729c6
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Some usecases of stub-regulator require the regulator devices to
be probed early on. As a consequence, allow for stub-regulator
to be added at a custom time by the platform code. Simply
changing the init level of this driver is not enough. We must
allow for other drivers added at the same init level to be
dependencies or dependents of this driver.
Change-Id: Ifd57d0e77e25f73dfb16c45c6774a382873ec44a
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
This reverts commit 7dd2266ae3.
It was a mistake to move the usb driver to the clock apis for XO
buffer voting. Due to an RPM design CXO and D0 are the same but
we would like to hide that from the users of the buffers.
Therefore the msm_xo driver itself remaps the D0 buffer request
to the cxo clock until the RPM is fixed.
Change-Id: I230de55d30a49fa5bcf0d07f40453f1e09c4a9b1
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
* changes:
regulator: map consumer regulator based on device tree
regulator: pass additional of_node to regulator_register()
regulator: adapt fixed regulator driver to dt
regulator: helper routine to extract regulator_init_data
regulator: Constify constraints name
regulator: Properly register dummy regulator driver
dt: add empty dt helpers for non-dt build
copper: regulator-stub: Add devices for Krait Power Control
The rbatt was observed to change with battery temperature and the state
of charge of the battery. Update the BMS driver and the battery data
to include and use a rbatt table indicating its changes w.r.t temperature
and state of charge.
On similar lines provide api for other systems to query battery resistance.
Change-Id: I681675db537b70919e6e0437bd400ce53bf97096
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Slave devices can be added by listing them as child of a SLIMBUS
controller of_node in the Device Tree.
It is required to specify elemental address, and name of the slave
device.
Change-Id: Ie1b2f8fe58988f0237547a84f1bbb14ce4733eff
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>