| /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 …]
|
| H A D | dw-hdmi-qp.c | 157 struct dw_hdmi_qp_cec *cec; member 1046 struct dw_hdmi_qp_cec *cec = hdmi->cec; in dw_hdmi_qp_cec_hardirq() local 1057 cec->tx_status = CEC_TX_STATUS_ERROR; in dw_hdmi_qp_cec_hardirq() 1058 cec->tx_done = true; in dw_hdmi_qp_cec_hardirq() 1061 cec->tx_status = CEC_TX_STATUS_OK; in dw_hdmi_qp_cec_hardirq() 1062 cec->tx_done = true; in dw_hdmi_qp_cec_hardirq() 1065 cec->tx_status = CEC_TX_STATUS_NACK; in dw_hdmi_qp_cec_hardirq() 1066 cec->tx_done = true; in dw_hdmi_qp_cec_hardirq() 1076 if (len > sizeof(cec->rx_msg.msg)) in dw_hdmi_qp_cec_hardirq() 1077 len = sizeof(cec->rx_msg.msg); in dw_hdmi_qp_cec_hardirq() [all …]
|
| /linux/drivers/media/platform/synopsys/hdmirx/ |
| H A D | snps_hdmirx_cec.c | 20 static void hdmirx_cec_write(struct hdmirx_cec *cec, int reg, u32 val) in hdmirx_cec_write() argument 22 cec->ops->write(cec->hdmirx, reg, val); in hdmirx_cec_write() 25 static u32 hdmirx_cec_read(struct hdmirx_cec *cec, int reg) in hdmirx_cec_read() argument 27 return cec->ops->read(cec->hdmirx, reg); in hdmirx_cec_read() 30 static void hdmirx_cec_update_bits(struct hdmirx_cec *cec, int reg, u32 mask, in hdmirx_cec_update_bits() argument 33 u32 val = hdmirx_cec_read(cec, reg) & ~mask; in hdmirx_cec_update_bits() 36 hdmirx_cec_write(cec, reg, val); in hdmirx_cec_update_bits() 41 struct hdmirx_cec *cec = cec_get_drvdata(adap); in hdmirx_cec_log_addr() local 44 cec->addresses = 0; in hdmirx_cec_log_addr() 46 cec->addresses |= BIT(logical_addr) | BIT(15); in hdmirx_cec_log_addr() [all …]
|
| /linux/drivers/media/cec/platform/cec-gpio/ |
| H A D | cec-gpio.c | 37 struct cec_gpio *cec = cec_get_drvdata(adap); in cec_gpio_read() local 39 if (cec->cec_is_low) in cec_gpio_read() 41 return gpiod_get_value(cec->cec_gpio); in cec_gpio_read() 46 struct cec_gpio *cec = cec_get_drvdata(adap); in cec_gpio_high() local 48 if (!cec->cec_is_low) in cec_gpio_high() 50 cec->cec_is_low = false; in cec_gpio_high() 51 gpiod_set_value(cec->cec_gpio, 1); in cec_gpio_high() 56 struct cec_gpio *cec = cec_get_drvdata(adap); in cec_gpio_low() local 58 if (cec->cec_is_low) in cec_gpio_low() 60 cec->cec_is_low = true; in cec_gpio_low() [all …]
|
| /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 …]
|
| /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 …]
|
| /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 …]
|
| /linux/drivers/gpu/drm/mediatek/ |
| H A D | mtk_cec.c | 61 static void mtk_cec_clear_bits(struct mtk_cec *cec, unsigned int offset, in mtk_cec_clear_bits() argument 64 void __iomem *reg = cec->regs + offset; in mtk_cec_clear_bits() 72 static void mtk_cec_set_bits(struct mtk_cec *cec, unsigned int offset, in mtk_cec_set_bits() argument 75 void __iomem *reg = cec->regs + offset; in mtk_cec_set_bits() 83 static void mtk_cec_mask(struct mtk_cec *cec, unsigned int offset, in mtk_cec_mask() argument 86 u32 tmp = readl(cec->regs + offset) & ~mask; in mtk_cec_mask() 89 writel(tmp, cec->regs + offset); in mtk_cec_mask() 96 struct mtk_cec *cec = dev_get_drvdata(dev); in mtk_cec_set_hpd_event() local 99 spin_lock_irqsave(&cec->lock, flags); in mtk_cec_set_hpd_event() 100 cec->hdmi_dev = hdmi_dev; in mtk_cec_set_hpd_event() [all …]
|
| /linux/drivers/media/cec/platform/sti/ |
| H A D | stih-cec.c | 135 struct stih_cec *cec = cec_get_drvdata(adap); in stih_cec_adap_enable() local 139 unsigned long clk_freq = clk_get_rate(cec->clk); in stih_cec_adap_enable() 142 writel(cec_clk_div, cec->regs + CEC_CLK_DIV); in stih_cec_adap_enable() 146 cec->regs + CEC_BIT_TOUT_THRESH); in stih_cec_adap_enable() 150 cec->regs + CEC_BIT_PULSE_THRESH); in stih_cec_adap_enable() 153 writel(BIT(5) | BIT(7), cec->regs + CEC_TX_CTRL); in stih_cec_adap_enable() 157 cec->regs + CEC_DATA_ARRAY_CTRL); in stih_cec_adap_enable() 161 cec->regs + CEC_CTRL); in stih_cec_adap_enable() 164 writel(0, cec->regs + CEC_ADDR_TABLE); in stih_cec_adap_enable() 167 writel(0x0, cec->regs + CEC_STATUS); in stih_cec_adap_enable() [all …]
|
| /linux/drivers/gpu/drm/display/ |
| H A D | drm_dp_cec.c | 192 struct cec_adapter *adap = aux->cec.adap; in drm_dp_cec_received() 215 struct cec_adapter *adap = aux->cec.adap; in drm_dp_cec_handle_irq() 252 mutex_lock(&aux->cec.lock); in drm_dp_cec_irq() 253 if (!aux->cec.adap) in drm_dp_cec_irq() 264 mutex_unlock(&aux->cec.lock); in drm_dp_cec_irq() 287 cec.unregister_work.work); in drm_dp_cec_unregister_work() 289 mutex_lock(&aux->cec.lock); in drm_dp_cec_unregister_work() 290 cec_unregister_adapter(aux->cec.adap); in drm_dp_cec_unregister_work() 291 aux->cec.adap = NULL; in drm_dp_cec_unregister_work() 292 mutex_unlock(&aux->cec.lock); in drm_dp_cec_unregister_work() [all …]
|
| H A D | drm_hdmi_cec_helper.c | 24 struct drm_connector_hdmi_cec_data *data = connector->cec.data; in drm_connector_hdmi_cec_adap_enable() 32 struct drm_connector_hdmi_cec_data *data = connector->cec.data; in drm_connector_hdmi_cec_adap_log_addr() 41 struct drm_connector_hdmi_cec_data *data = connector->cec.data; in drm_connector_hdmi_cec_adap_transmit() 54 struct drm_connector_hdmi_cec_data *data = connector->cec.data; in drm_connector_hdmi_cec_adapter_phys_addr_invalidate() 62 struct drm_connector_hdmi_cec_data *data = connector->cec.data; in drm_connector_hdmi_cec_adapter_phys_addr_set() 70 struct drm_connector_hdmi_cec_data *data = connector->cec.data; in drm_connector_hdmi_cec_adapter_unregister() 78 connector->cec.data = NULL; in drm_connector_hdmi_cec_adapter_unregister() 118 mutex_lock(&connector->cec.mutex); in drmm_connector_hdmi_cec_register() 120 connector->cec.data = data; in drmm_connector_hdmi_cec_register() 121 connector->cec.funcs = &drm_connector_hdmi_cec_adapter_funcs; in drmm_connector_hdmi_cec_register() [all …]
|
| H A D | drm_hdmi_cec_notifier_helper.c | 19 cec_notifier_phys_addr_invalidate(connector->cec.data); in drm_connector_hdmi_cec_notifier_phys_addr_invalidate() 25 cec_notifier_set_phys_addr(connector->cec.data, addr); in drm_connector_hdmi_cec_notifier_phys_addr_set() 32 cec_notifier_conn_unregister(connector->cec.data); in drm_connector_hdmi_cec_notifier_unregister() 33 connector->cec.data = NULL; in drm_connector_hdmi_cec_notifier_unregister() 54 mutex_lock(&connector->cec.mutex); in drmm_connector_hdmi_cec_notifier_register() 56 connector->cec.data = notifier; in drmm_connector_hdmi_cec_notifier_register() 57 connector->cec.funcs = &drm_connector_cec_notifier_funcs; in drmm_connector_hdmi_cec_notifier_register() 59 mutex_unlock(&connector->cec.mutex); in drmm_connector_hdmi_cec_notifier_register()
|
| /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
|
| /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 | 18 cec-intro 19 cec-funcs 20 cec-pin-error-inj 21 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
|
| /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 …]
|
| /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: 58 - cec-gpio. If the CEC pin is hooked up to a GPIO pin then 62 - cec-gpio and Allwinner A10 (or any other driver that uses the CEC pin 77 ``utils/cec-ctl``: control a CEC device 79 ``utils/cec-compliance``: test compliance of a remote CEC device 81 ``utils/cec-follower``: emulate a CEC follower device 83 Note that ``cec-ctl`` has support for the CEC Hospitality Profile as is 111 cec-ctl --playback # Configure the PC as a CEC Playback device 112 cec-ctl -S # Show the CEC topology [all …]
|
| /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 …]
|
| /linux/drivers/media/cec/usb/extron-da-hd-4k-plus/ |
| H A D | Makefile | 1 extron-da-hd-4k-plus-cec-objs := extron-da-hd-4k-plus.o cec-splitter.o 2 obj-$(CONFIG_USB_EXTRON_DA_HD_4K_PLUS_CEC) := extron-da-hd-4k-plus-cec.o
|
| /linux/drivers/gpu/drm/tegra/ |
| H A D | output.c | 43 cec_notifier_set_phys_addr(output->cec, 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() 227 output->cec = cec_notifier_conn_register(output->dev, NULL, in tegra_output_init() 229 if (!output->cec) in tegra_output_init()
|
| /linux/drivers/media/cec/usb/ |
| H A D | Kconfig | 6 source "drivers/media/cec/usb/extron-da-hd-4k-plus/Kconfig" 7 source "drivers/media/cec/usb/pulse8/Kconfig" 8 source "drivers/media/cec/usb/rainshadow/Kconfig"
|