lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150222213131.GA9837@opensource.wolfsonmicro.com>
Date:	Sun, 22 Feb 2015 21:31:31 +0000
From:	Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	swarren@...dotorg.org, lee@...nel.org, linux@....linux.org.uk,
	robh+dt@...nel.org, pawel.moll@....com, galak@...eaurora.org,
	devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-rpi-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ARM: bcm2835: Add header file for pinctrl constants

On Sun, Feb 22, 2015 at 09:13:23PM +0100, Arnd Bergmann wrote:
> On Sunday 22 February 2015 16:59:56 Charles Keepax wrote:
> > +
> > +/* IRQ Flags */
> > +#define BCM2835_PIN_IRQ_RISING                         1
> > +#define BCM2835_PIN_IRQ_FALLING                                2
> > +#define BCM2835_PIN_IRQ_EDGE   (BCM2835_PIN_IRQ_RISING | \
> > +                                BCM2835_PIN_IRQ_FALLING)
> > +#define BCM2835_PIN_IRQ_LOW                            4
> > +#define BCM2835_PIN_IRQ_HIGH                           8
> 
> Are these different from the standard definitions?
> 
> > +/* Pin Function Settings */
> > +#define BCM2835_PIN_FUNC_GPIO_IN                       0
> > +#define BCM2835_PIN_FUNC_GPIO_OUT                      1
> > +#define BCM2835_PIN_FUNC_ALT5                          2
> > +#define BCM2835_PIN_FUNC_ALT4                          3
> > +#define BCM2835_PIN_FUNC_ALT0                          4
> > +#define BCM2835_PIN_FUNC_ALT1                          5
> > +#define BCM2835_PIN_FUNC_ALT2                          6
> > +#define BCM2835_PIN_FUNC_ALT3                          7
> 
> Why are these required? They don't seem to be used by any driver,
> which leads me to suspect that they are just the hardware numbers.
> 
> In that case, don't add any syntactical sugar like that and just
> use the hardware numbers directly.

Yeah they are just hardware numbers, I wasn't aware there was a
preference to use the numbers directly in which case just ignore
this patch.

> 
> What's with the strange mapping of numbers anyway?

You would need to ask Broadcom that :-)

Thanks,
Charles
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ