09 Jul, 2012

21 commits

  • Since none of the users now reference the cache directly we can happily
    remove the custom cache code and rely on the regmap cache.

    For simplicity we don't bother with the register defaults tables but
    instead read the defaults from the device - regmap is capable of doing
    this, unlike our old cache infrastructure. This saves a lot of code and
    allows us to cache the device revision information too.

    Signed-off-by: Mark Brown
    Signed-off-by: Samuel Ortiz

    Mark Brown
     
  • We can just use regmap_update_bits() to achieve the same effect - it will
    do the read/modify/update cycle for us.

    Signed-off-by: Mark Brown
    Signed-off-by: Samuel Ortiz

    Mark Brown
     
  • Use the most simple possible transformation on the existing code so keep
    the table sitting around, further patches in this series will delete the
    existing cache code - the main purpose of this patch is to ensure that
    we always have a cache for bisection.

    Signed-off-by: Mark Brown
    Signed-off-by: Samuel Ortiz

    Mark Brown
     
  • Signed-off-by: Chris Rattray
    Signed-off-by: Mark Brown
    Signed-off-by: Samuel Ortiz

    Mark Brown
     
  • Hierarchically, the AB8500 is a child of the DB8500 PRCMU. So now that
    Device Tree is being used and MFD core code is Device Tree aware, we
    can simply register DB8500 PRCMU from Device Tree in the normal way
    then allow the DB8500 PRCMU driver to register the AB8500 as a simple
    MFD device at probe time.

    Signed-off-by: Lee Jones
    Signed-off-by: Samuel Ortiz

    Lee Jones
     
  • Now the MFD API is Device Tree aware we can use it for platform
    registration again, even when booting with DT enabled. To aid in
    Device Node pointer allocation we provide each cell with the
    associative compatible string.

    Signed-off-by: Lee Jones
    Signed-off-by: Samuel Ortiz

    Lee Jones
     
  • The AB8500 is soon to have its own IRQ domain. For this to be useful
    the driver needs to be initialised earlier in the boot sequence. Here
    we move initialisation forward from arch_initcall to core_initcall time.

    Cc: Samuel Ortiz
    Signed-off-by: Lee Jones
    Signed-off-by: Samuel Ortiz

    Lee Jones
     
  • Now the AB8500 has its own IRQ domain it needs to be initialised earlier
    in the boot sequence. As the AB8500 relies on the DB8500 PRCMU we need to
    reflect this change for the PRCMU driver too.

    Cc: Samuel Ortiz
    Signed-off-by: Lee Jones
    Signed-off-by: Samuel Ortiz

    Lee Jones
     
  • During Device Tree enablement of the ab8500 and db8500-prcmu drivers,
    a decision was made to omit registration through the MFD API and use
    Device Tree directly. However, because MFD devices have a different
    address space and the ab8500 and db8500 both use I2C to communicate,
    this causes issues with address translation during execution of
    of_platform_populate(). So the solution is to make the MFD core aware
    of Device Tree and have it assign the correct node pointers instead.

    To make this work the MFD core also needs to be awere of IRQ domains,
    as Device Tree insists on IRQ domain compatibility. So, instead of
    providing an irq-base via platform code, in the DT case we simply
    look up the IRQ domain and map to the correct virtual IRQ.

    Signed-off-by: Lee Jones
    Signed-off-by: Samuel Ortiz

    Lee Jones
     
  • There is only one method used to communicate with the DB8500 PRCMU, via I2C.
    Now this can be assumed, there is no requirement to specify the protocol in
    the function name. This patch removes protocol specifics and uses a more
    generic naming convention.

    Signed-off-by: Lee Jones
    Signed-off-by: Samuel Ortiz

    Lee Jones
     
  • As the AB8500 is an IRQ controller in its own right, here we provide
    the AB8500 driver with IRQ domain support. This is required if we wish
    to reference any of its IRQs from a platform's Device Tree.

    Cc: Naga Radheshy
    Cc: Mattias Wallin
    Cc: Daniel Willerud
    Signed-off-by: Lee Jones
    Signed-off-by: Samuel Ortiz

    Lee Jones
     
  • This patch adds the correct compatible string for use during Device Tree
    population. Without it the DB8500 PRCMU will not be probed.

    Acked-by: Linus Walleij
    Signed-off-by: Lee Jones
    Signed-off-by: Samuel Ortiz

    Lee Jones
     
  • During ab8500-core clean-up the Kconfig entry for AB8500_I2C_CORE
    was left remnant. This patch simply removes it.

    Acked-by: Linus Walleij
    Signed-off-by: Lee Jones
    Signed-off-by: Samuel Ortiz

    Lee Jones
     
  • The kernel now forces IRQs to be ONESHOT if no IRQ handler is passed.

    Acked-by: Linus Walleij
    Signed-off-by: Lee Jones
    Signed-off-by: Samuel Ortiz

    Lee Jones
     
  • Signed-off-by: Axel Lin
    Signed-off-by: Samuel Ortiz

    Axel Lin
     
  • The MC13xxx PMIC is mainly used on i.Mx SoC. On those SoC the SPI
    hardware will deassert CS line as soon as the SPI FIFO is empty.
    The MC13xxx hardware is very sensitive to CS line change as it
    corrupts the transfer if CS is deasserted in the middle of a register
    read or write.
    It is not possible to use the CS line as a GPIO on some SoC, so we
    need to workaround this by implementing a single SPI transfer to
    access the PMIC.

    Reviewed-by: Mark Brown
    Acked-by: Marc Reilly
    Signed-off-by: Philippe Rétornaz
    Signed-off-by: Samuel Ortiz

    Philippe Rétornaz
     
  • This fix the SPI regmap configuration, the wrong write flag was used.
    Also, bits_per_word should not be set as the regmap spi implementation
    uses a 8bits transfert granularity.

    Signed-off-by: Philippe Rétornaz
    Tested-by: Fabio Estevam
    Signed-off-by: Samuel Ortiz

    Philippe Rétornaz
     
  • Now this driver is using regmap APIs, the iolock mutex is not used and can be
    removed.

    Signed-off-by: Axel Lin
    Signed-off-by: Samuel Ortiz

    Axel Lin
     
  • This is to address the following warning during compilation time:

    drivers/mfd/da9052-core.c: In function ‘da9052_device_init’:
    drivers/mfd/da9052-core.c:646: warning: unused variable ‘desc’

    This variable is indeed no longer in use (change can be traced back
    to commit: 8614419451d88bf99fff7f5e468fe45f8450891e).

    Signed-off-by: Krzysztof Wilczynski
    Signed-off-by: Samuel Ortiz

    Krzysztof Wilczynski
     
  • The i2c_device_id table is supposed to be zero-terminated.

    Signed-off-by: Axel Lin
    Signed-off-by: Samuel Ortiz

    Axel Lin
     
  • This patch is device driver for MAX77686 chip.
    MAX77686 is PMIC and includes regulator and rtc on it.
    This driver is core of MAX77686 chip, so provides common support for
    accessing on-chip devices. It uses irq_domain to manage irq and regmap
    to read/write data to its register with i2c bus.

    Signed-off-by: Chiwoong Byun
    Signed-off-by: Jonghwa Lee
    Signed-off-by: Myungjoo Ham
    Signed-off-by: Kyungmin Park
    Reviewed-by: Mark Brown
    Signed-off-by: Samuel Ortiz

    Jonghwa Lee
     

08 Jul, 2012

4 commits

  • Linus Torvalds
     
  • Pull security docs update from James Morris.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
    security: Minor improvements to no_new_privs documentation

    Linus Torvalds
     
  • We already use them for openat() and friends, but fchdir() also wants to
    be able to use O_PATH file descriptors. This should make it comparable
    to the O_SEARCH of Solaris. In particular, O_PATH allows you to access
    (not-quite-open) a directory you don't have read persmission to, only
    execute permission.

    Noticed during development of multithread support for ksh93.

    Reported-by: ольга крыжановская
    Cc: Al Viro
    Cc: stable@kernel.org # O_PATH introduced in 3.0+
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Pull ARM fixes from Russell King:
    "Last merge window, we had some updates from Al cleaning up the signal
    restart handling. These have caused some problems on ARM, and while
    Al has some fixes, we have some concerns with Al's patches but we've
    been unsuccesful with discussing this.

    We have got to the point where we need to do something, and we've
    decided that the best solution is to revert the appropriate commits
    until Al is able to reply to us.

    Also included here are four patches to fix warnings that I've noticed
    in my build system, and one fix for kprobes test code."

    * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
    ARM: fix warning caused by wrongly typed arm_dma_limit
    ARM: fix warnings about atomic64_read
    ARM: 7440/1: kprobes: only test 'sub pc, pc, #1b-2b+8-2' on ARMv6
    ARM: 7441/1: perf: return -EOPNOTSUPP if requested mode exclusion is unavailable
    ARM: 7443/1: Revert "new way of handling ERESTART_RESTARTBLOCK"
    ARM: 7442/1: Revert "remove unused restart trampoline"
    ARM: fix set_domain() macro
    ARM: fix mach-versatile/pci.c warning

    Linus Torvalds
     

07 Jul, 2012

11 commits

  • The documentation didn't actually mention how to enable no_new_privs.
    This also adds a note about possible interactions between
    no_new_privs and LSMs (i.e. why teaching systemd to set no_new_privs
    is not necessarily a good idea), and it references the new docs
    from include/linux/prctl.h.

    Suggested-by: Rob Landley
    Signed-off-by: Andy Lutomirski
    Acked-by: Kees Cook
    Signed-off-by: James Morris

    Andy Lutomirski
     
  • Pull eCryptfs fixes from Tyler Hicks:
    "Fixes an incorrect access mode check when preparing to open a file in
    the lower filesystem. This isn't an urgent fix, but it is simple and
    the check was obviously incorrect.

    Also fixes a couple important bugs in the eCryptfs miscdev interface.
    These changes are low risk due to the small number of users that use
    the miscdev interface. I was able to keep the changes minimal and I
    have some cleaner, more complete changes queued up for the next merge
    window that will build on these patches."

    * tag 'ecryptfs-3.5-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
    eCryptfs: Gracefully refuse miscdev file ops on inherited/passed files
    eCryptfs: Fix lockdep warning in miscdev operations
    eCryptfs: Properly check for O_RDONLY flag before doing privileged open

    Linus Torvalds
     
  • Pull target fixes from Nicholas Bellinger:
    "Two minor target fixes. There is really nothing exciting and/or
    controversial this time around.

    There's one fix from MDR for a RCU debug warning message within tcm_fc
    code (CC'ed to stable), and a small AC fix for qla_target.c based upon
    a recent Coverity static report.

    Also, there is one other outstanding virtio-scsi LUN scanning bugfix
    that has been uncovered with the in-flight tcm_vhost driver over the
    last days, and that needs to make it into 3.5 final too. This patch
    has been posted to linux-scsi again here:

    http://marc.info/?l=linux-scsi&m=134160609212542&w=2

    and I've asked James to include it in his next PULL request."

    * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    qla2xxx: print the right array elements in qlt_async_event
    tcm_fc: Resolve suspicious RCU usage warnings

    Linus Torvalds
     
  • File operations on /dev/ecryptfs would BUG() when the operations were
    performed by processes other than the process that originally opened the
    file. This could happen with open files inherited after fork() or file
    descriptors passed through IPC mechanisms. Rather than calling BUG(), an
    error code can be safely returned in most situations.

    In ecryptfs_miscdev_release(), eCryptfs still needs to handle the
    release even if the last file reference is being held by a process that
    didn't originally open the file. ecryptfs_find_daemon_by_euid() will not
    be successful, so a pointer to the daemon is stored in the file's
    private_data. The private_data pointer is initialized when the miscdev
    file is opened and only used when the file is released.

    https://launchpad.net/bugs/994247

    Signed-off-by: Tyler Hicks
    Reported-by: Sasha Levin
    Tested-by: Sasha Levin

    Tyler Hicks
     
  • Based upon Alan's patch from Coverity scan id 793583, these debug
    messages in qlt_async_event() should be starting from byte 0, which is
    always the Asynchronous Event Status Code from the parent switch statement.

    Also, rename reason_code -> login_code following the language used in
    2500 FW spec for Port Database Changed (0x8014) -> Port Database Changed
    Event Mailbox Register for mailbox[2].

    Signed-off-by: Alan Cox
    Cc: Chad Dupuis
    Cc: Giridhar Malavali
    Signed-off-by: Nicholas Bellinger

    Alan Cox
     
  • Use rcu_dereference_protected to tell rcu that the ft_lport_lock
    is held during ft_lport_create. This resolved "suspicious RCU usage"
    warnings when debugging options are turned on.

    Signed-off-by: Mark Rustad
    Tested-by: Ross Brattain
    Cc:
    Signed-off-by: Nicholas Bellinger

    Mark Rustad
     
  • Pull two MTD fixes from David Woodhouse:
    - Fix a logic error in OLPC CAFÉ NAND ready() function.
    - Fix regression due to bitflip handling changes.

    * tag 'for-linus-20120706' of git://git.infradead.org/linux-mtd:
    mtd: cafe_nand: fix an & vs | mistake
    mtd: nand: initialize bitflip_threshold prior to BBT scanning

    Linus Torvalds
     
  • Otherwise the code races with munmap (causing a use-after-free
    of the vma) or with close (causing a use-after-free of the struct
    file).

    The bug was introduced by commit 90ed52ebe481 ("[PATCH] holepunch: fix
    mmap_sem i_mutex deadlock")

    Cc: Hugh Dickins
    Cc: Miklos Szeredi
    Cc: Badari Pulavarty
    Cc: Nick Piggin
    Cc: stable@vger.kernel.org
    Signed-off-by: Andy Lutomirski
    Signed-off-by: Linus Torvalds

    Andy Lutomirski
     
  • Pull ocfs2 fixes from Joel Becker.

    * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
    aio: make kiocb->private NUll in init_sync_kiocb()
    ocfs2: Fix bogus error message from ocfs2_global_read_info
    ocfs2: for SEEK_DATA/SEEK_HOLE, return internal error unchanged if ocfs2_get_clusters_nocache() or ocfs2_inode_lock() call failed.
    ocfs2: use spinlock irqsave for downconvert lock.patch
    ocfs2: Misplaced parens in unlikley
    ocfs2: clear unaligned io flag when dio fails

    Linus Torvalds
     
  • Pull cifs fixes from Steve French.

    * git://git.samba.org/sfrench/cifs-2.6:
    cifs: when server doesn't set CAP_LARGE_READ_X, cap default rsize at MaxBufferSize
    cifs: fix parsing of password mount option

    Linus Torvalds
     
  • Pull input layer fixes from Dmitry Torokhov:
    "Two fixes for regressions in Wacom driver and fixes for drivers using
    threaded IRQ framework without specifying IRQF_ONESHOT."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: request threaded-only IRQs with IRQF_ONESHOT
    Input: wacom - don't retrieve touch_max when it is predefined
    Input: wacom - fix retrieving touch_max bug
    Input: fix input.h kernel-doc warning

    Linus Torvalds
     

06 Jul, 2012

4 commits

  • The intent here was clearly to set result to true if the 0x40000000 flag
    was set. But instead there was a | vs & typo and we always set result
    to true.

    Artem: check the spec at
    wiki.laptop.org/images/5/5c/88ALP01_Datasheet_July_2007.pdf
    and this fix looks correct.

    Signed-off-by: Dan Carpenter
    Cc: stable@vger.kernel.org
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Dan Carpenter
     
  • Pull ARM SoC fixes from Arnd Bergmann:
    "Small fixes on multiple ARM platforms
    - A build regression from a previous fix on dove and mv78xx0
    - Two fixes for recently (3.5-rc1) changed mmp/pxa code
    - multiple omap2+ bug fixes
    - two trivial fixes for i.MX
    - one v3.5 regression for mxs"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: apx4devkit: fix FEC enabling PHY clock
    ARM: OMAP2+: hwmod data: Fix wrong McBSP clock alias on OMAP4
    ARM: OMAP4: hwmod data: temporarily comment out data for the usb_host_fs and aess IP blocks
    ARM: Orion: Fix WDT compile for Dove and MV78xx0
    ARM: mmp: remove mach/gpio-pxa.h
    ARM: imx: assert SCC gate stays enabled
    ARM: OMAP4: TWL6030: ensure sys_nirq1 is mux'd and wakeup enabled
    ARM: OMAP2: Overo: init I2C before MMC to fix MMC suspend/resume failure
    ARM: imx27_visstrim_m10: Do not include
    ARM: pxa: hx4700: Fix basic suspend/resume

    Linus Torvalds
     
  • Pull KVM fix from Marcelo Tosatti:
    "Memory leak and oops on the x86 mmu code, and sanitization of the
    KVM_IRQFD ioctl."

    * git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM: MMU: fix shrinking page from the empty mmu
    KVM: fix fault page leak
    KVM: Sanitize KVM_IRQFD flags
    KVM: Add missing KVM_IRQFD API documentation
    KVM: Pass kvm_irqfd to functions

    Linus Torvalds
     
  • Pull leds fix from Bryan Wu:
    "Fix for heartbeat led trigger driver"

    * 'fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
    leds: heartbeat: fix bug on panic

    Linus Torvalds