09 Mar, 2016

10 commits


08 Mar, 2016

3 commits

  • Replace calls to devm_request_mem_region and devm_ioremap with a
    direct call to devm_ioremap_resource instead and modify error
    handling.

    Move the call to platform_get_resource adjacent to the call to
    devm_ioremap_resource to make the connection between them more
    clear.

    A simplified version of the Coccinelle semantic patch that is used to
    make this change is as follows:
    //
    @nm@
    expression myname;
    identifier i;
    @@

    struct platform_driver i = { .driver = { .name = myname } };

    @@
    expression dev,res,size,e1,e;
    expression nm.myname;
    @@

    -if (!devm_request_mem_region(dev, res->start, size,
    - \(res->name\|dev_name(dev)\|myname\)))
    {
    - ...
    - return ...;
    -}
    ... when != res->start = e1
    e =
    -devm_ioremap(dev,res->start,size);
    +devm_ioremap_resource(dev,res);

    if
    -(e == NULL)
    +(IS_ERR(e))
    {
    ...
    -return ...;
    +return PTR_ERR(e);
    }
    //

    Further, updated error handling by hand as devm_ioremap_resource
    gives appropriate error messages, so remove unnecessary error
    messages.

    Signed-off-by: Amitoj Kaur Chawla
    Signed-off-by: Linus Walleij

    Amitoj Kaur Chawla
     
  • The TS-4800 is an i.MX515 board. Its GPIO driver should only be compiled
    for this CPU or for test builds.

    Signed-off-by: Julien Grossholtz
    Signed-off-by: Linus Walleij

    Julien Grossholtz
     
  • Linus Walleij
     

07 Mar, 2016

3 commits

  • The original code of gpiodev_add_to_list is not very clear which
    lead to bugs or compiling warning, reference the following patches:
    Bugs:
    1. Commit ef7c7553039b ("gpiolib: improve overlap check of range of
    gpio").
    2. Commit 96098df125c0 ("gpiolib: fix chip order in gpio list")

    Warning:
    1. Commit e28ecca6eac4 ("gpio: fix warning about iterator").
    of gpio").

    There is a off-list discussion about how to improve it consequently.
    This commit try to follow this by rewriting the whole functions.

    Tested pass with my gpio mockup driver and test scripts[1].

    [1] http://www.spinics.net/lists/linux-gpio/msg09598.html

    Suggested-by: Arnd Bergmann
    Signed-off-by: Bamvor Jian Zhang
    Signed-off-by: Linus Walleij

    Bamvor Jian Zhang
     
  • There is no build dependency for this driver, so enable COMPILE_TEST to get
    better build coverage.

    Signed-off-by: Axel Lin
    Signed-off-by: Linus Walleij

    Axel Lin
     
  • These fields are initialized by bgpio_init() with exactly the same settings
    so remove the redundant code.

    Signed-off-by: Axel Lin
    Signed-off-by: Linus Walleij

    Axel Lin
     

26 Feb, 2016

1 commit

  • I named the field representing the current user of GPIO line as
    "label" but this is too vague and ambiguous. Before anyone gets
    confused, rename it to "consumer" and indicate clearly in the
    documentation that this is a string set by the user of the line.

    Also clean up leftovers in the documentation.

    Signed-off-by: Linus Walleij

    Linus Walleij
     

25 Feb, 2016

19 commits


23 Feb, 2016

4 commits