This fixes a few pinctrl problems seen since v3.7-rc1:

- Section tagging for init code
 - Use proper pointers to lookup struct device * in the
   bcm2835 (a.k.a. Raspberry Pi)
 - Remove duplicate #includes
 - Fix bad return values in errorpath
 - Remove extraneous pull function from the sirf driver
   causing build errors
 - Provide compilation stubs for the Nomadik pinctrl driver
   when used with legacy systems without PRCMU units
 - Various irqdomain fixes in the Nomadik driver as predicted
 - Various smallish bugs in the Tegra driver, most also
   targeted for stable
 - Removed a deadlocking mutex in the groups debugfs show
   function
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJQh9MAAAoJEEEQszewGV1zIg4P/R3I23LFIV3EqAwNfM24Ru1X
 iOphKTPEp4SlRvElnb8yIH68wumHZirh16jehgGgqsredkokyOCaB8Nbip8ZN/zP
 pRxn5bvT3ZSimEDr9yzF15Odyzg6FA+QTjm3I2pnu5+J9/sQaUpUl5J0xLc3VyHR
 L0D35/Eo2iL79FSzJBM8f3TGbLtEuJJ4Vvqt8PauKg1NSaDWjSzQHa/e3Qkn85P2
 dy0xg/hD8UZcc1hgxFb/R1+IQnkoo56fEaPPMR+l5i2+20ksQf5rx5hzsK6MW2Km
 vqkH5E5y5n5s1SA60TVJ5Baw6Av1ciEa5gzglC4vCVRFDWqrJRlf4h5jOiwzTERy
 LtpXM2a7rpcBy1fNUezzHb3Hg3IVBhXvGurhLu7LZQqggHDzj96ptAidtM5yG0R5
 cRJ+5aIPU/NxPGSnwg4gl8musvfXxknTuEywpvtHMkVCrhXF4pR0hQYTRbzB7RRk
 bmkN9EJuYgtt0jmcmXWsQzKmTUdLNtifu/yeZDoEsXp6yWjPP8n6B5ShIvwhwWTr
 dpFAIX1PFNPE/Re2Xz2UstzGGcIsX77aDfwcLDrIqN0iHNjo/x6l84PB876TiA77
 tFZQFP2jQhbromUd2JvtTgkcnohBdPUjjv/MC+hKN5r65IlSUVpg/WPbsFo0jkIi
 2JDVSnazkUCRdJRorZ7O
 =QL92
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl-v3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pinctrl fixes from Linus Walleij:
 "This fixes a few pinctrl problems seen since v3.7-rc1:
   - Section tagging for init code
   - Use proper pointers to lookup struct device * in the bcm2835
     (a.k.a.  Raspberry Pi)
   - Remove duplicate #includes
   - Fix bad return values in errorpath
   - Remove extraneous pull function from the sirf driver causing build
     errors
   - Provide compilation stubs for the Nomadik pinctrl driver when used
     with legacy systems without PRCMU units
   - Various irqdomain fixes in the Nomadik driver as predicted
   - Various smallish bugs in the Tegra driver, most also targeted for
     stable
   - Removed a deadlocking mutex in the groups debugfs show function"

* tag 'pinctrl-v3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl/nomadik: pass DT node to the irqdomain
  pinctrl/nomadik: use zero as default irq_start
  pinctrl: fix missing unlock on error in pinctrl_groups_show()
  pinctrl/nomadik: use irq_create_mapping()
  pinctrl: remove mutex lock in groups show
  pinctrl: tegra: correct bank for pingroup and drv pingroup
  pinctrl: tegra: set low power mode bank width to 2
  dt: Document: correct tegra20/30 pinctrl slew-rate name
This commit is contained in:
Linus Torvalds 2012-10-24 17:01:16 -07:00
commit 99103f7748
7 changed files with 21 additions and 23 deletions

View File

@ -93,7 +93,7 @@ Valid values for pin and group names are:
With some exceptions, these support nvidia,high-speed-mode, With some exceptions, these support nvidia,high-speed-mode,
nvidia,schmitt, nvidia,low-power-mode, nvidia,pull-down-strength, nvidia,schmitt, nvidia,low-power-mode, nvidia,pull-down-strength,
nvidia,pull-up-strength, nvidia,slew_rate-rising, nvidia,slew_rate-falling. nvidia,pull-up-strength, nvidia,slew-rate-rising, nvidia,slew-rate-falling.
drive_ao1, drive_ao2, drive_at1, drive_at2, drive_cdev1, drive_cdev2, drive_ao1, drive_ao2, drive_at1, drive_at2, drive_cdev1, drive_cdev2,
drive_csus, drive_dap1, drive_dap2, drive_dap3, drive_dap4, drive_dbg, drive_csus, drive_dap1, drive_dap2, drive_dap3, drive_dap4, drive_dbg,

View File

@ -83,7 +83,7 @@ Valid values for pin and group names are:
drive groups: drive groups:
These all support nvidia,pull-down-strength, nvidia,pull-up-strength, These all support nvidia,pull-down-strength, nvidia,pull-up-strength,
nvidia,slew_rate-rising, nvidia,slew_rate-falling. Most but not all nvidia,slew-rate-rising, nvidia,slew-rate-falling. Most but not all
support nvidia,high-speed-mode, nvidia,schmitt, nvidia,low-power-mode. support nvidia,high-speed-mode, nvidia,schmitt, nvidia,low-power-mode.
ao1, ao2, at1, at2, at3, at4, at5, cdev1, cdev2, cec, crt, csus, dap1, ao1, ao2, at1, at2, at3, at4, at5, cdev1, cdev2, cec, crt, csus, dap1,

View File

@ -1061,8 +1061,10 @@ static int pinctrl_groups_show(struct seq_file *s, void *what)
seq_printf(s, "group: %s\n", gname); seq_printf(s, "group: %s\n", gname);
for (i = 0; i < num_pins; i++) { for (i = 0; i < num_pins; i++) {
pname = pin_get_name(pctldev, pins[i]); pname = pin_get_name(pctldev, pins[i]);
if (WARN_ON(!pname)) if (WARN_ON(!pname)) {
mutex_unlock(&pinctrl_mutex);
return -EINVAL; return -EINVAL;
}
seq_printf(s, "pin %d (%s)\n", pins[i], pname); seq_printf(s, "pin %d (%s)\n", pins[i], pname);
} }
seq_puts(s, "\n"); seq_puts(s, "\n");

View File

@ -537,8 +537,6 @@ static int pinconf_groups_show(struct seq_file *s, void *what)
seq_puts(s, "Pin config settings per pin group\n"); seq_puts(s, "Pin config settings per pin group\n");
seq_puts(s, "Format: group (name): configs\n"); seq_puts(s, "Format: group (name): configs\n");
mutex_lock(&pinctrl_mutex);
while (selector < ngroups) { while (selector < ngroups) {
const char *gname = pctlops->get_group_name(pctldev, selector); const char *gname = pctlops->get_group_name(pctldev, selector);
@ -549,8 +547,6 @@ static int pinconf_groups_show(struct seq_file *s, void *what)
selector++; selector++;
} }
mutex_unlock(&pinctrl_mutex);
return 0; return 0;
} }

View File

@ -1056,7 +1056,7 @@ static int nmk_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
struct nmk_gpio_chip *nmk_chip = struct nmk_gpio_chip *nmk_chip =
container_of(chip, struct nmk_gpio_chip, chip); container_of(chip, struct nmk_gpio_chip, chip);
return irq_find_mapping(nmk_chip->domain, offset); return irq_create_mapping(nmk_chip->domain, offset);
} }
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
@ -1281,7 +1281,7 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
struct clk *clk; struct clk *clk;
int secondary_irq; int secondary_irq;
void __iomem *base; void __iomem *base;
int irq_start = -1; int irq_start = 0;
int irq; int irq;
int ret; int ret;
@ -1387,7 +1387,7 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
if (!np) if (!np)
irq_start = NOMADIK_GPIO_TO_IRQ(pdata->first_gpio); irq_start = NOMADIK_GPIO_TO_IRQ(pdata->first_gpio);
nmk_chip->domain = irq_domain_add_simple(NULL, nmk_chip->domain = irq_domain_add_simple(np,
NMK_GPIO_PER_CHIP, irq_start, NMK_GPIO_PER_CHIP, irq_start,
&nmk_gpio_irq_simple_ops, nmk_chip); &nmk_gpio_irq_simple_ops, nmk_chip);
if (!nmk_chip->domain) { if (!nmk_chip->domain) {

View File

@ -464,7 +464,7 @@ static int tegra_pinconf_reg(struct tegra_pmx *pmx,
*bank = g->drv_bank; *bank = g->drv_bank;
*reg = g->drv_reg; *reg = g->drv_reg;
*bit = g->lpmd_bit; *bit = g->lpmd_bit;
*width = 1; *width = 2;
break; break;
case TEGRA_PINCONF_PARAM_DRIVE_DOWN_STRENGTH: case TEGRA_PINCONF_PARAM_DRIVE_DOWN_STRENGTH:
*bank = g->drv_bank; *bank = g->drv_bank;

View File

@ -3345,10 +3345,10 @@ static const struct tegra_function tegra30_functions[] = {
FUNCTION(vi_alt3), FUNCTION(vi_alt3),
}; };
#define MUXCTL_REG_A 0x3000 #define DRV_PINGROUP_REG_A 0x868 /* bank 0 */
#define PINGROUP_REG_A 0x868 #define PINGROUP_REG_A 0x3000 /* bank 1 */
#define PINGROUP_REG_Y(r) ((r) - MUXCTL_REG_A) #define PINGROUP_REG_Y(r) ((r) - PINGROUP_REG_A)
#define PINGROUP_REG_N(r) -1 #define PINGROUP_REG_N(r) -1
#define PINGROUP(pg_name, f0, f1, f2, f3, f_safe, r, od, ior) \ #define PINGROUP(pg_name, f0, f1, f2, f3, f_safe, r, od, ior) \
@ -3364,25 +3364,25 @@ static const struct tegra_function tegra30_functions[] = {
}, \ }, \
.func_safe = TEGRA_MUX_ ## f_safe, \ .func_safe = TEGRA_MUX_ ## f_safe, \
.mux_reg = PINGROUP_REG_Y(r), \ .mux_reg = PINGROUP_REG_Y(r), \
.mux_bank = 0, \ .mux_bank = 1, \
.mux_bit = 0, \ .mux_bit = 0, \
.pupd_reg = PINGROUP_REG_Y(r), \ .pupd_reg = PINGROUP_REG_Y(r), \
.pupd_bank = 0, \ .pupd_bank = 1, \
.pupd_bit = 2, \ .pupd_bit = 2, \
.tri_reg = PINGROUP_REG_Y(r), \ .tri_reg = PINGROUP_REG_Y(r), \
.tri_bank = 0, \ .tri_bank = 1, \
.tri_bit = 4, \ .tri_bit = 4, \
.einput_reg = PINGROUP_REG_Y(r), \ .einput_reg = PINGROUP_REG_Y(r), \
.einput_bank = 0, \ .einput_bank = 1, \
.einput_bit = 5, \ .einput_bit = 5, \
.odrain_reg = PINGROUP_REG_##od(r), \ .odrain_reg = PINGROUP_REG_##od(r), \
.odrain_bank = 0, \ .odrain_bank = 1, \
.odrain_bit = 6, \ .odrain_bit = 6, \
.lock_reg = PINGROUP_REG_Y(r), \ .lock_reg = PINGROUP_REG_Y(r), \
.lock_bank = 0, \ .lock_bank = 1, \
.lock_bit = 7, \ .lock_bit = 7, \
.ioreset_reg = PINGROUP_REG_##ior(r), \ .ioreset_reg = PINGROUP_REG_##ior(r), \
.ioreset_bank = 0, \ .ioreset_bank = 1, \
.ioreset_bit = 8, \ .ioreset_bit = 8, \
.drv_reg = -1, \ .drv_reg = -1, \
} }
@ -3401,8 +3401,8 @@ static const struct tegra_function tegra30_functions[] = {
.odrain_reg = -1, \ .odrain_reg = -1, \
.lock_reg = -1, \ .lock_reg = -1, \
.ioreset_reg = -1, \ .ioreset_reg = -1, \
.drv_reg = ((r) - PINGROUP_REG_A), \ .drv_reg = ((r) - DRV_PINGROUP_REG_A), \
.drv_bank = 1, \ .drv_bank = 0, \
.hsm_bit = hsm_b, \ .hsm_bit = hsm_b, \
.schmitt_bit = schmitt_b, \ .schmitt_bit = schmitt_b, \
.lpmd_bit = lpmd_b, \ .lpmd_bit = lpmd_b, \