Commit 34934d79 authored by Guillaume Ranquet's avatar Guillaume Ranquet Committed by Jonathan Cameron
Browse files

iio: introduce the FAULT event type

parent 80ce1f10
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -232,6 +232,7 @@ static const char * const iio_ev_type_text[] = {
	[IIO_EV_TYPE_CHANGE] = "change",
	[IIO_EV_TYPE_MAG_REFERENCED] = "mag_referenced",
	[IIO_EV_TYPE_GESTURE] = "gesture",
	[IIO_EV_TYPE_FAULT] = "fault",
};

static const char * const iio_ev_dir_text[] = {
@@ -240,6 +241,7 @@ static const char * const iio_ev_dir_text[] = {
	[IIO_EV_DIR_FALLING] = "falling",
	[IIO_EV_DIR_SINGLETAP] = "singletap",
	[IIO_EV_DIR_DOUBLETAP] = "doubletap",
	[IIO_EV_DIR_FAULT_OPENWIRE] = "openwire",
};

static const char * const iio_ev_info_text[] = {
+2 −0
Original line number Diff line number Diff line
@@ -119,6 +119,7 @@ enum iio_event_type {
	IIO_EV_TYPE_CHANGE,
	IIO_EV_TYPE_MAG_REFERENCED,
	IIO_EV_TYPE_GESTURE,
	IIO_EV_TYPE_FAULT,
};

enum iio_event_direction {
@@ -128,6 +129,7 @@ enum iio_event_direction {
	IIO_EV_DIR_NONE,
	IIO_EV_DIR_SINGLETAP,
	IIO_EV_DIR_DOUBLETAP,
	IIO_EV_DIR_FAULT_OPENWIRE,
};

#endif /* _UAPI_IIO_TYPES_H_ */
+4 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ static const char * const iio_ev_type_text[] = {
	[IIO_EV_TYPE_CHANGE] = "change",
	[IIO_EV_TYPE_MAG_REFERENCED] = "mag_referenced",
	[IIO_EV_TYPE_GESTURE] = "gesture",
	[IIO_EV_TYPE_FAULT] = "fault",
};

static const char * const iio_ev_dir_text[] = {
@@ -83,6 +84,7 @@ static const char * const iio_ev_dir_text[] = {
	[IIO_EV_DIR_FALLING] = "falling",
	[IIO_EV_DIR_SINGLETAP] = "singletap",
	[IIO_EV_DIR_DOUBLETAP] = "doubletap",
	[IIO_EV_DIR_FAULT_OPENWIRE] = "openwire",
};

static const char * const iio_modifier_names[] = {
@@ -249,6 +251,7 @@ static bool event_is_known(struct iio_event_data *event)
	case IIO_EV_TYPE_MAG_ADAPTIVE:
	case IIO_EV_TYPE_CHANGE:
	case IIO_EV_TYPE_GESTURE:
	case IIO_EV_TYPE_FAULT:
		break;
	default:
		return false;
@@ -260,6 +263,7 @@ static bool event_is_known(struct iio_event_data *event)
	case IIO_EV_DIR_FALLING:
	case IIO_EV_DIR_SINGLETAP:
	case IIO_EV_DIR_DOUBLETAP:
	case IIO_EV_DIR_FAULT_OPENWIRE:
	case IIO_EV_DIR_NONE:
		break;
	default: