Thread (1 message) 1 message, 1 author, 2013-06-04

Re: [PATCH 12/19] iio & mfd & input: ti_tscadc: Match mfd sub devices to regmap interface

From: Sebastian Andrzej Siewior <hidden>
Date: 2013-06-04 10:23:18
Also in: linux-iio

Possibly related (same subject, not in this thread)

* Jonathan Cameron | 2013-06-02 18:46:29 [+0100]:
On 05/27/2013 08:11 PM, Sebastian Andrzej Siewior wrote:
quoted
From: Pantelis Antoniou <panto-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>
Some confusing splitting between this and the previous patch that definitely wants
to be cleaned up.
quoted
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index cceff09..72ffe89 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -76,22 +82,24 @@ static void tiadc_step_config(struct tiadc_device *adc_dev)
 	tiadc_writel(adc_dev, REG_SE, STPENB_STEPENB);
 }
 
-static int tiadc_channel_init(struct iio_dev *indio_dev, int channels)
+static int tiadc_channel_init(struct iio_dev *indio_dev,
+		struct tiadc_device *adc_dev)
 {
 	struct iio_chan_spec *chan_array;
 	struct iio_chan_spec *chan;
 	char *s;
 	int i, len, size, ret;
+	int channels = adc_dev->channels;
This is an unconnected bit of cleanup.  If you want it put it in the previous patch
which only just introduced what you are changing.
It will be probably best.
quoted
diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
index bd127bd..a27401a 100644
--- a/drivers/mfd/ti_am335x_tscadc.c
+++ b/drivers/mfd/ti_am335x_tscadc.c
@@ -31,6 +31,7 @@ static unsigned int tscadc_readl(struct ti_tscadc_dev *tsadc, unsigned int reg)
 {
 	unsigned int val;
????  What is this doing here? It's not doing the move to regmap but rather setting a default value.
No lo sé :) I saw that and was wondering myself a little and planned the
romval of this default for later. Now I think I do this earlier.
quoted
+	val = (unsigned int)-1;
 	regmap_read(tsadc->regmap_tscadc, reg, &val);
 	return val;
 }
Sebastian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help