/Linux-v5.4/drivers/input/keyboard/ |
D | sun4i-lradc-keys.c | 96 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 …]
|
D | Makefile | 64 obj-$(CONFIG_KEYBOARD_SUN4I_LRADC) += sun4i-lradc-keys.o
|
/Linux-v5.4/drivers/mfd/ |
D | mxs-lradc.c | 131 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/ |
D | mxs-lradc-ts.c | 42 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/ |
D | mxs-lradc.txt | 4 - 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/ |
D | mxs-lradc-adc.c | 114 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/ |
D | mxs-lradc.h | 166 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/ |
D | imx23-evk.dts | 104 lradc@80050000 { 106 fsl,lradc-touchscreen-wires = <4>;
|
D | imx28-cfa10058.dts | 78 lradc@80050000 { 79 fsl,lradc-touchscreen-wires = <4>;
|
D | imx28-cfa10055.dts | 119 lradc@80050000 { 120 fsl,lradc-touchscreen-wires = <4>;
|
D | imx28-cfa10057.dts | 105 lradc@80050000 { 106 fsl,lradc-touchscreen-wires = <4>;
|
D | imx28-apf28dev.dts | 117 lradc@80050000 { 118 fsl,lradc-touchscreen-wires = <4>;
|
D | imx23.dtsi | 519 lradc: lradc@80050000 { label 520 compatible = "fsl,imx23-lradc"; 626 io-channels = <&lradc 8>;
|
D | imx28-m28evk.dts | 151 lradc@80050000 { 153 fsl,lradc-touchscreen-wires = <4>;
|
D | imx28-eukrea-mbmx28lc.dtsi | 186 &lradc { 187 fsl,lradc-touchscreen-wires = <4>;
|
D | imx28-evk.dts | 239 lradc@80050000 { 241 fsl,lradc-touchscreen-wires = <4>;
|
D | sun8i-v3s.dtsi | 345 lradc: lradc@1c22800 { label 346 compatible = "allwinner,sun4i-a10-lradc-keys";
|
D | imx23-olinuxino.dts | 68 lradc@80050000 {
|
D | imx28-cfa10049.dts | 285 lradc@80050000 { 287 fsl,lradc-touchscreen-wires = <4>;
|
D | imx28-duckbill.dts | 77 lradc@80050000 {
|
D | imx28-duckbill-2.dts | 92 lradc@80050000 {
|
D | sunxi-reference-design-tablet.dtsi | 59 &lradc {
|
/Linux-v5.4/Documentation/devicetree/bindings/input/ |
D | adc-keys.txt | 28 io-channels = <&lradc 0>;
|
/Linux-v5.4/Documentation/devicetree/bindings/clock/ |
D | imx28-clock.txt | 55 lradc 41
|
/Linux-v5.4/drivers/clk/mxs/ |
D | clk-imx28.c | 139 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()
|