drivers: input: touchscreen: Extend common touchpanel interface by fp_state
* Add fp_state attribute to common touch panel interface that will be used by touchscreen drivers to notify userspace when finger is in FOD area. This sysfs knob is used to implement UDFPS sensor sub-HAL Signed-off-by: Ivan Vecera <ivan@cera.cz> Change-Id: Ic5fb0cf389779854a1c3b13833bcc1137e67c817
This commit is contained in:
@@ -13,10 +13,18 @@ struct kobject *touchpanel_kobj;
|
|||||||
return sysfs_create_file(touchpanel_kobj, &kattr.attr); \
|
return sysfs_create_file(touchpanel_kobj, &kattr.attr); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define TS_ENABLE_NOTIFY(type) \
|
||||||
|
void tp_common_notify_##type(void) \
|
||||||
|
{ \
|
||||||
|
sysfs_notify(touchpanel_kobj, NULL, __stringify(type)); \
|
||||||
|
}
|
||||||
|
|
||||||
TS_ENABLE_FOPS(capacitive_keys)
|
TS_ENABLE_FOPS(capacitive_keys)
|
||||||
TS_ENABLE_FOPS(double_tap)
|
TS_ENABLE_FOPS(double_tap)
|
||||||
TS_ENABLE_FOPS(fod_status)
|
TS_ENABLE_FOPS(fod_status)
|
||||||
|
TS_ENABLE_FOPS(fp_state)
|
||||||
TS_ENABLE_FOPS(reversed_keys)
|
TS_ENABLE_FOPS(reversed_keys)
|
||||||
|
TS_ENABLE_NOTIFY(fp_state)
|
||||||
|
|
||||||
static int __init tp_common_init(void)
|
static int __init tp_common_init(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ struct tp_common_ops {
|
|||||||
const char *buf, size_t count);
|
const char *buf, size_t count);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void tp_common_notify_fp_state(void);
|
||||||
int tp_common_set_capacitive_keys_ops(struct tp_common_ops *ops);
|
int tp_common_set_capacitive_keys_ops(struct tp_common_ops *ops);
|
||||||
int tp_common_set_double_tap_ops(struct tp_common_ops *ops);
|
int tp_common_set_double_tap_ops(struct tp_common_ops *ops);
|
||||||
int tp_common_set_fod_status_ops(struct tp_common_ops *ops);
|
int tp_common_set_fod_status_ops(struct tp_common_ops *ops);
|
||||||
|
int tp_common_set_fp_state_ops(struct tp_common_ops *ops);
|
||||||
int tp_common_set_reversed_keys_ops(struct tp_common_ops *ops);
|
int tp_common_set_reversed_keys_ops(struct tp_common_ops *ops);
|
||||||
|
|||||||
Reference in New Issue
Block a user