Home
last modified time | relevance | path

Searched refs:lradc (Results 1 – 25 of 75) sorted by relevance

123

/Linux-v5.4/drivers/input/keyboard/
Dsun4i-lradc-keys.c96 struct sun4i_lradc_data *lradc = dev_id; in sun4i_lradc_irq() local
99 ints = readl(lradc->base + LRADC_INTS); in sun4i_lradc_irq()
107 input_report_key(lradc->input, lradc->chan0_keycode, 0); in sun4i_lradc_irq()
108 lradc->chan0_keycode = 0; in sun4i_lradc_irq()
111 if ((ints & CHAN0_KEYDOWN_IRQ) && lradc->chan0_keycode == 0) { in sun4i_lradc_irq()
112 val = readl(lradc->base + LRADC_DATA0) & 0x3f; in sun4i_lradc_irq()
113 voltage = val * lradc->vref / 63; in sun4i_lradc_irq()
115 for (i = 0; i < lradc->chan0_map_count; i++) { in sun4i_lradc_irq()
116 diff = abs(lradc->chan0_map[i].voltage - voltage); in sun4i_lradc_irq()
119 keycode = lradc->chan0_map[i].keycode; in sun4i_lradc_irq()
[all …]
DMakefile64 obj-$(CONFIG_KEYBOARD_SUN4I_LRADC) += sun4i-lradc-keys.o
/Linux-v5.4/drivers/mfd/
Dmxs-lradc.c131 struct mxs_lradc *lradc; in mxs_lradc_probe() local
137 lradc = devm_kzalloc(&pdev->dev, sizeof(*lradc), GFP_KERNEL); in mxs_lradc_probe()
138 if (!lradc) in mxs_lradc_probe()
145 lradc->soc = (enum mxs_lradc_id)of_id->data; in mxs_lradc_probe()
147 lradc->clk = devm_clk_get(&pdev->dev, NULL); in mxs_lradc_probe()
148 if (IS_ERR(lradc->clk)) { in mxs_lradc_probe()
150 return PTR_ERR(lradc->clk); in mxs_lradc_probe()
153 ret = clk_prepare_enable(lradc->clk); in mxs_lradc_probe()
163 lradc->buffer_vchans = BUFFER_VCHANS_LIMITED; in mxs_lradc_probe()
167 lradc->touchscreen_wire = MXS_LRADC_TOUCHSCREEN_4WIRE; in mxs_lradc_probe()
[all …]
/Linux-v5.4/drivers/input/touchscreen/
Dmxs-lradc-ts.c42 struct mxs_lradc *lradc; member
274 struct mxs_lradc *lradc = ts->lradc; in mxs_lradc_setup_touch_detection() local
282 writel(info[lradc->soc].mask, in mxs_lradc_setup_touch_detection()
284 writel(info[lradc->soc].bit, in mxs_lradc_setup_touch_detection()
302 struct mxs_lradc *lradc = ts->lradc; in mxs_lradc_prepare_x_pos() local
304 writel(info[lradc->soc].mask, in mxs_lradc_prepare_x_pos()
306 writel(info[lradc->soc].x_plate, in mxs_lradc_prepare_x_pos()
328 struct mxs_lradc *lradc = ts->lradc; in mxs_lradc_prepare_y_pos() local
330 writel(info[lradc->soc].mask, in mxs_lradc_prepare_y_pos()
332 writel(info[lradc->soc].y_plate, in mxs_lradc_prepare_y_pos()
[all …]
/Linux-v5.4/Documentation/devicetree/bindings/mfd/
Dmxs-lradc.txt4 - compatible: Should be "fsl,imx23-lradc" for i.MX23 SoC and "fsl,imx28-lradc"
10 - fsl,lradc-touchscreen-wires: Number of wires used to connect the touchscreen
25 lradc@80050000 {
26 compatible = "fsl,imx23-lradc";
29 fsl,lradc-touchscreen-wires = <4>;
37 lradc@80050000 {
38 compatible = "fsl,imx28-lradc";
41 fsl,lradc-touchscreen-wires = <5>;
/Linux-v5.4/drivers/iio/adc/
Dmxs-lradc-adc.c114 struct mxs_lradc *lradc; member
134 struct mxs_lradc *lradc = adc->lradc; in mxs_lradc_adc_read_single() local
154 if (lradc->soc == IMX28_LRADC) in mxs_lradc_adc_read_single()
387 struct mxs_lradc *lradc = adc->lradc; in mxs_lradc_adc_handle_irq() local
391 if (!(reg & mxs_lradc_irq_mask(lradc))) in mxs_lradc_adc_handle_irq()
395 if (reg & lradc->buffer_vchans) { in mxs_lradc_adc_handle_irq()
404 writel(reg & mxs_lradc_irq_mask(lradc), in mxs_lradc_adc_handle_irq()
485 struct mxs_lradc *lradc = adc->lradc; in mxs_lradc_adc_buffer_preenable() local
494 if (lradc->soc == IMX28_LRADC) in mxs_lradc_adc_buffer_preenable()
495 writel(lradc->buffer_vchans << LRADC_CTRL1_LRADC_IRQ_EN_OFFSET, in mxs_lradc_adc_buffer_preenable()
[all …]
/Linux-v5.4/include/linux/mfd/
Dmxs-lradc.h166 static inline u32 mxs_lradc_irq_mask(struct mxs_lradc *lradc) in mxs_lradc_irq_mask() argument
168 switch (lradc->soc) { in mxs_lradc_irq_mask()
/Linux-v5.4/arch/arm/boot/dts/
Dimx23-evk.dts104 lradc@80050000 {
106 fsl,lradc-touchscreen-wires = <4>;
Dimx28-cfa10058.dts78 lradc@80050000 {
79 fsl,lradc-touchscreen-wires = <4>;
Dimx28-cfa10055.dts119 lradc@80050000 {
120 fsl,lradc-touchscreen-wires = <4>;
Dimx28-cfa10057.dts105 lradc@80050000 {
106 fsl,lradc-touchscreen-wires = <4>;
Dimx28-apf28dev.dts117 lradc@80050000 {
118 fsl,lradc-touchscreen-wires = <4>;
Dimx23.dtsi519 lradc: lradc@80050000 { label
520 compatible = "fsl,imx23-lradc";
626 io-channels = <&lradc 8>;
Dimx28-m28evk.dts151 lradc@80050000 {
153 fsl,lradc-touchscreen-wires = <4>;
Dimx28-eukrea-mbmx28lc.dtsi186 &lradc {
187 fsl,lradc-touchscreen-wires = <4>;
Dimx28-evk.dts239 lradc@80050000 {
241 fsl,lradc-touchscreen-wires = <4>;
Dsun8i-v3s.dtsi345 lradc: lradc@1c22800 { label
346 compatible = "allwinner,sun4i-a10-lradc-keys";
Dimx23-olinuxino.dts68 lradc@80050000 {
Dimx28-cfa10049.dts285 lradc@80050000 {
287 fsl,lradc-touchscreen-wires = <4>;
Dimx28-duckbill.dts77 lradc@80050000 {
Dimx28-duckbill-2.dts92 lradc@80050000 {
Dsunxi-reference-design-tablet.dtsi59 &lradc {
/Linux-v5.4/Documentation/devicetree/bindings/input/
Dadc-keys.txt28 io-channels = <&lradc 0>;
/Linux-v5.4/Documentation/devicetree/bindings/clock/
Dimx28-clock.txt55 lradc 41
/Linux-v5.4/drivers/clk/mxs/
Dclk-imx28.c139 clk32k_div, rtc, lradc, spdif_div, clk32k, pwm, uart, ssp0, enumerator
208 clks[lradc] = mxs_clk_fixed_factor("lradc", "clk32k", 1, 16); in mx28_clocks_init()

123