From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Viresh Kumar <viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: rabin.vincent-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org,
sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
spear-devel-nkJGhpqTU55BDgjK7y7TUQ@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
shiraz.hashim-qxv4g6HH51o@public.gmane.org
Subject: Re: [PATCH V4 Resend 2/3] mfd: stmpe: Remove irq_trigger from platform data
Date: Thu, 29 Nov 2012 09:34:28 +0000 [thread overview]
Message-ID: <20121129093428.GV2013@gmail.com> (raw)
In-Reply-To: <33d71d9d29a3edd2c4a33e0f187cdb89f344af72.1354128258.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
On Thu, 29 Nov 2012, Viresh Kumar wrote:
> STMPE can confige
configure?
> the way the device emits interrupts and till now this
until?
> information is passed as part of platform data.
>
> It would actually be good to ask the interrupt controller driver what kind of
> interrupt signal it expects for a given interrupt line. We can get the irq type
> by calling: irqd_get_trigger_type() routine.
>
> So, now we don't need to pass it via platform data. This is earlier discussed
> here:
>
> https://lkml.org/lkml/2012/11/26/711
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>
> @Linus/Shiraz: Can you please test this patch? You don't really need to test 1/3
> and 3/3, but would be good if you do that too..
>
> This is actually V1 of this patch.
>
> arch/arm/mach-ux500/board-mop500-stuib.c | 1 -
> drivers/mfd/stmpe.c | 7 ++++---
> include/linux/mfd/stmpe.h | 2 --
> 3 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-ux500/board-mop500-stuib.c b/arch/arm/mach-ux500/board-mop500-stuib.c
> index 564f57d..0efcf97 100644
> --- a/arch/arm/mach-ux500/board-mop500-stuib.c
> +++ b/arch/arm/mach-ux500/board-mop500-stuib.c
> @@ -57,7 +57,6 @@ static struct stmpe_keypad_platform_data stmpe1601_keypad_data = {
> static struct stmpe_platform_data stmpe1601_data = {
> .id = 1,
> .blocks = STMPE_BLOCK_KEYPAD,
> - .irq_trigger = IRQF_TRIGGER_FALLING,
> .irq_base = MOP500_STMPE1601_IRQ(0),
> .keypad = &stmpe1601_keypad_data,
> .autosleep = true,
> diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
> index 34408b4..10819e6 100644
> --- a/drivers/mfd/stmpe.c
> +++ b/drivers/mfd/stmpe.c
> @@ -914,7 +914,6 @@ static int __devinit stmpe_irq_init(struct stmpe *stmpe,
>
> static int __devinit stmpe_chip_init(struct stmpe *stmpe)
> {
> - unsigned int irq_trigger = stmpe->pdata->irq_trigger;
> int autosleep_timeout = stmpe->pdata->autosleep_timeout;
> struct stmpe_variant_info *variant = stmpe->variant;
> u8 icr = 0;
> @@ -941,6 +940,9 @@ static int __devinit stmpe_chip_init(struct stmpe *stmpe)
> return ret;
>
> if (stmpe->irq >= 0) {
> + unsigned int irq_trigger =
> + irqd_get_trigger_type(irq_get_irq_data(stmpe->irq));
> +
> if (id == STMPE801_ID)
> icr = STMPE801_REG_SYS_CTRL_INT_EN;
> else
> @@ -1118,8 +1120,7 @@ int __devinit stmpe_probe(struct stmpe_client_info *ci, int partnum)
> return ret;
>
> ret = devm_request_threaded_irq(ci->dev, stmpe->irq, NULL,
> - stmpe_irq, pdata->irq_trigger | IRQF_ONESHOT,
> - "stmpe", stmpe);
> + stmpe_irq, IRQF_ONESHOT, "stmpe", stmpe);
Forgive my ignorance, but you're no longer passing irq_trigger.
Is this intentional? If so, why was it needed before and not now?
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
next prev parent reply other threads:[~2012-11-29 9:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 18:47 [PATCH V4 Resend 1/3] mfd: stmpe: Get rid of irq_invert_polarity Viresh Kumar
[not found] ` <d1f012d7bb2835f696fc100073f2eb16d9f6204d.1354128258.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-11-28 18:47 ` [PATCH V4 Resend 2/3] mfd: stmpe: Remove irq_trigger from platform data Viresh Kumar
[not found] ` <33d71d9d29a3edd2c4a33e0f187cdb89f344af72.1354128258.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-11-29 9:34 ` Lee Jones [this message]
2012-11-29 10:01 ` Viresh Kumar
2012-11-30 10:55 ` [PATCH V4 Resend 1/3] mfd: stmpe: Get rid of irq_invert_polarity Samuel Ortiz
2012-11-28 18:47 ` [PATCH V4 Resend 3/3] mfd: stmpe: Update DT support in stmpe driver Viresh Kumar
2012-11-29 9:23 ` Lee Jones
2012-11-29 9:24 ` Lee Jones
2012-11-29 9:27 ` Viresh Kumar
2012-11-29 9:20 ` [PATCH V4 Resend 1/3] mfd: stmpe: Get rid of irq_invert_polarity Lee Jones
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=20121129093428.GV2013@gmail.com \
--to=lee.jones-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rabin.vincent-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org \
--cc=sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=shiraz.hashim-qxv4g6HH51o@public.gmane.org \
--cc=spear-devel-nkJGhpqTU55BDgjK7y7TUQ@public.gmane.org \
--cc=viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).