lkml.org 
[lkml]   [2012]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RESEND] gpio: add MSIC gpio driver
On Tue, Apr 10, 2012 at 02:18:04PM +0100, Alan Cox wrote:

> + if (mg->trig_change_mask) {
> + offset = __ffs(mg->trig_change_mask);
> +
> + reg = msic_gpio_to_ireg(offset);
> + if (reg < 0)
> + goto out;
> +
> + if (mg->trig_type & IRQ_TYPE_EDGE_RISING)
> + trig |= MSIC_GPIO_TRIG_RISE;
> + if (mg->trig_type & IRQ_TYPE_EDGE_FALLING)
> + trig |= MSIC_GPIO_TRIG_FALL;
> +
> + intel_msic_reg_update(reg, trig, MSIC_GPIO_INTCNT_MASK);
> + mg->trig_change_mask = 0;
> + }

What happens if we manage to get more than one change flagged while the
lock is held?

> +/* Firmware does all the masking and unmasking for us, no masking here. */
> +static void msic_irq_unmask(struct irq_data *data) { }

> +static void msic_irq_mask(struct irq_data *data) { }

Shouldn't these just be omitted if they don't do anything (or
alternatively, how does the firmware figure out that it needs to do the
masking and unmasking)?

> + mg = kzalloc(sizeof(*mg), GFP_KERNEL);
> + if (!mg)
> + return -ENOMEM;

devm_kzalloc()


\
 
 \ /
  Last update: 2012-04-10 15:13    [W:3.551 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site