diff options
author | David Jung <djung@nvidia.com> | 2013-05-03 09:37:42 -0700 |
---|---|---|
committer | Harshada Kale <hkale@nvidia.com> | 2013-05-16 05:09:30 -0700 |
commit | d21be33896a6ee20fc2e61464a320d6114f5f816 (patch) | |
tree | c7912434b98619d83629a3d22033e41991d9d6f6 /include | |
parent | 643318b89813c7163ef1c984a8a3827e6debb510 (diff) |
input: touch: maxim: Add Maxim touch updates
Maxim Integrated code drop, v1.1.0.
Bug 1279288
Change-Id: Ib49e57ac8f05c22121d99b94453eaa500a9f9dfb
Signed-off-by: David Jung <djung@nvidia.com>
Reviewed-on: http://git-master/r/225301
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/maxim_sti.h | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/include/linux/maxim_sti.h b/include/linux/maxim_sti.h index 19804fd7ddb1..2776b0263898 100644 --- a/include/linux/maxim_sti.h +++ b/include/linux/maxim_sti.h @@ -1,5 +1,7 @@ /* drivers/input/touchscreen/maxim_sti.c * + * Maxim SmartTouch Imager Touchscreen Driver + * * Copyright (c)2013 Maxim Integrated Products, Inc. * Copyright (C) 2013, NVIDIA Corporation. All Rights Reserved. * @@ -25,29 +27,33 @@ #include "genetlink.h" #endif -#define DRIVER_VERSION "0.0.1" +#define DRIVER_VERSION "1.1.0" +#define DRIVER_RELEASE "May 2, 2013" /****************************************************************************\ * Netlink: common kernel/user space macros * \****************************************************************************/ #define NL_BUF_SIZE 8192 + #define NL_ATTR_FIRST(nptr) \ ((struct nlattr *)((void *)nptr + NLMSG_HDRLEN + GENL_HDRLEN)) #define NL_ATTR_LAST(nptr) \ ((struct nlattr *)((void *)nptr + \ NLMSG_ALIGN(((struct nlmsghdr *)nptr)->nlmsg_len))) -#define NL_SIZE(nptr) NLMSG_ALIGN(((struct nlmsghdr *)nptr)->nlmsg_len) -#define NL_TYPE(nptr) (((struct nlmsghdr *)nptr)->nlmsg_type) -#define NL_SEQ(nptr) (((struct nlmsghdr *)nptr)->nlmsg_seq) -#define NL_OK(nptr) (NL_TYPE(nptr) >= NLMSG_MIN_TYPE) -#define NL_ATTR_VAL(aptr, type) ((type *)((void *)aptr + NLA_HDRLEN)) +#define NL_SIZE(nptr) NLMSG_ALIGN(((struct nlmsghdr *)nptr)->nlmsg_len) +#define NL_TYPE(nptr) (((struct nlmsghdr *)nptr)->nlmsg_type) +#define NL_SEQ(nptr) (((struct nlmsghdr *)nptr)->nlmsg_seq) +#define NL_OK(nptr) (NL_TYPE(nptr) >= NLMSG_MIN_TYPE) +#define NL_ATTR_VAL(aptr, type) ((type *)((void *)aptr + NLA_HDRLEN)) #define NL_ATTR_NEXT(aptr) \ ((struct nlattr *)((void *)aptr + \ NLA_ALIGN(((struct nlattr *)aptr)->nla_len))) -#define GENL_CMP(name1, name2) strncmp(name1, name2, GENL_NAMSIZ) +#define GENL_CMP(name1, name2) strncmp(name1, name2, GENL_NAMSIZ) #define GENL_COPY(name1, name2) strncpy(name1, name2, GENL_NAMSIZ) -#define GENL_CHK(name) (strlen(name) > (GENL_NAMSIZ - 1)) +#define GENL_CHK(name) (strlen(name) > (GENL_NAMSIZ - 1)) +#define MSG_TYPE(nptr) NL_ATTR_FIRST(nptr)->nla_type +#define MSG_PAYLOAD(nptr) NL_ATTR_VAL(NL_ATTR_FIRST(nptr), void) /****************************************************************************\ * Netlink: common kernel/user space inline functions * @@ -101,7 +107,7 @@ nl_add_attr(void *buf, __u16 type, void *ptr, __u16 len) enum { MC_DRIVER, MC_FUSION, - MC_REQUIRED_GROUPS + MC_REQUIRED_GROUPS, }; #define MC_DRIVER_NAME "driver" @@ -134,12 +140,14 @@ enum { }; enum { + DR_ADD_MC_GROUP, DR_ECHO_REQUEST, DR_CHIP_READ, DR_CHIP_WRITE, DR_CHIP_RESET, DR_GET_IRQLINE, DR_DELAY, + DR_CHIP_ACCESS_METHOD, DR_CONFIG_IRQ, DR_CONFIG_INPUT, DR_DECONFIG, @@ -147,6 +155,11 @@ enum { DR_LEGACY_FWDL, }; +struct __attribute__ ((__packed__)) dr_add_mc_group { + __u8 number; + char name[GENL_NAMSIZ]; +}; + struct __attribute__ ((__packed__)) dr_echo_request { __u32 cookie; }; @@ -170,6 +183,10 @@ struct __attribute__ ((__packed__)) dr_delay { __u32 period; }; +struct __attribute__ ((__packed__)) dr_chip_access_method { + __u8 method; +}; + #define MAX_IRQ_PARAMS 20 struct __attribute__ ((__packed__)) dr_config_irq { __u16 irq_param[MAX_IRQ_PARAMS]; @@ -202,6 +219,7 @@ enum { FU_CHIP_READ_RESULT, FU_IRQLINE_STATUS, FU_ASYNC_DATA, + FU_RESUME, }; struct __attribute__ ((__packed__)) fu_echo_response { |