144d6f2efSHeiko Stübner /* 244d6f2efSHeiko Stübner * Rockchip Successive Approximation Register (SAR) A/D Converter 344d6f2efSHeiko Stübner * Copyright (C) 2014 ROCKCHIP, Inc. 444d6f2efSHeiko Stübner * 544d6f2efSHeiko Stübner * This program is free software; you can redistribute it and/or modify 644d6f2efSHeiko Stübner * it under the terms of the GNU General Public License as published by 744d6f2efSHeiko Stübner * the Free Software Foundation; either version 2 of the License, or 844d6f2efSHeiko Stübner * (at your option) any later version. 944d6f2efSHeiko Stübner * 1044d6f2efSHeiko Stübner * This program is distributed in the hope that it will be useful, 1144d6f2efSHeiko Stübner * but WITHOUT ANY WARRANTY; without even the implied warranty of 1244d6f2efSHeiko Stübner * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1344d6f2efSHeiko Stübner * GNU General Public License for more details. 1444d6f2efSHeiko Stübner */ 1544d6f2efSHeiko Stübner 1644d6f2efSHeiko Stübner #include <linux/module.h> 1744d6f2efSHeiko Stübner #include <linux/platform_device.h> 1844d6f2efSHeiko Stübner #include <linux/interrupt.h> 1944d6f2efSHeiko Stübner #include <linux/io.h> 2044d6f2efSHeiko Stübner #include <linux/of.h> 214c21bbb4SHeiko Stübner #include <linux/of_device.h> 2244d6f2efSHeiko Stübner #include <linux/clk.h> 2344d6f2efSHeiko Stübner #include <linux/completion.h> 2444d6f2efSHeiko Stübner #include <linux/regulator/consumer.h> 2544d6f2efSHeiko Stübner #include <linux/iio/iio.h> 2644d6f2efSHeiko Stübner 2744d6f2efSHeiko Stübner #define SARADC_DATA 0x00 2844d6f2efSHeiko Stübner 2944d6f2efSHeiko Stübner #define SARADC_STAS 0x04 3044d6f2efSHeiko Stübner #define SARADC_STAS_BUSY BIT(0) 3144d6f2efSHeiko Stübner 3244d6f2efSHeiko Stübner #define SARADC_CTRL 0x08 3344d6f2efSHeiko Stübner #define SARADC_CTRL_IRQ_STATUS BIT(6) 3444d6f2efSHeiko Stübner #define SARADC_CTRL_IRQ_ENABLE BIT(5) 3544d6f2efSHeiko Stübner #define SARADC_CTRL_POWER_CTRL BIT(3) 3644d6f2efSHeiko Stübner #define SARADC_CTRL_CHN_MASK 0x7 3744d6f2efSHeiko Stübner 3844d6f2efSHeiko Stübner #define SARADC_DLY_PU_SOC 0x0c 3944d6f2efSHeiko Stübner #define SARADC_DLY_PU_SOC_MASK 0x3f 4044d6f2efSHeiko Stübner 4144d6f2efSHeiko Stübner #define SARADC_TIMEOUT msecs_to_jiffies(100) 4244d6f2efSHeiko Stübner 434c21bbb4SHeiko Stübner struct rockchip_saradc_data { 444c21bbb4SHeiko Stübner int num_bits; 454c21bbb4SHeiko Stübner const struct iio_chan_spec *channels; 464c21bbb4SHeiko Stübner int num_channels; 474c21bbb4SHeiko Stübner unsigned long clk_rate; 484c21bbb4SHeiko Stübner }; 494c21bbb4SHeiko Stübner 5044d6f2efSHeiko Stübner struct rockchip_saradc { 5144d6f2efSHeiko Stübner void __iomem *regs; 5244d6f2efSHeiko Stübner struct clk *pclk; 5344d6f2efSHeiko Stübner struct clk *clk; 5444d6f2efSHeiko Stübner struct completion completion; 5544d6f2efSHeiko Stübner struct regulator *vref; 564c21bbb4SHeiko Stübner const struct rockchip_saradc_data *data; 5744d6f2efSHeiko Stübner u16 last_val; 5844d6f2efSHeiko Stübner }; 5944d6f2efSHeiko Stübner 6044d6f2efSHeiko Stübner static int rockchip_saradc_read_raw(struct iio_dev *indio_dev, 6144d6f2efSHeiko Stübner struct iio_chan_spec const *chan, 6244d6f2efSHeiko Stübner int *val, int *val2, long mask) 6344d6f2efSHeiko Stübner { 6444d6f2efSHeiko Stübner struct rockchip_saradc *info = iio_priv(indio_dev); 6544d6f2efSHeiko Stübner int ret; 6644d6f2efSHeiko Stübner 6744d6f2efSHeiko Stübner switch (mask) { 6844d6f2efSHeiko Stübner case IIO_CHAN_INFO_RAW: 6944d6f2efSHeiko Stübner mutex_lock(&indio_dev->mlock); 7044d6f2efSHeiko Stübner 7144d6f2efSHeiko Stübner reinit_completion(&info->completion); 7244d6f2efSHeiko Stübner 7344d6f2efSHeiko Stübner /* 8 clock periods as delay between power up and start cmd */ 7444d6f2efSHeiko Stübner writel_relaxed(8, info->regs + SARADC_DLY_PU_SOC); 7544d6f2efSHeiko Stübner 7644d6f2efSHeiko Stübner /* Select the channel to be used and trigger conversion */ 7744d6f2efSHeiko Stübner writel(SARADC_CTRL_POWER_CTRL 7844d6f2efSHeiko Stübner | (chan->channel & SARADC_CTRL_CHN_MASK) 7944d6f2efSHeiko Stübner | SARADC_CTRL_IRQ_ENABLE, 8044d6f2efSHeiko Stübner info->regs + SARADC_CTRL); 8144d6f2efSHeiko Stübner 8244d6f2efSHeiko Stübner if (!wait_for_completion_timeout(&info->completion, 8344d6f2efSHeiko Stübner SARADC_TIMEOUT)) { 8444d6f2efSHeiko Stübner writel_relaxed(0, info->regs + SARADC_CTRL); 8544d6f2efSHeiko Stübner mutex_unlock(&indio_dev->mlock); 8644d6f2efSHeiko Stübner return -ETIMEDOUT; 8744d6f2efSHeiko Stübner } 8844d6f2efSHeiko Stübner 8944d6f2efSHeiko Stübner *val = info->last_val; 9044d6f2efSHeiko Stübner mutex_unlock(&indio_dev->mlock); 9144d6f2efSHeiko Stübner return IIO_VAL_INT; 9244d6f2efSHeiko Stübner case IIO_CHAN_INFO_SCALE: 9344d6f2efSHeiko Stübner ret = regulator_get_voltage(info->vref); 9444d6f2efSHeiko Stübner if (ret < 0) { 9544d6f2efSHeiko Stübner dev_err(&indio_dev->dev, "failed to get voltage\n"); 9644d6f2efSHeiko Stübner return ret; 9744d6f2efSHeiko Stübner } 9844d6f2efSHeiko Stübner 9944d6f2efSHeiko Stübner *val = ret / 1000; 1004c21bbb4SHeiko Stübner *val2 = info->data->num_bits; 10144d6f2efSHeiko Stübner return IIO_VAL_FRACTIONAL_LOG2; 10244d6f2efSHeiko Stübner default: 10344d6f2efSHeiko Stübner return -EINVAL; 10444d6f2efSHeiko Stübner } 10544d6f2efSHeiko Stübner } 10644d6f2efSHeiko Stübner 10744d6f2efSHeiko Stübner static irqreturn_t rockchip_saradc_isr(int irq, void *dev_id) 10844d6f2efSHeiko Stübner { 10944d6f2efSHeiko Stübner struct rockchip_saradc *info = (struct rockchip_saradc *)dev_id; 11044d6f2efSHeiko Stübner 11144d6f2efSHeiko Stübner /* Read value */ 11244d6f2efSHeiko Stübner info->last_val = readl_relaxed(info->regs + SARADC_DATA); 1134c21bbb4SHeiko Stübner info->last_val &= GENMASK(info->data->num_bits - 1, 0); 11444d6f2efSHeiko Stübner 11544d6f2efSHeiko Stübner /* Clear irq & power down adc */ 11644d6f2efSHeiko Stübner writel_relaxed(0, info->regs + SARADC_CTRL); 11744d6f2efSHeiko Stübner 11844d6f2efSHeiko Stübner complete(&info->completion); 11944d6f2efSHeiko Stübner 12044d6f2efSHeiko Stübner return IRQ_HANDLED; 12144d6f2efSHeiko Stübner } 12244d6f2efSHeiko Stübner 12344d6f2efSHeiko Stübner static const struct iio_info rockchip_saradc_iio_info = { 12444d6f2efSHeiko Stübner .read_raw = rockchip_saradc_read_raw, 12544d6f2efSHeiko Stübner .driver_module = THIS_MODULE, 12644d6f2efSHeiko Stübner }; 12744d6f2efSHeiko Stübner 12844d6f2efSHeiko Stübner #define ADC_CHANNEL(_index, _id) { \ 12944d6f2efSHeiko Stübner .type = IIO_VOLTAGE, \ 13044d6f2efSHeiko Stübner .indexed = 1, \ 13144d6f2efSHeiko Stübner .channel = _index, \ 13244d6f2efSHeiko Stübner .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ 13344d6f2efSHeiko Stübner .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ 13444d6f2efSHeiko Stübner .datasheet_name = _id, \ 13544d6f2efSHeiko Stübner } 13644d6f2efSHeiko Stübner 13744d6f2efSHeiko Stübner static const struct iio_chan_spec rockchip_saradc_iio_channels[] = { 13844d6f2efSHeiko Stübner ADC_CHANNEL(0, "adc0"), 13944d6f2efSHeiko Stübner ADC_CHANNEL(1, "adc1"), 14044d6f2efSHeiko Stübner ADC_CHANNEL(2, "adc2"), 14144d6f2efSHeiko Stübner }; 14244d6f2efSHeiko Stübner 1434c21bbb4SHeiko Stübner static const struct rockchip_saradc_data saradc_data = { 1444c21bbb4SHeiko Stübner .num_bits = 10, 1454c21bbb4SHeiko Stübner .channels = rockchip_saradc_iio_channels, 1464c21bbb4SHeiko Stübner .num_channels = ARRAY_SIZE(rockchip_saradc_iio_channels), 1474c21bbb4SHeiko Stübner .clk_rate = 1000000, 1484c21bbb4SHeiko Stübner }; 1494c21bbb4SHeiko Stübner 1504c21bbb4SHeiko Stübner static const struct iio_chan_spec rockchip_rk3066_tsadc_iio_channels[] = { 1514c21bbb4SHeiko Stübner ADC_CHANNEL(0, "adc0"), 1524c21bbb4SHeiko Stübner ADC_CHANNEL(1, "adc1"), 1534c21bbb4SHeiko Stübner }; 1544c21bbb4SHeiko Stübner 1554c21bbb4SHeiko Stübner static const struct rockchip_saradc_data rk3066_tsadc_data = { 1564c21bbb4SHeiko Stübner .num_bits = 12, 1574c21bbb4SHeiko Stübner .channels = rockchip_rk3066_tsadc_iio_channels, 1584c21bbb4SHeiko Stübner .num_channels = ARRAY_SIZE(rockchip_rk3066_tsadc_iio_channels), 1594c21bbb4SHeiko Stübner .clk_rate = 50000, 1604c21bbb4SHeiko Stübner }; 1614c21bbb4SHeiko Stübner 1624c21bbb4SHeiko Stübner static const struct of_device_id rockchip_saradc_match[] = { 1634c21bbb4SHeiko Stübner { 1644c21bbb4SHeiko Stübner .compatible = "rockchip,saradc", 1654c21bbb4SHeiko Stübner .data = &saradc_data, 1664c21bbb4SHeiko Stübner }, { 1674c21bbb4SHeiko Stübner .compatible = "rockchip,rk3066-tsadc", 1684c21bbb4SHeiko Stübner .data = &rk3066_tsadc_data, 1694c21bbb4SHeiko Stübner }, 1704c21bbb4SHeiko Stübner {}, 1714c21bbb4SHeiko Stübner }; 1724c21bbb4SHeiko Stübner MODULE_DEVICE_TABLE(of, rockchip_saradc_match); 1734c21bbb4SHeiko Stübner 17444d6f2efSHeiko Stübner static int rockchip_saradc_probe(struct platform_device *pdev) 17544d6f2efSHeiko Stübner { 17644d6f2efSHeiko Stübner struct rockchip_saradc *info = NULL; 17744d6f2efSHeiko Stübner struct device_node *np = pdev->dev.of_node; 17844d6f2efSHeiko Stübner struct iio_dev *indio_dev = NULL; 17944d6f2efSHeiko Stübner struct resource *mem; 1804c21bbb4SHeiko Stübner const struct of_device_id *match; 18144d6f2efSHeiko Stübner int ret; 18244d6f2efSHeiko Stübner int irq; 18344d6f2efSHeiko Stübner 18444d6f2efSHeiko Stübner if (!np) 18544d6f2efSHeiko Stübner return -ENODEV; 18644d6f2efSHeiko Stübner 18744d6f2efSHeiko Stübner indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*info)); 18844d6f2efSHeiko Stübner if (!indio_dev) { 18944d6f2efSHeiko Stübner dev_err(&pdev->dev, "failed allocating iio device\n"); 19044d6f2efSHeiko Stübner return -ENOMEM; 19144d6f2efSHeiko Stübner } 19244d6f2efSHeiko Stübner info = iio_priv(indio_dev); 19344d6f2efSHeiko Stübner 1944c21bbb4SHeiko Stübner match = of_match_device(rockchip_saradc_match, &pdev->dev); 1954c21bbb4SHeiko Stübner info->data = match->data; 1964c21bbb4SHeiko Stübner 19744d6f2efSHeiko Stübner mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 19844d6f2efSHeiko Stübner info->regs = devm_ioremap_resource(&pdev->dev, mem); 19944d6f2efSHeiko Stübner if (IS_ERR(info->regs)) 20044d6f2efSHeiko Stübner return PTR_ERR(info->regs); 20144d6f2efSHeiko Stübner 20244d6f2efSHeiko Stübner init_completion(&info->completion); 20344d6f2efSHeiko Stübner 20444d6f2efSHeiko Stübner irq = platform_get_irq(pdev, 0); 20544d6f2efSHeiko Stübner if (irq < 0) { 20644d6f2efSHeiko Stübner dev_err(&pdev->dev, "no irq resource?\n"); 20744d6f2efSHeiko Stübner return irq; 20844d6f2efSHeiko Stübner } 20944d6f2efSHeiko Stübner 21044d6f2efSHeiko Stübner ret = devm_request_irq(&pdev->dev, irq, rockchip_saradc_isr, 21144d6f2efSHeiko Stübner 0, dev_name(&pdev->dev), info); 21244d6f2efSHeiko Stübner if (ret < 0) { 21344d6f2efSHeiko Stübner dev_err(&pdev->dev, "failed requesting irq %d\n", irq); 21444d6f2efSHeiko Stübner return ret; 21544d6f2efSHeiko Stübner } 21644d6f2efSHeiko Stübner 21744d6f2efSHeiko Stübner info->pclk = devm_clk_get(&pdev->dev, "apb_pclk"); 21844d6f2efSHeiko Stübner if (IS_ERR(info->pclk)) { 21944d6f2efSHeiko Stübner dev_err(&pdev->dev, "failed to get pclk\n"); 22044d6f2efSHeiko Stübner return PTR_ERR(info->pclk); 22144d6f2efSHeiko Stübner } 22244d6f2efSHeiko Stübner 22344d6f2efSHeiko Stübner info->clk = devm_clk_get(&pdev->dev, "saradc"); 22444d6f2efSHeiko Stübner if (IS_ERR(info->clk)) { 22544d6f2efSHeiko Stübner dev_err(&pdev->dev, "failed to get adc clock\n"); 22644d6f2efSHeiko Stübner return PTR_ERR(info->clk); 22744d6f2efSHeiko Stübner } 22844d6f2efSHeiko Stübner 22944d6f2efSHeiko Stübner info->vref = devm_regulator_get(&pdev->dev, "vref"); 23044d6f2efSHeiko Stübner if (IS_ERR(info->vref)) { 23144d6f2efSHeiko Stübner dev_err(&pdev->dev, "failed to get regulator, %ld\n", 23244d6f2efSHeiko Stübner PTR_ERR(info->vref)); 23344d6f2efSHeiko Stübner return PTR_ERR(info->vref); 23444d6f2efSHeiko Stübner } 23544d6f2efSHeiko Stübner 23644d6f2efSHeiko Stübner /* 2374c21bbb4SHeiko Stübner * Use a default value for the converter clock. 23844d6f2efSHeiko Stübner * This may become user-configurable in the future. 23944d6f2efSHeiko Stübner */ 2404c21bbb4SHeiko Stübner ret = clk_set_rate(info->clk, info->data->clk_rate); 24144d6f2efSHeiko Stübner if (ret < 0) { 24244d6f2efSHeiko Stübner dev_err(&pdev->dev, "failed to set adc clk rate, %d\n", ret); 24344d6f2efSHeiko Stübner return ret; 24444d6f2efSHeiko Stübner } 24544d6f2efSHeiko Stübner 24644d6f2efSHeiko Stübner ret = regulator_enable(info->vref); 24744d6f2efSHeiko Stübner if (ret < 0) { 24844d6f2efSHeiko Stübner dev_err(&pdev->dev, "failed to enable vref regulator\n"); 24944d6f2efSHeiko Stübner return ret; 25044d6f2efSHeiko Stübner } 25144d6f2efSHeiko Stübner 25244d6f2efSHeiko Stübner ret = clk_prepare_enable(info->pclk); 25344d6f2efSHeiko Stübner if (ret < 0) { 25444d6f2efSHeiko Stübner dev_err(&pdev->dev, "failed to enable pclk\n"); 25544d6f2efSHeiko Stübner goto err_reg_voltage; 25644d6f2efSHeiko Stübner } 25744d6f2efSHeiko Stübner 25844d6f2efSHeiko Stübner ret = clk_prepare_enable(info->clk); 25944d6f2efSHeiko Stübner if (ret < 0) { 26044d6f2efSHeiko Stübner dev_err(&pdev->dev, "failed to enable converter clock\n"); 26144d6f2efSHeiko Stübner goto err_pclk; 26244d6f2efSHeiko Stübner } 26344d6f2efSHeiko Stübner 26444d6f2efSHeiko Stübner platform_set_drvdata(pdev, indio_dev); 26544d6f2efSHeiko Stübner 26644d6f2efSHeiko Stübner indio_dev->name = dev_name(&pdev->dev); 26744d6f2efSHeiko Stübner indio_dev->dev.parent = &pdev->dev; 26844d6f2efSHeiko Stübner indio_dev->dev.of_node = pdev->dev.of_node; 26944d6f2efSHeiko Stübner indio_dev->info = &rockchip_saradc_iio_info; 27044d6f2efSHeiko Stübner indio_dev->modes = INDIO_DIRECT_MODE; 27144d6f2efSHeiko Stübner 2724c21bbb4SHeiko Stübner indio_dev->channels = info->data->channels; 2734c21bbb4SHeiko Stübner indio_dev->num_channels = info->data->num_channels; 27444d6f2efSHeiko Stübner 27544d6f2efSHeiko Stübner ret = iio_device_register(indio_dev); 27644d6f2efSHeiko Stübner if (ret) 27744d6f2efSHeiko Stübner goto err_clk; 27844d6f2efSHeiko Stübner 27944d6f2efSHeiko Stübner return 0; 28044d6f2efSHeiko Stübner 28144d6f2efSHeiko Stübner err_clk: 28244d6f2efSHeiko Stübner clk_disable_unprepare(info->clk); 28344d6f2efSHeiko Stübner err_pclk: 28444d6f2efSHeiko Stübner clk_disable_unprepare(info->pclk); 28544d6f2efSHeiko Stübner err_reg_voltage: 28644d6f2efSHeiko Stübner regulator_disable(info->vref); 28744d6f2efSHeiko Stübner return ret; 28844d6f2efSHeiko Stübner } 28944d6f2efSHeiko Stübner 29044d6f2efSHeiko Stübner static int rockchip_saradc_remove(struct platform_device *pdev) 29144d6f2efSHeiko Stübner { 29244d6f2efSHeiko Stübner struct iio_dev *indio_dev = platform_get_drvdata(pdev); 29344d6f2efSHeiko Stübner struct rockchip_saradc *info = iio_priv(indio_dev); 29444d6f2efSHeiko Stübner 29544d6f2efSHeiko Stübner iio_device_unregister(indio_dev); 29644d6f2efSHeiko Stübner clk_disable_unprepare(info->clk); 29744d6f2efSHeiko Stübner clk_disable_unprepare(info->pclk); 29844d6f2efSHeiko Stübner regulator_disable(info->vref); 29944d6f2efSHeiko Stübner 30044d6f2efSHeiko Stübner return 0; 30144d6f2efSHeiko Stübner } 30244d6f2efSHeiko Stübner 30344d6f2efSHeiko Stübner #ifdef CONFIG_PM_SLEEP 30444d6f2efSHeiko Stübner static int rockchip_saradc_suspend(struct device *dev) 30544d6f2efSHeiko Stübner { 30644d6f2efSHeiko Stübner struct iio_dev *indio_dev = dev_get_drvdata(dev); 30744d6f2efSHeiko Stübner struct rockchip_saradc *info = iio_priv(indio_dev); 30844d6f2efSHeiko Stübner 30944d6f2efSHeiko Stübner clk_disable_unprepare(info->clk); 31044d6f2efSHeiko Stübner clk_disable_unprepare(info->pclk); 31144d6f2efSHeiko Stübner regulator_disable(info->vref); 31244d6f2efSHeiko Stübner 31344d6f2efSHeiko Stübner return 0; 31444d6f2efSHeiko Stübner } 31544d6f2efSHeiko Stübner 31644d6f2efSHeiko Stübner static int rockchip_saradc_resume(struct device *dev) 31744d6f2efSHeiko Stübner { 31844d6f2efSHeiko Stübner struct iio_dev *indio_dev = dev_get_drvdata(dev); 31944d6f2efSHeiko Stübner struct rockchip_saradc *info = iio_priv(indio_dev); 32044d6f2efSHeiko Stübner int ret; 32144d6f2efSHeiko Stübner 32244d6f2efSHeiko Stübner ret = regulator_enable(info->vref); 32344d6f2efSHeiko Stübner if (ret) 32444d6f2efSHeiko Stübner return ret; 32544d6f2efSHeiko Stübner 32644d6f2efSHeiko Stübner ret = clk_prepare_enable(info->pclk); 32744d6f2efSHeiko Stübner if (ret) 32844d6f2efSHeiko Stübner return ret; 32944d6f2efSHeiko Stübner 33044d6f2efSHeiko Stübner ret = clk_prepare_enable(info->clk); 33144d6f2efSHeiko Stübner if (ret) 33244d6f2efSHeiko Stübner return ret; 33344d6f2efSHeiko Stübner 33444d6f2efSHeiko Stübner return ret; 33544d6f2efSHeiko Stübner } 33644d6f2efSHeiko Stübner #endif 33744d6f2efSHeiko Stübner 33844d6f2efSHeiko Stübner static SIMPLE_DEV_PM_OPS(rockchip_saradc_pm_ops, 33944d6f2efSHeiko Stübner rockchip_saradc_suspend, rockchip_saradc_resume); 34044d6f2efSHeiko Stübner 34144d6f2efSHeiko Stübner static struct platform_driver rockchip_saradc_driver = { 34244d6f2efSHeiko Stübner .probe = rockchip_saradc_probe, 34344d6f2efSHeiko Stübner .remove = rockchip_saradc_remove, 34444d6f2efSHeiko Stübner .driver = { 34544d6f2efSHeiko Stübner .name = "rockchip-saradc", 34644d6f2efSHeiko Stübner .of_match_table = rockchip_saradc_match, 34744d6f2efSHeiko Stübner .pm = &rockchip_saradc_pm_ops, 34844d6f2efSHeiko Stübner }, 34944d6f2efSHeiko Stübner }; 35044d6f2efSHeiko Stübner 35144d6f2efSHeiko Stübner module_platform_driver(rockchip_saradc_driver); 352*dc7b8d98SHeiko Stuebner 353*dc7b8d98SHeiko Stuebner MODULE_AUTHOR("Heiko Stuebner <heiko@sntech.de>"); 354*dc7b8d98SHeiko Stuebner MODULE_DESCRIPTION("Rockchip SARADC driver"); 355*dc7b8d98SHeiko Stuebner MODULE_LICENSE("GPL v2"); 356