On Sunday 16 March 2008, Felipe Balbi wrote:
> + set_irq_type(OMAP_GPIO_IRQ(14), IRQF_SAMPLE_RANDOM);
You should provide *only* IRQF_TRIGGER_* bits when
you call set_irq_type() ... while the docs are weak
here (too), notice how kernel/irq/manage.c masks
out all except the four bits in IRQF_TRIGGER_MASK.
No irq_chip should pay attention to other bits in
that call. Other flags, like IRQF_{DISABLED,SHARED},
are driver-specific.
Plus, the whole point is to specify the trigger mode,
so calling this the equivalent of "use the default"
(IRQF_TRIGGER_NONE == 0) is pointless. :)
Also, I'm sure someone will be tempted to remove the
IRQF_SAMPLE_RANDOM here, and it's something of a fair
argument for externally controlled signals. It's not
random when an external agent can control delivery of
signals at the millisecond level... hence it's not a
crypto-strong source of randomness. Luckily most
OMAPs include a hardware RNG (except the 35xx series,
for some odd reason?) so that's not a real issue.
- Dave
_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c