1. Dec 05, 2018
    • Hans de Goede's avatar
      pinctrl: cherryview: Stop clearing the GPIO_EN bit from chv_gpio_disable_free · 1adde32a
      Hans de Goede authored
      
      
      Clearing the GPIO_EN bit from chv_gpio_disable_free is a bad idea and
      pinctrl-cherryview.c is the only Intel pinctrl driver doing something
      like this.
      
      Clearing the GPIO_EN bit means that if the pin was an output it is now
      effectively floating. The datasheet is not clear what happens to pull ups /
      downs in this case, but from testing it looks like these are disabled too,
      also floating input pins.
      
      One example where this is causing issues is the soc_button_array input
      driver, this parses ACPI tables to create 2 platform devices for the
      gpio_keys input driver. The list of GPIOs is passed through struct
      gpio_keys_platform_data which uses gpio numbers rather then gpio_desc
      pointers.
      
      The buttons handled by this drivers short the pin to ground when pressed
      and the volume buttons rely on the SoC's internal pull-up to pull the
      pin high when the button is not pressed.
      
      To get the gpio number, the soc_button_array code calls gpiod_get_index
      followed by a desc_to_gpio call and then gpiod_put on the gpio_desc.
      This last call causes chv_gpio_disable_free to clear the GPIO_EN bit.
      
      When the gpio_keys driver then loads next it gets the gpio_desc again
      causing the GPIO_EN bit to be set again and immediately reads the GPIO
      value which for the volume buttons reads 0 at this time, causing a spurious
      press of the volume buttons to get reported.
      
      Putting a small delay between the gpio_desc request and the read fixes
      this, I assume that this is caused by the pull-up being temporarily
      disabled while the GPIO_EN bit is cleared as the powerbutton which also
      has its GPIO_EN bit cleared does not have this problem.
      
      The soc_button_array code is not the only code temporarily requesting GPIOs
      the DWC3 PCI code also does this, to set the enable and reset GPIOs for the
      external phy, so that the code instantiating the ULPI phy can read the
      vendor and product ID registers from the phy. These GPIOs are released
      after this so that the PHY driver can claim and use them when it loads.
      
      Another example of temporary GPIO usage would be a user-space set_gpio
      utility using the userspace ioctls to set a GPIO as output value 0 or 1,
      having the GPIO revert to floating as soon as this utility exits would
      certainly be unexpected behavior.
      
      One argument in favor of clearing the GPIO_EN bit is if the GPIO is going
      to be muxed to another function after being released, but in that case
      chv_pinmux_set_mux() already clears it.
      
      TL;DR: Clearing the GPIO_EN bit from is a bad idea, this commit therefor
      removes the clearing from chv_gpio_disable_free(), replacing it with code
      to clear the interrupt-trigger condition so that the GPIO stops generating
      interrupts when released, as pinctrl-baytrail.c does.
      
      Note this commit adds a !chv_pad_locked() condition to the trigger clearing
      call, which the original GPIO_EN clearing code was missing.
      
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      1adde32a
    • Hans de Goede's avatar
      pinctrl: cherryview: Add chv_gpio_clear_triggering() helper function · b6fb6e11
      Hans de Goede authored
      
      
      This is a preparation patch for clearing the interrupt trigger from
      chv_gpio_disable_free().
      
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      b6fb6e11
  2. Nov 08, 2018
  3. Nov 05, 2018
    • Linus Torvalds's avatar
      Linux 4.20-rc1 · 65102238
      Linus Torvalds authored
      65102238
    • Linus Torvalds's avatar
      Merge tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs · 42bd06e9
      Linus Torvalds authored
      Pull UBIFS updates from Richard Weinberger:
      
       - Full filesystem authentication feature, UBIFS is now able to have the
         whole filesystem structure authenticated plus user data encrypted and
         authenticated.
      
       - Minor cleanups
      
      * tag 'tags/upstream-4.20-rc1' of git://git.infradead.org/linux-ubifs: (26 commits)
        ubifs: Remove unneeded semicolon
        Documentation: ubifs: Add authentication whitepaper
        ubifs: Enable authentication support
        ubifs: Do not update inode size in-place in authenticated mode
        ubifs: Add hashes and HMACs to default filesystem
        ubifs: authentication: Authenticate super block node
        ubifs: Create hash for default LPT
        ubfis: authentication: Authenticate master node
        ubifs: authentication: Authenticate LPT
        ubifs: Authenticate replayed journal
        ubifs: Add auth nodes to garbage collector journal head
        ubifs: Add authentication nodes to journal
        ubifs: authentication: Add hashes to index nodes
        ubifs: Add hashes to the tree node cache
        ubifs: Create functions to embed a HMAC in a node
        ubifs: Add helper functions for authentication support
        ubifs: Add separate functions to init/crc a node
        ubifs: Format changes for authentication support
        ubifs: Store read superblock node
        ubifs: Drop write_node
        ...
      42bd06e9
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 4710e789
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Bugfix:
         - Fix build issues on architectures that don't provide 64-bit cmpxchg
      
        Cleanups:
         - Fix a spelling mistake"
      
      * tag 'nfs-for-4.20-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS: fix spelling mistake, EACCESS -> EACCES
        SUNRPC: Use atomic(64)_t for seq_send(64)
      4710e789
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 35e74524
      Linus Torvalds authored
      Pull more timer updates from Thomas Gleixner:
       "A set of commits for the new C-SKY architecture timers"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        dt-bindings: timer: gx6605s SOC timer
        clocksource/drivers/c-sky: Add gx6605s SOC system timer
        dt-bindings: timer: C-SKY Multi-processor timer
        clocksource/drivers/c-sky: Add C-SKY SMP timer
      35e74524
    • Linus Torvalds's avatar
      Merge tag 'ntb-4.20' of git://github.com/jonmason/ntb · 04578e84
      Linus Torvalds authored
      Pull NTB updates from Jon Mason:
       "Fairly minor changes and bug fixes:
      
        NTB IDT thermal changes and hook into hwmon, ntb_netdev clean-up of
        private struct, and a few bug fixes"
      
      * tag 'ntb-4.20' of git://github.com/jonmason/ntb:
        ntb: idt: Alter the driver info comments
        ntb: idt: Discard temperature sensor IRQ handler
        ntb: idt: Add basic hwmon sysfs interface
        ntb: idt: Alter temperature read method
        ntb_netdev: Simplify remove with client device drvdata
        NTB: transport: Try harder to alloc an aligned MW buffer
        ntb: ntb_transport: Mark expected switch fall-throughs
        ntb: idt: Set PCIe bus address to BARLIMITx
        NTB: ntb_hw_idt: replace IS_ERR_OR_NULL with regular NULL checks
        ntb: intel: fix return value for ndev_vec_mask()
        ntb_netdev: fix sleep time mismatch
      04578e84
  4. Nov 04, 2018