/openbmc/linux/drivers/media/cec/platform/cec-gpio/ |
H A D | cec-gpio.c | 36 struct cec_gpio *cec = cec_get_drvdata(adap); in cec_gpio_read() local 38 if (cec->cec_is_low) in cec_gpio_read() 40 return gpiod_get_value(cec->cec_gpio); in cec_gpio_read() 45 struct cec_gpio *cec = cec_get_drvdata(adap); in cec_gpio_high() local 47 if (!cec->cec_is_low) in cec_gpio_high() 49 cec->cec_is_low = false; in cec_gpio_high() 50 gpiod_set_value(cec->cec_gpio, 1); in cec_gpio_high() 55 struct cec_gpio *cec = cec_get_drvdata(adap); in cec_gpio_low() local 57 if (cec->cec_is_low) in cec_gpio_low() 59 cec->cec_is_low = true; in cec_gpio_low() [all …]
|
/openbmc/linux/drivers/gpu/drm/bridge/synopsys/ |
H A D | dw-hdmi-cec.c | 71 static void dw_hdmi_write(struct dw_hdmi_cec *cec, u8 val, int offset) in dw_hdmi_write() argument 73 cec->ops->write(cec->hdmi, val, offset); in dw_hdmi_write() 76 static u8 dw_hdmi_read(struct dw_hdmi_cec *cec, int offset) in dw_hdmi_read() argument 78 return cec->ops->read(cec->hdmi, offset); in dw_hdmi_read() 83 struct dw_hdmi_cec *cec = cec_get_drvdata(adap); in dw_hdmi_cec_log_addr() local 86 cec->addresses = 0; in dw_hdmi_cec_log_addr() 88 cec->addresses |= BIT(logical_addr) | BIT(15); in dw_hdmi_cec_log_addr() 90 dw_hdmi_write(cec, cec->addresses & 255, HDMI_CEC_ADDR_L); in dw_hdmi_cec_log_addr() 91 dw_hdmi_write(cec, cec->addresses >> 8, HDMI_CEC_ADDR_H); in dw_hdmi_cec_log_addr() 99 struct dw_hdmi_cec *cec = cec_get_drvdata(adap); in dw_hdmi_cec_transmit() local [all …]
|
/openbmc/linux/drivers/media/cec/platform/s5p/ |
H A D | s5p_cec.c | 39 struct s5p_cec_dev *cec = cec_get_drvdata(adap); in s5p_cec_adap_enable() local 42 ret = pm_runtime_resume_and_get(cec->dev); in s5p_cec_adap_enable() 46 s5p_cec_reset(cec); in s5p_cec_adap_enable() 48 s5p_cec_set_divider(cec); in s5p_cec_adap_enable() 49 s5p_cec_threshold(cec); in s5p_cec_adap_enable() 51 s5p_cec_unmask_tx_interrupts(cec); in s5p_cec_adap_enable() 52 s5p_cec_unmask_rx_interrupts(cec); in s5p_cec_adap_enable() 53 s5p_cec_enable_rx(cec); in s5p_cec_adap_enable() 55 s5p_cec_mask_tx_interrupts(cec); in s5p_cec_adap_enable() 56 s5p_cec_mask_rx_interrupts(cec); in s5p_cec_adap_enable() [all …]
|
H A D | exynos_hdmi_cecctrl.c | 23 void s5p_cec_set_divider(struct s5p_cec_dev *cec) in s5p_cec_set_divider() argument 30 if (regmap_read(cec->pmu, EXYNOS_HDMI_PHY_CONTROL, ®)) { in s5p_cec_set_divider() 31 dev_err(cec->dev, "failed to read phy control\n"); in s5p_cec_set_divider() 37 if (regmap_write(cec->pmu, EXYNOS_HDMI_PHY_CONTROL, reg)) { in s5p_cec_set_divider() 38 dev_err(cec->dev, "failed to write phy control\n"); in s5p_cec_set_divider() 44 writeb(0x0, cec->reg + S5P_CEC_DIVISOR_3); in s5p_cec_set_divider() 45 writeb(0x0, cec->reg + S5P_CEC_DIVISOR_2); in s5p_cec_set_divider() 46 writeb(0x0, cec->reg + S5P_CEC_DIVISOR_1); in s5p_cec_set_divider() 47 writeb(div_val, cec->reg + S5P_CEC_DIVISOR_0); in s5p_cec_set_divider() 50 void s5p_cec_enable_rx(struct s5p_cec_dev *cec) in s5p_cec_enable_rx() argument [all …]
|
H A D | exynos_hdmi_cec.h | 16 void s5p_cec_set_divider(struct s5p_cec_dev *cec); 17 void s5p_cec_enable_rx(struct s5p_cec_dev *cec); 18 void s5p_cec_mask_rx_interrupts(struct s5p_cec_dev *cec); 19 void s5p_cec_unmask_rx_interrupts(struct s5p_cec_dev *cec); 20 void s5p_cec_mask_tx_interrupts(struct s5p_cec_dev *cec); 21 void s5p_cec_unmask_tx_interrupts(struct s5p_cec_dev *cec); 22 void s5p_cec_reset(struct s5p_cec_dev *cec); 23 void s5p_cec_tx_reset(struct s5p_cec_dev *cec); 24 void s5p_cec_rx_reset(struct s5p_cec_dev *cec); 25 void s5p_cec_threshold(struct s5p_cec_dev *cec); [all …]
|
H A D | Makefile | 2 obj-$(CONFIG_CEC_SAMSUNG_S5P) += s5p-cec.o 3 s5p-cec-y += s5p_cec.o exynos_hdmi_cecctrl.o
|
/openbmc/linux/drivers/media/cec/platform/tegra/ |
H A D | tegra_cec.c | 52 static inline u32 cec_read(struct tegra_cec *cec, u32 reg) in cec_read() argument 54 return readl(cec->cec_base + reg); in cec_read() 57 static inline void cec_write(struct tegra_cec *cec, u32 reg, u32 val) in cec_write() argument 59 writel(val, cec->cec_base + reg); in cec_write() 62 static void tegra_cec_error_recovery(struct tegra_cec *cec) in tegra_cec_error_recovery() argument 66 hw_ctrl = cec_read(cec, TEGRA_CEC_HW_CONTROL); in tegra_cec_error_recovery() 67 cec_write(cec, TEGRA_CEC_HW_CONTROL, 0); in tegra_cec_error_recovery() 68 cec_write(cec, TEGRA_CEC_INT_STAT, 0xffffffff); in tegra_cec_error_recovery() 69 cec_write(cec, TEGRA_CEC_HW_CONTROL, hw_ctrl); in tegra_cec_error_recovery() 75 struct tegra_cec *cec = dev_get_drvdata(dev); in tegra_cec_irq_thread_handler() local [all …]
|
/openbmc/linux/drivers/media/cec/platform/stm32/ |
H A D | stm32-cec.c | 79 static void cec_hw_init(struct stm32_cec *cec) in cec_hw_init() argument 81 regmap_update_bits(cec->regmap, CEC_CR, TXEOM | TXSOM | CECEN, 0); in cec_hw_init() 83 regmap_update_bits(cec->regmap, CEC_IER, ALL_TX_IT | ALL_RX_IT, in cec_hw_init() 86 regmap_update_bits(cec->regmap, CEC_CFGR, FULL_CFG, FULL_CFG); in cec_hw_init() 89 static void stm32_tx_done(struct stm32_cec *cec, u32 status) in stm32_tx_done() argument 92 cec_transmit_done(cec->adap, CEC_TX_STATUS_ERROR, in stm32_tx_done() 98 cec_transmit_done(cec->adap, CEC_TX_STATUS_ARB_LOST, in stm32_tx_done() 104 cec_transmit_done(cec->adap, CEC_TX_STATUS_NACK, in stm32_tx_done() 109 if (cec->irq_status & TXBR) { in stm32_tx_done() 111 if (cec->tx_cnt < cec->tx_msg.len) in stm32_tx_done() [all …]
|
/openbmc/linux/drivers/gpu/drm/mediatek/ |
H A D | mtk_cec.c | 62 static void mtk_cec_clear_bits(struct mtk_cec *cec, unsigned int offset, in mtk_cec_clear_bits() argument 65 void __iomem *reg = cec->regs + offset; in mtk_cec_clear_bits() 73 static void mtk_cec_set_bits(struct mtk_cec *cec, unsigned int offset, in mtk_cec_set_bits() argument 76 void __iomem *reg = cec->regs + offset; in mtk_cec_set_bits() 84 static void mtk_cec_mask(struct mtk_cec *cec, unsigned int offset, in mtk_cec_mask() argument 87 u32 tmp = readl(cec->regs + offset) & ~mask; in mtk_cec_mask() 90 writel(tmp, cec->regs + offset); in mtk_cec_mask() 97 struct mtk_cec *cec = dev_get_drvdata(dev); in mtk_cec_set_hpd_event() local 100 spin_lock_irqsave(&cec->lock, flags); in mtk_cec_set_hpd_event() 101 cec->hdmi_dev = hdmi_dev; in mtk_cec_set_hpd_event() [all …]
|
/openbmc/linux/drivers/media/cec/platform/sti/ |
H A D | stih-cec.c | 134 struct stih_cec *cec = cec_get_drvdata(adap); in stih_cec_adap_enable() local 138 unsigned long clk_freq = clk_get_rate(cec->clk); in stih_cec_adap_enable() 141 writel(cec_clk_div, cec->regs + CEC_CLK_DIV); in stih_cec_adap_enable() 145 cec->regs + CEC_BIT_TOUT_THRESH); in stih_cec_adap_enable() 149 cec->regs + CEC_BIT_PULSE_THRESH); in stih_cec_adap_enable() 152 writel(BIT(5) | BIT(7), cec->regs + CEC_TX_CTRL); in stih_cec_adap_enable() 156 cec->regs + CEC_DATA_ARRAY_CTRL); in stih_cec_adap_enable() 160 cec->regs + CEC_CTRL); in stih_cec_adap_enable() 163 writel(0, cec->regs + CEC_ADDR_TABLE); in stih_cec_adap_enable() 166 writel(0x0, cec->regs + CEC_STATUS); in stih_cec_adap_enable() [all …]
|
/openbmc/linux/drivers/gpu/drm/display/ |
H A D | drm_dp_cec.c | 191 struct cec_adapter *adap = aux->cec.adap; in drm_dp_cec_received() 214 struct cec_adapter *adap = aux->cec.adap; in drm_dp_cec_handle_irq() 251 mutex_lock(&aux->cec.lock); in drm_dp_cec_irq() 252 if (!aux->cec.adap) in drm_dp_cec_irq() 263 mutex_unlock(&aux->cec.lock); in drm_dp_cec_irq() 286 cec.unregister_work.work); in drm_dp_cec_unregister_work() 288 mutex_lock(&aux->cec.lock); in drm_dp_cec_unregister_work() 289 cec_unregister_adapter(aux->cec.adap); in drm_dp_cec_unregister_work() 290 aux->cec.adap = NULL; in drm_dp_cec_unregister_work() 291 mutex_unlock(&aux->cec.lock); in drm_dp_cec_unregister_work() [all …]
|
/openbmc/linux/drivers/media/cec/core/ |
H A D | Makefile | 2 cec-objs := cec-core.o cec-adap.o cec-api.o 5 cec-objs += cec-notifier.o 9 cec-objs += cec-pin.o 13 cec-objs += cec-pin-error-inj.o 16 obj-$(CONFIG_CEC_CORE) += cec.o
|
/openbmc/linux/Documentation/userspace-api/media/cec/ |
H A D | cec-funcs.rst | 13 cec-func-open 14 cec-func-close 15 cec-func-ioctl 16 cec-func-poll 17 cec-ioc-adap-g-caps 18 cec-ioc-adap-g-log-addrs 19 cec-ioc-adap-g-phys-addr 20 cec-ioc-adap-g-conn-info 21 cec-ioc-dqevent 22 cec-ioc-g-mode [all …]
|
H A D | cec-func-ioctl.rst | 7 cec ioctl() 13 cec-ioctl - Control a cec device 31 CEC ioctl request code as defined in the cec.h header file, for 40 The :c:func:`ioctl()` function manipulates cec device parameters. The 43 The ioctl ``request`` code specifies the cec function to be called. It 47 Macros and structures definitions specifying cec ioctl requests and 48 their parameters are located in the cec.h header file. All cec ioctl 50 :ref:`cec-user-func`.
|
H A D | cec-api.rst | 23 cec-intro 24 cec-funcs 25 cec-pin-error-inj 26 cec-header
|
H A D | cec-func-close.rst | 7 cec close() 13 cec-close - Close a cec device 33 Closes the cec device. Resources associated with the file descriptor are
|
H A D | cec-func-open.rst | 7 cec open() 13 cec-open - Open a cec device 46 To open a cec device applications call :c:func:`open()` with the
|
/openbmc/linux/drivers/media/cec/platform/seco/ |
H A D | seco-cec.c | 94 struct secocec_data *cec = cec_get_drvdata(adap); in secocec_adap_enable() local 95 struct device *dev = cec->dev; in secocec_adap_enable() 243 struct secocec_data *cec = cec_get_drvdata(adap); in secocec_rx_done() local 244 struct device *dev = cec->dev; in secocec_rx_done() 306 cec_received_msg(cec->cec_adap, &msg); in secocec_rx_done() 336 struct secocec_data *cec = priv; in secocec_ir_probe() local 337 struct device *dev = cec->dev; in secocec_ir_probe() 342 cec->ir = devm_rc_allocate_device(dev, RC_DRIVER_SCANCODE); in secocec_ir_probe() 343 if (!cec->ir) in secocec_ir_probe() 346 snprintf(cec->ir_input_phys, sizeof(cec->ir_input_phys), in secocec_ir_probe() [all …]
|
/openbmc/linux/Documentation/admin-guide/media/ |
H A D | cec.rst | 20 - amlogic (meson ao-cec and ao-cec-g12a) 41 - Pulse-Eight: the pulse8-cec driver implements the following module option: 54 - cec-gpio. If the CEC pin is hooked up to a GPIO pin then 58 - cec-gpio and Allwinner A10 (or any other driver that uses the CEC pin 73 ``utils/cec-ctl``: control a CEC device 75 ``utils/cec-compliance``: test compliance of a remote CEC device 77 ``utils/cec-follower``: emulate a CEC follower device 79 Note that ``cec-ctl`` has support for the CEC Hospitality Profile as is 107 cec-ctl --playback # Configure the PC as a CEC Playback device 108 cec-ctl -S # Show the CEC topology [all …]
|
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-extended/libcec/libcec/ |
H A D | 0001-CheckPlatformSupport.cmake-Do-not-hardcode-lib-path.patch | 22 … DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/${PYTHON_LIB_INSTALL_PATH}/cec) 23 …N ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/${PYTHON_LIB_INSTALL_PATH}/cec) 24 install(FILES ${CMAKE_BINARY_DIR}/src/libcec/cec.py 28 - DESTINATION lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/cec) 29 + DESTINATION ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}/cec) 34 install(FILES ${CMAKE_BINARY_DIR}/src/libcec/cec.py
|
/openbmc/linux/drivers/media/cec/i2c/ |
H A D | ch7322.c | 153 struct cec_adapter *cec; member 267 cec_transmit_attempt_done(ch7322->cec, status); in ch7322_tx_done() 282 cec_received_msg(ch7322->cec, &msg); in ch7322_rx_done() 303 cec_s_phys_addr(ch7322->cec, pal | (pah << 8), false); in ch7322_phys_addr() 317 cec_phys_addr_invalidate(ch7322->cec); in ch7322_irq() 496 ch7322->cec = cec_allocate_adapter(&ch7322_cec_adap_ops, ch7322, in ch7322_probe() 500 if (IS_ERR(ch7322->cec)) { in ch7322_probe() 501 ret = PTR_ERR(ch7322->cec); in ch7322_probe() 505 ch7322->cec->adap_controls_phys_addr = true; in ch7322_probe() 510 ch7322->cec); in ch7322_probe() [all …]
|
/openbmc/linux/drivers/gpu/drm/tegra/ |
H A D | output.c | 41 cec_notifier_set_phys_addr_from_edid(output->cec, edid); in tegra_output_connector_get_modes() 71 cec_notifier_phys_addr_invalidate(output->cec); in tegra_output_connector_detect() 80 if (output->cec) in tegra_output_connector_destroy() 81 cec_notifier_conn_unregister(output->cec); in tegra_output_connector_destroy() 221 output->cec = cec_notifier_conn_register(output->dev, NULL, in tegra_output_init() 223 if (!output->cec) in tegra_output_init()
|
/openbmc/linux/Documentation/userspace-api/media/ |
H A D | Makefile | 11 videodev2.h.rst media.h.rst cec.h.rst lirc.h.rst 42 $(BUILDDIR)/cec.h.rst: ${UAPI}/cec.h ${PARSER} $(SRC_DIR)/cec.h.rst.exceptions
|
/openbmc/linux/drivers/media/rc/keymaps/ |
H A D | rc-cec.c | 26 static struct rc_map_table cec[] = { variable 167 .scan = cec, 168 .size = ARRAY_SIZE(cec),
|
/openbmc/linux/drivers/media/cec/ |
H A D | Kconfig | 38 source "drivers/media/cec/i2c/Kconfig" 39 source "drivers/media/cec/platform/Kconfig" 40 source "drivers/media/cec/usb/Kconfig"
|