1. 16 6月, 2020 2 次提交
    • A
      gpio: pca953x: Override IRQ for one of the expanders on Galileo Gen 2 · ba8c90c6
      Andy Shevchenko 提交于
      ACPI table on Intel Galileo Gen 2 has wrong pin number for IRQ resource
      of one of the I²C GPIO expanders. Since we know what that number is and
      luckily have GPIO bases fixed for SoC's controllers, we may use a simple
      DMI quirk to match the platform and retrieve GpioInt() pin on it for
      the expander in question.
      
      Mika suggested the way to avoid a quirk in the GPIO ACPI library and
      here is the second, almost rewritten version of it.
      
      Fixes: f32517bf ("gpio: pca953x: support ACPI devices found on Galileo Gen2")
      Depends-on: 25e3ef89 ("gpio: acpi: Split out acpi_gpio_get_irq_resource() helper")
      Suggested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      ba8c90c6
    • A
      gpio: pca953x: Synchronize interrupt handler properly · 064c73af
      Andy Shevchenko 提交于
      Since the commit aa58a21a ("gpio: pca953x: disable regmap locking")
      the locking of regmap is disabled and that immediately introduces
      a synchronization issue. It's easy to see when we try to monitor
      more than one interrupt from the same chip.
      
      It seems that the problem exists from the day one and even commit
      6e20fb18 ("drivers/gpio/pca953x.c: add a mutex to fix race condition")
      missed this.
      
      Below are the traces and shell reproducers before and after proposed change.
      Note duplicates in the IRQ events. /proc/interrupts also shows a deviation,
      i.e. sum of children interrupts higher than parent's one.
      
      When locking is disabled for regmap and no protection in IRQ handler
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       ...
       gpioset-194          regmap_hw_write_start: i2c-INT3491:02 reg=2 count=1
       irq/31-i2c-INT3-139  regmap_hw_read_start: i2c-INT3491:02 reg=4c count=2
       gpioset-194          regmap_hw_write_done: i2c-INT3491:02 reg=2 count=1
       gpioset-194          regmap_reg_read_cache: i2c-INT3491:02 reg=6 val=f5
       gpioset-194          regmap_reg_write: i2c-INT3491:02 reg=6 val=f5
       gpioset-194          regmap_hw_write_start: i2c-INT3491:02 reg=6 count=1
       irq/31-i2c-INT3-139  regmap_hw_read_done: i2c-INT3491:02 reg=4c count=2
       ...
      
       % gpiomon gpiochip3 0 &
       % gpioset gpiochip3 1=0
       % gpioset gpiochip3 1=1
       event:  RISING EDGE offset: 0 timestamp: [     302.782583765]
       % gpiomon gpiochip3 2 &
       % gpioset gpiochip3 1=0
       event:  RISING EDGE offset: 2 timestamp: [     312.033148829]
       event: FALLING EDGE offset: 0 timestamp: [     312.022757525]
       % gpioset gpiochip3 1=1
       event:  RISING EDGE offset: 2 timestamp: [     316.201148473]
       event:  RISING EDGE offset: 0 timestamp: [     316.191759599]
      
      When locking is disabled for regmap and protection in IRQ handler
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       ...
       gpioset-202          regmap_hw_write_start: i2c-INT3491:02 reg=2 count=1
       gpioset-202          regmap_hw_write_done: i2c-INT3491:02 reg=2 count=1
       gpioset-202          regmap_reg_read_cache: i2c-INT3491:02 reg=6 val=fd
       gpioset-202          regmap_reg_write: i2c-INT3491:02 reg=6 val=fd
       gpioset-202          regmap_hw_write_start: i2c-INT3491:02 reg=6 count=1
       gpioset-202          regmap_hw_write_done: i2c-INT3491:02 reg=6 count=1
       irq/31-i2c-INT3-139  regmap_hw_read_start: i2c-INT3491:02 reg=4c count=2
       irq/31-i2c-INT3-139  regmap_hw_read_done: i2c-INT3491:02 reg=4c count=2
       ...
      
       % gpiomon gpiochip3 0 &
       % gpioset gpiochip3 1=0
       event: FALLING EDGE offset: 0 timestamp: [     531.330078107]
       % gpioset gpiochip3 1=1
       event:  RISING EDGE offset: 0 timestamp: [     532.912239128]
       % gpiomon gpiochip3 2 &
       % gpioset gpiochip3 1=0
       event: FALLING EDGE offset: 0 timestamp: [     539.633669484]
       % gpioset gpiochip3 1=1
       event:  RISING EDGE offset: 0 timestamp: [     542.256978461]
      
      Fixes: 6e20fb18 ("drivers/gpio/pca953x.c: add a mutex to fix race condition")
      Depends-on: 35d13d94 ("gpio: pca953x: convert to use bitmap API")
      Depends-on: 49427232 ("gpio: pca953x: Perform basic regmap conversion")
      Cc: Marek Vasut <marek.vasut@gmail.com>
      Cc: Roland Stigge <stigge@antcom.de>
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      064c73af
  2. 14 6月, 2020 1 次提交
    • M
      treewide: replace '---help---' in Kconfig files with 'help' · a7f7f624
      Masahiro Yamada 提交于
      Since commit 84af7a61 ("checkpatch: kconfig: prefer 'help' over
      '---help---'"), the number of '---help---' has been gradually
      decreasing, but there are still more than 2400 instances.
      
      This commit finishes the conversion. While I touched the lines,
      I also fixed the indentation.
      
      There are a variety of indentation styles found.
      
        a) 4 spaces + '---help---'
        b) 7 spaces + '---help---'
        c) 8 spaces + '---help---'
        d) 1 space + 1 tab + '---help---'
        e) 1 tab + '---help---'    (correct indentation)
        f) 1 tab + 1 space + '---help---'
        g) 1 tab + 2 spaces + '---help---'
      
      In order to convert all of them to 1 tab + 'help', I ran the
      following commend:
      
        $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      a7f7f624
  3. 03 6月, 2020 3 次提交
  4. 29 5月, 2020 2 次提交
  5. 27 5月, 2020 1 次提交
  6. 25 5月, 2020 10 次提交
  7. 22 5月, 2020 1 次提交
    • R
      gpio: max730x: bring gpiochip_add_data after port config · 47a3734b
      Rodrigo Alencar 提交于
      gpiochip_add_data being called before might cause premature calls of
      the gpiochip operations before the port_config values are initialized,
      which would possibily write zeros to port configuration registers,
      an operation not allowed. For example, if there are gpio-hog nodes
      in a device-tree, the sequence of function calls are performed
      
      gpiochip_add_data
      of_gpiochip_add
      of_gpiochip_scan_gpios
      of_gpiochip_add_hog
      gpiod_hog
      gpiochip_request_own_desc
      gpiod_configure_flags
      gpiod_direction_output/gpiod_direction_input
      
      which would call later the gpiochip operation direction_output or
      direction_input prior the port_config[] initialization.
      
      Moreover, gpiochip_get_data is replaced by the container_of macro
      inside the gpiochip operations, which would allow the calling of
      max7301_direction_input prior to gpiochip_add_data
      Signed-off-by: NRodrigo Alencar <455.rodrigo.alencar@gmail.com>
      [Bartosz: tweaked the commit message]
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      47a3734b
  8. 18 5月, 2020 8 次提交
  9. 16 5月, 2020 1 次提交
  10. 13 5月, 2020 1 次提交
  11. 06 5月, 2020 3 次提交
  12. 29 4月, 2020 4 次提交
  13. 28 4月, 2020 3 次提交