From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] M28: Added guarding for reserved bits in GPIO driver
Date: Tue, 22 Nov 2011 23:36:51 +0100 [thread overview]
Message-ID: <201111222336.51506.marek.vasut@gmail.com> (raw)
In-Reply-To: <790839E1-8C4C-49A4-A380-5F0AAF34BB35@delien.nl>
> > Careful here !!
> >
> > The driver _should_ work for MX233 too! What I'd like to see is you
> > introducing a function like:
> >
> > int mxs_gpio_is_valid(gpio)
> > {
> > char mxs_banks[PINCTRL_BANKS] = PINCTRL_BANK_COUNTS;
> >
> > if (PAD_PIN(gpio) > mxs_bank[PAD_BANK(gpio)])
> >
> > return -EINVAL;
> >
> > return 0;
> > }
> >
> > And define PINCTRL_BANK_COUNTS in the section of mxs_gpio.c where all the
> > remaining mx28 and mx233 specific defines are hoarded (near the top of
> > the file).
>
> Does mx233 use arch/arm/include/asm/arch-mx28/iomux.h? In that case we
> should consider renaming it to arch/arm/include/asm/arch-mxs, for all
> Sigmatel base FreeScale SoCs.
It doesn't, because it's not yet supported.
>
> I do like the idea of a function validating pins. If I'm going to introduce
> changes that big, I may also introduce functionality to set pin functions
> run-time, as that is very useful during board bring-up.
Please introduce the validation function first, the runtime stuff can be done
later.
M
next prev parent reply other threads:[~2011-11-22 22:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 14:41 [U-Boot] [PATCH] M28: Added guarding for reserved bits in GPIO driver Robert Deliën
2011-11-22 14:49 ` Marek Vasut
[not found] ` <B4232BD0-3457-4DC5-9A4A-4E16719BA157@delien.nl>
2011-11-22 15:25 ` Marek Vasut
2011-11-22 16:48 ` Robert Deliën
2011-11-22 18:08 ` Marek Vasut
2011-11-22 18:20 ` Marek Vasut
2011-11-22 19:24 ` Robert Deliën
2011-11-22 22:36 ` Marek Vasut [this message]
2011-11-23 10:47 ` Robert Deliën
2011-11-23 10:59 ` Marek Vasut
2011-11-23 12:36 ` Robert Deliën
2011-11-22 21:09 ` Mike Frysinger
2011-11-22 21:16 ` Robert Deliën
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=201111222336.51506.marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=u-boot@lists.denx.de \
/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