Skip to content

Commit

Permalink
Merge pull request #11 from bitrvmpd/feature-n-leds
Browse files Browse the repository at this point in the history
Feature: RGB leds & IR
  • Loading branch information
bitrvmpd authored Dec 18, 2017
2 parents 763b52d + 665b649 commit e332513
Show file tree
Hide file tree
Showing 19 changed files with 2,459 additions and 730 deletions.
41 changes: 21 additions & 20 deletions arch/arm64/configs/santoni_defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 3.18.87 Kernel Configuration
# Linux/arm64 3.18.88 Kernel Configuration
#
CONFIG_ARM64=y
CONFIG_64BIT=y
Expand Down Expand Up @@ -1187,6 +1187,7 @@ CONFIG_USB_EXT_TYPE_C_PERICOM=y
# CONFIG_TI_DRV2667 is not set
# CONFIG_QPNP_MISC is not set
# CONFIG_MEMORY_STATE_TIME is not set
CONFIG_AW87319=y
# CONFIG_C2PORT is not set

#
Expand Down Expand Up @@ -2554,15 +2555,16 @@ CONFIG_RC_MAP=y
CONFIG_RC_DECODERS=y
CONFIG_LIRC=y
CONFIG_IR_LIRC_CODEC=y
CONFIG_IR_NEC_DECODER=y
CONFIG_IR_RC5_DECODER=y
CONFIG_IR_RC6_DECODER=y
CONFIG_IR_JVC_DECODER=y
CONFIG_IR_SONY_DECODER=y
CONFIG_IR_SANYO_DECODER=y
CONFIG_IR_SHARP_DECODER=y
CONFIG_IR_MCE_KBD_DECODER=y
CONFIG_IR_XMP_DECODER=y
# CONFIG_IR_NEC_DECODER is not set
# CONFIG_IR_RC5_DECODER is not set
# CONFIG_IR_RC6_DECODER is not set
# CONFIG_IR_JVC_DECODER is not set
# CONFIG_IR_SONY_DECODER is not set
# CONFIG_IR_SANYO_DECODER is not set
# CONFIG_IR_SHARP_DECODER is not set
# CONFIG_IR_MCE_KBD_DECODER is not set
# CONFIG_IR_XMP_DECODER is not set
# CONFIG_IR_DUMP_DECODER is not set
CONFIG_RC_DEVICES=y
# CONFIG_RC_ATI_REMOTE is not set
# CONFIG_IR_HIX5HD2 is not set
Expand All @@ -2575,6 +2577,8 @@ CONFIG_RC_DEVICES=y
# CONFIG_IR_IMG is not set
# CONFIG_RC_LOOPBACK is not set
# CONFIG_IR_GPIO_CIR is not set
CONFIG_IR_GPIO=y
# CONFIG_IR_PWM is not set
# CONFIG_MEDIA_USB_SUPPORT is not set
# CONFIG_MEDIA_PCI_SUPPORT is not set
CONFIG_V4L_PLATFORM_DRIVERS=y
Expand All @@ -2591,10 +2595,10 @@ CONFIG_MSM_VIDC_GOVERNORS=y
# QTI MSM Camera And Video & AIS
#
CONFIG_MSM_CAMERA=y
# CONFIG_MSM_CAMERA_DEBUG is not set
CONFIG_MSM_CAMERA_DEBUG=y
# CONFIG_MSM_CAMERA_AUTOMOTIVE is not set
CONFIG_MSMB_CAMERA=y
# CONFIG_MSMB_CAMERA_DEBUG is not set
CONFIG_MSMB_CAMERA_DEBUG=y
CONFIG_MSM_CAMERA_SENSOR=y
CONFIG_MSM_CPP=y
CONFIG_MSM_CCI=y
Expand All @@ -2605,7 +2609,6 @@ CONFIG_MSM_CSI31_HEADER=y
CONFIG_MSM_CSIPHY=y
CONFIG_MSM_CSID=y
CONFIG_MSM_EEPROM=y
# CONFIG_MSM_ISP_V1 is not set
CONFIG_MSM_ISPIF=y
# CONFIG_MSM_ISPIF_V1 is not set
CONFIG_MSM_ISPIF_V2=y
Expand All @@ -2622,8 +2625,6 @@ CONFIG_MSM_V4L2_VIDEO_OVERLAY_DEVICE=y
CONFIG_MSMB_JPEG=y
CONFIG_MSM_FD=y
# CONFIG_MSM_JPEGDMA is not set
CONFIG_MSM_SEC_CCI_TA_NAME="seccamdemo64"
# CONFIG_MSM_SEC_CCI_DEBUG is not set
# CONFIG_MSM_AIS is not set
# CONFIG_TSPP is not set
# CONFIG_MSM_SDE_ROTATOR is not set
Expand Down Expand Up @@ -3724,7 +3725,7 @@ CONFIG_ION_MSM=y
# Qualcomm Atheros Prima WLAN module
#
# CONFIG_PRIMA_WLAN is not set
CONFIG_PRONTO_WLAN=m
CONFIG_PRONTO_WLAN=y
# CONFIG_PRIMA_WLAN_BTAMP is not set
CONFIG_PRIMA_WLAN_LFR=y
CONFIG_PRIMA_WLAN_OKC=y
Expand Down Expand Up @@ -4043,7 +4044,7 @@ CONFIG_FS_MBCACHE=y
# CONFIG_NILFS2_FS is not set
CONFIG_FS_POSIX_ACL=y
CONFIG_FILE_LOCKING=y
# CONFIG_FS_ENCRYPTION is not set
CONFIG_FS_ENCRYPTION=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY_USER=y
Expand All @@ -4055,7 +4056,7 @@ CONFIG_QUOTA=y
# CONFIG_QFMT_V1 is not set
# CONFIG_QFMT_V2 is not set
CONFIG_QUOTACTL=y
# CONFIG_AUTOFS4_FS is not set
CONFIG_AUTOFS4_FS=y
CONFIG_FUSE_FS=y
# CONFIG_CUSE is not set
# CONFIG_OVERLAY_FS is not set
Expand Down Expand Up @@ -4466,7 +4467,7 @@ CONFIG_CRYPTO_SEQIV=y
#
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_CTR=y
# CONFIG_CRYPTO_CTS is not set
CONFIG_CRYPTO_CTS=y
CONFIG_CRYPTO_ECB=y
# CONFIG_CRYPTO_LRW is not set
# CONFIG_CRYPTO_PCBC is not set
Expand All @@ -4484,7 +4485,7 @@ CONFIG_CRYPTO_XCBC=y
# Digest
#
CONFIG_CRYPTO_CRC32C=y
# CONFIG_CRYPTO_CRC32 is not set
CONFIG_CRYPTO_CRC32=y
# CONFIG_CRYPTO_CRCT10DIF is not set
# CONFIG_CRYPTO_GHASH is not set
CONFIG_CRYPTO_MD4=y
Expand Down
21 changes: 21 additions & 0 deletions drivers/input/touchscreen/ft5x06_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@
static irqreturn_t ft5x06_ts_interrupt(int irq, void *data);
#endif

#if defined(CONFIG_FOCALTECH_5336)
//Required to get tp_color
#define FT_LOCKDOWN_SIZE 8
static u8 lockdown_info[FT_LOCKDOWN_SIZE];
extern u8 tp_color;
#endif

#define FT_DRIVER_VERSION 0x02

#define FT_META_REGS 3
Expand Down Expand Up @@ -2279,6 +2286,9 @@ static int ft5x06_ts_probe(struct i2c_client *client,
u8 reg_value = 0;
u8 reg_addr;
int err, len, retval, attr_count;
#if defined(CONFIG_FOCALTECH_5336)
u8 buf[128];
#endif

if (client->dev.of_node) {
pdata = devm_kzalloc(&client->dev,
Expand Down Expand Up @@ -2621,6 +2631,17 @@ static int ft5x06_ts_probe(struct i2c_client *client,
data->fw_ver[1], data->fw_ver[2]);
FT_STORE_TS_INFO(ts_info_buff, data->family_id, data->fw_ver[0],
data->fw_ver[1], data->fw_ver[2]);
#if defined(CONFIG_FOCALTECH_5336)
buf[0] = 0x03;
buf[1] = 0x00;
buf[2] = (u8) (0x07d0 >> 8);
buf[3] = (u8) (0x07d0);

ft5x06_i2c_read(client, buf, 4, lockdown_info, 8);
msleep(10);
printk(KERN_ERR "Bitrvmpd tp_color: %d" , lockdown_info[2]);
tp_color = lockdown_info[2];
#endif
#if defined(CONFIG_FB)
INIT_WORK(&data->fb_notify_work, fb_notify_resume_work);
data->fb_notif.notifier_call = fb_notifier_callback;
Expand Down
Loading

0 comments on commit e332513

Please sign in to comment.