From: ashley.hughes@blueyonder.co.uk (Ash Hughes)
To: linux-arm-kernel@lists.infradead.org
Subject: orion5x mpp/gpio issue
Date: Tue, 03 Jan 2012 22:45:36 +0000 [thread overview]
Message-ID: <1325630736.18479.12.camel@ash-ubuntu> (raw)
Hi,
I recently tried to build a new kernel and ran into an error with GPIOs
on my device. The MPP setup code has changed since I last compiled and
it now seems that some of the information in the mpp_list is being
ignored.
I've traced this back to arch/arm/plat-orion/mpp.c. In function:
void __init orion_mpp_conf(unsigned int *mpp_list, unsigned int
variant_mask,
unsigned int mpp_max, unsigned int dev_bus)
there is the following:
if (sel != 0)
gpio_mode = 0;
sel is the value to be written to the MPP config registers and this is
not 0 for some pins (>16 and perhaps a few others, see
arch/arm/plat-orion/mpp.h). This means these pins will not be recorded
in the orion_gpio_chip valid_input and valid_output vars, which makes
them unavailable for drivers, despite the mpp_list defined for the
device (and the device registers being set correctly!).
What is the reason for this limitation? I've seen that some devices
(e.g. arch/arm/mach-orion5x/d2net-setup.c) use orion_gpio_set_valid to
manually enable higher GPIOs, along with the comment "/* Configure GPIO
over MPP max number. */" Is this the correct workaround to enable higher
GPIOs or should the code above not be included?
Apologies if there has already been a discussion on this, I couldn't
find one with a quick search!
Many thanks
Ash
reply other threads:[~2012-01-03 22:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1325630736.18479.12.camel@ash-ubuntu \
--to=ashley.hughes@blueyonder.co.uk \
--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).