• Home
  • Raw
  • Download

Lines Matching +full:has +full:- +full:touchscreen

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Samsung S3C24XX touchscreen driver
5 * Copyright 2004 Arnaud Patard <arnaud.patard@rtp-net.org>
6 * Copyright 2008 Ben Dooks <ben-linux@fluff.org>
23 #include <linux/soc/samsung/s3c-adc.h>
24 #include <linux/platform_data/touchscreen-s3c2410.h>
76 #define FEAT_PEN_IRQ (1 << 0) /* HAS ADCCLRINTPNDNUP */
78 /* Per-touchscreen data. */
81 * struct s3c2410ts - driver touchscreen state.
111 * get_down - return the down state of the pen
115 * Return non-zero if both readings show that the pen is down.
170 * stylus_irq - touchscreen stylus event interrupt
205 * s3c24xx_ts_conversion - ADC conversion callback
211 * Called when a conversion has finished.
224 /* From tests, it seems that it is unlikely to get a pen-up in s3c24xx_ts_conversion()
226 * ignore any pen-up events with less than the requisite in s3c24xx_ts_conversion()
229 * In several thousand conversions, no pen-ups where detected in s3c24xx_ts_conversion()
235 * s3c24xx_ts_select - ADC selection callback.
253 * s3c2410ts_probe - device core probe entry point
262 struct device *dev = &pdev->dev; in s3c2410ts_probe()
265 int ret = -EINVAL; in s3c2410ts_probe()
275 return -EINVAL; in s3c2410ts_probe()
278 dev_dbg(dev, "initialising touchscreen\n"); in s3c2410ts_probe()
283 return -ENOENT; in s3c2410ts_probe()
302 ret = -ENOENT; in s3c2410ts_probe()
306 ts.io = ioremap(res->start, resource_size(res)); in s3c2410ts_probe()
309 ret = -ENOMEM; in s3c2410ts_probe()
314 if (info->cfg_gpio) in s3c2410ts_probe()
315 info->cfg_gpio(to_platform_device(ts.dev)); in s3c2410ts_probe()
326 if ((info->delay & 0xffff) > 0) in s3c2410ts_probe()
327 writel(info->delay & 0xffff, ts.io + S3C2410_ADCDLY); in s3c2410ts_probe()
334 ret = -ENOMEM; in s3c2410ts_probe()
339 ts.input->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in s3c2410ts_probe()
340 ts.input->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); in s3c2410ts_probe()
344 ts.input->name = "S3C24XX TouchScreen"; in s3c2410ts_probe()
345 ts.input->id.bustype = BUS_HOST; in s3c2410ts_probe()
346 ts.input->id.vendor = 0xDEAD; in s3c2410ts_probe()
347 ts.input->id.product = 0xBEEF; in s3c2410ts_probe()
348 ts.input->id.version = 0x0102; in s3c2410ts_probe()
350 ts.shift = info->oversampling_shift; in s3c2410ts_probe()
351 ts.features = platform_get_device_id(pdev)->driver_data; in s3c2410ts_probe()
366 ret = -EIO; in s3c2410ts_probe()
387 * s3c2410ts_remove - device core removal entry point
419 struct s3c2410_ts_mach_info *info = dev_get_platdata(&pdev->dev); in s3c2410ts_resume()
425 if ((info->delay & 0xffff) > 0) in s3c2410ts_resume()
426 writel(info->delay & 0xffff, ts.io + S3C2410_ADCDLY); in s3c2410ts_resume()
440 { "s3c2410-ts", 0 },
441 { "s3c2440-ts", 0 },
442 { "s3c64xx-ts", FEAT_PEN_IRQ },
449 .name = "samsung-ts",
460 MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>, "
463 MODULE_DESCRIPTION("S3C24XX Touchscreen driver");