Merge tag 'pinctrl-v4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 19 May 2016 19:50:56 +0000 (12:50 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 19 May 2016 19:50:56 +0000 (12:50 -0700)
Pull pin control updates from Linus Walleij:
 "This kernel cycle was quite calm when it comes to pin control and
  there is really just one major change, and that is the introduction of
  devm_pinctrl_register() managed resources.

  Apart from that linear development, details below.

  Core changes:

   - Add the devm_pinctrl_register() API and switch all applicable
     drivers to use it, saving lots of lines of code all over the place.

  New drivers:

   - driver for the Broadcom NS2 SoC

   - subdriver for the PXA25x SoCs

   - subdriver for the AMLogic Meson GXBB SoC

  Driver improvements:

   - the Intel Baytrail driver now properly supports pin control

   - Nomadik, Rockchip, Broadcom BCM2835 support the .get_direction()
     callback in the GPIO portions

   - continued development and stabilization of several SH-PFC SoC
     subdrivers: r8a7795, r8a7790, r8a7794 etc"

* tag 'pinctrl-v4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (85 commits)
  Revert "pinctrl: tegra: avoid parked_reg and parked_bank"
  pinctrl: meson: Fix eth_tx_en bit index
  pinctrl: tegra: avoid parked_reg and parked_bank
  pinctrl: tegra: Correctly check the supported configuration
  pinctrl: amlogic: Add support for Amlogic Meson GXBB SoC
  pinctrl: rockchip: fix pull setting error for rk3399
  pinctrl: stm32: Implement .pin_config_dbg_show()
  pinctrl: nomadik: hide nmk_gpio_get_mode when unused
  pinctrl: ns2: rename pinctrl_utils_dt_free_map
  pinctrl: at91: Merge clk_prepare and clk_enable into clk_prepare_enable
  pinctrl: at91: Make at91_gpio_template const
  pinctrl: baytrail: fix some error handling in debugfs
  pinctrl: ns2: add pinmux driver support for Broadcom NS2 SoC
  pinctrl: sirf/atlas7: trivial fix of spelling mistake on flagged
  pinctrl: sh-pfc: Kill unused variable in sh_pfc_remove()
  pinctrl: nomadik: implement .get_direction()
  pinctrl: nomadik: use BIT() with offsets consequently
  pinctrl: exynos5440: Use off-stack memory for pinctrl_gpio_range
  pinctrl: zynq: Use devm_pinctrl_register() for pinctrl registration
  pinctrl: u300: Use devm_pinctrl_register() for pinctrl registration
  ...

1  2 
drivers/pinctrl/freescale/pinctrl-imx.c
drivers/pinctrl/intel/pinctrl-intel.c
drivers/pinctrl/mediatek/pinctrl-mtk-common.c
drivers/pinctrl/nomadik/pinctrl-nomadik.c
drivers/pinctrl/pinctrl-at91-pio4.c
drivers/pinctrl/pinctrl-pistachio.c
drivers/pinctrl/sh-pfc/core.c
drivers/pinctrl/stm32/pinctrl-stm32.c
drivers/pinctrl/sunxi/pinctrl-sunxi.c
drivers/pinctrl/tegra/pinctrl-tegra-xusb.c

Simple merge
Simple merge
Simple merge
Simple merge
index 8deb566ed4cd63477c40c8cf56ccdf40308b7b5e,e51c1cf5270b11c0113bde6069fe6af02e74339b..ae9fab82a1b9ac1fe274ae7e01681ed7850e2851
@@@ -634,6 -744,69 +744,69 @@@ static int stm32_pconf_group_set(struc
        return 0;
  }
  
 -              seq_printf(s, "%d - %s -%s", alt,
+ static void stm32_pconf_dbg_show(struct pinctrl_dev *pctldev,
+                                struct seq_file *s,
+                                unsigned int pin)
+ {
+       struct pinctrl_gpio_range *range;
+       struct stm32_gpio_bank *bank;
+       int offset;
+       u32 mode, alt, drive, speed, bias;
+       static const char * const modes[] = {
+                       "input", "output", "alternate", "analog" };
+       static const char * const speeds[] = {
+                       "low", "medium", "high", "very high" };
+       static const char * const biasing[] = {
+                       "floating", "pull up", "pull down", "" };
+       bool val;
+       range = pinctrl_find_gpio_range_from_pin_nolock(pctldev, pin);
+       bank = gpio_range_to_bank(range);
+       offset = stm32_gpio_pin(pin);
+       stm32_pmx_get_mode(bank, offset, &mode, &alt);
+       bias = stm32_pconf_get_bias(bank, offset);
+       seq_printf(s, "%s ", modes[mode]);
+       switch (mode) {
+       /* input */
+       case 0:
+               val = stm32_pconf_input_get(bank, offset);
+               seq_printf(s, "- %s - %s",
+                          val ? "high" : "low",
+                          biasing[bias]);
+               break;
+       /* output */
+       case 1:
+               drive = stm32_pconf_get_driving(bank, offset);
+               speed = stm32_pconf_get_speed(bank, offset);
+               val = stm32_pconf_output_get(bank, offset);
+               seq_printf(s, "- %s - %s - %s - %s %s",
+                          val ? "high" : "low",
+                          drive ? "open drain" : "push pull",
+                          biasing[bias],
+                          speeds[speed], "speed");
+               break;
+       /* alternate */
+       case 2:
+               drive = stm32_pconf_get_driving(bank, offset);
+               speed = stm32_pconf_get_speed(bank, offset);
++              seq_printf(s, "%d - %s - %s - %s %s", alt,
+                          drive ? "open drain" : "push pull",
+                          biasing[bias],
+                          speeds[speed], "speed");
+               break;
+       /* analog */
+       case 3:
+               break;
+       }
+ }
  static const struct pinconf_ops stm32_pconf_ops = {
        .pin_config_group_get   = stm32_pconf_group_get,
        .pin_config_group_set   = stm32_pconf_group_set,
Simple merge