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

Started by Sebastian Andrzej Siewior on Jun 4, 2013

open the first message on its own page

Message details and related content
* Jonathan Cameron | 2013-06-02 18:46:29 [+0100]:
On 05/27/2013 08:11 PM, Sebastian Andrzej Siewior wrote:
quoted
From: Pantelis Antoniou <redacted>
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 / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help