Commit Graph

1086 Commits

Author SHA1 Message Date
Roberto Granados Dorado 92c8712065 drivers: mfd: Add support to configure OCP current limit
OCP (over current protection) current can be configured
for speaker driver on wcd9330 codec. Add support to
configure the OCP current based on the parameter value
set in device tree.

Change-Id: Iadedef28a849863b0b2b63eef21bd0ad69db38e3
Signed-off-by: Roberto Granados Dorado <robertog@codeaurora.org>
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2019-08-26 16:38:23 +02:00
Nathan Chancellor a626beca4c This is the 3.10.105 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJYnZNdAAoJEE44bZycYXAvJv0P/jpPc+jKb+D0FVUOiYDkY5Rw
 jxsZ3oeruTIeSFAAIzusVMLm9moBJA6DThuTHU5Kt68mRaKB2lgmqwkkvQAPTSYh
 tnDQwlrF7dOSVmPczJFHalpaLpRdXdQP9r8y+38PibaFZPssKdnZr3BBfdOdi5DT
 lj029AGKfG7co6Hb/iAhsxuAFfPmvGHY4QNwJ2FRbU1m6MDtmCTbXzF0fc6X5AW1
 qrtaWwPulJtZ/5MPk7aFyNpuCpNvIaTEqNaQsZbuz3bHfzDQVLerWze98vgHC0QM
 2YOTP6TnEiHhxHGMb9SywUgSV1ylx0X542YDfxmcfyxBWRr0khlxQh1gpX+waqE3
 pqdSlvN7AFzifw6kubbG2/XjkNvFtJcDTgrL3qco4utIezSijXmoOsDpKNnJuzk/
 kSD5WYd+Q1CSHOkqZX29QPw1Dl/7Ftm7GPfxu7Pis1OBuPByqtRkEfmn9DpiKSs5
 Aja0ljZYiQ3jy3fH+WlEzo6PVSxx0ZxKg0fOShlpgjj8KjMUdGfl9cB1OZxyWnNH
 UiQ9iIWd3tJci7WbsBOfawsQpq3EIJxZKjyUmLYpBht5/YenYxOBDCr/CLJDQBGI
 IQUPAs/E1JGDxGTUY3AmsaMVrcX2yOfhLzjrsVJGqSdote0um+2PdTLZHE4MMiz2
 Dh6CbUVYWS1KNgmQ8T8L
 =k5mW
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEJDfLduVEy2qz2d/TmXOSYMtstxYFAlpqeiwACgkQmXOSYMts
 txaBAQ/+KqZh90YZI+gRHGdczbo3XnlryHMdpp+DTIFtN3zU+2LM352oP+haoJfr
 YhNsixcMhW5TX0is5fg4SkIc0B3ooGKZLVKOPIRw+1NLBAVG5yVuYxW7I1faJgk6
 F37+4rvq7KAOPCNMjAEXRt7GqZ4WZjgvgKy+u5wzKh3k5kUylqDwlP2qdgx2L5Rc
 IxyxgOuaVGV6dZTyAyRlRMild5Tlz+SMY4pWoMe0sulDDXhd5/5PnGNVIgh+XqB6
 m0AGkIIzPVe+wmg6n1iYs93dQO0Jmu6DL47Zv4f3ASZNL/XVSLvU9ie63FyWGZXG
 e52qAPtztXInEOo15vPQSAAq7McZHDTzhHhsU/ZtkBT+LeSUU+rsxXddJ2EO5UgC
 O3cVm11x1FWMzbBtFNFtkqeri2Y2OxvU4O81mfNP1oOUQBTMeSHTzQ8psbCdXeEr
 ktSOtI+nakPmDE3aq4YSaz7BwSgt2tU/vZehkrTxtAQJxt0b88r2xFfThy5WScT1
 v6muoqxlprjjvFld7v99P8cXxJq4QrxKUxXtEBTdB79Q5xtCC29OAcTelpPFDCED
 /KpgZflubzH/Z872AW9Ru8OL9PYty6hBNDOP4aHLSFWfCu3KQxL6BMEeqi5qBjBX
 mJ8JT0dCQYP6xONIWq6a3fICroNMazhNFxdpPSfsQFRhujhjGPg=
 =zhKv
 -----END PGP SIGNATURE-----

Merge 3.10.105 into android-msm-bullhead-3.10-oreo-m5

Changes in 3.10.105: (315 commits)
        sched/core: Fix a race between try_to_wake_up() and a woken up task
        sched/core: Fix an SMP ordering race in try_to_wake_up() vs. schedule()
        crypto: algif_skcipher - Require setkey before accept(2)
        crypto: af_alg - Disallow bind/setkey/... after accept(2)
        crypto: af_alg - Add nokey compatibility path
        crypto: algif_skcipher - Add nokey compatibility path
        crypto: hash - Add crypto_ahash_has_setkey
        crypto: shash - Fix has_key setting
        crypto: algif_hash - Require setkey before accept(2)
        crypto: skcipher - Add crypto_skcipher_has_setkey
        crypto: algif_skcipher - Add key check exception for cipher_null
        crypto: af_alg - Allow af_af_alg_release_parent to be called on nokey path
        crypto: algif_hash - Remove custom release parent function
        crypto: algif_skcipher - Remove custom release parent function
        crypto: af_alg - Forbid bind(2) when nokey child sockets are present
        crypto: algif_hash - Fix race condition in hash_check_key
        crypto: algif_skcipher - Fix race condition in skcipher_check_key
        crypto: algif_skcipher - Load TX SG list after waiting
        crypto: cryptd - initialize child shash_desc on import
        crypto: skcipher - Fix blkcipher walk OOM crash
        crypto: gcm - Fix IV buffer size in crypto_gcm_setkey
        MIPS: KVM: Fix unused variable build warning
        KVM: MIPS: Precalculate MMIO load resume PC
        KVM: MIPS: Drop other CPU ASIDs on guest MMU changes
        KVM: nVMX: postpone VMCS changes on MSR_IA32_APICBASE write
        KVM: MIPS: Make ERET handle ERL before EXL
        KVM: x86: fix wbinvd_dirty_mask use-after-free
        KVM: x86: fix missed SRCU usage in kvm_lapic_set_vapic_addr
        KVM: Disable irq while unregistering user notifier
        PM / devfreq: Fix incorrect type issue.
        ppp: defer netns reference release for ppp channel
        x86/mm/xen: Suppress hugetlbfs in PV guests
        xen: Add RING_COPY_REQUEST()
        xen-netback: don't use last request to determine minimum Tx credit
        xen-netback: use RING_COPY_REQUEST() throughout
        xen-blkback: only read request operation from shared ring once
        xen/pciback: Save xen_pci_op commands before processing it
        xen/pciback: Save the number of MSI-X entries to be copied later.
        xen/pciback: Return error on XEN_PCI_OP_enable_msi when device has MSI or MSI-X enabled
        xen/pciback: Return error on XEN_PCI_OP_enable_msix when device has MSI or MSI-X enabled
        xen/pciback: Do not install an IRQ handler for MSI interrupts.
        xen/pciback: For XEN_PCI_OP_disable_msi[|x] only disable if device has MSI(X) enabled.
        xen/pciback: Don't allow MSI-X ops if PCI_COMMAND_MEMORY is not set.
        xen-pciback: Add name prefix to global 'permissive' variable
        x86/xen: fix upper bound of pmd loop in xen_cleanhighmap()
        x86/traps: Ignore high word of regs->cs in early_idt_handler_common
        x86/mm: Disable preemption during CR3 read+write
        x86/apic: Do not init irq remapping if ioapic is disabled
        x86/mm/pat, /dev/mem: Remove superfluous error message
        x86/paravirt: Do not trace _paravirt_ident_*() functions
        x86/build: Build compressed x86 kernels as PIE
        x86/um: reuse asm-generic/barrier.h
        iommu/amd: Update Alias-DTE in update_device_table()
        iommu/amd: Free domain id when free a domain of struct dma_ops_domain
        ARM: 8616/1: dt: Respect property size when parsing CPUs
        ARM: 8618/1: decompressor: reset ttbcr fields to use TTBR0 on ARMv7
        ARM: sa1100: clear reset status prior to reboot
        ARM: sa1111: fix pcmcia suspend/resume
        arm64: avoid returning from bad_mode
        arm64: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO
        arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb()
        arm64: debug: avoid resetting stepping state machine when TIF_SINGLESTEP
        MIPS: Malta: Fix IOCU disable switch read for MIPS64
        MIPS: ptrace: Fix regs_return_value for kernel context
        powerpc/mm: Don't alias user region to other regions below PAGE_OFFSET
        powerpc/vdso64: Use double word compare on pointers
        powerpc/powernv: Use CPU-endian PEST in pnv_pci_dump_p7ioc_diag_data()
        powerpc/64: Fix incorrect return value from __copy_tofrom_user
        powerpc/nvram: Fix an incorrect partition merge
        avr32: fix copy_from_user()
        avr32: fix 'undefined reference to `___copy_from_user'
        avr32: off by one in at32_init_pio()
        s390/dasd: fix hanging device after clear subchannel
        parisc: Ensure consistent state when switching to kernel stack at syscall entry
        microblaze: fix __get_user()
        microblaze: fix copy_from_user()
        mn10300: failing __get_user() and get_user() should zero
        m32r: fix __get_user()
        sh64: failing __get_user() should zero
        score: fix __get_user/get_user
        s390: get_user() should zero on failure
        ARC: uaccess: get_user to zero out dest in cause of fault
        asm-generic: make get_user() clear the destination on errors
        frv: fix clear_user()
        cris: buggered copy_from_user/copy_to_user/clear_user
        blackfin: fix copy_from_user()
        score: fix copy_from_user() and friends
        sh: fix copy_from_user()
        hexagon: fix strncpy_from_user() error return
        mips: copy_from_user() must zero the destination on access_ok() failure
        asm-generic: make copy_from_user() zero the destination properly
        alpha: fix copy_from_user()
        metag: copy_from_user() should zero the destination on access_ok() failure
        parisc: fix copy_from_user()
        openrisc: fix copy_from_user()
        openrisc: fix the fix of copy_from_user()
        mn10300: copy_from_user() should zero on access_ok() failure...
        sparc32: fix copy_from_user()
        ppc32: fix copy_from_user()
        ia64: copy_from_user() should zero the destination on access_ok() failure
        fix fault_in_multipages_...() on architectures with no-op access_ok()
        fix memory leaks in tracing_buffers_splice_read()
        arc: don't leak bits of kernel stack into coredump
        Fix potential infoleak in older kernels
        swapfile: fix memory corruption via malformed swapfile
        coredump: fix unfreezable coredumping task
        usb: dwc3: gadget: increment request->actual once
        USB: validate wMaxPacketValue entries in endpoint descriptors
        USB: fix typo in wMaxPacketSize validation
        usb: xhci: Fix panic if disconnect
        USB: serial: fix memleak in driver-registration error path
        USB: kobil_sct: fix non-atomic allocation in write path
        USB: serial: mos7720: fix non-atomic allocation in write path
        USB: serial: mos7840: fix non-atomic allocation in write path
        usb: renesas_usbhs: fix clearing the {BRDY,BEMP}STS condition
        USB: change bInterval default to 10 ms
        usb: gadget: fsl_qe_udc: signedness bug in qe_get_frame()
        USB: serial: cp210x: fix hardware flow-control disable
        usb: misc: legousbtower: Fix NULL pointer deference
        usb: gadget: function: u_ether: don't starve tx request queue
        USB: serial: cp210x: fix tiocmget error handling
        usb: gadget: u_ether: remove interrupt throttling
        usb: chipidea: move the lock initialization to core file
        Fix USB CB/CBI storage devices with CONFIG_VMAP_STACK=y
        ALSA: rawmidi: Fix possible deadlock with virmidi registration
        ALSA: timer: fix NULL pointer dereference in read()/ioctl() race
        ALSA: timer: fix division by zero after SNDRV_TIMER_IOCTL_CONTINUE
        ALSA: timer: fix NULL pointer dereference on memory allocation failure
        ALSA: ali5451: Fix out-of-bound position reporting
        ALSA: pcm : Call kill_fasync() in stream lock
        zfcp: fix fc_host port_type with NPIV
        zfcp: fix ELS/GS request&response length for hardware data router
        zfcp: close window with unblocked rport during rport gone
        zfcp: retain trace level for SCSI and HBA FSF response records
        zfcp: restore: Dont use 0 to indicate invalid LUN in rec trace
        zfcp: trace on request for open and close of WKA port
        zfcp: restore tracing of handle for port and LUN with HBA records
        zfcp: fix D_ID field with actual value on tracing SAN responses
        zfcp: fix payload trace length for SAN request&response
        zfcp: trace full payload of all SAN records (req,resp,iels)
        scsi: zfcp: spin_lock_irqsave() is not nestable
        scsi: mpt3sas: Fix secure erase premature termination
        scsi: mpt3sas: Unblock device after controller reset
        scsi: mpt3sas: fix hang on ata passthrough commands
        mpt2sas: Fix secure erase premature termination
        scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices
        scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression
        scsi: ibmvfc: Fix I/O hang when port is not mapped
        scsi: Fix use-after-free
        scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()
        scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded
        scsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware
        ext4: validate that metadata blocks do not overlap superblock
        ext4: avoid modifying checksum fields directly during checksum verification
        ext4: use __GFP_NOFAIL in ext4_free_blocks()
        ext4: reinforce check of i_dtime when clearing high fields of uid and gid
        ext4: allow DAX writeback for hole punch
        ext4: sanity check the block and cluster size at mount time
        reiserfs: fix "new_insert_key may be used uninitialized ..."
        reiserfs: Unlock superblock before calling reiserfs_quota_on_mount()
        xfs: fix superblock inprogress check
        libxfs: clean up _calc_dquots_per_chunk
        btrfs: ensure that file descriptor used with subvol ioctls is a dir
        ocfs2/dlm: fix race between convert and migration
        ocfs2: fix start offset to ocfs2_zero_range_for_truncate()
        ubifs: Fix assertion in layout_in_gaps()
        ubifs: Fix xattr_names length in exit paths
        UBIFS: Fix possible memory leak in ubifs_readdir()
        ubifs: Abort readdir upon error
        ubifs: Fix regression in ubifs_readdir()
        UBI: fastmap: scrub PEB when bitflips are detected in a free PEB EC header
        NFSv4.x: Fix a refcount leak in nfs_callback_up_net
        NFSD: Using free_conn free connection
        NFS: Don't drop CB requests with invalid principals
        NFSv4: Open state recovery must account for file permission changes
        fs/seq_file: fix out-of-bounds read
        fs/super.c: fix race between freeze_super() and thaw_super()
        isofs: Do not return EACCES for unknown filesystems
        hostfs: Freeing an ERR_PTR in hostfs_fill_sb_common()
        driver core: Delete an unnecessary check before the function call "put_device"
        driver core: fix race between creating/querying glue dir and its cleanup
        drm/radeon: fix radeon_move_blit on 32bit systems
        drm: Reject page_flip for !DRIVER_MODESET
        drm/radeon: Ensure vblank interrupt is enabled on DPMS transition to on
        qxl: check for kmap failures
        Input: i8042 - break load dependency between atkbd/psmouse and i8042
        Input: i8042 - set up shared ps2_cmd_mutex for AUX ports
        Input: ili210x - fix permissions on "calibrate" attribute
        hwrng: exynos - Disable runtime PM on probe failure
        hwrng: omap - Fix assumption that runtime_get_sync will always succeed
        hwrng: omap - Only fail if pm_runtime_get_sync returns < 0
        i2c-eg20t: fix race between i2c init and interrupt enable
        em28xx-i2c: rt_mutex_trylock() returns zero on failure
        i2c: core: fix NULL pointer dereference under race condition
        i2c: at91: fix write transfers by clearing pending interrupt first
        iio: accel: kxsd9: Fix raw read return
        iio: accel: kxsd9: Fix scaling bug
        thermal: hwmon: Properly report critical temperature in sysfs
        cdc-acm: fix wrong pipe type on rx interrupt xfers
        timers: Use proper base migration in add_timer_on()
        EDAC: Increment correct counter in edac_inc_ue_error()
        IB/ipoib: Fix memory corruption in ipoib cm mode connect flow
        IB/core: Fix use after free in send_leave function
        IB/ipoib: Don't allow MC joins during light MC flush
        IB/mlx4: Fix incorrect MC join state bit-masking on SR-IOV
        IB/mlx4: Fix create CQ error flow
        IB/uverbs: Fix leak of XRC target QPs
        IB/cm: Mark stale CM id's whenever the mad agent was unregistered
        mtd: blkdevs: fix potential deadlock + lockdep warnings
        mtd: pmcmsp-flash: Allocating too much in init_msp_flash()
        mtd: nand: davinci: Reinitialize the HW ECC engine in 4bit hwctl
        perf symbols: Fixup symbol sizes before picking best ones
        perf: Tighten (and fix) the grouping condition
        tty: Prevent ldisc drivers from re-using stale tty fields
        tty: limit terminal size to 4M chars
        tty: vt, fix bogus division in csi_J
        vt: clear selection before resizing
        drivers/vfio: Rework offsetofend()
        include/stddef.h: Move offsetofend() from vfio.h to a generic kernel header
        stddef.h: move offsetofend inside #ifndef/#endif guard, neaten
        ipv6: don't call fib6_run_gc() until routing is ready
        ipv6: split duplicate address detection and router solicitation timer
        ipv6: move DAD and addrconf_verify processing to workqueue
        ipv6: addrconf: fix dev refcont leak when DAD failed
        ipv6: fix rtnl locking in setsockopt for anycast and multicast
        ip6_gre: fix flowi6_proto value in ip6gre_xmit_other()
        ipv6: correctly add local routes when lo goes up
        ipv6: dccp: fix out of bound access in dccp_v6_err()
        ipv6: dccp: add missing bind_conflict to dccp_ipv6_mapped
        ip6_tunnel: Clear IP6CB in ip6tunnel_xmit()
        ip6_tunnel: disable caching when the traffic class is inherited
        net/irda: handle iriap_register_lsap() allocation failure
        tcp: fix use after free in tcp_xmit_retransmit_queue()
        tcp: properly scale window in tcp_v[46]_reqsk_send_ack()
        tcp: fix overflow in __tcp_retransmit_skb()
        tcp: fix wrong checksum calculation on MTU probing
        tcp: take care of truncations done by sk_filter()
        bonding: Fix bonding crash
        net: ratelimit warnings about dst entry refcount underflow or overflow
        mISDN: Support DR6 indication in mISDNipac driver
        mISDN: Fixing missing validation in base_sock_bind()
        net: disable fragment reassembly if high_thresh is set to zero
        ipvs: count pre-established TCP states as active
        iwlwifi: pcie: fix access to scratch buffer
        svc: Avoid garbage replies when pc_func() returns rpc_drop_reply
        brcmsmac: Free packet if dma_mapping_error() fails in dma_rxfill
        brcmsmac: Initialize power in brcms_c_stf_ss_algo_channel_get()
        brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()
        pstore: Fix buffer overflow while write offset equal to buffer size
        net/mlx4_core: Allow resetting VF admin mac to zero
        firewire: net: guard against rx buffer overflows
        firewire: net: fix fragmented datagram_size off-by-one
        netfilter: fix namespace handling in nf_log_proc_dostring
        can: bcm: fix warning in bcm_connect/proc_register
        net: fix sk_mem_reclaim_partial()
        net: avoid sk_forward_alloc overflows
        ipmr, ip6mr: fix scheduling while atomic and a deadlock with ipmr_get_route
        packet: call fanout_release, while UNREGISTERING a netdev
        net: sctp, forbid negative length
        sctp: validate chunk len before actually using it
        net: clear sk_err_soft in sk_clone_lock()
        net: mangle zero checksum in skb_checksum_help()
        dccp: do not send reset to already closed sockets
        dccp: fix out of bound access in dccp_v4_err()
        sctp: assign assoc_id earlier in __sctp_connect
        neigh: check error pointer instead of NULL for ipv4_neigh_lookup()
        ipv4: use new_gw for redirect neigh lookup
        mac80211: fix purging multicast PS buffer queue
        mac80211: discard multicast and 4-addr A-MSDUs
        cfg80211: limit scan results cache size
        mwifiex: printk() overflow with 32-byte SSIDs
        ipv4: Set skb->protocol properly for local output
        net: sky2: Fix shutdown crash
        kaweth: fix firmware download
        tracing: Move mutex to protect against resetting of seq data
        kernel/fork: fix CLONE_CHILD_CLEARTID regression in nscd
        Revert "ipc/sem.c: optimize sem_lock()"
        cfq: fix starvation of asynchronous writes
        drbd: Fix kernel_sendmsg() usage - potential NULL deref
        lib/genalloc.c: start search from start of chunk
        tools/vm/slabinfo: fix an unintentional printf
        rcu: Fix soft lockup for rcu_nocb_kthread
        ratelimit: fix bug in time interval by resetting right begin time
        mfd: core: Fix device reference leak in mfd_clone_cell
        PM / sleep: fix device reference leak in test_suspend
        mmc: mxs: Initialize the spinlock prior to using it
        mmc: block: don't use CMD23 with very old MMC cards
        pstore/core: drop cmpxchg based updates
        pstore/ram: Use memcpy_toio instead of memcpy
        pstore/ram: Use memcpy_fromio() to save old buffer
        mb86a20s: fix the locking logic
        mb86a20s: fix demod settings
        cx231xx: don't return error on success
        cx231xx: fix GPIOs for Pixelview SBTVD hybrid
        gpio: mpc8xxx: Correct irq handler function
        uio: fix dmem_region_start computation
        KEYS: Fix short sprintf buffer in /proc/keys show function
        hv: do not lose pending heartbeat vmbus packets
        staging: iio: ad5933: avoid uninitialized variable in error case
        mei: bus: fix received data size check in NFC fixup
        ACPI / APEI: Fix incorrect return value of ghes_proc()
        PCI: Handle read-only BARs on AMD CS553x devices
        tile: avoid using clocksource_cyc2ns with absolute cycle count
        dm flakey: fix reads to be issued if drop_writes configured
        mm,ksm: fix endless looping in allocating memory when ksm enable
        can: dev: fix deadlock reported after bus-off
        hwmon: (adt7411) set bit 3 in CFG1 register
        mpi: Fix NULL ptr dereference in mpi_powm() [ver #3]
        mfd: 88pm80x: Double shifting bug in suspend/resume
        ASoC: omap-mcpdm: Fix irq resource handling
        regulator: tps65910: Work around silicon erratum SWCZ010
        dm: mark request_queue dead before destroying the DM device
        fbdev/efifb: Fix 16 color palette entry calculation
        metag: Only define atomic_dec_if_positive conditionally
        Linux 3.10.105

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Conflicts:
	arch/arm/mach-sa1100/generic.c
	arch/arm64/kernel/traps.c
	crypto/blkcipher.c
	drivers/devfreq/devfreq.c
	drivers/usb/dwc3/gadget.c
	drivers/usb/gadget/u_ether.c
	fs/ubifs/dir.c
	include/net/if_inet6.h
	lib/genalloc.c
	net/ipv6/addrconf.c
	net/ipv6/tcp_ipv6.c
	net/wireless/scan.c
	sound/core/timer.c
2018-01-25 17:45:32 -07:00
Dan Carpenter a28d835844 mfd: 88pm80x: Double shifting bug in suspend/resume
commit 9a6dc644512fd083400a96ac4a035ac154fe6b8d upstream.

set_bit() and clear_bit() take the bit number so this code is really
doing "1 << (1 << irq)" which is a double shift bug.  It's done
consistently so it won't cause a problem unless "irq" is more than 4.

Fixes: 70c6cce040 ('mfd: Support 88pm80x in 80x driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2017-02-10 11:04:07 +01:00
Patrick Lai cdef0aa690 mfd: wcd9xxx-core: add debugfs entry to dump slimslave registers
Currently, there is a debugfs entry defined for peeking one register
at a time. Add another debugfs entry to dump all SLIMBUS slave
register.

Change-Id: Iddf056d68afd3699d9d8d8eef83bd98d03e61fac
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2015-01-11 11:12:00 -08:00
Bhalchandra Gajare 6d1514aa71 mfd: wcd9xxx-core: Add API to support slimbus clock bandwidth request
Slimbus clock can be scaled for high bandwidth requirements, add API to
support voting for slimbus clock so that individual codec drivers can
use this API.

CRs-fixed: 735296
Change-Id: I5be78b9ce5d0e2b241cecdba5f7ee672d8211461
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2014-10-21 19:16:05 -07:00
Bhalchandra Gajare 0db8515893 mfd: wcd9xxx: Add support for MAD specific DMIC clk rate
MAD (Microphone Activity Detection) block on the codec can use
different Digital MIC (DMIC) clock rate as compared to regular audio
recording use cases. Add support to configure DMIC clock rate specific
to MAD which will be used by codec drivers whenever MAD is active.

CRs-fixed: 692015
Change-Id: Ife73a407c8d1a2d16b9b89df4979395a575f96c2
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2014-09-02 11:20:37 -07:00
Linux Build Service Account 3c4a9994ec Merge "ASoC: wcd9xxx: Changes for High performance mode" 2014-08-15 04:52:00 -07:00
Sudheer Papothi eac4b94d30 ASoC: wcd9xxx: Changes for High performance mode
Add changes for high performance audio playback on headset
for better audio quality during 192KHz/24bit audio playback.

CRs-Fixed: 706322
Change-Id: Ie79293f24114d5d81a610186d24b44b1550dae9c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2014-08-13 02:19:28 +05:30
Aviral Gupta 8ecaf403ff ASoC: wcd9xxx: update the pinctrl for the slimbus based devices
Parse the pinctrl nodes from the dtsi file for the slimbus
based codecs.

Change-Id: I5f03bbeaad608ae0966395e8170ec8a6e64d9bb0
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
2014-08-12 17:37:33 +05:30
Laxminath Kasam fdbcce7bba mfd: wcd9xxx: fix no audio issue due to irq failure
on wcd9306, we have dtsi entry to register interrupts
from 0 to 28. But Tapan codec has num_irq initialised
to 31 causing irq_init to fail.
Correct the macro for TAPAN_NUM_IRQS to resolve the
issue.

Change-Id: Ieadc3fee5c7524e31d1697b23e30665a00564516
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2014-08-01 18:33:05 +05:30
Laxminath Kasam 84abfaf362 ASoC: msm8939: add support for external codec over slimbus
With new sound cards possible to connect over SLIMBUS,
add SLIMBUS as primary BE dai.

Change-Id: I6ebb3744a539f3409caad0565f7a80e6f531cc07
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2014-06-25 14:56:45 +05:30
Linux Build Service Account bed92b2391 Merge "ASoC: wcd9xxx: Add support for MAD Slim master channel API" 2014-06-06 06:05:54 -07:00
Linux Build Service Account 1be968617f Merge "ASoC: msm8x16-wcd: add support for pmic rev 2.0" 2014-06-04 07:06:53 -07:00
Laxminath Kasam 5fcb6a52af ASoC: msm8x16-wcd: add support for pmic rev 2.0
Add register changes as per flatfile for rev 2.0
and maintain backward compatible.

Change-Id: I0060c4369ae66e624ea9d181048449d4e0cdf4f2
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2014-05-28 20:44:27 +05:30
Venkat Sudhir 20938dead3 ASoC: wcd9xxx: Add support for MAD Slim master channel API
LAB feature is used in listen to capture PCM data once
the keyword is detected. To get the PCM from codec Apps
processor will enable the Slim master channel. PCM data
can be acquired from this master channel which is further
connected to MAD Tx port in codec. This change implements
and exports API to enable the Slim master channel on Apps
side.

Change-Id: Ibac20acc9e1c5c1afe2833c76de894aaf6b1d646
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2014-05-27 15:31:39 -07:00
Aravind Kumar 2c28ca7a16 ASoC: support external codec for 8916
8916 supports external audio codec (tapan) over I2C\I2S.
Add suport for tapan audio codec and also add pinctrl support
for codec reset GPIO.

Change-Id: I3f2820139c644bd993c17e12e27f7a54f58f692e
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2014-05-26 19:31:41 +05:30
Linux Build Service Account 878893201c Merge "mfd: wcd9xxx: Increase codec max regulators" 2014-05-21 21:24:29 -07:00
Sudheer Papothi 0555c0c1b4 mfd: wcd9xxx: Increase codec max regulators
Increase codec max regulators count by one as wcd9330 codec has
stereo speakers and require an additional on-demand supply.

Change-Id: Ie01b233d555a925687fa5c99363664206cf1b197
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2014-05-17 04:34:23 +05:30
Sudheer Papothi 3289a93cd7 mfd: wcd9xxx: Add wcd9330 config for core drivers
wcd9330 codec uses wcd9xxx core services. Change enables config
to compile core drivers for wcd9330 codec.

Change-Id: Ica75ffa383c5049b0d8f5bb92eacf4e4bf7f82c5
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2014-05-16 08:19:25 +05:30
Linux Build Service Account a0ec602b94 Merge "ASoC: wcd9330: Update codec register defaults based on codec version" 2014-05-13 23:45:32 -07:00
Linux Build Service Account 8a3f8e02a4 Merge "mfd: wcd9xxx: Add support to detect wcd9330 codec version" 2014-05-13 23:45:31 -07:00
Phani Kumar Uppalapati f5310b75f7 ASoC: wcd9330: Update codec register defaults based on codec version
Update wcd9330 codec register default values based on
the version (v1.0 or v2.0) that is detected.

Change-Id: I55d9b3a240a9a9c3ca9a33d96ccb99dca83a2e02
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2014-05-09 19:37:59 -07:00
Phani Kumar Uppalapati 2238405ede mfd: wcd9xxx: Add support to detect wcd9330 codec version
WCD9330 codec hardware has two versions v1.0 and v2.0.
Add support to detect the codec version.

Change-Id: Icd5fbbccc57642bb686593ebacec3dd1fa0b5392
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2014-05-09 19:27:42 -07:00
Kuirong Wang 70f5243391 ASoC: wcd93xx: Remove delay for Slimbus during SSR recovery
When SLIMBUS data channel is to be torn down, CODEC driver
waits for channel removal interrupt from SLIMBUS slave device
with 1 second timeout as measure to prevent system from lock
down in case channel removal interrupt never arrive due to
known reason. When ADSP SSR happen, SLIMBUS would be reset
hence data channel will be gone inherently. Waiting for 1
second will only prolong SSR recovery latency. Update to
avoid the delay after SSR.

Change-Id: Ic6a94ddd1150ba143f4dd33aac1785d7d2ee7653
CRs-fixed: 653504
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2014-04-22 19:27:43 -07:00
Linux Build Service Account 0837b705e7 Merge "ASoC: wcdxxxx: Add check for buffer overflow" 2014-04-04 10:00:21 -07:00
Bhalchandra Gajare ca2824f878 mfd: wcd9xxx: Add support for REPEAT_CHANGE_VALUE
Slimbus supports ability to write upto 16 bytes to the same register as
one transaction on the bus through REPEAT_CHANGE_VALUE slimbus message.
Add support to write codec register with multiple values using
REPEAT_CHANGE_VALUE. Not all sizes from 1 to 16 are supported by such a
message, add support in driver to be able to write all sizes from 1 to
16 by splitting the register writes of unsupported sizes into multiple
writes of supported sizes.

Change-Id: I33fdd983068bc10f65523b2a95f1d7741fa6c486
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2014-04-01 13:53:23 -07:00
Aravind Kumar 2f9678cd2b ASoC: wcdxxxx: Add check for buffer overflow
Current code does not check if the indexes of array
codec_dai being accessed is within the maximum
number of codec dais for a particular codec. The change
adds this check and ensures that indexes outside the
bounds of array are not accessed.

CRs-Fixed: 628865
Change-Id: Ibf81f91b35e43feddc6b03a1239b4d12e04a95da
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2014-03-21 13:02:36 +05:30
Phani Kumar Uppalapati 44b8eeb030 ASoC: wcd9xxx: Add support to detect wcd9330 based on chip version
Add support to detect wcd9330 audio codec by reading the chip
version registers and also update the codec reset control
registers based on the codec type detected.

Change-Id: Ida69413a0e423e9311229200edfbf6f56d4c2759
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2014-03-11 18:07:58 -07:00
Phani Kumar Uppalapati 59278338b1 ASoC: WCD9330: Add initial driver for WCD9330 codec
Add codec driver for WCD9330 audio codec. This driver
is an ALSA-compliant and constructs the internal codec
audio paths with DAPM widgets and controls. Provides the
controls to the upper layers to enable and configure
audio paths.

Change-Id: If0832f3dd7dc671d7a61a43a7a8683106ad84973
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2014-03-11 18:04:33 -07:00
Yeleswarapu, Nagaradhesh db9848fa1f Asoc: Add support for codec bulk write for Helicon
Helicon can not use existing bulk_write function
as analog and digital codecs are in different busses.
So implement bulk write accordingly as per the codec interfaces

CRs-Fixed: 593609
Change-Id: Ibc16539cbd795fd998e88b6dc5b9060d70b498ac
Signed-off-by: Yeleswarapu, Nagaradhesh <nagaradh@codeaurora.org>
2014-01-10 14:14:59 +05:30
Ian Maund f06163e6d0 msm: reap unused kernel files
This change removes source files from the kernel tree that
were not being used during make. The list of used files
was generated using an annotated make log and was then
compared with new files added since the public release of
kernel version 3.10.00. New files which were added but
not used have been removed from the tree.

A diff was also run to determine the list of files that had
been modified since the release of kernel version 3.10.00.
These files were then scrubbed based on the current kernel
configuration, removing invalid and unused conditionals.

Some files which support planned functionality or are
useful in debugging have been excluded from this reap.

Change-Id: Ia44a224d3cea7bc78dd45e8a8279860d35d4b008
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2013-11-21 17:45:28 -08:00
Yeleswarapu, Nagaradhesh 93fc4a4250 ASoC: wcd9xxx: Correct OCP IRQ mapping for Tapan
OCP interrupt mapping bit number is changed in Tapan codec,
so correct the interrupt mapping accordingly.

Change-Id: I9ecdd5174822f807261700478686776413d87667
Signed-off-by: Yeleswarapu, Nagaradhesh <nagaradh@codeaurora.org>
2013-10-18 18:06:07 -07:00
Damir Didjusto 8938ad3317 ASoC: wcd9306: Add DMIC sample rate support to wcd9306
Add the capability to read DMIC sample rate from device
tree file to wcd9306. This enables different sample rates
without changing the codec driver.

CRs-fixed: 542737
Change-Id: I436df2114f9f19cb6a17c8e700df2654deede7e1
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
2013-10-14 18:59:44 -07:00
Bhalchandra Gajare 09790bbe55 mfd: wcd9xxx: Refactor codec core driver and irq driver
IRQ driver can be used by codecs that do not use the core driver.
Refactor the drivers so that codec drivers that are not children
of the core driver can also request/access the interrupt routines
provided by the IRQ driver.

Change-Id: I3086be02839fd735db2d32665abf7b984958dc2b
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2013-09-04 17:29:06 -07:00
Bradley Rubin 325ca23f2a Kbuild: Export msm adie codec header files to user space
Change-Id: I16f3e6bc413a5b5b82f14525b42c35a7017b9227
Signed-off-by: Brad Rubin <brubin@codeaurora.org>
2013-09-04 17:24:21 -07:00
Gopikrishnaiah Anandan 0fccdd5f9e msm: uapi: Export the wcd9320 header file to userspace
Kernel 3.10 requires that exported header files should
be placed in uapi folder. Change moves the wcd9320
header file to uapi folder.

Change-Id: I9cbc8258901aa983bc0922b1d666eff0b14c4dc3
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2013-09-04 17:23:49 -07:00
Phani Kumar Uppalapati b00b41ad19 ASoC: wcd9xxx: Add run-time detection of wcd9306/wcd9302
Tapan codec has two variants wcd9306 and wcd9302. Wcd9302
is derived from wcd9306 while few hardware blocks are not
available. Add support to detect the codec variant at run
time.

Change-Id: Idb5b39aec2b8262391aea475a261ee5c0fcd1ede
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2013-09-04 17:22:16 -07:00
Joonwoo Park 40d755d8b2 ASoC: wcd9xxx: reinitialize codec irq after subsystem restart
During subsystem restart, it's possible codec's upstream irq is disabled
if irq handler tried to access codec register when it's inaccessible.
Reinitialize codec irq handler after subsystem restart to be able to
bring codec interrupts back to work again.

CRs-fixed: 520754
Change-Id: Iaa6fa8da25cdf6ed6746754385ad895db8dcea9a
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2013-09-04 17:21:30 -07:00
Joonwoo Park 6727615676 ASoC: wcd9xxx: Update sound card's online/offline state
Update sound card's state when it went to online/offline so application
can monitor and wait for card's online prior to issue command.

Change-Id: I7cfb120e56e97cf743782a8b4b2fcbad242b227b
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2013-09-04 17:21:30 -07:00
Anirudh Ghayal b4a1e6b17f power: pm8921-charger: Add delay after turning on D0 (TCXO) clock
On APQ8064, TCXO cannot be turned off before its warm-up period (4ms).
This is not required on the platform which have a CXO. Add a warm-up
delay after turning on D0 (which turns on the TCXO).

Change-Id: I252372c35a9fdfaf4a9fade1594936b05c1b5745
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2013-09-04 17:18:20 -07:00
Xiaozhe Shi 5346956160 of: batterydata: Introduce DT support for battery data
Add the of_batterydata driver to parse device tree battery data.

Battery data contains battery profile information and is used by the
charger and the BMS drivers.

Change-Id: Ibe03800be0d51e82194c9385c6348c5a6c92711d
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
2013-09-04 17:11:19 -07:00
Joonwoo Park ba633649d8 ASoC: wcd9xxx: introduce headphone impedance detection support
Different headphones have different impedance that results in volume level
difference on ears as lower impedance headphone will have higher
volume with the same gain on PAs.
Provide impedance of headphones to be able to adjust gain according to
impedance so user can have consistent volume level with different
headphones.

Change-Id: I707f34344cd0068507bdd8a0192eb7afea1147f2
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2013-09-04 17:07:12 -07:00
Anirudh Ghayal 691aa279aa power: pm8921-bms: Fix variable naming
The max_fcc_learning_cycles variable actually indicates
the minimum number of FCC cycles required to update a new FCC,
name it accordingly.

Change-Id: I510d3a05eed736a9ee560c936faa20ed2d3c5bd1
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2013-09-04 17:00:52 -07:00
tingting 50bfd48c34 power: qpnp-bms: Add qrd 4v2 1300mah battery data
currently there is no battery data for qrd 4v2 1300mah

add qrd 4v2 1300mah battery data

Change-Id: Ie5bf0cafb2f50e85d45976178bb13d8b79017bb5
Signed-off-by: tingting <tingting@codeaurora.org>
2013-09-04 16:56:25 -07:00
Prasad Sodagudi b9878fcc82 leds: pm8xxx: Enable PWM LPG banks based on max current
The current design enables PWM LPG high bank with out
checking the max current. So enable PWM LPG low bank when max
current configured as 4mA and enable PWM LPG high bank when
the max current configured as 8mA. Enabled both PWM LPG low bank
and PWM LPG high bank when max current configure as 12mA.

CRs-Fixed: 486318
Change-Id: Ib7177aafc63c4c33b8c144d665a11d5aaf0ef584
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2013-09-04 16:55:35 -07:00
Joonwoo Park 31342a81f1 ASoC: wcd9xxx: don't clear pending mbhc interrupt
Clear mbhc irq before dispatching it to avoid lost irq when the same
irq asserts while driver is handling previous one.

CRs-fixed: 488535
Change-Id: I43ff7553258c0e8b260f233bbb064a5b8f118120
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2013-09-04 16:53:56 -07:00
Anirudh Ghayal 574b4bda17 power: pm8921-bms: Update the FCC learning algorithm
1. Add configurable parameters to
	- enable/disable fcc learning
	- minimum soc to start FCC learning
	- minimum ocv (pc) to start FCC learning
	- minimum cycles to update fcc vs temp. table

2. New FCC is calculated using the cc count-
	FCC_NEW = (cc_end - cc_start) / (soc2 - soc1)
	cc_end = CC count when charing ends
	cc_start = CC count when charging starts
	soc1, soc2 = starting and ending SOC_rbatt value

3. Add a new sysfs entries to update the learnt fcc values
   to userspace. These values are restored back on
   reboot.

CRs-Fixed: 417288
Change-Id: I0dc713d59ef9c45f96b9f0b5844252758bd09320
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2013-09-04 16:46:15 -07:00
Wu Fenglin 877849609e bms: qpnp-bms: Add QRD 4.35v 2000mAh battery data
Add data for QRD 4.35V 2000mAh battery. In pmic8x26 V1.0, batt_id pin
is connect to ground, so can't identify the battery using ADC, add
a battery type for QRD.

Change-Id: Ib54873210b6dce476c93c8e48942921e305b5d82
Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
2013-09-04 16:37:26 -07:00
Asish Bhattacharya 50fb08f9f9 ASoC: msm: Fix the register address of TX4 registers
The TX4 register address are not correct and needs to be fixed to
correct offset.

Change-Id: Iacb4a57a8c0a8508a68d057d0d431715e617eba5
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2013-09-04 16:32:04 -07:00
Joonwoo Park 6a4526c450 ASoC: wcd9320: Allow micbias 2 sharing
Currently wcd9320 driver assumes micbias 2 is dedicated to headset and ANC
microphones on headset.  Allow different microphones share the micbias 2 to
support hardware that have shared micbias configuration.

If micbias 2 is shared by mic biases other than headset mic, MBHC's ext
cable feature will be compromized and also headset removal can make more
pop noise.  If hardware has dedicated micbias 2 for headset, it's
recommanded to disable this feature.

Change-Id: I5d5e5c2feb406212dad6d211f49de49e64e1a888
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2013-09-04 16:30:49 -07:00