1. 23 8月, 2013 12 次提交
  2. 16 8月, 2013 9 次提交
    • S
      pinctrl: imx: Use struct type for pins · 8f903f8a
      Sascha Hauer 提交于
      The i.MX pinctrl driver uses 5 different arrays for storing the
      informations for pins. This requires five allocations. Instead,
      use a struct type which is more cache friendly, readable and
      requires less allocations. One array of integers is still needed
      since the pinctrl framework forces us to maintain it.
      This also adds checks whether the allocations are succesful which
      were missing.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Acked-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      8f903f8a
    • S
      pinctrl: imx: do not fail when parsing a function fails · 7ea46e0f
      Sascha Hauer 提交于
      When parsing a function fails this is no reason to make the whole
      driver fail. Just continue with the next function.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Acked-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      7ea46e0f
    • S
      pinctrl: imx: do not fail when parsing a group fails · 5e13762c
      Sascha Hauer 提交于
      The i.MX pinctrl driver completely bails out when it detects an error
      in the pinctrl nodes. This usually means that whatever error a
      devicetree has the user is left blind because even the console cannot
      be initialized without working pinmux.
      
      Instead of bailing out completely, just continue probing. This makes
      the pinctrl driver work, only the erroneous groups will fail later
      during pin request time.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Acked-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      5e13762c
    • S
      pinctrl: imx: Catch no fsl,pins property · 1bf1fea9
      Sascha Hauer 提交于
      Instead of crashing the kernel print an error message when
      the fsl,pins property is missing.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Acked-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      1bf1fea9
    • S
      pinctrl: imx: make error messages more informative · 01312513
      Sascha Hauer 提交于
      When printing error messages about errors in the devicetree also print
      the offending node to give the use a hint what might be wrong.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Acked-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      01312513
    • J
      pinctrl: nomadik: simplify use of devm_ioremap_resource · 690ebabb
      Julia Lawall 提交于
      Remove unneeded error handling on the result of a call to
      platform_get_resource when the value is passed to devm_ioremap_resource.
      
      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 semantic patch that makes this change is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression pdev,res,n,e,e1;
      expression ret != 0;
      identifier l;
      @@
      
      - res = platform_get_resource(pdev, IORESOURCE_MEM, n);
        ... when != res
      - if (res == NULL) { ... \(goto l;\|return ret;\) }
        ... when != res
      + res = platform_get_resource(pdev, IORESOURCE_MEM, n);
        e = devm_ioremap_resource(e1, res);
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      690ebabb
    • L
      pinctrl: add includes and ifdefs for non-DT builds · 0d74d4a1
      Linus Walleij 提交于
      Commit e81c8f18
      "pinctrl: pinconf-generic: add generic APIs for mapping pinctrl node"
      Added function prototypes with implicit dependencies
      on other header files causing build warnings like this:
      
      In file included from
      arch/arm/mach-ux500/board-mop500-pins.c:12:0:
      include/linux/pinctrl/pinconf-generic.h:142:3:
      warning: 'struct device_node' declared inside parameter list [enabled
      by default]
         unsigned *reserved_maps, unsigned *num_maps);
         ^
      include/linux/pinctrl/pinconf-generic.h:142:3:
      warning: its scope is only this definition or declaration, which is
      probably not what you want [enabled by default]
      include/linux/pinctrl/pinconf-generic.h:142:3:
      warning: 'struct pinctrl_dev' declared inside parameter list [enabled
      by default]
      include/linux/pinctrl/pinconf-generic.h:145:3:
      warning: 'struct device_node' declared inside parameter list [enabled
      by default]
         unsigned *num_maps);
         ^
      Let's just add ifdefs for non-DT systems (the actual code is
      already ifdefed) and #include <linux/device.h> to get the
      most important structs and forward-declare the pinctrl
      core structs.
      Reported-by: NOlof Johansson <olof@lixom.net>
      Cc: Laxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      0d74d4a1
    • L
      pinctrl: nomadik: shut up a warning for flags · f84b4171
      Linus Walleij 提交于
      The irq flags variable gets a warning like this after
      commit bf4dae5c
      "pinctrl: nomadik: delete ancient pin control API":
      
      In file included from include/linux/seqlock.h:29:0,
                       from include/linux/time.h:5,
                       from include/linux/stat.h:18,
                       from include/linux/module.h:10,
                       from
      drivers/pinctrl/pinctrl-nomadik.c:14:
      drivers/pinctrl/pinctrl-nomadik.c: In function 'nmk_pmx_enable':
      include/linux/spinlock.h:348:122: warning:
      'flags' may be used uninitialized in this function
      [-Wmaybe-uninitialized]
        raw_spin_unlock_irqrestore(&lock->rlock, flags);
                                                         ^
      drivers/pinctrl/pinctrl-nomadik.c:1515:16: note:
      'flags' was declared here
        unsigned long flags;
      
      The function is question was never changed but it appears
      the semantic checker could previously determine that the code
      path that would use the flags was going to either use it or
      not, but now it can't for some reason. Just fix it up.
      Reported-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      f84b4171
    • S
      gpio: clean up gpio-ranges documentation · a1bc260b
      Stephen Warren 提交于
      This change makes documentation of the the gpio-ranges property shorter
      and more succinct, more consistent with the style of the rest of the
      document, and not mention Linux-specifics such as the API
      pinctrl_request_gpio(); DT binding documents should be OS independant
      where at all possible. As part of this, the gpio-ranges property's format
      is described in BNF form, in order to match the rest of the document.
      
      This change also deprecates the #gpio-range-cells property. Such
      properties are useful when one node references a second node, and that
      second node dictates the format of the reference. However, that is not
      the case here; the definition of gpio-ranges itself always dictates its
      format entirely, and hence the value #gpio-range-cells must always be 3,
      and hence there is no point requiring any referenced node to include
      this property. The only remaining need for this property is to ensure
      compatibility of DTs with older SW that was written to support the
      previous version of the binding.
      
      v4:
      * Mention #gpio-range-cells as being deprecated, rather than removing all
        documentation of that property. This allows DTs to be written in a
        backwards-compatible way if desired, and also allows older DTs to be
        interpreted fully using the latest documentation.
      v3:
      * Mention BNF in commit description.
      * Fixed typo.
      * Dropped patch that removed the deprecated property from *.dts, since
        it's required to boot older kernels.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      a1bc260b
  3. 15 8月, 2013 10 次提交
  4. 14 8月, 2013 1 次提交
  5. 08 8月, 2013 8 次提交