linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: pinctrl-imx: calculation of pinid bogus for i.MX25
Date: Wed, 28 Jan 2015 00:24:40 +0100	[thread overview]
Message-ID: <20150127232440.GK29856@pengutronix.de> (raw)

Hello,

for an i.MX25 based machine I used the same pin for two different
devices (which obviously is an error). The pinctrl driver detected this
just fine, but the error message it issued is bogus. It said:

	imx25-pinctrl 43fac000.iomuxc: pin MX25_PAD_CSI_D9 already requested by 43fac000.iomuxc; cannot claim for gpio-leds
	imx25-pinctrl 43fac000.iomuxc: could not request pin 80 (MX25_PAD_CSI_D9) from group gpioleds  on device 43fac000.iomuxc

but actually it was pin MX25_PAD_CSI_MCLK that I used twice.

The problem is 

 - drivers/pinctrl/freescale/pinctrl-imx25.c has:

	enum ... {
		...
		MX25_PAD_CSI_D9 = 80,
		MX25_PAD_CSI_MCLK = 81,
		...
	};

 - arch/arm/boot/dts/imx25-pinfunc.h has:

 	#define MX25_PAD_CSI_MCLK__GPIO_1_8             0x140 0x338 0x000 0x15 0x000

 - and to determine the pin of a given pinconfig tuple the first value
   is divided by 4. 0x140 / 4 == 80.

All entries in the enum above are affected. Is the right fix to
decrement all the values by one (and drop MX25_PAD_RESERVE1)?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

             reply	other threads:[~2015-01-27 23:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27 23:24 Uwe Kleine-König [this message]
2015-01-27 23:45 ` [PATCH] pinctrl: imx25: fix numbering for pins Uwe Kleine-König
2015-01-28  0:39   ` Fabio Estevam
2015-02-03 13:03   ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150127232440.GK29856@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).