From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 06/10] iio: exynos-adc: add experimental touchscreen support
Date: Thu, 12 Mar 2015 18:01 +0100 [thread overview]
Message-ID: <2880161.O2Qj0NkBq3@wuerfel> (raw)
In-Reply-To: <20150304231000.GD38298@dtor-ws>
On Wednesday 04 March 2015 15:10:00 Dmitry Torokhov wrote:
> > +static int exynos_adc_ts_init(struct exynos_adc *info)
> > +{
> > + int ret;
> > +
> > + if (info->tsirq <= 0)
> > + return -ENODEV;
> > +
> > + info->input = input_allocate_device();
> > + if (!info->input)
> > + return -ENOMEM;
> > +
> > + info->input->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
> > + info->input->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
> > +
> > + input_set_abs_params(info->input, ABS_X, 0, 0x3FF, 0, 0);
> > + input_set_abs_params(info->input, ABS_Y, 0, 0x3FF, 0, 0);
> > +
> > + info->input->name = "S3C24xx TouchScreen";
> > + info->input->id.bustype = BUS_HOST;
> > + info->input->open = exynos_adc_ts_open;
> > + info->input->close = exynos_adc_ts_close;
> > +
> > + input_set_drvdata(info->input, info);
> > +
> > + ret = input_register_device(info->input);
> > + if (ret)
> > + input_free_device(info->input);
>
>
> If you fail to register input device are you sure you want to continue
> and register interrupt?
>
> > +
> > + disable_irq(info->tsirq);
> > + ret = request_threaded_irq(info->tsirq, NULL, exynos_ts_isr,
> > + 0, "touchscreen", info);
> > + if (ret)
> > + input_unregister_device(info->input);
> > +
> > + return ret;
> > +}
Sorry for the delayed reply, I've now folded in this patch:
diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index 75cd381a8181..d11cd604562c 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -732,8 +732,10 @@ static int exynos_adc_ts_init(struct exynos_adc *info)
input_set_drvdata(info->input, info);
ret = input_register_device(info->input);
- if (ret)
+ if (ret) {
input_free_device(info->input);
+ return ret;
+ }
disable_irq(info->tsirq);
ret = request_threaded_irq(info->tsirq, NULL, exynos_ts_isr,
Arnd
next prev parent reply other threads:[~2015-03-12 17:01 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 12:35 [PATCH 00/10] ARM: s3c64xx multiplatform, help needed Arnd Bergmann
2015-03-02 12:35 ` [PATCH 01/10] Input: s3c2410_ts: fix S3C_ADC dependency Arnd Bergmann
2015-03-04 23:05 ` Dmitry Torokhov
2015-03-02 12:35 ` [PATCH 02/10] ASoC: samsung/smartq: use dynamic registration Arnd Bergmann
2015-03-03 14:14 ` Mark Brown
2015-03-02 12:35 ` [PATCH 03/10] gpio: samsung: move gpio-samsung driver back to platform code Arnd Bergmann
2015-03-02 12:35 ` [PATCH 04/10] ARM: s3c64xx: prepare initcalls for multiplatform Arnd Bergmann
2015-03-02 12:35 ` [PATCH 05/10] ARM: s3c64xx: enable sparse IRQ support Arnd Bergmann
2015-03-06 17:43 ` Charles Keepax
2015-03-08 18:56 ` Mark Brown
2015-03-08 21:42 ` Arnd Bergmann
2015-03-18 0:02 ` Mark Brown
2015-03-21 16:38 ` Charles Keepax
2015-03-21 18:22 ` Mark Brown
2015-03-22 2:54 ` Arnd Bergmann
2015-03-02 12:35 ` [PATCH 06/10] iio: exynos-adc: add experimental touchscreen support Arnd Bergmann
2015-03-04 23:10 ` Dmitry Torokhov
2015-03-12 17:01 ` Arnd Bergmann [this message]
2015-03-02 12:36 ` [PATCH 07/10] ARM: s3c64xx: use new adc/touchscreen driver Arnd Bergmann
2015-03-02 12:36 ` [PATCH 08/10] ARM: s3c64xx: use common debug-ll implementation Arnd Bergmann
2015-03-02 12:36 ` [PATCH 09/10] ARM: s3c64xx: multiplatform support Arnd Bergmann
2015-03-02 12:36 ` [PATCH 10/10] ARM: s3c64xx: allow building without board support Arnd Bergmann
2015-03-21 17:17 ` Charles Keepax
2015-03-02 16:17 ` [PATCH 00/10] ARM: s3c64xx multiplatform, help needed Mark Brown
2015-03-02 18:03 ` Charles Keepax
2015-03-02 16:53 ` Tomasz Figa
2015-03-02 19:04 ` Kukjin Kim
2015-03-02 17:37 ` Dmitry Torokhov
2015-03-02 18:14 ` Vasily Khoruzhick
2015-03-02 20:48 ` Arnd Bergmann
-- strict thread matches above, loose matches on Subject: below --
2015-11-25 16:06 [PATCH 00/10] ARM: s3c64xx multiplatform Arnd Bergmann
2015-11-25 16:06 ` [PATCH 06/10] iio: exynos-adc: add experimental touchscreen support Arnd Bergmann
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=2880161.O2Qj0NkBq3@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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