1. 26 Mar, 2014 1 commit
  2. 25 Mar, 2014 2 commits
  3. 18 Mar, 2014 4 commits
  4. 14 Mar, 2014 5 commits
    • Alan Tull's avatar
      gpio: gpio-dwapb size-cells should be two · 1d4a2166
      Alan Tull authored
      Fix size-cells to show use of OF_GPIO_ACTIVE_LOW flag.
      Signed-off-by: default avatarAlan Tull <atull@altera.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      1d4a2166
    • Mika Westerberg's avatar
      gpio / ACPI: Add support for ACPI GPIO operation regions · 473ed7be
      Mika Westerberg authored
      GPIO operation regions is a new feature introduced in ACPI 5.0
      specification. This feature adds a way for platform ASL code to call back
      to OS GPIO driver and toggle GPIO pins.
      
      An example ASL code from Lenovo Miix 2 tablet with only relevant part
      listed:
      
       Device (\_SB.GPO0)
       {
           Name (AVBL, Zero)
           Method (_REG, 2, NotSerialized)
           {
               If (LEqual (Arg0, 0x08))
               {
                   // Marks the region available
                   Store (Arg1, AVBL)
               }
           }
      
           OperationRegion (GPOP, GeneralPurposeIo, Zero, 0x0C)
           Field (GPOP, ByteAcc, NoLock, Preserve)
           {
               Connection (
                   GpioIo (Exclusive, PullDefault, 0, 0, IoRestrictionOutputOnly,
                           "\\_SB.GPO0", 0x00, ResourceConsumer,,)
                   {
                       0x003B
                   }
               ),
               SHD3,   1,
           }
       }
      
       Device (SHUB)
       {
           Method (_PS0, 0, Serialized)
           {
               If (LEqual (\_SB.GPO0.AVBL, One))
               {
                   Store (One, \_SB.GPO0.SHD3)
                   Sleep (0x32)
               }
           }
           Method (_PS3, 0, Serialized)
           {
               If (LEqual (\_SB.GPO0.AVBL, One))
               {
                   Store (Zero, \_SB.GPO0.SHD3)
               }
           }
       }
      
      How this works is that whenever _PS0 or _PS3 method is run (typically when
      SHUB device is transitioned to D0 or D3 respectively), ASL code checks if
      the GPIO operation region is available (\_SB.GPO0.AVBL). If it is we go and
      store either 0 or 1 to \_SB.GPO0.SHD3.
      
      Now, when ACPICA notices ACPI GPIO operation region access (the store
      above) it will call acpi_gpio_adr_space_handler() that then toggles the
      GPIO accordingly using standard gpiolib interfaces.
      
      Implement the support by registering GPIO operation region handlers for all
      GPIO devices that have an ACPI handle. First time the GPIO is used by the
      ASL code we make sure that the GPIO stays requested until the GPIO chip
      driver itself is unloaded. If we find out that the GPIO is already
      requested we just toggle it according to the value got from ASL code.
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      473ed7be
    • Linus Walleij's avatar
    • Linus Walleij's avatar
      Merge tag 'v3.14-rc6' into devel · 9e294427
      Linus Walleij authored
      Linux 3.14-rc6
      9e294427
    • Alexandre Courbot's avatar
      gpio: clamp returned values to the boolean range · 23600969
      Alexandre Courbot authored
      Nothing prevents GPIO drivers from returning values outside the
      boolean range, and as it turns out a few drivers are actually doing so.
      These values were passed as-is to unsuspecting consumers and created
      confusion.
      
      This patch makes the internal _gpiod_get_raw_value() function return a
      bool, effectively clamping the GPIO value to the boolean range no
      matter what the driver does.
      
      While we are at it, we also change the value parameter of
      _gpiod_set_raw_value() to bool type before drivers start doing funny
      things with it as well.
      
      Another way to fix this would be to change the prototypes of the driver
      interface to use bool directly, but this would require a huge
      cross-systems patch so this simpler solution is preferred.
      
      Changes since v1:
      - Change local variable type to bool as well, use boolean values in
        code
      - Also change prototype of open drain/open source setting functions
        since they are only called from _gpiod_set_raw_value()
      
      This probably calls for a larger booleanization of gpiolib, but let's
      keep that for a latter change - right now we need to address the issue
      of non-boolean values returned by drivers.
      Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      23600969
  5. 13 Mar, 2014 4 commits
    • Mika Westerberg's avatar
      gpio / ACPI: Rework ACPI GPIO event handling · 6072b9dc
      Mika Westerberg authored
      The current ACPI GPIO event handling code was never tested against real
      hardware with functioning GPIO triggered events (at the time such hardware
      wasn't available). Thus it misses certain things like requesting the GPIOs
      properly, passing correct flags to the interrupt handler and so on.
      
      This patch reworks ACPI GPIO event handling so that we:
      
       1) Use struct acpi_gpio_event for all GPIO signaled events.
       2) Switch to use GPIO descriptor API and request GPIOs by calling
          gpiochip_request_own_desc() that we added in a previous patch.
       3) Pass proper flags from ACPI GPIO resource to request_threaded_irq().
      
      Also instead of open-coding the _AEI iteration loop we can use
      acpi_walk_resources(). This simplifies the code a bit and fixes memory leak
      that was caused by missing kfree() for buffer returned by
      acpi_get_event_resources().
      
      Since the remove path now calls gpiochip_free_own_desc() which takes GPIO
      spinlock we need to call acpi_gpiochip_remove() outside of that lock
      (analogous to acpi_gpiochip_add() path where the lock is released before
      those funtions are called).
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      6072b9dc
    • Mika Westerberg's avatar
      gpio / ACPI: Rename acpi_gpio_evt_pin to acpi_gpio_event · 4b01a14b
      Mika Westerberg authored
      In order to consolidate _Exx, _Lxx and _EVT to use the same structure make
      the structure name to reflect that we are dealing with any event, not just
      _EVT.
      
      This is just rename, no functional changes.
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      4b01a14b
    • Mika Westerberg's avatar
      gpio / ACPI: Allocate ACPI specific data directly in acpi_gpiochip_add() · aa92b6f6
      Mika Westerberg authored
      We are going to add more ACPI specific data to accompany GPIO chip so
      instead of allocating it per each use-case we allocate it once when
      acpi_gpiochip_add() is called and release it when acpi_gpiochip_remove() is
      called.
      
      Doing this allows us to add more ACPI specific data by merely adding new
      fields to struct acpi_gpio_chip.
      
      In addition we embed evt_pins member directly to the structure instead of
      having it as a pointer. This simplifies the code a bit since we don't need
      to check against NULL.
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      aa92b6f6
    • Mika Westerberg's avatar
      gpiolib: Allow GPIO chips to request their own GPIOs · 77c2d792
      Mika Westerberg authored
      Sometimes it is useful to allow GPIO chips themselves to request GPIOs they
      own through gpiolib API. One use case is ACPI ASL code that should be able
      to toggle GPIOs through GPIO operation regions.
      
      We can't use gpio_request() because it will pin the module to the kernel
      forever (it calls try_module_get()). To solve this we move module refcount
      manipulation to gpiod_request() and let __gpiod_request() handle the actual
      request. This changes the sequence a bit as now try_module_get() is called
      outside of gpio_lock (I think this is safe, try_module_get() handles
      serialization it needs already).
      
      Then we provide gpiolib internal functions gpiochip_request/free_own_desc()
      that do the same as gpio_request() but don't manipulate module refrence
      count. This allows the GPIO chip driver to request and free descriptors it
      owns without being pinned to the kernel forever.
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      77c2d792
  6. 12 Mar, 2014 7 commits
  7. 11 Mar, 2014 2 commits
  8. 10 Mar, 2014 6 commits
    • Linus Torvalds's avatar
      Linux 3.14-rc6 · fa389e22
      Linus Torvalds authored
      fa389e22
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 79e61542
      Linus Torvalds authored
      Pull ARM SoC fixes from from Olof Johansson:
       "A collection of fixes for ARM platforms.  A little large due to us
        missing to do one last week, but there's nothing in particular here
        that is in itself large and scary.
      
        Mostly a handful of smaller fixes all over the place.  The majority is
        made up of fixes for OMAP, but there are a few for others as well.  In
        particular, there was a decision to rename a binding for the Broadcom
        pinctrl block that we need to go in before the final release since we
        then treat it as ABI"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: dts: omap3-gta04: Add ti,omap36xx to compatible property to avoid problems with booting
        ARM: tegra: add LED options back into tegra_defconfig
        ARM: dts: omap3-igep: fix boot fail due wrong compatible match
        ARM: OMAP3: Fix pinctrl interrupts for core2
        pinctrl: Rename Broadcom Capri pinctrl binding
        pinctrl: refer to updated dt binding string.
        Update dtsi with new pinctrl compatible string
        ARM: OMAP: Kill warning in CPUIDLE code with !CONFIG_SMP
        ARM: OMAP2+: Add support for thumb mode on DT booted N900
        ARM: OMAP2+: clock: fix clkoutx2 with CLK_SET_RATE_PARENT
        ARM: OMAP4: hwmod: Fix SOFTRESET logic for OMAP4
        ARM: DRA7: hwmod data: correct the sysc data for spinlock
        ARM: OMAP5: PRM: Fix reboot handling
        ARM: sunxi: dt: Change the touchscreen compatibles
        ARM: sun7i: dt: Fix interrupt trigger types
      79e61542
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-3.14-5' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · fe9ea91c
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
         - Fix another nfs4_sequence corruptor in RELEASE_LOCKOWNER
         - Fix an Oopsable delegation callback race
         - Fix another bad stateid infinite loop
         - Fail the data server I/O is the stateid represents a lost lock
         - Fix an Oopsable sunrpc trace event"
      
      * tag 'nfs-for-3.14-5' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        SUNRPC: Fix oops when trace sunrpc_task events in nfs client
        NFSv4: Fail the truncate() if the lock/open stateid is invalid
        NFSv4.1 Fail data server I/O if stateid represents a lost lock
        NFSv4: Fix the return value of nfs4_select_rw_stateid
        NFSv4: nfs4_stateid_is_current should return 'true' for an invalid stateid
        NFS: Fix a delegation callback race
        NFSv4: Fix another nfs4_sequence corruptor
      fe9ea91c
    • Linus Torvalds's avatar
      Merge tag 'usb-3.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · cf8bf7cd
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are 4 USB fixes for your current tree.
      
        Two of them are reverts to hopefully resolve the nasty XHCI
        regressions we have been having on some types of devices.  The other
        two are quirks for some Logitech video devices"
      
      * tag 'usb-3.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        Revert "USBNET: ax88179_178a: enable tso if usb host supports sg dma"
        Revert "xhci 1.0: Limit arbitrarily-aligned scatter gather."
        usb: Make DELAY_INIT quirk wait 100ms between Get Configuration requests
        usb: Add device quirk for Logitech HD Pro Webcams C920 and C930e
      cf8bf7cd
    • Linus Torvalds's avatar
      Merge tag 'staging-3.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · a491ce72
      Linus Torvalds authored
      Pull staging driver tree fix from Greg KH:
       "Here is a single staging driver fix for your tree.
      
        It resolves an issue with arbritary writes to memory if a specific
        driver is loaded"
      
      * tag 'staging-3.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging/cxt1e1/linux.c: Correct arbitrary memory write in c4_ioctl()
      a491ce72
    • David Howells's avatar
      KEYS: Make the keyring cycle detector ignore other keyrings of the same name · 979e0d74
      David Howells authored
      This fixes CVE-2014-0102.
      
      The following command sequence produces an oops:
      
      	keyctl new_session
      	i=`keyctl newring _ses @s`
      	keyctl link @s $i
      
      The problem is that search_nested_keyrings() sees two keyrings that have
      matching type and description, so keyring_compare_object() returns true.
      s_n_k() then passes the key to the iterator function -
      keyring_detect_cycle_iterator() - which *should* check to see whether this is
      the keyring of interest, not just one with the same name.
      
      Because assoc_array_find() will return one and only one match, I assumed that
      the iterator function would only see an exact match or never be called - but
      the iterator isn't only called from assoc_array_find()...
      
      The oops looks something like this:
      
      	kernel BUG at /data/fs/linux-2.6-fscache/security/keys/keyring.c:1003!
      	invalid opcode: 0000 [#1] SMP
      	...
      	RIP: keyring_detect_cycle_iterator+0xe/0x1f
      	...
      	Call Trace:
      	  search_nested_keyrings+0x76/0x2aa
      	  __key_link_check_live_key+0x50/0x5f
      	  key_link+0x4e/0x85
      	  keyctl_keyring_link+0x60/0x81
      	  SyS_keyctl+0x65/0xe4
      	  tracesys+0xdd/0xe2
      
      The fix is to make keyring_detect_cycle_iterator() check that the key it
      has is the key it was actually looking for rather than calling BUG_ON().
      
      A testcase has been included in the keyutils testsuite for this:
      
      	http://git.kernel.org/cgit/linux/kernel/git/dhowells/keyutils.git/commit/?id=891f3365d07f1996778ade0e3428f01878a1790bReported-by: default avatarTommi Rantala <tt.rantala@gmail.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Acked-by: default avatarJames Morris <james.l.morris@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      979e0d74
  9. 09 Mar, 2014 7 commits
    • Linus Torvalds's avatar
      Merge branch 'for-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · 1dc3217d
      Linus Torvalds authored
      Pull thermal fixes from Zhang Rui:
       "Specifics:
      
         - Update the help text of INT3403 Thermal driver, which was not
           friendly to users.  From Zhang Rui.
      
         - The "type" sysfs attribute of x86_pkg_temp_thermal registered
           thermal zones includes an instance number, which makes the
           thermal-to-hwmon bridge fails to group them all in a single hwmon
           device.  Fixed by Jean Delvare.
      
         - The hwmon device registered by x86_pkg_temp_thermal driver is
           redundant because the temperature value reported by
           x86_pkg_temp_thermal is already reported by the coretemp driver.
           Fixed by Jean Delvare.
      
         - Fix a problem that the cooling device can not be updated properly
           if it is initialized at max cooling state.  From Ni Wade.
      
         - Fix a problem that OF registered thermal zones are running without
           thermal governors.  From Zhang Rui.
      
         - Commit beeb5a1e ("thermal: rcar-thermal: Enable driver
           compilation with COMPILE_TEST") broke build on archs wihout io
           memory.  Thus make it depend on HAS_IOMEM to bypass build failures.
           Fixed by Richard Weinberger"
      
      * 'for-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
        Thermal: thermal zone governor fix
        Thermal: Allow first update of cooling device state
        thermal,rcar_thermal: Add dependency on HAS_IOMEM
        x86_pkg_temp_thermal: Fix the thermal zone type
        x86_pkg_temp_thermal: Do not expose as a hwmon device
        Thermal: update INT3404 thermal driver help text
      1dc3217d
    • Linus Torvalds's avatar
      Merge tag 'spi-v3.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 4aa41ba7
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A scattering of driver specific fixes here.
      
        The fixes from Axel cover bitrot in apparently unmaintained drivers,
        the at79 bug is fixing a glitch on /CS during initialisation of some
        devices which could break some slaves and the remainder are fixes for
        recently introduced bugs from the past release cycle or so"
      
      * tag 'spi-v3.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: atmel: add missing spi_master_{resume,suspend} calls to PM callbacks
        spi: coldfire-qspi: Fix getting correct address for *mcfqspi
        spi: fsl-dspi: Fix getting correct address for master
        spi: spi-ath79: fix initial GPIO CS line setup
        spi: spi-imx: spi_imx_remove: do not disable disabled clocks
        spi-topcliff-pch: Fix probing when DMA mode is used
        spi/topcliff-pch: Fix DMA channel
      4aa41ba7
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 66a523db
      Linus Torvalds authored
      Pull SCSI target fixes from Nicholas Bellinger:
       "This series addresses a number of outstanding issues wrt to active I/O
        shutdown using iser-target.  This includes:
      
         - Fix a long standing tpg_state bug where a tpg could be referenced
           during explicit shutdown (v3.1+ stable)
         - Use list_del_init for iscsi_cmd->i_conn_node so list_empty checks
           work as expected (v3.10+ stable)
         - Fix a isert_conn->state related hung task bug + ensure outstanding
           I/O completes during session shutdown.  (v3.10+ stable)
         - Fix isert_conn->post_send_buf_count accounting for RDMA READ/WRITEs
           (v3.10+ stable)
         - Ignore FRWR completions during active I/O shutdown (v3.12+ stable)
         - Fix command leakage for interrupt coalescing during active I/O
           shutdown (v3.13+ stable)
      
        Also included is another DIF emulation fix from Sagi specific to
        v3.14-rc code"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        Target/sbc: Fix sbc_copy_prot for offset scatters
        iser-target: Fix command leak for tx_desc->comp_llnode_batch
        iser-target: Ignore completions for FRWRs in isert_cq_tx_work
        iser-target: Fix post_send_buf_count for RDMA READ/WRITE
        iscsi/iser-target: Fix isert_conn->state hung shutdown issues
        iscsi/iser-target: Use list_del_init for ->i_conn_node
        iscsi-target: Fix iscsit_get_tpg_from_np tpg_state bug
      66a523db
    • Rafael J. Wysocki's avatar
      Revert "ACPI / sleep: pm_power_off needs more sanity checks to be installed" · 4c7b7040
      Rafael J. Wysocki authored
      Revert commit 3130497f ("ACPI / sleep: pm_power_off needs more
      sanity checks to be installed") that breaks power ACPI power off on a
      lot of systems, because it checks wrong registers.
      
      Fixes: 3130497f ("ACPI / sleep: pm_power_off needs more sanity checks to be installed")
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4c7b7040
    • Olof Johansson's avatar
      Merge tag 'omap-for-v3.14/fixes-dt-rc4' of... · 10554647
      Olof Johansson authored
      Merge tag 'omap-for-v3.14/fixes-dt-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      From Tony Lindgren:
      
      Two omap3430 vs 3630 device tree regression fixes for
      issues booting 3430 based boards.
      
      * tag 'omap-for-v3.14/fixes-dt-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: dts: omap3-gta04: Add ti,omap36xx to compatible property to avoid problems with booting
        ARM: dts: omap3-igep: fix boot fail due wrong compatible match
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      10554647
    • Olof Johansson's avatar
      Merge tag 'bcm-for-3.14-pinctrl-reduced-rename' of git://github.com/broadcom/bcm11351 into fixes · 4058f762
      Olof Johansson authored
      Merge 'bcm pinctrl rename' From Christin Daudt:
      
      Rename pinctrl dt binding to restore consistency with other bcm mobile
      bindings.
      
      * tag 'bcm-for-3.14-pinctrl-reduced-rename' of git://github.com/broadcom/bcm11351:
        pinctrl: Rename Broadcom Capri pinctrl binding
        pinctrl: refer to updated dt binding string.
        Update dtsi with new pinctrl compatible string
        + Linux 3.14-rc4
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      4058f762
    • Olof Johansson's avatar
      Merge tag 'sunxi-fixes-for-3.14' of https://github.com/mripard/linux into fixes · 614cd4a4
      Olof Johansson authored
      Allwinner fixes from Maxime Ripard:
      
      Two fixes for device trees additions that got added in 3.14. One fixes the
      interrupt types of some IPs, the other fixes up a compatible that got
      introduced during 3.14
      
      * tag 'sunxi-fixes-for-3.14' of https://github.com/mripard/linux:
        ARM: sunxi: dt: Change the touchscreen compatibles
        ARM: sun7i: dt: Fix interrupt trigger types
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      614cd4a4
  10. 08 Mar, 2014 2 commits