- 0x00000080
- The CEC hardware can monitor CEC pin changes from low to high voltage
and vice versa. When in pin monitoring mode the application will
- receive ``CEC_EVENT_PIN_LOW`` and ``CEC_EVENT_PIN_HIGH`` events.
+ receive ``CEC_EVENT_PIN_CEC_LOW`` and ``CEC_EVENT_PIN_CEC_HIGH`` events.
- 2
- Generated if one or more CEC messages were lost because the
application didn't dequeue CEC messages fast enough.
- * .. _`CEC-EVENT-PIN-LOW`:
+ * .. _`CEC-EVENT-PIN-CEC-LOW`:
- - ``CEC_EVENT_PIN_LOW``
+ - ``CEC_EVENT_PIN_CEC_LOW``
- 3
- Generated if the CEC pin goes from a high voltage to a low voltage.
Only applies to adapters that have the ``CEC_CAP_MONITOR_PIN``
capability set.
- * .. _`CEC-EVENT-PIN-HIGH`:
+ * .. _`CEC-EVENT-PIN-CEC-HIGH`:
- - ``CEC_EVENT_PIN_HIGH``
+ - ``CEC_EVENT_PIN_CEC_HIGH``
- 4
- Generated if the CEC pin goes from a low voltage to a high voltage.
Only applies to adapters that have the ``CEC_CAP_MONITOR_PIN``
This mode requires that the :ref:`CEC_CAP_MONITOR_PIN <CEC-CAP-MONITOR-PIN>`
capability is set, otherwise the ``EINVAL`` error code is returned.
While in pin monitoring mode this file descriptor can receive the
- ``CEC_EVENT_PIN_LOW`` and ``CEC_EVENT_PIN_HIGH`` events to see the
+ ``CEC_EVENT_PIN_CEC_LOW`` and ``CEC_EVENT_PIN_CEC_HIGH`` events to see the
low-level CEC pin transitions. This is very useful for debugging.
This mode is only allowed if the process has the ``CAP_NET_ADMIN``
capability. If that is not set, then the ``EPERM`` error code is returned.
}
/* Notify userspace that the CEC pin changed state at the given time. */
-void cec_queue_pin_event(struct cec_adapter *adap, bool is_high, ktime_t ts)
+void cec_queue_pin_cec_event(struct cec_adapter *adap, bool is_high, ktime_t ts)
{
struct cec_event ev = {
- .event = is_high ? CEC_EVENT_PIN_HIGH : CEC_EVENT_PIN_LOW,
+ .event = is_high ? CEC_EVENT_PIN_CEC_HIGH :
+ CEC_EVENT_PIN_CEC_LOW,
};
struct cec_fh *fh;
cec_queue_event_fh(fh, &ev, ktime_to_ns(ts));
mutex_unlock(&adap->devnode.lock);
}
-EXPORT_SYMBOL_GPL(cec_queue_pin_event);
+EXPORT_SYMBOL_GPL(cec_queue_pin_cec_event);
/*
* Queue a new message for this filehandle.
.flags = CEC_EVENT_FL_INITIAL_STATE,
};
- ev.event = adap->pin->cur_value ? CEC_EVENT_PIN_HIGH :
- CEC_EVENT_PIN_LOW;
+ ev.event = adap->pin->cur_value ? CEC_EVENT_PIN_CEC_HIGH :
+ CEC_EVENT_PIN_CEC_LOW;
cec_queue_event_fh(fh, &ev, 0);
#endif
adap->monitor_pin_cnt++;
while (atomic_read(&pin->work_pin_events)) {
unsigned int idx = pin->work_pin_events_rd;
- cec_queue_pin_event(adap, pin->work_pin_is_high[idx],
- pin->work_pin_ts[idx]);
+ cec_queue_pin_cec_event(adap,
+ pin->work_pin_is_high[idx],
+ pin->work_pin_ts[idx]);
pin->work_pin_events_rd = (idx + 1) % CEC_NUM_PIN_EVENTS;
atomic_dec(&pin->work_pin_events);
}
};
#define CEC_NUM_CORE_EVENTS 2
-#define CEC_NUM_EVENTS CEC_EVENT_PIN_HIGH
+#define CEC_NUM_EVENTS CEC_EVENT_PIN_CEC_HIGH
struct cec_fh {
struct list_head list;
}
/**
- * cec_queue_pin_event() - queue a pin event with a given timestamp.
+ * cec_queue_pin_cec_event() - queue a CEC pin event with a given timestamp.
*
* @adap: pointer to the cec adapter
- * @is_high: when true the pin is high, otherwise it is low
+ * @is_high: when true the CEC pin is high, otherwise it is low
* @ts: the timestamp for this event
*
*/
-void cec_queue_pin_event(struct cec_adapter *adap, bool is_high, ktime_t ts);
+void cec_queue_pin_cec_event(struct cec_adapter *adap,
+ bool is_high, ktime_t ts);
/**
* cec_get_edid_phys_addr() - find and return the physical address
* didn't empty the message queue in time
*/
#define CEC_EVENT_LOST_MSGS 2
-#define CEC_EVENT_PIN_LOW 3
-#define CEC_EVENT_PIN_HIGH 4
+#define CEC_EVENT_PIN_CEC_LOW 3
+#define CEC_EVENT_PIN_CEC_HIGH 4
#define CEC_EVENT_FL_INITIAL_STATE (1 << 0)
#define CEC_EVENT_FL_DROPPED_EVENTS (1 << 1)