forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/iio/adc/axp288_adc.c
....@@ -1,19 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * axp288_adc.c - X-Powers AXP288 PMIC ADC Driver
34 *
45 * Copyright (C) 2014 Intel Corporation
56 *
67 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; version 2 of the License.
11
- *
12
- * This program is distributed in the hope that it will be useful, but
13
- * WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
- * General Public License for more details.
16
- *
178 */
189
1910 #include <linux/dmi.h>
....@@ -205,6 +196,14 @@
205196 },
206197 .driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
207198 },
199
+ {
200
+ /* Nuvision Solo 10 Draw */
201
+ .matches = {
202
+ DMI_MATCH(DMI_SYS_VENDOR, "TMAX"),
203
+ DMI_MATCH(DMI_PRODUCT_NAME, "TM101W610L"),
204
+ },
205
+ .driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA,
206
+ },
208207 {}
209208 };
210209
....@@ -266,10 +265,8 @@
266265
267266 info = iio_priv(indio_dev);
268267 info->irq = platform_get_irq(pdev, 0);
269
- if (info->irq < 0) {
270
- dev_err(&pdev->dev, "no irq resource?\n");
268
+ if (info->irq < 0)
271269 return info->irq;
272
- }
273270 platform_set_drvdata(pdev, indio_dev);
274271 info->regmap = axp20x->regmap;
275272 /*
....@@ -282,7 +279,6 @@
282279 return ret;
283280 }
284281
285
- indio_dev->dev.parent = &pdev->dev;
286282 indio_dev->name = pdev->name;
287283 indio_dev->channels = axp288_adc_channels;
288284 indio_dev->num_channels = ARRAY_SIZE(axp288_adc_channels);