lradc 208 drivers/clk/mxs/clk-imx28.c clks[lradc] = mxs_clk_fixed_factor("lradc", "clk32k", 1, 16); lradc 114 drivers/iio/adc/mxs-lradc-adc.c struct mxs_lradc *lradc; lradc 134 drivers/iio/adc/mxs-lradc-adc.c struct mxs_lradc *lradc = adc->lradc; lradc 154 drivers/iio/adc/mxs-lradc-adc.c if (lradc->soc == IMX28_LRADC) lradc 387 drivers/iio/adc/mxs-lradc-adc.c struct mxs_lradc *lradc = adc->lradc; lradc 391 drivers/iio/adc/mxs-lradc-adc.c if (!(reg & mxs_lradc_irq_mask(lradc))) lradc 395 drivers/iio/adc/mxs-lradc-adc.c if (reg & lradc->buffer_vchans) { lradc 404 drivers/iio/adc/mxs-lradc-adc.c writel(reg & mxs_lradc_irq_mask(lradc), lradc 485 drivers/iio/adc/mxs-lradc-adc.c struct mxs_lradc *lradc = adc->lradc; lradc 494 drivers/iio/adc/mxs-lradc-adc.c if (lradc->soc == IMX28_LRADC) lradc 495 drivers/iio/adc/mxs-lradc-adc.c writel(lradc->buffer_vchans << LRADC_CTRL1_LRADC_IRQ_EN_OFFSET, lradc 497 drivers/iio/adc/mxs-lradc-adc.c writel(lradc->buffer_vchans, lradc 523 drivers/iio/adc/mxs-lradc-adc.c struct mxs_lradc *lradc = adc->lradc; lradc 528 drivers/iio/adc/mxs-lradc-adc.c writel(lradc->buffer_vchans, lradc 530 drivers/iio/adc/mxs-lradc-adc.c if (lradc->soc == IMX28_LRADC) lradc 531 drivers/iio/adc/mxs-lradc-adc.c writel(lradc->buffer_vchans << LRADC_CTRL1_LRADC_IRQ_EN_OFFSET, lradc 541 drivers/iio/adc/mxs-lradc-adc.c struct mxs_lradc *lradc = adc->lradc; lradc 546 drivers/iio/adc/mxs-lradc-adc.c if (lradc->use_touchbutton) lradc 548 drivers/iio/adc/mxs-lradc-adc.c if (lradc->touchscreen_wire == MXS_LRADC_TOUCHSCREEN_4WIRE) lradc 550 drivers/iio/adc/mxs-lradc-adc.c if (lradc->touchscreen_wire == MXS_LRADC_TOUCHSCREEN_5WIRE) lradc 553 drivers/iio/adc/mxs-lradc-adc.c if (lradc->use_touchbutton) lradc 555 drivers/iio/adc/mxs-lradc-adc.c if (lradc->touchscreen_wire) lradc 692 drivers/iio/adc/mxs-lradc-adc.c struct mxs_lradc *lradc = dev_get_drvdata(dev->parent); lradc 708 drivers/iio/adc/mxs-lradc-adc.c adc->lradc = lradc; lradc 731 drivers/iio/adc/mxs-lradc-adc.c if (lradc->soc == IMX23_LRADC) { lradc 770 drivers/iio/adc/mxs-lradc-adc.c adc->vref_mv = mxs_lradc_adc_vref_mv[lradc->soc]; lradc 96 drivers/input/keyboard/sun4i-lradc-keys.c struct sun4i_lradc_data *lradc = dev_id; lradc 99 drivers/input/keyboard/sun4i-lradc-keys.c ints = readl(lradc->base + LRADC_INTS); lradc 107 drivers/input/keyboard/sun4i-lradc-keys.c input_report_key(lradc->input, lradc->chan0_keycode, 0); lradc 108 drivers/input/keyboard/sun4i-lradc-keys.c lradc->chan0_keycode = 0; lradc 111 drivers/input/keyboard/sun4i-lradc-keys.c if ((ints & CHAN0_KEYDOWN_IRQ) && lradc->chan0_keycode == 0) { lradc 112 drivers/input/keyboard/sun4i-lradc-keys.c val = readl(lradc->base + LRADC_DATA0) & 0x3f; lradc 113 drivers/input/keyboard/sun4i-lradc-keys.c voltage = val * lradc->vref / 63; lradc 115 drivers/input/keyboard/sun4i-lradc-keys.c for (i = 0; i < lradc->chan0_map_count; i++) { lradc 116 drivers/input/keyboard/sun4i-lradc-keys.c diff = abs(lradc->chan0_map[i].voltage - voltage); lradc 119 drivers/input/keyboard/sun4i-lradc-keys.c keycode = lradc->chan0_map[i].keycode; lradc 123 drivers/input/keyboard/sun4i-lradc-keys.c lradc->chan0_keycode = keycode; lradc 124 drivers/input/keyboard/sun4i-lradc-keys.c input_report_key(lradc->input, lradc->chan0_keycode, 1); lradc 127 drivers/input/keyboard/sun4i-lradc-keys.c input_sync(lradc->input); lradc 129 drivers/input/keyboard/sun4i-lradc-keys.c writel(ints, lradc->base + LRADC_INTS); lradc 136 drivers/input/keyboard/sun4i-lradc-keys.c struct sun4i_lradc_data *lradc = input_get_drvdata(dev); lradc 139 drivers/input/keyboard/sun4i-lradc-keys.c error = regulator_enable(lradc->vref_supply); lradc 143 drivers/input/keyboard/sun4i-lradc-keys.c lradc->vref = regulator_get_voltage(lradc->vref_supply) * lradc 144 drivers/input/keyboard/sun4i-lradc-keys.c lradc->variant->divisor_numerator / lradc 145 drivers/input/keyboard/sun4i-lradc-keys.c lradc->variant->divisor_denominator; lradc 151 drivers/input/keyboard/sun4i-lradc-keys.c SAMPLE_RATE(0) | ENABLE(1), lradc->base + LRADC_CTRL); lradc 153 drivers/input/keyboard/sun4i-lradc-keys.c writel(CHAN0_KEYUP_IRQ | CHAN0_KEYDOWN_IRQ, lradc->base + LRADC_INTC); lradc 160 drivers/input/keyboard/sun4i-lradc-keys.c struct sun4i_lradc_data *lradc = input_get_drvdata(dev); lradc 164 drivers/input/keyboard/sun4i-lradc-keys.c SAMPLE_RATE(2), lradc->base + LRADC_CTRL); lradc 165 drivers/input/keyboard/sun4i-lradc-keys.c writel(0, lradc->base + LRADC_INTC); lradc 167 drivers/input/keyboard/sun4i-lradc-keys.c regulator_disable(lradc->vref_supply); lradc 171 drivers/input/keyboard/sun4i-lradc-keys.c struct sun4i_lradc_data *lradc) lradc 181 drivers/input/keyboard/sun4i-lradc-keys.c lradc->chan0_map_count = of_get_child_count(np); lradc 182 drivers/input/keyboard/sun4i-lradc-keys.c if (lradc->chan0_map_count == 0) { lradc 187 drivers/input/keyboard/sun4i-lradc-keys.c lradc->chan0_map = devm_kmalloc_array(dev, lradc->chan0_map_count, lradc 190 drivers/input/keyboard/sun4i-lradc-keys.c if (!lradc->chan0_map) lradc 195 drivers/input/keyboard/sun4i-lradc-keys.c struct sun4i_lradc_keymap *map = &lradc->chan0_map[i]; lradc 227 drivers/input/keyboard/sun4i-lradc-keys.c struct sun4i_lradc_data *lradc; lradc 232 drivers/input/keyboard/sun4i-lradc-keys.c lradc = devm_kzalloc(dev, sizeof(struct sun4i_lradc_data), GFP_KERNEL); lradc 233 drivers/input/keyboard/sun4i-lradc-keys.c if (!lradc) lradc 236 drivers/input/keyboard/sun4i-lradc-keys.c error = sun4i_lradc_load_dt_keymap(dev, lradc); lradc 240 drivers/input/keyboard/sun4i-lradc-keys.c lradc->variant = of_device_get_match_data(&pdev->dev); lradc 241 drivers/input/keyboard/sun4i-lradc-keys.c if (!lradc->variant) { lradc 246 drivers/input/keyboard/sun4i-lradc-keys.c lradc->vref_supply = devm_regulator_get(dev, "vref"); lradc 247 drivers/input/keyboard/sun4i-lradc-keys.c if (IS_ERR(lradc->vref_supply)) lradc 248 drivers/input/keyboard/sun4i-lradc-keys.c return PTR_ERR(lradc->vref_supply); lradc 250 drivers/input/keyboard/sun4i-lradc-keys.c lradc->dev = dev; lradc 251 drivers/input/keyboard/sun4i-lradc-keys.c lradc->input = devm_input_allocate_device(dev); lradc 252 drivers/input/keyboard/sun4i-lradc-keys.c if (!lradc->input) lradc 255 drivers/input/keyboard/sun4i-lradc-keys.c lradc->input->name = pdev->name; lradc 256 drivers/input/keyboard/sun4i-lradc-keys.c lradc->input->phys = "sun4i_lradc/input0"; lradc 257 drivers/input/keyboard/sun4i-lradc-keys.c lradc->input->open = sun4i_lradc_open; lradc 258 drivers/input/keyboard/sun4i-lradc-keys.c lradc->input->close = sun4i_lradc_close; lradc 259 drivers/input/keyboard/sun4i-lradc-keys.c lradc->input->id.bustype = BUS_HOST; lradc 260 drivers/input/keyboard/sun4i-lradc-keys.c lradc->input->id.vendor = 0x0001; lradc 261 drivers/input/keyboard/sun4i-lradc-keys.c lradc->input->id.product = 0x0001; lradc 262 drivers/input/keyboard/sun4i-lradc-keys.c lradc->input->id.version = 0x0100; lradc 264 drivers/input/keyboard/sun4i-lradc-keys.c __set_bit(EV_KEY, lradc->input->evbit); lradc 265 drivers/input/keyboard/sun4i-lradc-keys.c for (i = 0; i < lradc->chan0_map_count; i++) lradc 266 drivers/input/keyboard/sun4i-lradc-keys.c __set_bit(lradc->chan0_map[i].keycode, lradc->input->keybit); lradc 268 drivers/input/keyboard/sun4i-lradc-keys.c input_set_drvdata(lradc->input, lradc); lradc 270 drivers/input/keyboard/sun4i-lradc-keys.c lradc->base = devm_ioremap_resource(dev, lradc 272 drivers/input/keyboard/sun4i-lradc-keys.c if (IS_ERR(lradc->base)) lradc 273 drivers/input/keyboard/sun4i-lradc-keys.c return PTR_ERR(lradc->base); lradc 277 drivers/input/keyboard/sun4i-lradc-keys.c "sun4i-a10-lradc-keys", lradc); lradc 281 drivers/input/keyboard/sun4i-lradc-keys.c error = input_register_device(lradc->input); lradc 42 drivers/input/touchscreen/mxs-lradc-ts.c struct mxs_lradc *lradc; lradc 274 drivers/input/touchscreen/mxs-lradc-ts.c struct mxs_lradc *lradc = ts->lradc; lradc 282 drivers/input/touchscreen/mxs-lradc-ts.c writel(info[lradc->soc].mask, lradc 284 drivers/input/touchscreen/mxs-lradc-ts.c writel(info[lradc->soc].bit, lradc 302 drivers/input/touchscreen/mxs-lradc-ts.c struct mxs_lradc *lradc = ts->lradc; lradc 304 drivers/input/touchscreen/mxs-lradc-ts.c writel(info[lradc->soc].mask, lradc 306 drivers/input/touchscreen/mxs-lradc-ts.c writel(info[lradc->soc].x_plate, lradc 328 drivers/input/touchscreen/mxs-lradc-ts.c struct mxs_lradc *lradc = ts->lradc; lradc 330 drivers/input/touchscreen/mxs-lradc-ts.c writel(info[lradc->soc].mask, lradc 332 drivers/input/touchscreen/mxs-lradc-ts.c writel(info[lradc->soc].y_plate, lradc 354 drivers/input/touchscreen/mxs-lradc-ts.c struct mxs_lradc *lradc = ts->lradc; lradc 356 drivers/input/touchscreen/mxs-lradc-ts.c writel(info[lradc->soc].mask, lradc 358 drivers/input/touchscreen/mxs-lradc-ts.c writel(info[lradc->soc].pressure, lradc 496 drivers/input/touchscreen/mxs-lradc-ts.c struct mxs_lradc *lradc = ts->lradc; lradc 498 drivers/input/touchscreen/mxs-lradc-ts.c u32 clr_irq = mxs_lradc_irq_mask(lradc); lradc 505 drivers/input/touchscreen/mxs-lradc-ts.c if (!(reg & mxs_lradc_irq_mask(lradc))) lradc 535 drivers/input/touchscreen/mxs-lradc-ts.c struct mxs_lradc *lradc = ts->lradc; lradc 544 drivers/input/touchscreen/mxs-lradc-ts.c writel(info[lradc->soc].mask, lradc 547 drivers/input/touchscreen/mxs-lradc-ts.c writel(lradc->buffer_vchans << LRADC_CTRL1_LRADC_IRQ_EN_OFFSET, lradc 563 drivers/input/touchscreen/mxs-lradc-ts.c struct mxs_lradc *lradc = ts->lradc; lradc 566 drivers/input/touchscreen/mxs-lradc-ts.c if (lradc->soc == IMX28_LRADC) { lradc 570 drivers/input/touchscreen/mxs-lradc-ts.c if (lradc->touchscreen_wire == MXS_LRADC_TOUCHSCREEN_5WIRE) lradc 607 drivers/input/touchscreen/mxs-lradc-ts.c struct mxs_lradc *lradc = dev_get_drvdata(dev->parent); lradc 618 drivers/input/touchscreen/mxs-lradc-ts.c ts->lradc = lradc; lradc 131 drivers/mfd/mxs-lradc.c struct mxs_lradc *lradc; lradc 137 drivers/mfd/mxs-lradc.c lradc = devm_kzalloc(&pdev->dev, sizeof(*lradc), GFP_KERNEL); lradc 138 drivers/mfd/mxs-lradc.c if (!lradc) lradc 145 drivers/mfd/mxs-lradc.c lradc->soc = (enum mxs_lradc_id)of_id->data; lradc 147 drivers/mfd/mxs-lradc.c lradc->clk = devm_clk_get(&pdev->dev, NULL); lradc 148 drivers/mfd/mxs-lradc.c if (IS_ERR(lradc->clk)) { lradc 150 drivers/mfd/mxs-lradc.c return PTR_ERR(lradc->clk); lradc 153 drivers/mfd/mxs-lradc.c ret = clk_prepare_enable(lradc->clk); lradc 163 drivers/mfd/mxs-lradc.c lradc->buffer_vchans = BUFFER_VCHANS_LIMITED; lradc 167 drivers/mfd/mxs-lradc.c lradc->touchscreen_wire = MXS_LRADC_TOUCHSCREEN_4WIRE; lradc 170 drivers/mfd/mxs-lradc.c if (lradc->soc == IMX28_LRADC) { lradc 171 drivers/mfd/mxs-lradc.c lradc->touchscreen_wire = lradc 184 drivers/mfd/mxs-lradc.c lradc->buffer_vchans = BUFFER_VCHANS_ALL; lradc 187 drivers/mfd/mxs-lradc.c platform_set_drvdata(pdev, lradc); lradc 195 drivers/mfd/mxs-lradc.c switch (lradc->soc) { lradc 219 drivers/mfd/mxs-lradc.c if (!lradc->touchscreen_wire) lradc 233 drivers/mfd/mxs-lradc.c clk_disable_unprepare(lradc->clk); lradc 240 drivers/mfd/mxs-lradc.c struct mxs_lradc *lradc = platform_get_drvdata(pdev); lradc 242 drivers/mfd/mxs-lradc.c clk_disable_unprepare(lradc->clk); lradc 166 include/linux/mfd/mxs-lradc.h static inline u32 mxs_lradc_irq_mask(struct mxs_lradc *lradc) lradc 168 include/linux/mfd/mxs-lradc.h switch (lradc->soc) {