30 Sep, 2020

9 commits


18 May, 2020

1 commit

  • The interrupt simulator API exposes a lot of custom data structures and
    functions and doesn't reuse the interfaces already exposed by the irq
    subsystem. This patch tries to address it.

    We hide all the simulator-related data structures from users and instead
    rely on the well-known irq domain. When creating the interrupt simulator
    the user receives a pointer to a newly created irq_domain and can use it
    to create mappings for simulated interrupts.

    It is also possible to pass a handle to fwnode when creating the simulator
    domain and retrieve it using irq_find_matching_fwnode().

    The irq_sim_fire() function is dropped as well. Instead we implement the
    irq_get/set_irqchip_state interface.

    We modify the two modules that use the simulator at the same time as
    adding these changes in order to reduce the intermediate bloat that would
    result when trying to migrate the drivers in separate patches.

    Signed-off-by: Bartosz Golaszewski
    Signed-off-by: Marc Zyngier
    Reviewed-by: Linus Walleij
    Acked-by: Jonathan Cameron #for IIO
    Link: https://lore.kernel.org/r/20200514083901.23445-3-brgl@bgdev.pl

    Bartosz Golaszewski
     

20 Feb, 2020

1 commit


17 Jan, 2020

1 commit


15 Jan, 2020

2 commits


04 Jan, 2020

1 commit

  • I have missed two indentation issues in commit 64e7112ee307 ("gpio:
    mockup: add set_config to support pull up/down"). This commit fixes them.

    Fixes: 64e7112ee307 ("gpio: mockup: add set_config to support pull up/down")
    Signed-off-by: Bartosz Golaszewski

    Bartosz Golaszewski
     

11 Dec, 2019

1 commit


12 Nov, 2019

1 commit


07 Nov, 2019

1 commit

  • It's hard for occasional GPIO code reader/writer to know if values 0/1
    equal to IN or OUT. Use defined GPIO_LINE_DIRECTION_IN and
    GPIO_LINE_DIRECTION_OUT to help them out.

    NOTE - for gpio-amd-fch and gpio-bd9571mwv:
    This commit also changes the return value for direction get to equal 1
    for direction INPUT. Prior this commit these drivers might have
    returned some other positive value but 1 for INPUT.

    Signed-off-by: Matti Vaittinen
    Acked-by: Scott Branden
    Reviewed-by: Grygorii Strashko
    Reviewed-by: Michal Simek
    Reviewed-by: Geert Uytterhoeven
    Acked-by: Andy Shevchenko
    Acked-by: William Breathitt Gray
    Acked-by: Kuppuswamy Sathyanarayanan
    Signed-off-by: Linus Walleij

    Matti Vaittinen
     

09 Sep, 2019

1 commit

  • When using single_open() for opening, single_release() should be
    used instead of seq_release(), otherwise there is a memory leak.

    Fixes: 2a9e27408e12 ("gpio: mockup: rework debugfs interface")
    Cc: stable
    Signed-off-by: Wei Yongjun
    Signed-off-by: Bartosz Golaszewski

    Wei Yongjun
     

27 Jun, 2019

1 commit

  • When calling debugfs functions, there is no need to ever check the
    return value. The function can work or not, but the code logic should
    never do something different based on this.

    Cc: Bamvor Jian Zhang
    Cc: Linus Walleij
    Cc: Bartosz Golaszewski
    Cc: linux-gpio@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman
    [Bartosz: removed one more check for debugfs return value]
    Signed-off-by: Bartosz Golaszewski
    Reviewed-by: Linus Walleij

    Greg Kroah-Hartman
     

29 Mar, 2019

1 commit


27 Mar, 2019

1 commit

  • The debugfs read callback must advance ppos or users using read() on
    the file descriptor will never get the EOL. This wasn't spotted before
    as I was using busybox cat for testing which uses sendfile() internally
    and only noticed it now when switched to cat from coreutils.

    Fixes: 2a9e27408e12 ("gpio: mockup: rework debugfs interface")
    Signed-off-by: Bartosz Golaszewski

    Bartosz Golaszewski
     

20 Feb, 2019

6 commits


17 Nov, 2018

1 commit

  • Commit 3edfb7bd76bd ("gpiolib: Show correct direction from the
    beginning") fixed an existing issue but broke libgpiod tests by
    changing the default direction of dummy lines to output.

    We don't break user-space so make gpio-mockup behave as before.

    Signed-off-by: Bartosz Golaszewski
    Signed-off-by: Linus Walleij

    Bartosz Golaszewski
     

03 Oct, 2018

1 commit

  • Some users want to introduce device tree support to the mockup driver.
    Let's make it easier by switching to using generic device properties.
    The driver stays compatible with previous use cases and after this
    conversion there'll be no need to change the way probing of mockup
    GPIO chips works.

    Tested with libgpiod test suite.

    Signed-off-by: Bartosz Golaszewski
    Signed-off-by: Linus Walleij

    Bartosz Golaszewski
     

16 May, 2018

1 commit


27 Mar, 2018

1 commit


06 Mar, 2018

1 commit


08 Dec, 2017

1 commit

  • The return value of platform_device_register_resndata() on error is
    an error code converted to pointer with ERR_PTR(), not NULL.

    Check the return value correctly.

    Fixes: 8a39f597bcfd ("gpio: mockup: rework device probing")
    Signed-off-by: Bartosz Golaszewski
    Signed-off-by: Linus Walleij

    Bartosz Golaszewski
     

03 Dec, 2017

6 commits