Home
last modified time | relevance | path

Searched refs:cec (Results 1 – 25 of 130) sorted by relevance

123456

/Linux-v4.19/drivers/media/platform/cec-gpio/
Dcec-gpio.c35 struct cec_gpio *cec = cec_get_drvdata(adap); in cec_gpio_read() local
37 if (cec->cec_is_low) in cec_gpio_read()
39 return gpiod_get_value(cec->cec_gpio); in cec_gpio_read()
44 struct cec_gpio *cec = cec_get_drvdata(adap); in cec_gpio_high() local
46 if (!cec->cec_is_low) in cec_gpio_high()
48 cec->cec_is_low = false; in cec_gpio_high()
49 gpiod_set_value(cec->cec_gpio, 1); in cec_gpio_high()
54 struct cec_gpio *cec = cec_get_drvdata(adap); in cec_gpio_low() local
56 if (cec->cec_is_low) in cec_gpio_low()
58 if (WARN_ON_ONCE(cec->cec_have_irq)) in cec_gpio_low()
[all …]
/Linux-v4.19/drivers/media/platform/s5p-cec/
Ds5p_cec.c42 struct s5p_cec_dev *cec = cec_get_drvdata(adap); in s5p_cec_adap_enable() local
45 pm_runtime_get_sync(cec->dev); in s5p_cec_adap_enable()
47 s5p_cec_reset(cec); in s5p_cec_adap_enable()
49 s5p_cec_set_divider(cec); in s5p_cec_adap_enable()
50 s5p_cec_threshold(cec); in s5p_cec_adap_enable()
52 s5p_cec_unmask_tx_interrupts(cec); in s5p_cec_adap_enable()
53 s5p_cec_unmask_rx_interrupts(cec); in s5p_cec_adap_enable()
54 s5p_cec_enable_rx(cec); in s5p_cec_adap_enable()
56 s5p_cec_mask_tx_interrupts(cec); in s5p_cec_adap_enable()
57 s5p_cec_mask_rx_interrupts(cec); in s5p_cec_adap_enable()
[all …]
Dexynos_hdmi_cecctrl.c26 void s5p_cec_set_divider(struct s5p_cec_dev *cec) in s5p_cec_set_divider() argument
33 if (regmap_read(cec->pmu, EXYNOS_HDMI_PHY_CONTROL, &reg)) { in s5p_cec_set_divider()
34 dev_err(cec->dev, "failed to read phy control\n"); in s5p_cec_set_divider()
40 if (regmap_write(cec->pmu, EXYNOS_HDMI_PHY_CONTROL, reg)) { in s5p_cec_set_divider()
41 dev_err(cec->dev, "failed to write phy control\n"); in s5p_cec_set_divider()
47 writeb(0x0, cec->reg + S5P_CEC_DIVISOR_3); in s5p_cec_set_divider()
48 writeb(0x0, cec->reg + S5P_CEC_DIVISOR_2); in s5p_cec_set_divider()
49 writeb(0x0, cec->reg + S5P_CEC_DIVISOR_1); in s5p_cec_set_divider()
50 writeb(div_val, cec->reg + S5P_CEC_DIVISOR_0); in s5p_cec_set_divider()
53 void s5p_cec_enable_rx(struct s5p_cec_dev *cec) in s5p_cec_enable_rx() argument
[all …]
Dexynos_hdmi_cec.h19 void s5p_cec_set_divider(struct s5p_cec_dev *cec);
20 void s5p_cec_enable_rx(struct s5p_cec_dev *cec);
21 void s5p_cec_mask_rx_interrupts(struct s5p_cec_dev *cec);
22 void s5p_cec_unmask_rx_interrupts(struct s5p_cec_dev *cec);
23 void s5p_cec_mask_tx_interrupts(struct s5p_cec_dev *cec);
24 void s5p_cec_unmask_tx_interrupts(struct s5p_cec_dev *cec);
25 void s5p_cec_reset(struct s5p_cec_dev *cec);
26 void s5p_cec_tx_reset(struct s5p_cec_dev *cec);
27 void s5p_cec_rx_reset(struct s5p_cec_dev *cec);
28 void s5p_cec_threshold(struct s5p_cec_dev *cec);
[all …]
/Linux-v4.19/drivers/media/platform/tegra-cec/
Dtegra_cec.c63 static inline u32 cec_read(struct tegra_cec *cec, u32 reg) in cec_read() argument
65 return readl(cec->cec_base + reg); in cec_read()
68 static inline void cec_write(struct tegra_cec *cec, u32 reg, u32 val) in cec_write() argument
70 writel(val, cec->cec_base + reg); in cec_write()
73 static void tegra_cec_error_recovery(struct tegra_cec *cec) in tegra_cec_error_recovery() argument
77 hw_ctrl = cec_read(cec, TEGRA_CEC_HW_CONTROL); in tegra_cec_error_recovery()
78 cec_write(cec, TEGRA_CEC_HW_CONTROL, 0); in tegra_cec_error_recovery()
79 cec_write(cec, TEGRA_CEC_INT_STAT, 0xffffffff); in tegra_cec_error_recovery()
80 cec_write(cec, TEGRA_CEC_HW_CONTROL, hw_ctrl); in tegra_cec_error_recovery()
86 struct tegra_cec *cec = dev_get_drvdata(dev); in tegra_cec_irq_thread_handler() local
[all …]
/Linux-v4.19/drivers/gpu/drm/bridge/synopsys/
Ddw-hdmi-cec.c70 static void dw_hdmi_write(struct dw_hdmi_cec *cec, u8 val, int offset) in dw_hdmi_write() argument
72 cec->ops->write(cec->hdmi, val, offset); in dw_hdmi_write()
75 static u8 dw_hdmi_read(struct dw_hdmi_cec *cec, int offset) in dw_hdmi_read() argument
77 return cec->ops->read(cec->hdmi, offset); in dw_hdmi_read()
82 struct dw_hdmi_cec *cec = cec_get_drvdata(adap); in dw_hdmi_cec_log_addr() local
85 cec->addresses = 0; in dw_hdmi_cec_log_addr()
87 cec->addresses |= BIT(logical_addr) | BIT(15); in dw_hdmi_cec_log_addr()
89 dw_hdmi_write(cec, cec->addresses & 255, HDMI_CEC_ADDR_L); in dw_hdmi_cec_log_addr()
90 dw_hdmi_write(cec, cec->addresses >> 8, HDMI_CEC_ADDR_H); in dw_hdmi_cec_log_addr()
98 struct dw_hdmi_cec *cec = cec_get_drvdata(adap); in dw_hdmi_cec_transmit() local
[all …]
/Linux-v4.19/drivers/media/platform/stm32/
Dstm32-cec.c73 static void cec_hw_init(struct stm32_cec *cec) in cec_hw_init() argument
75 regmap_update_bits(cec->regmap, CEC_CR, TXEOM | TXSOM | CECEN, 0); in cec_hw_init()
77 regmap_update_bits(cec->regmap, CEC_IER, ALL_TX_IT | ALL_RX_IT, in cec_hw_init()
80 regmap_update_bits(cec->regmap, CEC_CFGR, FULL_CFG, FULL_CFG); in cec_hw_init()
83 static void stm32_tx_done(struct stm32_cec *cec, u32 status) in stm32_tx_done() argument
86 cec_transmit_done(cec->adap, CEC_TX_STATUS_ERROR, in stm32_tx_done()
92 cec_transmit_done(cec->adap, CEC_TX_STATUS_ARB_LOST, in stm32_tx_done()
98 cec_transmit_done(cec->adap, CEC_TX_STATUS_NACK, in stm32_tx_done()
103 if (cec->irq_status & TXBR) { in stm32_tx_done()
105 if (cec->tx_cnt < cec->tx_msg.len) in stm32_tx_done()
[all …]
/Linux-v4.19/drivers/gpu/drm/mediatek/
Dmtk_cec.c67 static void mtk_cec_clear_bits(struct mtk_cec *cec, unsigned int offset, in mtk_cec_clear_bits() argument
70 void __iomem *reg = cec->regs + offset; in mtk_cec_clear_bits()
78 static void mtk_cec_set_bits(struct mtk_cec *cec, unsigned int offset, in mtk_cec_set_bits() argument
81 void __iomem *reg = cec->regs + offset; in mtk_cec_set_bits()
89 static void mtk_cec_mask(struct mtk_cec *cec, unsigned int offset, in mtk_cec_mask() argument
92 u32 tmp = readl(cec->regs + offset) & ~mask; in mtk_cec_mask()
95 writel(val, cec->regs + offset); in mtk_cec_mask()
102 struct mtk_cec *cec = dev_get_drvdata(dev); in mtk_cec_set_hpd_event() local
105 spin_lock_irqsave(&cec->lock, flags); in mtk_cec_set_hpd_event()
106 cec->hdmi_dev = hdmi_dev; in mtk_cec_set_hpd_event()
[all …]
/Linux-v4.19/drivers/media/platform/sti/cec/
Dstih-cec.c134 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 …]
/Linux-v4.19/drivers/gpu/drm/
Ddrm_dp_cec.c185 struct cec_adapter *adap = aux->cec.adap; in drm_dp_cec_received()
208 struct cec_adapter *adap = aux->cec.adap; in drm_dp_cec_handle_irq()
241 mutex_lock(&aux->cec.lock); in drm_dp_cec_irq()
242 if (!aux->cec.adap) in drm_dp_cec_irq()
253 mutex_unlock(&aux->cec.lock); in drm_dp_cec_irq()
276 cec.unregister_work.work); in drm_dp_cec_unregister_work()
278 mutex_lock(&aux->cec.lock); in drm_dp_cec_unregister_work()
279 cec_unregister_adapter(aux->cec.adap); in drm_dp_cec_unregister_work()
280 aux->cec.adap = NULL; in drm_dp_cec_unregister_work()
281 mutex_unlock(&aux->cec.lock); in drm_dp_cec_unregister_work()
[all …]
/Linux-v4.19/drivers/media/cec/
DMakefile2 cec-objs := cec-core.o cec-adap.o cec-api.o cec-edid.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-v4.19/Documentation/media/uapi/cec/
Dcec-funcs.rst11 cec-func-open
12 cec-func-close
13 cec-func-ioctl
14 cec-func-poll
15 cec-ioc-adap-g-caps
16 cec-ioc-adap-g-log-addrs
17 cec-ioc-adap-g-phys-addr
18 cec-ioc-dqevent
19 cec-ioc-g-mode
20 cec-ioc-receive
Dcec-func-ioctl.rst6 cec ioctl()
12 cec-ioctl - Control a cec device
23 :name: cec-ioctl
29 File descriptor returned by :c:func:`open() <cec-open>`.
32 CEC ioctl request code as defined in the cec.h header file, for
42 The :c:func:`ioctl() <cec-ioctl>` function manipulates cec device parameters. The
45 The ioctl ``request`` code specifies the cec function to be called. It
49 Macros and structures definitions specifying cec ioctl requests and
50 their parameters are located in the cec.h header file. All cec ioctl
52 :ref:`cec-user-func`.
Dcec-func-close.rst6 cec close()
12 cec-close - Close a cec device
24 :name: cec-close
30 File descriptor returned by :c:func:`open() <cec-open>`.
36 Closes the cec device. Resources associated with the file descriptor are
43 :c:func:`close() <cec-close>` returns 0 on success. On error, -1 is returned, and
Dcec-func-open.rst6 cec open()
12 cec-open - Open a cec device
23 :name: cec-open
49 To open a cec device applications call :c:func:`open() <cec-open>` with the
61 :c:func:`open() <cec-open>` returns the new file descriptor on success. On error,
Dcec-func-poll.rst6 cec poll()
12 cec-poll - Wait for some event on a file descriptor
24 :name: cec-poll
42 With the :c:func:`poll() <cec-poll>` function applications can wait for CEC
45 On success :c:func:`poll() <cec-poll>` returns the number of file descriptors
56 For more details see the :c:func:`poll() <cec-poll>` manual page.
62 On success, :c:func:`poll() <cec-poll>` returns the number structures which have
Dcec-api.rst24 cec-intro
25 cec-funcs
26 cec-pin-error-inj
27 cec-header
/Linux-v4.19/Documentation/devicetree/bindings/media/
Dst,stm32-cec.txt4 - compatible : value should be "st,stm32-cec"
8 - clock-names : from common clock binding: must be "cec" and "hdmi-cec".
13 cec: cec@40006c00 {
14 compatible = "st,stm32-cec";
18 clock-names = "cec", "hdmi-cec";
Dtegra-cec.txt8 "nvidia,tegra114-cec"
9 "nvidia,tegra124-cec"
10 "nvidia,tegra210-cec"
15 - clock-names : from common clock binding: must contain "cec",
17 - hdmi-phandle : phandle to the HDMI controller, see also cec.txt.
21 cec@70015000 {
22 compatible = "nvidia,tegra124-cec";
26 clock-names = "cec";
Dstih-cec.txt4 - compatible : value should be "st,stih-cec"
12 - hdmi-phandle: Phandle to the HDMI controller, see also cec.txt.
16 sti-cec@94a087c {
17 compatible = "st,stih-cec";
20 clock-names = "cec-clk";
22 interrupt-names = "cec-irq";
Ds5p-cec.txt8 "samsung,s5p-cec"
18 - hdmi-phandle - phandle to the HDMI controller, see also cec.txt.
22 is high. See cec.txt for more details.
26 hdmicec: cec@100b0000 {
27 compatible = "samsung,s5p-cec";
Dcec-gpio.txt12 - compatible: value must be "cec-gpio".
13 - cec-gpios: gpio that the CEC line is connected to. The line should be
19 - hdmi-phandle - phandle to the HDMI controller, see also cec.txt.
37 cec-gpio {
38 compatible = "cec-gpio";
39 cec-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
Dmeson-ao-cec.txt8 "amlogic,meson-gx-ao-cec"
21 cec_AO: cec@100 {
22 compatible = "amlogic,meson-gx-ao-cec";
/Linux-v4.19/drivers/media/platform/
DMakefile30 obj-$(CONFIG_CEC_GPIO) += cec-gpio/
42 obj-$(CONFIG_VIDEO_SAMSUNG_S5P_CEC) += s5p-cec/
48 obj-$(CONFIG_VIDEO_STI_HDMI_CEC) += sti/cec/
52 obj-$(CONFIG_VIDEO_TEGRA_HDMI_CEC) += tegra-cec/
98 obj-y += cros-ec-cec/
/Linux-v4.19/drivers/media/rc/keymaps/
Drc-cec.c20 static struct rc_map_table cec[] = { variable
161 .scan = cec,
162 .size = ARRAY_SIZE(cec),

123456