1. 02 3月, 2018 3 次提交
    • B
      gpio: Add GPIO driver for Spreadtrum SC9860 platform · 9a3821c2
      Baolin Wang 提交于
      The Spreadtrum SC9860 platform GPIO controller contains 16 groups and
      each group contains 16 GPIOs. Each GPIO can set input/output and has
      the interrupt capability.
      Signed-off-by: NBaolin Wang <baolin.wang@linaro.org>
      Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      9a3821c2
    • A
      gpio: raspberrypi-ext: fix firmware dependency · 7ed91505
      Arnd Bergmann 提交于
      When the firmware driver is a loadable module, the gpio driver cannot be
      built-in:
      
      drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_set':
      gpio-raspberrypi-exp.c:(.text+0xb4): undefined reference to `rpi_firmware_property'
      drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_get':
      gpio-raspberrypi-exp.c:(.text+0x1ec): undefined reference to `rpi_firmware_property'
      drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_get_direction':
      gpio-raspberrypi-exp.c:(.text+0x360): undefined reference to `rpi_firmware_property'
      drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_get_polarity':
      gpio-raspberrypi-exp.c:(.text+0x4d4): undefined reference to `rpi_firmware_property'
      drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_dir_out':
      gpio-raspberrypi-exp.c:(.text+0x670): undefined reference to `rpi_firmware_property'
      drivers/gpio/gpio-raspberrypi-exp.o:gpio-raspberrypi-exp.c:(.text+0x7fc): more undefined references to `rpi_firmware_property' follow
      drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_dir_in':
      drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_probe':
      gpio-raspberrypi-exp.c:(.text+0x93c): undefined reference to `rpi_firmware_get'
      
      We already have a Kconfig dependency for it, but when compile-testing, it
      is disregarded.
      
      This changes the dependency so that compile-testing is only done when the
      firmware driver is completely disabled.
      
      Fixes: a98d90e7 ("gpio: raspberrypi-exp: Driver for RPi3 GPIO expander via mailbox service")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      7ed91505
    • W
      gpiolib: friendly debug information for consumer · 9d5a1f2c
      Wang Dongsheng 提交于
      "failed" maybe makes observer confuse when a consumer can not
      lookup, so change to a friendly information.
      Signed-off-by: NWang Dongsheng <dongsheng.wang@hxt-semitech.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      9d5a1f2c
  2. 01 3月, 2018 1 次提交
  3. 26 2月, 2018 1 次提交
  4. 23 2月, 2018 1 次提交
  5. 22 2月, 2018 15 次提交
  6. 13 2月, 2018 1 次提交
  7. 12 2月, 2018 3 次提交
  8. 23 1月, 2018 2 次提交
  9. 17 1月, 2018 9 次提交
    • C
      gpiolib: remove redundant initialization of pointer desc · 40a3c9db
      Colin Ian King 提交于
      The initialized value stored in pointer desc is never read as it
      is updated in the first executable statement in the function.
      This is therefore redundant and can be removed.
      
      Cleans up clang warning:
      drivers/gpio/gpiolib.c:3710:20: warning: Value stored to 'desc'
      during its initialization is never read
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      40a3c9db
    • L
      gpio: of: Fix NPE from OF flags · 605f2d34
      Linus Walleij 提交于
      Some calls to of_get_named_gpio() calls sets the flags
      argument to NULL because they are not interested in the
      flags. This caused a null pointer exception since we were
      unconditionally using these flags. Fix it.
      
      Fixes: 6a537d48 ("gpio: of: Support regulator nonstandard GPIO properties")
      Cc: Heiner Kallweit <hkallweit1@gmail.com>
      Reported-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      605f2d34
    • M
      gpio: stmpe: Delete an unnecessary variable initialisation in stmpe_gpio_probe() · 0f719231
      Markus Elfring 提交于
      The local variable "irq" will eventually be set to an appropriate value
      a bit later. Thus omit the explicit initialisation at the beginning.
      Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      0f719231
    • M
      gpio: stmpe: Move an assignment in stmpe_gpio_probe() · 757ad058
      Markus Elfring 提交于
      Move the assignment for the local variable "irq" so that its setting
      will only be performed directly before it is checked by this function.
      Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      757ad058
    • M
      gpio: stmpe: Improve a size determination in stmpe_gpio_probe() · 64fec0bc
      Markus Elfring 提交于
      Replace the specification of a data structure by a pointer dereference
      as the parameter for the operator "sizeof" to make the corresponding size
      determination a bit safer according to the Linux coding style convention.
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      64fec0bc
    • M
      gpio: stmpe: Use seq_putc() in stmpe_dbg_show() · 0d83a5eb
      Markus Elfring 提交于
      A single character (line break) should be put into a sequence.
      Thus use the corresponding function "seq_putc".
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      0d83a5eb
    • L
      gpio: No NULL owner · 7d18f0a1
      Linus Walleij 提交于
      Sometimes a GPIO is fetched with NULL as parent device, and
      that is just fine. So under these circumstances, avoid using
      dev_name() to provide a name for the GPIO line.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      7d18f0a1
    • P
      gpio: stmpe: i2c transfer are forbiden in atomic context · b888fb6f
      Patrice Chotard 提交于
      Move the workaround from stmpe_gpio_irq_unmask() which is executed
      in atomic context to stmpe_gpio_irq_sync_unlock() which is not.
      
      It fixes the following issue:
      
      [    1.500000] BUG: scheduling while atomic: swapper/1/0x00000002
      [    1.500000] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc2-00020-gbd4301f-dirty #28
      [    1.520000] Hardware name: STM32 (Device Tree Support)
      [    1.520000] [<0000bfc9>] (unwind_backtrace) from [<0000b347>] (show_stack+0xb/0xc)
      [    1.530000] [<0000b347>] (show_stack) from [<0001fc49>] (__schedule_bug+0x39/0x58)
      [    1.530000] [<0001fc49>] (__schedule_bug) from [<00168211>] (__schedule+0x23/0x2b2)
      [    1.550000] [<00168211>] (__schedule) from [<001684f7>] (schedule+0x57/0x64)
      [    1.550000] [<001684f7>] (schedule) from [<0016a513>] (schedule_timeout+0x137/0x164)
      [    1.550000] [<0016a513>] (schedule_timeout) from [<00168b91>] (wait_for_common+0x8d/0xfc)
      [    1.570000] [<00168b91>] (wait_for_common) from [<00139753>] (stm32f4_i2c_xfer+0xe9/0xfe)
      [    1.580000] [<00139753>] (stm32f4_i2c_xfer) from [<00138545>] (__i2c_transfer+0x111/0x148)
      [    1.590000] [<00138545>] (__i2c_transfer) from [<001385cf>] (i2c_transfer+0x53/0x70)
      [    1.590000] [<001385cf>] (i2c_transfer) from [<001388a5>] (i2c_smbus_xfer+0x12f/0x36e)
      [    1.600000] [<001388a5>] (i2c_smbus_xfer) from [<00138b49>] (i2c_smbus_read_byte_data+0x1f/0x2a)
      [    1.610000] [<00138b49>] (i2c_smbus_read_byte_data) from [<00124fdd>] (__stmpe_reg_read+0xd/0x24)
      [    1.620000] [<00124fdd>] (__stmpe_reg_read) from [<001252b3>] (stmpe_reg_read+0x19/0x24)
      [    1.630000] [<001252b3>] (stmpe_reg_read) from [<0002c4d1>] (unmask_irq+0x17/0x22)
      [    1.640000] [<0002c4d1>] (unmask_irq) from [<0002c57f>] (irq_startup+0x6f/0x78)
      [    1.650000] [<0002c57f>] (irq_startup) from [<0002b7a1>] (__setup_irq+0x319/0x47c)
      [    1.650000] [<0002b7a1>] (__setup_irq) from [<0002bad3>] (request_threaded_irq+0x6b/0xe8)
      [    1.660000] [<0002bad3>] (request_threaded_irq) from [<0002d0b9>] (devm_request_threaded_irq+0x3b/0x6a)
      [    1.670000] [<0002d0b9>] (devm_request_threaded_irq) from [<001446e7>] (mmc_gpiod_request_cd_irq+0x49/0x8a)
      [    1.680000] [<001446e7>] (mmc_gpiod_request_cd_irq) from [<0013d45d>] (mmc_start_host+0x49/0x60)
      [    1.690000] [<0013d45d>] (mmc_start_host) from [<0013e40b>] (mmc_add_host+0x3b/0x54)
      [    1.700000] [<0013e40b>] (mmc_add_host) from [<00148119>] (mmci_probe+0x4d1/0x60c)
      [    1.710000] [<00148119>] (mmci_probe) from [<000f903b>] (amba_probe+0x7b/0xbe)
      [    1.720000] [<000f903b>] (amba_probe) from [<001170e5>] (driver_probe_device+0x169/0x1f8)
      [    1.730000] [<001170e5>] (driver_probe_device) from [<001171b7>] (__driver_attach+0x43/0x5c)
      [    1.740000] [<001171b7>] (__driver_attach) from [<0011618d>] (bus_for_each_dev+0x3d/0x46)
      [    1.740000] [<0011618d>] (bus_for_each_dev) from [<001165cd>] (bus_add_driver+0xcd/0x124)
      [    1.740000] [<001165cd>] (bus_add_driver) from [<00117713>] (driver_register+0x4d/0x7a)
      [    1.760000] [<00117713>] (driver_register) from [<001fc765>] (do_one_initcall+0xbd/0xe8)
      [    1.770000] [<001fc765>] (do_one_initcall) from [<001fc88b>] (kernel_init_freeable+0xfb/0x134)
      [    1.780000] [<001fc88b>] (kernel_init_freeable) from [<00167ee3>] (kernel_init+0x7/0x9c)
      [    1.790000] [<00167ee3>] (kernel_init) from [<00009b65>] (ret_from_fork+0x11/0x2c)
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NAlexandre TORGUE <alexandre.torgue@st.com>
      Signed-off-by: NPatrice Chotard <patrice.chotard@st.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      b888fb6f
    • L
      gpio: mmio: Also read bits that are zero · 07c7b6a5
      Linus Walleij 提交于
      The code for .get_multiple() has bugs:
      
      1. The simple .get_multiple() just reads a register, masks it
      and sets the return value. This is not correct: we only want to
      assign values (whether 0 or 1) to the bits that are set in the
      mask. Fix this by using &= ~mask to clear all bits in the mask
      and then |= val & mask to set the corresponding bits from the
      read.
      
      2. The bgpio_get_multiple_be() call has a similar problem: it
      uses the |= operator to set the bits, so only the bits in the
      mask are affected, but it misses to clear all returned bits
      from the mask initially, so some bits will be returned
      erroneously set to 1.
      
      3. The bgpio_get_set_multiple() again fails to clear the bits
      from the mask.
      
      4. find_next_bit() wasn't handled correctly, use a totally
      different approach for one function and change the other
      function to follow the design pattern of assigning the first
      bit to -1, then use bit + 1 in the for loop and < num_iterations
      as break condition.
      
      Fixes: 80057cb4 ("gpio-mmio: Use the new .get_multiple() callback")
      Cc: Bartosz Golaszewski <brgl@bgdev.pl>
      Reported-by: NClemens Gruber <clemens.gruber@pqgruber.com>
      Tested-by: NClemens Gruber <clemens.gruber@pqgruber.com>
      Reported-by: NLukas Wunner <lukas@wunner.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      07c7b6a5
  10. 14 1月, 2018 4 次提交