ARM: s3c: adc: move header to linux/soc/samsung

There are multiple drivers using the private adc interface.
It seems unlikely that they would ever get converted to iio,
so make the current state official by making the header file
global.

The s3c2410_ts driver needs a couple of register definitions
as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Sebastian Reichel <sre@kernel.org>
Link: https://lore.kernel.org/r/20200806182059.2431-22-krzk@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
This commit is contained in:
Arnd Bergmann 2020-08-06 20:20:39 +02:00 committed by Krzysztof Kozlowski
parent 95b415efff
commit 7dbad03ebc
10 changed files with 46 additions and 13 deletions

View File

@ -57,7 +57,7 @@
#include <plat/keypad.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/adc.h>
#include <linux/soc/samsung/s3c-adc.h>
#include <linux/platform_data/i2c-s3c2410.h>
#include <plat/pm.h>

View File

@ -27,7 +27,7 @@
#include <mach/regs-gpio.h>
#include <mach/gpio-samsung.h>
#include <plat/adc.h>
#include <linux/soc/samsung/s3c-adc.h>
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/fb.h>

View File

@ -29,7 +29,7 @@
#include <mach/gpio-samsung.h>
#include <mach/irqs.h>
#include <plat/adc.h>
#include <linux/soc/samsung/s3c-adc.h>
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/fb.h>

View File

@ -60,7 +60,7 @@
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/adc.h>
#include <linux/soc/samsung/s3c-adc.h>
#include <linux/platform_data/touchscreen-s3c2410.h>
#include <plat/keypad.h>

View File

@ -20,7 +20,7 @@
#include <linux/regulator/consumer.h>
#include <plat/regs-adc.h>
#include <plat/adc.h>
#include <linux/soc/samsung/s3c-adc.h>
/* This driver is designed to control the usage of the ADC block between
* the touchscreen and any other drivers that may need to use it, such as

View File

@ -46,7 +46,7 @@
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/adc.h>
#include <linux/soc/samsung/s3c-adc.h>
#include <linux/platform_data/ata-samsung_cf.h>
#include <plat/fb.h>
#include <plat/fb-s3c2410.h>

View File

@ -20,7 +20,7 @@
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <plat/adc.h>
#include <linux/soc/samsung/s3c-adc.h>
#include <linux/platform_data/hwmon-s3c.h>
struct s3c_hwmon_attr {

View File

@ -20,10 +20,43 @@
#include <linux/clk.h>
#include <linux/io.h>
#include <plat/adc.h>
#include <plat/regs-adc.h>
#include <linux/soc/samsung/s3c-adc.h>
#include <linux/platform_data/touchscreen-s3c2410.h>
#define S3C2410_ADCCON (0x00)
#define S3C2410_ADCTSC (0x04)
#define S3C2410_ADCDLY (0x08)
#define S3C2410_ADCDAT0 (0x0C)
#define S3C2410_ADCDAT1 (0x10)
#define S3C64XX_ADCUPDN (0x14)
#define S3C2443_ADCMUX (0x18)
#define S3C64XX_ADCCLRINT (0x18)
#define S5P_ADCMUX (0x1C)
#define S3C64XX_ADCCLRINTPNDNUP (0x20)
/* ADCTSC Register Bits */
#define S3C2443_ADCTSC_UD_SEN (1 << 8)
#define S3C2410_ADCTSC_YM_SEN (1<<7)
#define S3C2410_ADCTSC_YP_SEN (1<<6)
#define S3C2410_ADCTSC_XM_SEN (1<<5)
#define S3C2410_ADCTSC_XP_SEN (1<<4)
#define S3C2410_ADCTSC_PULL_UP_DISABLE (1<<3)
#define S3C2410_ADCTSC_AUTO_PST (1<<2)
#define S3C2410_ADCTSC_XY_PST(x) (((x)&0x3)<<0)
/* ADCDAT0 Bits */
#define S3C2410_ADCDAT0_UPDOWN (1<<15)
#define S3C2410_ADCDAT0_AUTO_PST (1<<14)
#define S3C2410_ADCDAT0_XY_PST (0x3<<12)
#define S3C2410_ADCDAT0_XPDATA_MASK (0x03FF)
/* ADCDAT1 Bits */
#define S3C2410_ADCDAT1_UPDOWN (1<<15)
#define S3C2410_ADCDAT1_AUTO_PST (1<<14)
#define S3C2410_ADCDAT1_XY_PST (0x3<<12)
#define S3C2410_ADCDAT1_YPDATA_MASK (0x03FF)
#define TSC_SLEEP (S3C2410_ADCTSC_PULL_UP_DISABLE | S3C2410_ADCTSC_XY_PST(0))
#define INT_DOWN (0)

View File

@ -22,7 +22,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <plat/adc.h>
#include <linux/soc/samsung/s3c-adc.h>
#define BAT_POLL_INTERVAL 10000 /* ms */
#define JITTER_DELAY 500 /* ms */

View File

@ -7,8 +7,8 @@
* S3C ADC driver information
*/
#ifndef __ASM_PLAT_ADC_H
#define __ASM_PLAT_ADC_H __FILE__
#ifndef __LINUX_SOC_SAMSUNG_S3C_ADC_H
#define __LINUX_SOC_SAMSUNG_S3C_ADC_H __FILE__
struct s3c_adc_client;
struct platform_device;
@ -29,4 +29,4 @@ extern struct s3c_adc_client *
extern void s3c_adc_release(struct s3c_adc_client *client);
#endif /* __ASM_PLAT_ADC_H */
#endif /* __LINUX_SOC_SAMSUNG_S3C_ADC_H */