When an ADC conversion results in a conversion fault, the
conversion fault bit in the status register is set, but never
cleared, by PBS, causing an error print for conversion fault
to appear for all future conversions. Update interrupt handler
to clear conversion fault bit if it is found set.
Change-Id: I83b36ce585ab5d20639dbf5050f91e8850cc2b75
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
Add support for reading ADC channels on a PMIC7 ADC directly from
the ADC_PBS peripheral on that PMIC instead of through PMK8350
ADC peripheral using PBS, for targets where PMK8350 does not run in
master mode.
The conversion request sequence for using ADC_PBS is similar to
the existing one for ADC7, with some differences in register
writes. In addition, SW now performs calibration in place of PBS,
for every conversion, by reading the three calibration channels,
calculating the reference values and entering them in the
calibration registers.
Change-Id: I9e47ed69e75ee2580a37195ea9063f24ffb8aac5
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed merge conflicts and modified
to compile with upstream driver version.]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
Add support to adc driver for suspend to disk feature.
Free interrupts during hibernation and re-register them during
resume.
Change-Id: I71d2aed51f0697e712db59dcc1ef4af0fa98aae4
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
Signed-off-by: Veera Vegivada <vvegivad@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed merge conflict]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
Correct base offset and register read API used in register
dump API called for conversion faults.
Change-Id: I274d40fe29f9f32238b9baa5e42b23d4df64cbf2
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
Fix timer value for immediate conversion to the right constant
to avoid TM conversions for immediate conversion requests.
Correct TM channel offsets checked from status and data registers
in TM interrupt handler.
Change-Id: I43a9a5cf33d31029fe306e61c4bf2e80966b9b7e
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
1.Remove mutexes used in TM configure API to avoid deadlock.
2.Update register writes in immediate and TM configure APIs.
3.Correct register and bit to check for end of conversion for immediate
conversion in IRQ handler.
Change-Id: I68d0bc4d6aeef089939d0d9ae9161b6122bf110e
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
Add scaling functions for batt_therm, batt_id and usb_in_i ADC channels
for PM5100. Also add usb_sns_v_div_16 and vin_div_16 channels to list of
supported channels and correct default prescaling value for vbat_sns
channel and full scale ADC current.
Change-Id: I86b86c319bff6df583efab8cc4c877218a79fe56
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed merge conflicts in
qcom-vadc-common.h due to location change and in qcom-vadc-common.c]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
[quic_collinsd@quicinc.com: changed struct vadc_prescale_ratio to
struct u32_fract and changed prescale "num" and "den" to
"numerator" and "denominator" respectively]
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
Add support for QCOM SPMI PMIC5 GEN3 ADC driver that supports
hardware based offset and gain compensation.
The ADC peripheral can measure both voltage and current
channels whose input signal is connected to the PMIC ADC AMUX.
The PMIC5 GEN3 ADC peripheral uses registers defined in SDAM.
The register set and configuration have been refreshed compared
to the prior QCOM PMIC7 ADC family.
Change-Id: I3512c3c067d9102406aa92c389d66283f0b12103
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed merge conflicts in
qcom-vadc-common.h due to location change; Made changes in
qcom-vadc-common.c to re-use existing qcom_vadc_map_temp_voltage();
Added entire include/linux/adc-tm-clients.h as it doesn't exist
anymore but needed to compile qcom-spmi-adc5-gen3.c and removed
the APIs used when CONFIG_QTI_ADC_TM is enabled.]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
[quic_collinsd@quicinc.com: changed struct vadc_prescale_ratio to
struct u32_fract and changed prescale "num" and "den" to
"numerator" and "denominator" respectively]
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
This snapshot is taken as of msm-5.10 'commit <52ccb2676d2b>
("soc: qcom: minidump_log: Add check to avoid NULL pointer dereference")'.
Change-Id: Ia62a11f2fed9194694914d9abb4fe47186958897
Signed-off-by: Chris Lew <clew@codeaurora.org>
Create a header library which export kernel headers.
These headers are needed by modules and userspace libraries.
This is snapshot merge from msm-5.10 branch commit 1c21e750af93 ("Merge
"drivers: dcvs: memlat: add scheme for adaptive boosting"").
Change-Id: If685678193e829a367ed672e0de345262235a2d5
Signed-off-by: Mulugeta Engdaw <mengdaw@codeaurora.org>
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Building CONFIG_UAPI_HEADER_TEST=y with a Bionic (Android's libc) based
sysroot produces the following warning:
In file included from <built-in>:1:
./usr/include/linux/icmp.h💯3: warning: declaration does not declare
anything [-Wmissing-declarations]
__be16 __unused;
^~~~~~
This is because Bionic defines __unused to expand to
__attribute__((__unused__)). Bionic pre-processes kernel headers and
redefines __unused to __linux_unused.
Do so here to avoid issues that only appear for Bionic based sysroot
UAPI header tests.
Link: 4ebdeebef7/libc/include/sys/cdefs.h (95)
Link: 4ebdeebef7/libc/kernel/tools/defaults.py (70)
Bug: 190019968
Bug: 234125788
Reported-by: Matthias Männich<maennich@google.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I2341953cbfce8e28b982c34df2df4b3b364d63a6
This reverts commit 99e629f14b ("PCI: dwc: Fix inverted condition of
DMA mask setup warning") and commit 660c486590 ("PCI: dwc: Set 32-bit
DMA mask for MSI target address allocation") in order to fix DW PCIe
host init issues on devices that support greater than 32-bit MSI target
address allocations. The bug was reported in [1] and the fix is
currently under review [2]. This change should be reverted once the
proper fix has merged upstream.
[1] https://lore.kernel.org/all/Yo0soniFborDl7+C@google.com/
[2] https://lore.kernel.org/all/20220525223316.388490-1-willmcvicker@google.com/
Bug: 232293973
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: I2820743bbcbc09bfe4e12832b155e86997ef5cae
(cherry picked from commit e43c6c73302b4217e1df36d660c4f8af05b66551)
The dispcc module is indirectly required by the interconnect providers
in qnoc-pineapple. Interconnect depends on disp_rsc, which depends on
dispcc. Without dispcc, interconnects required for critical early BW
voting to DDR won't probe.
Change-Id: Ib4111cff62a6a9785213de66983621449867e6f7
Signed-off-by: Vivek Aknurwar <quic_viveka@quicinc.com>
Add the dispcc driver for pineapple, which provides clocks for the display
subsystem.
Change-Id: Ib0bf267e6b3b11d05766408a0335e64b89d07b56
Signed-off-by: Vivek Aknurwar <quic_viveka@quicinc.com>
Commit 2a5a8fa8b2 ("leds: trigger: use RCU to protect the
led_cdevs list") changed the locking mechanism for the led_cdevs
list. Update the locking in the leds-qti-flash driver to match.
Change-Id: I54b044052134b29f56cbf18ad2d37832d89eba55
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
Add a qti-ocp-notifier driver which is used to log and notify
consumers of regulator over-current (OCP) events. This driver is
needed to monitor regulators controlled by RPMh since the
application processor is unable to directly receive OCP
interrupts for RPMh managed regulators.
Change-Id: I1fac154a5c6f70454ed1a013b9013c208d02dcce
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
Commit 29c41d5c47cb ("regulator: rpmh-regulator: support parent
supply specification in subnodes") introduced a memory leak in
the function rpmh_regulator_init_vreg_supply() due to 'buf' not
being freed in the new 'else if' statement. Fix this memory leak
by freeing 'buf' correctly.
Change-Id: If2748b595d8ae3a4564a2956a67aeda476975309
Signed-off-by: David Collins <collinsd@codeaurora.org>
Add support for debugfs control of a regulator's state. This
is useful for testing and debugging.
Change-Id: If400e15e25f29902261aa5d262baeee81b323dd5
Signed-off-by: David Collins <collinsd@codeaurora.org>
Add support for debugfs control of a regulator's state. This
is useful for testing and debugging.
Change-Id: I26da17c0cf45b942680eb4813d8cc7d0b58e6d29
Signed-off-by: David Collins <collinsd@codeaurora.org>
Add a new QTI fixed voltage regulator driver that is derived from
the fixed voltage regulator driver. Use this to provide support
for proxy consumer voting and debug features required on Qualcomm
Technologies, Inc. boards. Implement this driver as a wrapper
around fixed.c with #ifdef directives so that future updates to
fixed.c are applied automatically to qti-fixed-regulator.c.
Add support to enforce proxy consumer requests defined in device
tree for qti-fixed-regulator devices. These can be used to ensure
that regulators are not accidentally disabled before all consumers
have had a chance to make their own requests.
Change-Id: If4cf664b3f6a8214256a4b2de753f7ff27aa864e
Signed-off-by: David Collins <collinsd@codeaurora.org>
Add support for parent supply properties specified in regulator-
specific device tree subnodes. This style can be used to avoid
false positive circular dependencies in the wait_for_supplier
logic.
Change-Id: Id9a96e27ea62ef37b4b5bbfb344ee206b439ee3f
Signed-off-by: David Collins <collinsd@codeaurora.org>
Add support to enforce proxy consumer requests defined in device
tree for rpmh-regulator devices. These can be used to ensure
that regulators are not accidentally disabled or scaled down
before all consumers have had a chance to make their own
requests.
Change-Id: Ic5f4ef7369584433b0a187f966d2d5f379b98cb6
Signed-off-by: David Collins <collinsd@codeaurora.org>
Fix the following compiler warning from gcc 7.4.1 with -Werror enabled:
drivers/regulator/rpmh-regulator.c:1285:3: error: format '%d' expects argument
of type 'int', but argument 4 has type 'long int'
aggr_vreg_err(aggr_vreg, "could not retrieve ARC aux data, rc=%d\n",
drivers/regulator/rpmh-regulator.c:1292:3: error: format '%d' expects argument
of type 'int', but argument 4 has type 'size_t {aka long unsigned int}'
aggr_vreg_err(aggr_vreg, "more ARC levels defined than allowed: %d > %d\n",
drivers/regulator/rpmh-regulator.c:1296:3: error: format '%d' expects argument
of type 'int', but argument 4 has type 'size_t {aka long unsigned int}'
aggr_vreg_err(aggr_vreg, "invalid ARC aux data size: %d\n",
Fixes: ff2723a ("regulator: add rpmh-regulator driver")
Change-Id: Ic0dedbad2ea5a767dd4a56e55c231f3870342417
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Add a proxy consumer library which can be used by regulator
drivers to ensure that a given regulator maintains a certain
minimum power state during bootup. Enable state, voltage, and
current may be forced to specified levels.
Change-Id: I46853f55a1201195ed50f0365399cf49086f24ff
Signed-off-by: David Collins <collinsd@codeaurora.org>
Add the rpmh-regulator driver to support PMIC regulator
management via the RPMh hardware block on Qualcomm Technologies,
Inc. SoCs.
rpmh-regulator devices support PMIC regulator management via the
VRM and ARC RPMh accelerators. The APPS processor communicates
with these hardware blocks via an RSC using command packets. The
VRM allows changing four parameters for a given regulator: enable
state, output voltage, operating mode, and minimum headroom
voltage. The ARC allows changing only a single parameter for a
given regulator: its operating level. This operating level is
fed into CPR which then decides upon a final explicit voltage for
the regulator.
This is a snapshot commit of msm-4.14 as of:
commit 2913cfe33e10 ("Merge "iommu: arm-smmu: wait for writes to
complete before power off""). Some modifications have been made
to handle rpmh API differences between msm-4.14 and msm-4.19.
Change-Id: I48e9ab5db808036592cfb26042d843a153fbc92c
Signed-off-by: David Collins <collinsd@codeaurora.org>
* keystone/mirror-android-mainline:
ANDROID: Creating boot.img for x86_64 GKI
Linux 5.18
afs: Fix afs_getattr() to refetch file status if callback break occurred
perf session: Fix Intel LBR callstack entries and nr print message
perf test bpf: Skip test if clang is not present
perf test session topology: Fix test to skip the test in guest environment
perf bench numa: Address compiler error on s390
perf test: Avoid shell test description infinite loop
perf regs x86: Fix arch__intr_reg_mask() for the hybrid platform
perf test: Fix "all PMU test" to skip hv_24x7/hv_gpci tests on powerpc
drivers: i2c: thunderx: Allow driver to work with ACPI defined TWSI controllers
i2c: ismt: Provide a DMA buffer for Interrupt Cause Logging
i2c: mt7621: fix missing clk_disable_unprepare() on error in mtk_i2c_probe()
perf: Fix sys_perf_event_open() race against self
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
KVM: x86: hyper-v: fix type of valid_bank_mask
KVM: Free new dirty bitmap if creating a new memslot fails
gpio: mvebu/pwm: Refuse requests with inverted polarity
gpio: gpio-vf610: do not touch other bits when set the target bit
perf stat: Fix and validate CPU map inputs in synthetic PERF_RECORD_STAT events
KVM: eventfd: Fix false positive RCU usage warning
perf build: Fix check for btf__load_from_kernel_by_id() in libbpf
selftests: kvm/x86: Verify the pmu event filter matches the correct event
selftests: kvm/x86: Add the helper function create_pmu_event_filter
kvm: x86/pmu: Fix the compare function used by the pmu event filter
scsi: ufs: core: Fix referencing invalid rsp field
riscv: dts: microchip: fix gpio1 reg property typo
riscv: dts: sifive: fu540-c000: align dma node name with dtschema
mmc: core: Fix busy polling for MMC_SEND_OP_COND again
drm/i915: Use i915_gem_object_ggtt_pin_ww for reloc_iomap
net: bridge: Clear offload_fwd_mark when passing frame up bridge interface.
ptp: ocp: change sysfs attr group handling
selftests: forwarding: fix missing backslash
Input: ili210x - use one common reset implementation
Input: ili210x - fix reset timing
drm/amd: Don't reset dGPUs if the system is going to s2idle
libceph: fix misleading ceph_osdc_cancel_request() comment
libceph: fix potential use-after-free on linger ping and resends
Fix double fget() in vhost_net_set_backend()
vdpa/mlx5: Use consistent RQT size
netfilter: nf_tables: disable expression reduction infra
netfilter: flowtable: move dst_check to packet path
netfilter: flowtable: fix TCP flow teardown
net: ftgmac100: Disable hardware checksum on AST2600
igb: skip phy status check where unavailable
nfc: pn533: Fix buggy cleanup order
mptcp: Do TCP fallback on early DSS checksum failure
mptcp: fix checksum byte order
ARM: 9197/1: spectre-bhb: fix loop8 sequence for Thumb2
ARM: 9196/1: spectre-bhb: enable for Cortex-A15
net: af_key: check encryption module availability consistency
net: af_key: add check for pfkey_broadcast in function pfkey_process
percpu_ref_init(): clean ->percpu_count_ref on failure
net/mlx5: Drain fw_reset when removing device
net/mlx5e: CT: Fix setting flow_source for smfs ct tuples
net/mlx5e: CT: Fix support for GRE tuples
net/mlx5e: Remove HW-GRO from reported features
net/mlx5e: Properly block HW GRO when XDP is enabled
net/mlx5e: Properly block LRO when XDP is enabled
net/mlx5e: Block rx-gro-hw feature in switchdev mode
net/mlx5e: Wrap mlx5e_trap_napi_poll into rcu_read_lock
net/mlx5: DR, Ignore modify TTL on RX if device doesn't support it
net/mlx5: Initialize flow steering during driver probe
net/mlx5: DR, Fix missing flow_source when creating multi-destination FW table
scsi: target: Fix incorrect use of cpumask_t
NFC: nci: fix sleep in atomic context bugs caused by nci_skb_alloc
net/qla3xxx: Fix a test in ql_reset_work()
selinux: fix bad cleanup on error in hashtab_duplicate()
drm/dp/mst: fix a possible memory leak in fetch_monitor_name()
parisc: Fix patch code locking and flushing
parisc: Rewrite cache flush code for PA8800/PA8900
parisc: Disable debug code regarding cache flushes in handle_nadtlb_fault()
clk: at91: generated: consider range when calculating best rate
audit,io_uring,io-wq: call __audit_uring_exit for dummy contexts
io_uring: don't attempt to IOPOLL for MSG_RING requests
ice: Fix interrupt moderation settings getting cleared
ice: fix possible under reporting of ethtool Tx and Rx statistics
ice: fix crash when writing timestamp on RX rings
arm64: mte: Ensure the cleared tags are visible before setting the PTE
arm64: kexec: load from kimage prior to clobbering
arm64: paravirt: Use RCU read locks to guard stolen_time
dma-buf: fix use of DMA_BUF_SET_NAME_{A,B} in userspace
net: vmxnet3: fix possible NULL pointer dereference in vmxnet3_rq_cleanup()
net: vmxnet3: fix possible use-after-free bugs in vmxnet3_rq_alloc_rx_buf()
xfrm: set dst dev to blackhole_netdev instead of loopback_dev in ifdown
net: systemport: Fix an error handling path in bcm_sysport_probe()
net: lan966x: Fix assignment of the MAC address
Revert "clk: sunxi-ng: sun6i-rtc: Add support for H6"
clk: bcm2835: fix bcm2835_clock_choose_div
ptp: ocp: have adjtime handle negative delta_ns correctly
netfilter: nft_flow_offload: fix offload with pppoe + vlan
net: fix dev_fill_forward_path with pppoe + bridge
netfilter: nft_flow_offload: skip dst neigh lookup for ppp devices
netfilter: flowtable: fix excessive hw offload attempts after failure
net/sched: act_pedit: sanitize shift argument before usage
ALSA: usb-audio: Restore Rane SL-1 quirk
ALSA: hda/realtek: fix right sounds and mute/micmute LEDs for HP machine
xfrm: fix "disable_policy" flag use when arriving from different devices
i915/guc/reset: Make __guc_reset_context aware of guilty engines
drm/i915/dmc: Add MMIO range restrictions
KVM: arm64: Don't hypercall before EL2 init
KVM: arm64: vgic-v3: Consistently populate ID_AA64PFR0_EL1.GIC
can: m_can: remove support for custom bit timing, take #2
Revert "can: m_can: pci: use custom bit timings for Elkhart Lake"
net: macb: Increment rx bd head after allocating skb and buffer
selftests: mptcp: add subflow limits test-cases
mptcp: fix subflow accounting on close
pinctrl: sunxi: f1c100s: Fix signal name comment for PA2 SPI pin
pinctrl: sunxi: fix f1c100s uart2 function
block/mq-deadline: Set the fifo_time member also if inserting at head
dma-buf: ensure unique directory name for dmabuf stats
Revert "tcp/dccp: get rid of inet_twsk_purge()"
net: ipa: get rid of a duplicate initialization
net: ipa: record proper RX transaction count
net: ipa: certain dropped packets aren't accounted for
crypto: qcom-rng - fix infinite loop on requests not multiple of WORD_SZ
ALSA: hda/realtek: Add quirk for TongFang devices with pop noise
KVM: x86/mmu: Update number of zapped pages even if page list is stable
io_uring: fix ordering of args in io_uring_queue_async_work
ALSA: hda/realtek: Add quirk for the Framework Laptop
ALSA: wavefront: Proper check of get_user() error
ALSA: hda/realtek: Add quirk for Dell Latitude 7520
ALSA: hda - fix unused Realtek function when PM is not enabled
ALSA: usb-audio: Don't get sample rate for MCT Trigger 5 USB-to-HDMI
pinctrl: mediatek: mt8365: fix IES control pins
pinctrl: ocelot: Fix for lan966x alt mode
MAINTAINERS: omap: remove me as a maintainer
dt-bindings: input: mediatek,mt6779-keypad: update maintainer
ARM: dts: aspeed: Add video engine to g6
ARM: dts: aspeed: romed8hm3: Fix GPIOB0 name
ARM: dts: aspeed: romed8hm3: Add lm25066 sense resistor values
ARM: dts: aspeed-g6: fix SPI1/SPI2 quad pin group
ARM: dts: aspeed-g6: add FWQSPI group in pinctrl dtsi
dt-bindings: pinctrl: aspeed-g6: add FWQSPI function/group
pinctrl: pinctrl-aspeed-g6: add FWQSPI function-group
dt-bindings: pinctrl: aspeed-g6: remove FWQSPID group
pinctrl: pinctrl-aspeed-g6: remove FWQSPID group in pinctrl
ARM: dts: aspeed-g6: remove FWQSPID group in pinctrl dtsi
arm64: dts: qcom: sm8250: don't enable rx/tx macro by default
arm64: dts: rockchip: Add gmac1 and change network settings of bpi-r2-pro
arm64: dts: rockchip: Change io-domains of bpi-r2-pro
Bug: 232906147
Change-Id: Id5f14ffef86fedd4dd9c33ac43c2b3efd153faee
Signed-off-by: Blagovest Kolenichev <quic_c_bkolen@quicinc.com>