Re: [PATCH v2] irqchip/irq-mst: Support polarity configuration

2021-03-15 Thread Mark-PK Tsai
From: Daniel Palmer > On Fri, 12 Mar 2021 at 01:11, Mark-PK Tsai wrote: > > Why irq could accept either? > > As the irq intc has no way to clear it's triggered state (no eoi) it > must just pass the signal through instead of latching it? > Otherwise it would latch once and never again right?

Re: [PATCH v2] irqchip/irq-mst: Support polarity configuration

2021-03-12 Thread Daniel Palmer
On Fri, 12 Mar 2021 at 01:11, Mark-PK Tsai wrote: > Why irq could accept either? As the irq intc has no way to clear it's triggered state (no eoi) it must just pass the signal through instead of latching it? Otherwise it would latch once and never again right? That's what I really didn't

Re: [PATCH v2] irqchip/irq-mst: Support polarity configuration

2021-03-11 Thread Mark-PK Tsai
From: Daniel Palmer > On Thu, 11 Mar 2021 at 12:12, Mark-PK Tsai wrote: > > For a fiq controller, the input edge signal will be convert to level and > > keep the interrupt status until we do EOI operation. > > That means if a rising edge input if trigger the ouput line will keep high > > until

Re: [PATCH v2] irqchip/irq-mst: Support polarity configuration

2021-03-11 Thread Daniel Palmer
Hi Mark-PK. On Thu, 11 Mar 2021 at 12:12, Mark-PK Tsai wrote: > For a fiq controller, the input edge signal will be convert to level and > keep the interrupt status until we do EOI operation. > That means if a rising edge input if trigger the ouput line will keep high > until we clear the

Re: [PATCH v2] irqchip/irq-mst: Support polarity configuration

2021-03-10 Thread Mark-PK Tsai
From: Daniel Palmer >On Mon, 8 Mar 2021 at 23:30, Mark-PK Tsai wrote: >> From: Daniel Palmer >> >On Mon, 8 Mar 2021 at 15:05, Mark-PK Tsai wrote: >> >> +static int mst_irq_chip_set_type(struct irq_data *data, unsigned int >> >> type) >> > > +{ >> >> + if (type !=

Re: [PATCH v2] irqchip/irq-mst: Support polarity configuration

2021-03-10 Thread Daniel Palmer
Hi Mark-PK, On Mon, 8 Mar 2021 at 23:30, Mark-PK Tsai wrote: > From: Daniel Palmer > >On Mon, 8 Mar 2021 at 15:05, Mark-PK Tsai wrote: > >> +static int mst_irq_chip_set_type(struct irq_data *data, unsigned int type) > > > +{ > >> + if (type != IRQ_TYPE_LEVEL_LOW && type !=

Re: [PATCH v2] irqchip/irq-mst: Support polarity configuration

2021-03-08 Thread Mark-PK Tsai
From: Daniel Palmer >On Mon, 8 Mar 2021 at 15:05, Mark-PK Tsai wrote: >> +static int mst_irq_chip_set_type(struct irq_data *data, unsigned int type) > > +{ >> + if (type != IRQ_TYPE_LEVEL_LOW && type != IRQ_TYPE_LEVEL_HIGH) >> + return -EINVAL; >> + > >Does this mean

Re: [PATCH v2] irqchip/irq-mst: Support polarity configuration

2021-03-08 Thread Daniel Palmer
Hi Mark-PK, On Mon, 8 Mar 2021 at 15:05, Mark-PK Tsai wrote: > +static int mst_irq_chip_set_type(struct irq_data *data, unsigned int type) > +{ > + if (type != IRQ_TYPE_LEVEL_LOW && type != IRQ_TYPE_LEVEL_HIGH) > + return -EINVAL; > + Does this mean we can't do rising or

[PATCH v2] irqchip/irq-mst: Support polarity configuration

2021-03-07 Thread Mark-PK Tsai
Support irq polarity configuration and save and restore the config when system suspend and resume. Signed-off-by: Mark-PK Tsai --- drivers/irqchip/irq-mst-intc.c | 90 -- 1 file changed, 87 insertions(+), 3 deletions(-) diff --git