Thread (79 messages) flat view 79 messages, 8 authors, 2018-09-11
STALE2760d

Revision v3 of 3 in this series.

Revisions (3)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 current

[PATCH v3 09/30] iio: adc: Threat A33 as thermal sensor and remove non thermal sun4i channel

From: Philipp Rossak <hidden>
Date: 2018-08-30 15:45:33
Also in: linux-devicetree, linux-iio, lkml
Subsystem: iio subsystem and drivers, the rest · Maintainers: Jonathan Cameron, Linus Torvalds

We want to use this driver mostly as thermal sensor, that still supports
the adc for the older chips, thus we threat the A33 as thermal sensor.
We also remove the adc channel without thermal support.

Signed-off-by: Philipp Rossak <redacted>
---
 drivers/iio/adc/sun4i-gpadc-iio.c | 19 -------------------
 1 file changed, 19 deletions(-)
diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
index ab474ce86fb6..658a7e3e3370 100644
--- a/drivers/iio/adc/sun4i-gpadc-iio.c
+++ b/drivers/iio/adc/sun4i-gpadc-iio.c
@@ -123,23 +123,6 @@ static const struct iio_chan_spec sun4i_gpadc_channels[] = {
 	},
 };
 
-static const struct iio_chan_spec sun4i_gpadc_channels_no_temp[] = {
-	SUN4I_GPADC_ADC_CHANNEL(0, "adc_chan0"),
-	SUN4I_GPADC_ADC_CHANNEL(1, "adc_chan1"),
-	SUN4I_GPADC_ADC_CHANNEL(2, "adc_chan2"),
-	SUN4I_GPADC_ADC_CHANNEL(3, "adc_chan3"),
-};
-
-static const struct iio_chan_spec sun8i_a33_gpadc_channels[] = {
-	{
-		.type = IIO_TEMP,
-		.info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
-				      BIT(IIO_CHAN_INFO_SCALE) |
-				      BIT(IIO_CHAN_INFO_OFFSET),
-		.datasheet_name = "temp_adc",
-	},
-};
-
 static const struct regmap_config sun4i_gpadc_regmap_config = {
 	.reg_bits = 32,
 	.val_bits = 32,
@@ -444,8 +427,6 @@ static int sun4i_gpadc_probe_dt(struct platform_device *pdev,
 		return -ENODEV;
 
 	info->no_irq = true;
-	indio_dev->num_channels = ARRAY_SIZE(sun8i_a33_gpadc_channels);
-	indio_dev->channels = sun8i_a33_gpadc_channels;
 
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	base = devm_ioremap_resource(&pdev->dev, mem);
-- 
2.11.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help