* [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names
@ 2015-07-18 12:30 Stefan Wahren
2015-07-18 12:30 ` [PATCH 1/6] iio: mxs-lradc: clarify supported devices Stefan Wahren
` (6 more replies)
0 siblings, 7 replies; 24+ messages in thread
From: Stefan Wahren @ 2015-07-18 12:30 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Greg Kroah-Hartman, Marek Vasut, Kristina Martšenko,
Fabio Estevam, linux-iio, devel, Stefan Wahren
This patch series does some clean up in mxs-lradc and finally add the
datasheet names for every usable channel.
Changes in V2:
- remove confusing i.MX28 specific comments
- fix some spelling errors
- fix up includes
- separate channel spec for i.MX23 and i.MX28
Stefan Wahren (6):
iio: mxs-lradc: clarify supported devices
iio: mxs-lradc: fix some spelling errors
iio: mxs-lradc: add missing include
iio: mxs-lradc: remove unnecessary header includes
iio: mxs-lradc: reorder header includes
iio: mxs-lradc: add datasheet name for every usable channel
.../bindings/staging/iio/adc/mxs-lradc.txt | 2 +-
drivers/staging/iio/adc/mxs-lradc.c | 122 +++++++++++++-------
2 files changed, 82 insertions(+), 42 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 1/6] iio: mxs-lradc: clarify supported devices
2015-07-18 12:30 [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names Stefan Wahren
@ 2015-07-18 12:30 ` Stefan Wahren
2015-07-19 9:32 ` Jonathan Cameron
2015-07-18 12:30 ` [PATCH 2/6] iio: mxs-lradc: fix some spelling errors Stefan Wahren
` (5 subsequent siblings)
6 siblings, 1 reply; 24+ messages in thread
From: Stefan Wahren @ 2015-07-18 12:30 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Greg Kroah-Hartman, Marek Vasut, Kristina Martšenko,
Fabio Estevam, linux-iio, devel, Stefan Wahren
At the beginning the driver supported only i.MX28 SoC, but now the
whole MXS platform. So remove any confusing comments which apply
only to i.MX28.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
.../bindings/staging/iio/adc/mxs-lradc.txt | 2 +-
drivers/staging/iio/adc/mxs-lradc.c | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt
index 3075377..555fb11 100644
--- a/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt
+++ b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt
@@ -1,4 +1,4 @@
-* Freescale i.MX28 LRADC device driver
+* Freescale MXS LRADC device driver
Required properties:
- compatible: Should be "fsl,imx23-lradc" for i.MX23 SoC and "fsl,imx28-lradc"
diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
index d7c5223..1ccb367 100644
--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -1,5 +1,5 @@
/*
- * Freescale i.MX28 LRADC driver
+ * Freescale MXS LRADC driver
*
* Copyright (c) 2012 DENX Software Engineering, GmbH.
* Marek Vasut <marex@denx.de>
@@ -1392,7 +1392,7 @@ static const struct iio_chan_spec mxs_lradc_chan_spec[] = {
MXS_ADC_CHAN(4, IIO_VOLTAGE),
MXS_ADC_CHAN(5, IIO_VOLTAGE),
MXS_ADC_CHAN(6, IIO_VOLTAGE),
- MXS_ADC_CHAN(7, IIO_VOLTAGE), /* VBATT */
+ MXS_ADC_CHAN(7, IIO_VOLTAGE),
/* Combined Temperature sensors */
{
.type = IIO_TEMP,
@@ -1411,12 +1411,12 @@ static const struct iio_chan_spec mxs_lradc_chan_spec[] = {
.scan_index = -1,
.channel = 9,
},
- MXS_ADC_CHAN(10, IIO_VOLTAGE), /* VDDIO */
- MXS_ADC_CHAN(11, IIO_VOLTAGE), /* VTH */
- MXS_ADC_CHAN(12, IIO_VOLTAGE), /* VDDA */
- MXS_ADC_CHAN(13, IIO_VOLTAGE), /* VDDD */
- MXS_ADC_CHAN(14, IIO_VOLTAGE), /* VBG */
- MXS_ADC_CHAN(15, IIO_VOLTAGE), /* VDD5V */
+ MXS_ADC_CHAN(10, IIO_VOLTAGE),
+ MXS_ADC_CHAN(11, IIO_VOLTAGE),
+ MXS_ADC_CHAN(12, IIO_VOLTAGE),
+ MXS_ADC_CHAN(13, IIO_VOLTAGE),
+ MXS_ADC_CHAN(14, IIO_VOLTAGE),
+ MXS_ADC_CHAN(15, IIO_VOLTAGE),
};
static int mxs_lradc_hw_init(struct mxs_lradc *lradc)
@@ -1707,6 +1707,6 @@ static struct platform_driver mxs_lradc_driver = {
module_platform_driver(mxs_lradc_driver);
MODULE_AUTHOR("Marek Vasut <marex@denx.de>");
-MODULE_DESCRIPTION("Freescale i.MX28 LRADC driver");
+MODULE_DESCRIPTION("Freescale MXS LRADC driver");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:" DRIVER_NAME);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 2/6] iio: mxs-lradc: fix some spelling errors
2015-07-18 12:30 [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names Stefan Wahren
2015-07-18 12:30 ` [PATCH 1/6] iio: mxs-lradc: clarify supported devices Stefan Wahren
@ 2015-07-18 12:30 ` Stefan Wahren
2015-07-19 9:33 ` Jonathan Cameron
2015-07-18 12:30 ` [PATCH 3/6] iio: mxs-lradc: add missing include Stefan Wahren
` (4 subsequent siblings)
6 siblings, 1 reply; 24+ messages in thread
From: Stefan Wahren @ 2015-07-18 12:30 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Greg Kroah-Hartman, Marek Vasut, Kristina Martšenko,
Fabio Estevam, linux-iio, devel, Stefan Wahren
This patch fix some spelling errors in the comments.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/staging/iio/adc/mxs-lradc.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
index 1ccb367..386a44d 100644
--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -65,14 +65,14 @@
* Once the pen touches the touchscreen, the touchscreen switches from
* IRQ-driven mode to polling mode to prevent interrupt storm. The polling
* is realized by worker thread, which is called every 20 or so milliseconds.
- * This gives the touchscreen enough fluence and does not strain the system
+ * This gives the touchscreen enough fluency and does not strain the system
* too much.
*/
#define LRADC_TS_SAMPLE_DELAY_MS 5
/*
* The LRADC reads the following amount of samples from each touchscreen
- * channel and the driver then computes avarage of these.
+ * channel and the driver then computes average of these.
*/
#define LRADC_TS_SAMPLE_AMOUNT 4
@@ -238,7 +238,7 @@ struct mxs_lradc {
* CH5 -- Touch screen YNLR
* CH6 -- Touch screen WIPER (5-wire only)
*
- * The bitfields below represents which parts of the LRADC block are
+ * The bit fields below represents which parts of the LRADC block are
* switched into special mode of operation. These channels can not
* be sampled as regular LRADC channels. The driver will refuse any
* attempt to sample these channels.
@@ -252,7 +252,7 @@ struct mxs_lradc {
struct input_dev *ts_input;
enum mxs_lradc_id soc;
- enum lradc_ts_plate cur_plate; /* statemachine */
+ enum lradc_ts_plate cur_plate; /* state machine */
bool ts_valid;
unsigned ts_x_pos;
unsigned ts_y_pos;
@@ -812,7 +812,7 @@ static int mxs_lradc_read_single(struct iio_dev *iio_dev, int chan, int *val)
int ret;
/*
- * See if there is no buffered operation in progess. If there is, simply
+ * See if there is no buffered operation in progress. If there is, simply
* bail out. This can be improved to support both buffered and raw IO at
* the same time, yet the code becomes horribly complicated. Therefore I
* applied KISS principle here.
--
1.7.9.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 3/6] iio: mxs-lradc: add missing include
2015-07-18 12:30 [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names Stefan Wahren
2015-07-18 12:30 ` [PATCH 1/6] iio: mxs-lradc: clarify supported devices Stefan Wahren
2015-07-18 12:30 ` [PATCH 2/6] iio: mxs-lradc: fix some spelling errors Stefan Wahren
@ 2015-07-18 12:30 ` Stefan Wahren
2015-07-19 9:34 ` Jonathan Cameron
2015-07-18 12:30 ` [PATCH 4/6] iio: mxs-lradc: remove unnecessary header includes Stefan Wahren
` (3 subsequent siblings)
6 siblings, 1 reply; 24+ messages in thread
From: Stefan Wahren @ 2015-07-18 12:30 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Greg Kroah-Hartman, Marek Vasut, Kristina Martšenko,
Fabio Estevam, linux-iio, devel, Stefan Wahren
This patch adds the missing include for mutex handling.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/staging/iio/adc/mxs-lradc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
index 386a44d..763075b 100644
--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -26,6 +26,7 @@
#include <linux/list.h>
#include <linux/io.h>
#include <linux/module.h>
+#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
--
1.7.9.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 4/6] iio: mxs-lradc: remove unnecessary header includes
2015-07-18 12:30 [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names Stefan Wahren
` (2 preceding siblings ...)
2015-07-18 12:30 ` [PATCH 3/6] iio: mxs-lradc: add missing include Stefan Wahren
@ 2015-07-18 12:30 ` Stefan Wahren
2015-07-19 9:35 ` Jonathan Cameron
2015-07-18 12:30 ` [PATCH 5/6] iio: mxs-lradc: reorder " Stefan Wahren
` (2 subsequent siblings)
6 siblings, 1 reply; 24+ messages in thread
From: Stefan Wahren @ 2015-07-18 12:30 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Greg Kroah-Hartman, Marek Vasut, Kristina Martšenko,
Fabio Estevam, linux-iio, devel, Stefan Wahren
This patch removes the unnecessary header includes.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/staging/iio/adc/mxs-lradc.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
index 763075b..21b0ccf 100644
--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -23,18 +23,13 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/sysfs.h>
-#include <linux/list.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
-#include <linux/spinlock.h>
-#include <linux/wait.h>
-#include <linux/sched.h>
#include <linux/stmp_device.h>
#include <linux/bitops.h>
#include <linux/completion.h>
-#include <linux/delay.h>
#include <linux/input.h>
#include <linux/clk.h>
--
1.7.9.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 5/6] iio: mxs-lradc: reorder header includes
2015-07-18 12:30 [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names Stefan Wahren
` (3 preceding siblings ...)
2015-07-18 12:30 ` [PATCH 4/6] iio: mxs-lradc: remove unnecessary header includes Stefan Wahren
@ 2015-07-18 12:30 ` Stefan Wahren
2015-07-18 15:37 ` Marek Vasut
2015-07-18 12:30 ` [PATCH 6/6] iio: mxs-lradc: add datasheet name for every usable channel Stefan Wahren
2015-07-18 15:38 ` [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names Marek Vasut
6 siblings, 1 reply; 24+ messages in thread
From: Stefan Wahren @ 2015-07-18 12:30 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Greg Kroah-Hartman, Marek Vasut, Kristina Martšenko,
Fabio Estevam, linux-iio, devel, Stefan Wahren
This patch reorder the header includes alphabetically.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/staging/iio/adc/mxs-lradc.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
index 21b0ccf..3a549ef 100644
--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -15,30 +15,30 @@
* GNU General Public License for more details.
*/
+#include <linux/bitops.h>
+#include <linux/clk.h>
+#include <linux/completion.h>
+#include <linux/device.h>
#include <linux/err.h>
+#include <linux/input.h>
#include <linux/interrupt.h>
-#include <linux/device.h>
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/of.h>
-#include <linux/of_device.h>
-#include <linux/sysfs.h>
#include <linux/io.h>
+#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
#include <linux/platform_device.h>
+#include <linux/slab.h>
#include <linux/stmp_device.h>
-#include <linux/bitops.h>
-#include <linux/completion.h>
-#include <linux/input.h>
-#include <linux/clk.h>
+#include <linux/sysfs.h>
-#include <linux/iio/iio.h>
-#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>
+#include <linux/iio/iio.h>
#include <linux/iio/trigger.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
+#include <linux/iio/sysfs.h>
#define DRIVER_NAME "mxs-lradc"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 6/6] iio: mxs-lradc: add datasheet name for every usable channel
2015-07-18 12:30 [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names Stefan Wahren
` (4 preceding siblings ...)
2015-07-18 12:30 ` [PATCH 5/6] iio: mxs-lradc: reorder " Stefan Wahren
@ 2015-07-18 12:30 ` Stefan Wahren
2015-07-19 9:40 ` Jonathan Cameron
2015-07-18 15:38 ` [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names Marek Vasut
6 siblings, 1 reply; 24+ messages in thread
From: Stefan Wahren @ 2015-07-18 12:30 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Greg Kroah-Hartman, Marek Vasut, Kristina Martšenko,
Fabio Estevam, linux-iio, devel, Stefan Wahren
In order to provide a channel name to in kernel consumers add the
datasheet names for every usable AD channel. Since the channel names
differ between i.MX23 and i.MX28, we need to separate the channel
specs.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
drivers/staging/iio/adc/mxs-lradc.c | 80 +++++++++++++++++++++++++++--------
1 file changed, 62 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
index 3a549ef..3f7715c 100644
--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -1365,7 +1365,7 @@ static const struct iio_buffer_setup_ops mxs_lradc_buffer_ops = {
* Driver initialization
*/
-#define MXS_ADC_CHAN(idx, chan_type) { \
+#define MXS_ADC_CHAN(idx, chan_type, name) { \
.type = (chan_type), \
.indexed = 1, \
.scan_index = (idx), \
@@ -1378,17 +1378,18 @@ static const struct iio_buffer_setup_ops mxs_lradc_buffer_ops = {
.realbits = LRADC_RESOLUTION, \
.storagebits = 32, \
}, \
+ .datasheet_name = (name), \
}
-static const struct iio_chan_spec mxs_lradc_chan_spec[] = {
- MXS_ADC_CHAN(0, IIO_VOLTAGE),
- MXS_ADC_CHAN(1, IIO_VOLTAGE),
- MXS_ADC_CHAN(2, IIO_VOLTAGE),
- MXS_ADC_CHAN(3, IIO_VOLTAGE),
- MXS_ADC_CHAN(4, IIO_VOLTAGE),
- MXS_ADC_CHAN(5, IIO_VOLTAGE),
- MXS_ADC_CHAN(6, IIO_VOLTAGE),
- MXS_ADC_CHAN(7, IIO_VOLTAGE),
+static const struct iio_chan_spec mx23_lradc_chan_spec[] = {
+ MXS_ADC_CHAN(0, IIO_VOLTAGE, "LRADC0"),
+ MXS_ADC_CHAN(1, IIO_VOLTAGE, "LRADC1"),
+ MXS_ADC_CHAN(2, IIO_VOLTAGE, "LRADC2"),
+ MXS_ADC_CHAN(3, IIO_VOLTAGE, "LRADC3"),
+ MXS_ADC_CHAN(4, IIO_VOLTAGE, "LRADC4"),
+ MXS_ADC_CHAN(5, IIO_VOLTAGE, "LRADC5"),
+ MXS_ADC_CHAN(6, IIO_VOLTAGE, "VDDIO"),
+ MXS_ADC_CHAN(7, IIO_VOLTAGE, "VBATT"),
/* Combined Temperature sensors */
{
.type = IIO_TEMP,
@@ -1399,6 +1400,7 @@ static const struct iio_chan_spec mxs_lradc_chan_spec[] = {
BIT(IIO_CHAN_INFO_SCALE),
.channel = 8,
.scan_type = {.sign = 'u', .realbits = 18, .storagebits = 32,},
+ .datasheet_name = "TEMP_DIE",
},
/* Hidden channel to keep indexes */
{
@@ -1407,12 +1409,48 @@ static const struct iio_chan_spec mxs_lradc_chan_spec[] = {
.scan_index = -1,
.channel = 9,
},
- MXS_ADC_CHAN(10, IIO_VOLTAGE),
- MXS_ADC_CHAN(11, IIO_VOLTAGE),
- MXS_ADC_CHAN(12, IIO_VOLTAGE),
- MXS_ADC_CHAN(13, IIO_VOLTAGE),
- MXS_ADC_CHAN(14, IIO_VOLTAGE),
- MXS_ADC_CHAN(15, IIO_VOLTAGE),
+ MXS_ADC_CHAN(10, IIO_VOLTAGE, NULL),
+ MXS_ADC_CHAN(11, IIO_VOLTAGE, NULL),
+ MXS_ADC_CHAN(12, IIO_VOLTAGE, "USB_DP"),
+ MXS_ADC_CHAN(13, IIO_VOLTAGE, "USB_DN"),
+ MXS_ADC_CHAN(14, IIO_VOLTAGE, "VBG"),
+ MXS_ADC_CHAN(15, IIO_VOLTAGE, "VDD5V"),
+};
+
+static const struct iio_chan_spec mx28_lradc_chan_spec[] = {
+ MXS_ADC_CHAN(0, IIO_VOLTAGE, "LRADC0"),
+ MXS_ADC_CHAN(1, IIO_VOLTAGE, "LRADC1"),
+ MXS_ADC_CHAN(2, IIO_VOLTAGE, "LRADC2"),
+ MXS_ADC_CHAN(3, IIO_VOLTAGE, "LRADC3"),
+ MXS_ADC_CHAN(4, IIO_VOLTAGE, "LRADC4"),
+ MXS_ADC_CHAN(5, IIO_VOLTAGE, "LRADC5"),
+ MXS_ADC_CHAN(6, IIO_VOLTAGE, "LRADC6"),
+ MXS_ADC_CHAN(7, IIO_VOLTAGE, "VBATT"),
+ /* Combined Temperature sensors */
+ {
+ .type = IIO_TEMP,
+ .indexed = 1,
+ .scan_index = 8,
+ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
+ BIT(IIO_CHAN_INFO_OFFSET) |
+ BIT(IIO_CHAN_INFO_SCALE),
+ .channel = 8,
+ .scan_type = {.sign = 'u', .realbits = 18, .storagebits = 32,},
+ .datasheet_name = "TEMP_DIE",
+ },
+ /* Hidden channel to keep indexes */
+ {
+ .type = IIO_TEMP,
+ .indexed = 1,
+ .scan_index = -1,
+ .channel = 9,
+ },
+ MXS_ADC_CHAN(10, IIO_VOLTAGE, "VDDIO"),
+ MXS_ADC_CHAN(11, IIO_VOLTAGE, "VTH"),
+ MXS_ADC_CHAN(12, IIO_VOLTAGE, "VDDA"),
+ MXS_ADC_CHAN(13, IIO_VOLTAGE, "VDDD"),
+ MXS_ADC_CHAN(14, IIO_VOLTAGE, "VBG"),
+ MXS_ADC_CHAN(15, IIO_VOLTAGE, "VDD5V"),
};
static int mxs_lradc_hw_init(struct mxs_lradc *lradc)
@@ -1608,10 +1646,16 @@ static int mxs_lradc_probe(struct platform_device *pdev)
iio->dev.parent = &pdev->dev;
iio->info = &mxs_lradc_iio_info;
iio->modes = INDIO_DIRECT_MODE;
- iio->channels = mxs_lradc_chan_spec;
- iio->num_channels = ARRAY_SIZE(mxs_lradc_chan_spec);
iio->masklength = LRADC_MAX_TOTAL_CHANS;
+ if (lradc->soc == IMX23_LRADC) {
+ iio->channels = mx23_lradc_chan_spec;
+ iio->num_channels = ARRAY_SIZE(mx23_lradc_chan_spec);
+ } else {
+ iio->channels = mx28_lradc_chan_spec;
+ iio->num_channels = ARRAY_SIZE(mx28_lradc_chan_spec);
+ }
+
ret = iio_triggered_buffer_setup(iio, &iio_pollfunc_store_time,
&mxs_lradc_trigger_handler,
&mxs_lradc_buffer_ops);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 5/6] iio: mxs-lradc: reorder header includes
2015-07-18 12:30 ` [PATCH 5/6] iio: mxs-lradc: reorder " Stefan Wahren
@ 2015-07-18 15:37 ` Marek Vasut
2015-07-19 9:37 ` Jonathan Cameron
0 siblings, 1 reply; 24+ messages in thread
From: Marek Vasut @ 2015-07-18 15:37 UTC (permalink / raw)
To: Stefan Wahren
Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald, Greg Kroah-Hartman, Kristina Martšenko,
Fabio Estevam, linux-iio, devel
On Saturday, July 18, 2015 at 02:30:45 PM, Stefan Wahren wrote:
> This patch reorder the header includes alphabetically.
You call that operation "sort" :)
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names
2015-07-18 12:30 [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names Stefan Wahren
` (5 preceding siblings ...)
2015-07-18 12:30 ` [PATCH 6/6] iio: mxs-lradc: add datasheet name for every usable channel Stefan Wahren
@ 2015-07-18 15:38 ` Marek Vasut
2015-07-19 9:45 ` Jonathan Cameron
6 siblings, 1 reply; 24+ messages in thread
From: Marek Vasut @ 2015-07-18 15:38 UTC (permalink / raw)
To: Stefan Wahren
Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald, Greg Kroah-Hartman, Kristina Martšenko,
Fabio Estevam, linux-iio, devel
On Saturday, July 18, 2015 at 02:30:40 PM, Stefan Wahren wrote:
> This patch series does some clean up in mxs-lradc and finally add the
> datasheet names for every usable channel.
>
> Changes in V2:
> - remove confusing i.MX28 specific comments
> - fix some spelling errors
> - fix up includes
> - separate channel spec for i.MX23 and i.MX28
>
> Stefan Wahren (6):
> iio: mxs-lradc: clarify supported devices
> iio: mxs-lradc: fix some spelling errors
> iio: mxs-lradc: add missing include
> iio: mxs-lradc: remove unnecessary header includes
> iio: mxs-lradc: reorder header includes
> iio: mxs-lradc: add datasheet name for every usable channel
>
> .../bindings/staging/iio/adc/mxs-lradc.txt | 2 +-
> drivers/staging/iio/adc/mxs-lradc.c | 122
> +++++++++++++------- 2 files changed, 82 insertions(+), 42 deletions(-)
Entire series
Reviewed-by: Marek Vasut <marex@denx.de>
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 1/6] iio: mxs-lradc: clarify supported devices
2015-07-18 12:30 ` [PATCH 1/6] iio: mxs-lradc: clarify supported devices Stefan Wahren
@ 2015-07-19 9:32 ` Jonathan Cameron
0 siblings, 0 replies; 24+ messages in thread
From: Jonathan Cameron @ 2015-07-19 9:32 UTC (permalink / raw)
To: Stefan Wahren
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Greg Kroah-Hartman, Marek Vasut, Kristina Martšenko,
Fabio Estevam, linux-iio, devel
On 18/07/15 13:30, Stefan Wahren wrote:
> At the beginning the driver supported only i.MX28 SoC, but now the
> whole MXS platform. So remove any confusing comments which apply
> only to i.MX28.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Applied to the togreg branch of iio.git. Initially pushed out as
testing for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> .../bindings/staging/iio/adc/mxs-lradc.txt | 2 +-
> drivers/staging/iio/adc/mxs-lradc.c | 18 +++++++++---------
> 2 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt
> index 3075377..555fb11 100644
> --- a/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt
> +++ b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt
> @@ -1,4 +1,4 @@
> -* Freescale i.MX28 LRADC device driver
> +* Freescale MXS LRADC device driver
>
> Required properties:
> - compatible: Should be "fsl,imx23-lradc" for i.MX23 SoC and "fsl,imx28-lradc"
> diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
> index d7c5223..1ccb367 100644
> --- a/drivers/staging/iio/adc/mxs-lradc.c
> +++ b/drivers/staging/iio/adc/mxs-lradc.c
> @@ -1,5 +1,5 @@
> /*
> - * Freescale i.MX28 LRADC driver
> + * Freescale MXS LRADC driver
> *
> * Copyright (c) 2012 DENX Software Engineering, GmbH.
> * Marek Vasut <marex@denx.de>
> @@ -1392,7 +1392,7 @@ static const struct iio_chan_spec mxs_lradc_chan_spec[] = {
> MXS_ADC_CHAN(4, IIO_VOLTAGE),
> MXS_ADC_CHAN(5, IIO_VOLTAGE),
> MXS_ADC_CHAN(6, IIO_VOLTAGE),
> - MXS_ADC_CHAN(7, IIO_VOLTAGE), /* VBATT */
> + MXS_ADC_CHAN(7, IIO_VOLTAGE),
> /* Combined Temperature sensors */
> {
> .type = IIO_TEMP,
> @@ -1411,12 +1411,12 @@ static const struct iio_chan_spec mxs_lradc_chan_spec[] = {
> .scan_index = -1,
> .channel = 9,
> },
> - MXS_ADC_CHAN(10, IIO_VOLTAGE), /* VDDIO */
> - MXS_ADC_CHAN(11, IIO_VOLTAGE), /* VTH */
> - MXS_ADC_CHAN(12, IIO_VOLTAGE), /* VDDA */
> - MXS_ADC_CHAN(13, IIO_VOLTAGE), /* VDDD */
> - MXS_ADC_CHAN(14, IIO_VOLTAGE), /* VBG */
> - MXS_ADC_CHAN(15, IIO_VOLTAGE), /* VDD5V */
> + MXS_ADC_CHAN(10, IIO_VOLTAGE),
> + MXS_ADC_CHAN(11, IIO_VOLTAGE),
> + MXS_ADC_CHAN(12, IIO_VOLTAGE),
> + MXS_ADC_CHAN(13, IIO_VOLTAGE),
> + MXS_ADC_CHAN(14, IIO_VOLTAGE),
> + MXS_ADC_CHAN(15, IIO_VOLTAGE),
> };
>
> static int mxs_lradc_hw_init(struct mxs_lradc *lradc)
> @@ -1707,6 +1707,6 @@ static struct platform_driver mxs_lradc_driver = {
> module_platform_driver(mxs_lradc_driver);
>
> MODULE_AUTHOR("Marek Vasut <marex@denx.de>");
> -MODULE_DESCRIPTION("Freescale i.MX28 LRADC driver");
> +MODULE_DESCRIPTION("Freescale MXS LRADC driver");
> MODULE_LICENSE("GPL v2");
> MODULE_ALIAS("platform:" DRIVER_NAME);
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/6] iio: mxs-lradc: fix some spelling errors
2015-07-18 12:30 ` [PATCH 2/6] iio: mxs-lradc: fix some spelling errors Stefan Wahren
@ 2015-07-19 9:33 ` Jonathan Cameron
0 siblings, 0 replies; 24+ messages in thread
From: Jonathan Cameron @ 2015-07-19 9:33 UTC (permalink / raw)
To: Stefan Wahren
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Greg Kroah-Hartman, Marek Vasut, Kristina Martšenko,
Fabio Estevam, linux-iio, devel
On 18/07/15 13:30, Stefan Wahren wrote:
> This patch fix some spelling errors in the comments.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Applied.
> ---
> drivers/staging/iio/adc/mxs-lradc.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
> index 1ccb367..386a44d 100644
> --- a/drivers/staging/iio/adc/mxs-lradc.c
> +++ b/drivers/staging/iio/adc/mxs-lradc.c
> @@ -65,14 +65,14 @@
> * Once the pen touches the touchscreen, the touchscreen switches from
> * IRQ-driven mode to polling mode to prevent interrupt storm. The polling
> * is realized by worker thread, which is called every 20 or so milliseconds.
> - * This gives the touchscreen enough fluence and does not strain the system
> + * This gives the touchscreen enough fluency and does not strain the system
> * too much.
> */
> #define LRADC_TS_SAMPLE_DELAY_MS 5
>
> /*
> * The LRADC reads the following amount of samples from each touchscreen
> - * channel and the driver then computes avarage of these.
> + * channel and the driver then computes average of these.
> */
> #define LRADC_TS_SAMPLE_AMOUNT 4
>
> @@ -238,7 +238,7 @@ struct mxs_lradc {
> * CH5 -- Touch screen YNLR
> * CH6 -- Touch screen WIPER (5-wire only)
> *
> - * The bitfields below represents which parts of the LRADC block are
> + * The bit fields below represents which parts of the LRADC block are
> * switched into special mode of operation. These channels can not
> * be sampled as regular LRADC channels. The driver will refuse any
> * attempt to sample these channels.
> @@ -252,7 +252,7 @@ struct mxs_lradc {
> struct input_dev *ts_input;
>
> enum mxs_lradc_id soc;
> - enum lradc_ts_plate cur_plate; /* statemachine */
> + enum lradc_ts_plate cur_plate; /* state machine */
> bool ts_valid;
> unsigned ts_x_pos;
> unsigned ts_y_pos;
> @@ -812,7 +812,7 @@ static int mxs_lradc_read_single(struct iio_dev *iio_dev, int chan, int *val)
> int ret;
>
> /*
> - * See if there is no buffered operation in progess. If there is, simply
> + * See if there is no buffered operation in progress. If there is, simply
> * bail out. This can be improved to support both buffered and raw IO at
> * the same time, yet the code becomes horribly complicated. Therefore I
> * applied KISS principle here.
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/6] iio: mxs-lradc: add missing include
2015-07-18 12:30 ` [PATCH 3/6] iio: mxs-lradc: add missing include Stefan Wahren
@ 2015-07-19 9:34 ` Jonathan Cameron
0 siblings, 0 replies; 24+ messages in thread
From: Jonathan Cameron @ 2015-07-19 9:34 UTC (permalink / raw)
To: Stefan Wahren
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Greg Kroah-Hartman, Marek Vasut, Kristina Martšenko,
Fabio Estevam, linux-iio, devel
On 18/07/15 13:30, Stefan Wahren wrote:
> This patch adds the missing include for mutex handling.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Applied to the togreg branch of iio.git
Jonathan
> ---
> drivers/staging/iio/adc/mxs-lradc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
> index 386a44d..763075b 100644
> --- a/drivers/staging/iio/adc/mxs-lradc.c
> +++ b/drivers/staging/iio/adc/mxs-lradc.c
> @@ -26,6 +26,7 @@
> #include <linux/list.h>
> #include <linux/io.h>
> #include <linux/module.h>
> +#include <linux/mutex.h>
> #include <linux/platform_device.h>
> #include <linux/spinlock.h>
> #include <linux/wait.h>
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 4/6] iio: mxs-lradc: remove unnecessary header includes
2015-07-18 12:30 ` [PATCH 4/6] iio: mxs-lradc: remove unnecessary header includes Stefan Wahren
@ 2015-07-19 9:35 ` Jonathan Cameron
0 siblings, 0 replies; 24+ messages in thread
From: Jonathan Cameron @ 2015-07-19 9:35 UTC (permalink / raw)
To: Stefan Wahren
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Greg Kroah-Hartman, Marek Vasut, Kristina Martšenko,
Fabio Estevam, linux-iio, devel
On 18/07/15 13:30, Stefan Wahren wrote:
> This patch removes the unnecessary header includes.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Applied.
> ---
> drivers/staging/iio/adc/mxs-lradc.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
> index 763075b..21b0ccf 100644
> --- a/drivers/staging/iio/adc/mxs-lradc.c
> +++ b/drivers/staging/iio/adc/mxs-lradc.c
> @@ -23,18 +23,13 @@
> #include <linux/of.h>
> #include <linux/of_device.h>
> #include <linux/sysfs.h>
> -#include <linux/list.h>
> #include <linux/io.h>
> #include <linux/module.h>
> #include <linux/mutex.h>
> #include <linux/platform_device.h>
> -#include <linux/spinlock.h>
> -#include <linux/wait.h>
> -#include <linux/sched.h>
> #include <linux/stmp_device.h>
> #include <linux/bitops.h>
> #include <linux/completion.h>
> -#include <linux/delay.h>
> #include <linux/input.h>
> #include <linux/clk.h>
>
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 5/6] iio: mxs-lradc: reorder header includes
2015-07-18 15:37 ` Marek Vasut
@ 2015-07-19 9:37 ` Jonathan Cameron
0 siblings, 0 replies; 24+ messages in thread
From: Jonathan Cameron @ 2015-07-19 9:37 UTC (permalink / raw)
To: Marek Vasut, Stefan Wahren
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Greg Kroah-Hartman, Kristina Martšenko, Fabio Estevam,
linux-iio, devel
On 18/07/15 16:37, Marek Vasut wrote:
> On Saturday, July 18, 2015 at 02:30:45 PM, Stefan Wahren wrote:
>> This patch reorder the header includes alphabetically.
>
> You call that operation "sort" :)
>
> Best regards,
> Marek Vasut
>
Hmm.. I can't say I'm particularly keen on this patch. To
my mind having headers in order doesn't matter as sometimes
the grouping is providing information in of itself. Still
doesn't look that interesting here and as it's part of a good
series, I'll take it.
Just thought I'd be marginally grumpy about it ;)
Applied.
Jonathan
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 6/6] iio: mxs-lradc: add datasheet name for every usable channel
2015-07-18 12:30 ` [PATCH 6/6] iio: mxs-lradc: add datasheet name for every usable channel Stefan Wahren
@ 2015-07-19 9:40 ` Jonathan Cameron
0 siblings, 0 replies; 24+ messages in thread
From: Jonathan Cameron @ 2015-07-19 9:40 UTC (permalink / raw)
To: Stefan Wahren
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Greg Kroah-Hartman, Marek Vasut, Kristina Martšenko,
Fabio Estevam, linux-iio, devel
On 18/07/15 13:30, Stefan Wahren wrote:
> In order to provide a channel name to in kernel consumers add the
> datasheet names for every usable AD channel. Since the channel names
> differ between i.MX23 and i.MX28, we need to separate the channel
> specs.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Good series - nice to have some cleanups and then some more meat at
the end :) Thanks,
Applied to the togreg branch of iio.git.
Pushed out as testing for the autobuilders to play with it.
Jonathan
> ---
> drivers/staging/iio/adc/mxs-lradc.c | 80 +++++++++++++++++++++++++++--------
> 1 file changed, 62 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
> index 3a549ef..3f7715c 100644
> --- a/drivers/staging/iio/adc/mxs-lradc.c
> +++ b/drivers/staging/iio/adc/mxs-lradc.c
> @@ -1365,7 +1365,7 @@ static const struct iio_buffer_setup_ops mxs_lradc_buffer_ops = {
> * Driver initialization
> */
>
> -#define MXS_ADC_CHAN(idx, chan_type) { \
> +#define MXS_ADC_CHAN(idx, chan_type, name) { \
> .type = (chan_type), \
> .indexed = 1, \
> .scan_index = (idx), \
> @@ -1378,17 +1378,18 @@ static const struct iio_buffer_setup_ops mxs_lradc_buffer_ops = {
> .realbits = LRADC_RESOLUTION, \
> .storagebits = 32, \
> }, \
> + .datasheet_name = (name), \
> }
>
> -static const struct iio_chan_spec mxs_lradc_chan_spec[] = {
> - MXS_ADC_CHAN(0, IIO_VOLTAGE),
> - MXS_ADC_CHAN(1, IIO_VOLTAGE),
> - MXS_ADC_CHAN(2, IIO_VOLTAGE),
> - MXS_ADC_CHAN(3, IIO_VOLTAGE),
> - MXS_ADC_CHAN(4, IIO_VOLTAGE),
> - MXS_ADC_CHAN(5, IIO_VOLTAGE),
> - MXS_ADC_CHAN(6, IIO_VOLTAGE),
> - MXS_ADC_CHAN(7, IIO_VOLTAGE),
> +static const struct iio_chan_spec mx23_lradc_chan_spec[] = {
> + MXS_ADC_CHAN(0, IIO_VOLTAGE, "LRADC0"),
> + MXS_ADC_CHAN(1, IIO_VOLTAGE, "LRADC1"),
> + MXS_ADC_CHAN(2, IIO_VOLTAGE, "LRADC2"),
> + MXS_ADC_CHAN(3, IIO_VOLTAGE, "LRADC3"),
> + MXS_ADC_CHAN(4, IIO_VOLTAGE, "LRADC4"),
> + MXS_ADC_CHAN(5, IIO_VOLTAGE, "LRADC5"),
> + MXS_ADC_CHAN(6, IIO_VOLTAGE, "VDDIO"),
> + MXS_ADC_CHAN(7, IIO_VOLTAGE, "VBATT"),
> /* Combined Temperature sensors */
> {
> .type = IIO_TEMP,
> @@ -1399,6 +1400,7 @@ static const struct iio_chan_spec mxs_lradc_chan_spec[] = {
> BIT(IIO_CHAN_INFO_SCALE),
> .channel = 8,
> .scan_type = {.sign = 'u', .realbits = 18, .storagebits = 32,},
> + .datasheet_name = "TEMP_DIE",
> },
> /* Hidden channel to keep indexes */
> {
> @@ -1407,12 +1409,48 @@ static const struct iio_chan_spec mxs_lradc_chan_spec[] = {
> .scan_index = -1,
> .channel = 9,
> },
> - MXS_ADC_CHAN(10, IIO_VOLTAGE),
> - MXS_ADC_CHAN(11, IIO_VOLTAGE),
> - MXS_ADC_CHAN(12, IIO_VOLTAGE),
> - MXS_ADC_CHAN(13, IIO_VOLTAGE),
> - MXS_ADC_CHAN(14, IIO_VOLTAGE),
> - MXS_ADC_CHAN(15, IIO_VOLTAGE),
> + MXS_ADC_CHAN(10, IIO_VOLTAGE, NULL),
> + MXS_ADC_CHAN(11, IIO_VOLTAGE, NULL),
> + MXS_ADC_CHAN(12, IIO_VOLTAGE, "USB_DP"),
> + MXS_ADC_CHAN(13, IIO_VOLTAGE, "USB_DN"),
> + MXS_ADC_CHAN(14, IIO_VOLTAGE, "VBG"),
> + MXS_ADC_CHAN(15, IIO_VOLTAGE, "VDD5V"),
> +};
> +
> +static const struct iio_chan_spec mx28_lradc_chan_spec[] = {
> + MXS_ADC_CHAN(0, IIO_VOLTAGE, "LRADC0"),
> + MXS_ADC_CHAN(1, IIO_VOLTAGE, "LRADC1"),
> + MXS_ADC_CHAN(2, IIO_VOLTAGE, "LRADC2"),
> + MXS_ADC_CHAN(3, IIO_VOLTAGE, "LRADC3"),
> + MXS_ADC_CHAN(4, IIO_VOLTAGE, "LRADC4"),
> + MXS_ADC_CHAN(5, IIO_VOLTAGE, "LRADC5"),
> + MXS_ADC_CHAN(6, IIO_VOLTAGE, "LRADC6"),
> + MXS_ADC_CHAN(7, IIO_VOLTAGE, "VBATT"),
> + /* Combined Temperature sensors */
> + {
> + .type = IIO_TEMP,
> + .indexed = 1,
> + .scan_index = 8,
> + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
> + BIT(IIO_CHAN_INFO_OFFSET) |
> + BIT(IIO_CHAN_INFO_SCALE),
> + .channel = 8,
> + .scan_type = {.sign = 'u', .realbits = 18, .storagebits = 32,},
> + .datasheet_name = "TEMP_DIE",
> + },
> + /* Hidden channel to keep indexes */
> + {
> + .type = IIO_TEMP,
> + .indexed = 1,
> + .scan_index = -1,
> + .channel = 9,
> + },
> + MXS_ADC_CHAN(10, IIO_VOLTAGE, "VDDIO"),
> + MXS_ADC_CHAN(11, IIO_VOLTAGE, "VTH"),
> + MXS_ADC_CHAN(12, IIO_VOLTAGE, "VDDA"),
> + MXS_ADC_CHAN(13, IIO_VOLTAGE, "VDDD"),
> + MXS_ADC_CHAN(14, IIO_VOLTAGE, "VBG"),
> + MXS_ADC_CHAN(15, IIO_VOLTAGE, "VDD5V"),
> };
>
> static int mxs_lradc_hw_init(struct mxs_lradc *lradc)
> @@ -1608,10 +1646,16 @@ static int mxs_lradc_probe(struct platform_device *pdev)
> iio->dev.parent = &pdev->dev;
> iio->info = &mxs_lradc_iio_info;
> iio->modes = INDIO_DIRECT_MODE;
> - iio->channels = mxs_lradc_chan_spec;
> - iio->num_channels = ARRAY_SIZE(mxs_lradc_chan_spec);
> iio->masklength = LRADC_MAX_TOTAL_CHANS;
>
> + if (lradc->soc == IMX23_LRADC) {
> + iio->channels = mx23_lradc_chan_spec;
> + iio->num_channels = ARRAY_SIZE(mx23_lradc_chan_spec);
> + } else {
> + iio->channels = mx28_lradc_chan_spec;
> + iio->num_channels = ARRAY_SIZE(mx28_lradc_chan_spec);
> + }
> +
> ret = iio_triggered_buffer_setup(iio, &iio_pollfunc_store_time,
> &mxs_lradc_trigger_handler,
> &mxs_lradc_buffer_ops);
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names
2015-07-18 15:38 ` [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names Marek Vasut
@ 2015-07-19 9:45 ` Jonathan Cameron
2015-07-19 20:33 ` Dan Carpenter
2015-07-19 22:11 ` Marek Vasut
0 siblings, 2 replies; 24+ messages in thread
From: Jonathan Cameron @ 2015-07-19 9:45 UTC (permalink / raw)
To: Marek Vasut, Stefan Wahren
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Greg Kroah-Hartman, Kristina Martšenko, Fabio Estevam,
linux-iio, devel
On 18/07/15 16:38, Marek Vasut wrote:
> On Saturday, July 18, 2015 at 02:30:40 PM, Stefan Wahren wrote:
>> This patch series does some clean up in mxs-lradc and finally add the
>> datasheet names for every usable channel.
>>
>> Changes in V2:
>> - remove confusing i.MX28 specific comments
>> - fix some spelling errors
>> - fix up includes
>> - separate channel spec for i.MX23 and i.MX28
>>
>> Stefan Wahren (6):
>> iio: mxs-lradc: clarify supported devices
>> iio: mxs-lradc: fix some spelling errors
>> iio: mxs-lradc: add missing include
>> iio: mxs-lradc: remove unnecessary header includes
>> iio: mxs-lradc: reorder header includes
>> iio: mxs-lradc: add datasheet name for every usable channel
>>
>> .../bindings/staging/iio/adc/mxs-lradc.txt | 2 +-
>> drivers/staging/iio/adc/mxs-lradc.c | 122
>> +++++++++++++------- 2 files changed, 82 insertions(+), 42 deletions(-)
>
> Entire series
>
> Reviewed-by: Marek Vasut <marex@denx.de>
Thanks for looking through these.
Just to let you know, there is currently a rather extended discussion going
on (as part of a suggested topic for the kernel summit) about when reviewed-by
tags are appropriate.
The general feeling is they must in someway indicate some substantial work. Here
as a result I'd say it was appropriate for patch 6 whereas an Acked-by
would be more appropriate for the cleanups (where there is nothing 'interesting').
I've left these as reviewed by for this set though!
Note to all reviewers I may also start added reviewed by tags that you haven't sent if
I happen to feel you made a big contribution to review of a patch, but perhaps haven't
revisited later versions. I'll probably send out an email about this outside
of this thread at some point to get possible wider circulation.
Jonathan
>
> Best regards,
> Marek Vasut
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names
2015-07-19 9:45 ` Jonathan Cameron
@ 2015-07-19 20:33 ` Dan Carpenter
2015-07-19 20:49 ` Dan Carpenter
2015-07-19 21:08 ` Jonathan Cameron
2015-07-19 22:11 ` Marek Vasut
1 sibling, 2 replies; 24+ messages in thread
From: Dan Carpenter @ 2015-07-19 20:33 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Marek Vasut, Stefan Wahren, Fabio Estevam, devel,
Lars-Peter Clausen, linux-iio, Greg Kroah-Hartman, Peter Meerwald,
Hartmut Knaack
On Sun, Jul 19, 2015 at 10:45:29AM +0100, Jonathan Cameron wrote:
> Thanks for looking through these.
>
> Just to let you know, there is currently a rather extended discussion going
> on (as part of a suggested topic for the kernel summit) about when reviewed-by
> tags are appropriate.
>
> The general feeling is they must in someway indicate some substantial work. Here
> as a result I'd say it was appropriate for patch 6 whereas an Acked-by
> would be more appropriate for the cleanups (where there is nothing 'interesting').
> I've left these as reviewed by for this set though!
>
> Note to all reviewers I may also start added reviewed by tags that you haven't sent if
> I happen to feel you made a big contribution to review of a patch, but perhaps haven't
> revisited later versions. I'll probably send out an email about this outside
> of this thread at some point to get possible wider circulation.
>
I didn't necessarily read the thread that way, but the thread was
long... I think of Acked-by by as "I approve." which is different from
I reviewed this carefully. I seldom Ack anything since I'm not an
official maintainer of anything so no one cares if I approve or not.
Sometimes I really really approve something so I will Ack it even though
maybe no one cares.
I don't like the idea of someone adding my Reviewed-by tag because
that's a quite serious tag for me and if it has bugs then I will feel
responsible.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names
2015-07-19 20:33 ` Dan Carpenter
@ 2015-07-19 20:49 ` Dan Carpenter
2015-07-19 21:44 ` Jonathan Cameron
2015-07-19 22:06 ` Marek Vasut
2015-07-19 21:08 ` Jonathan Cameron
1 sibling, 2 replies; 24+ messages in thread
From: Dan Carpenter @ 2015-07-19 20:49 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Marek Vasut, Stefan Wahren, devel, Fabio Estevam, linux-iio,
Greg Kroah-Hartman, Lars-Peter Clausen, Peter Meerwald,
Hartmut Knaack
On Sun, Jul 19, 2015 at 11:33:43PM +0300, Dan Carpenter wrote:
> I didn't necessarily read the thread that way, but the thread was
> long...
I read the thread as saying that you sometimes get:
Reviewed-by: Some Person <email@bigcompany.com>
With no other comments and what does that even mean because you don't
know who that person is and if they are good at reviewing. There isn't
a solution to that. But since we know Marek then that doesn't really
apply here. Also people were worried that companies were going to start
counting Reviewed-by tags so we should discourage that.
Anyway, I don't see Reviewed-by tags as a reward, only as added
responsibility.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names
2015-07-19 20:33 ` Dan Carpenter
2015-07-19 20:49 ` Dan Carpenter
@ 2015-07-19 21:08 ` Jonathan Cameron
1 sibling, 0 replies; 24+ messages in thread
From: Jonathan Cameron @ 2015-07-19 21:08 UTC (permalink / raw)
To: Dan Carpenter, Jonathan Cameron
Cc: Marek Vasut, Stefan Wahren, Fabio Estevam, devel,
Lars-Peter Clausen, linux-iio, Greg Kroah-Hartman, Peter Meerwald,
Hartmut Knaack
On 19 July 2015 21:33:43 BST, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>On Sun, Jul 19, 2015 at 10:45:29AM +0100, Jonathan Cameron wrote:
>> Thanks for looking through these.
>>
>> Just to let you know, there is currently a rather extended discussion
>going
>> on (as part of a suggested topic for the kernel summit) about when
>reviewed-by
>> tags are appropriate.
>>
>> The general feeling is they must in someway indicate some substantial
>work. Here
>> as a result I'd say it was appropriate for patch 6 whereas an
>Acked-by
>> would be more appropriate for the cleanups (where there is nothing
>'interesting').
>> I've left these as reviewed by for this set though!
>>
>> Note to all reviewers I may also start added reviewed by tags that
>you haven't sent if
>> I happen to feel you made a big contribution to review of a patch,
>but perhaps haven't
>> revisited later versions. I'll probably send out an email about this
>outside
>> of this thread at some point to get possible wider circulation.
>>
>
>I didn't necessarily read the thread that way, but the thread was
>long... I think of Acked-by by as "I approve." which is different from
>I reviewed this carefully. I seldom Ack anything since I'm not an
>official maintainer of anything so no one cares if I approve or not.
>Sometimes I really really approve something so I will Ack it even
>though
>maybe no one cares.
>
>I don't like the idea of someone adding my Reviewed-by tag because
>that's a quite serious tag for me and if it has bugs then I will feel
>responsible.
That is fair enough. Maybe I will just need to pester people more about taking a final
look and giving tags if they want to or actively stating they don't mind not tagging a patch.
J
>
>regards,
>dan carpenter
>--
>To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names
2015-07-19 20:49 ` Dan Carpenter
@ 2015-07-19 21:44 ` Jonathan Cameron
2015-07-19 22:06 ` Marek Vasut
1 sibling, 0 replies; 24+ messages in thread
From: Jonathan Cameron @ 2015-07-19 21:44 UTC (permalink / raw)
To: Dan Carpenter, Jonathan Cameron
Cc: Marek Vasut, Stefan Wahren, devel, Fabio Estevam, linux-iio,
Greg Kroah-Hartman, Lars-Peter Clausen, Peter Meerwald,
Hartmut Knaack
On 19 July 2015 21:49:47 BST, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>On Sun, Jul 19, 2015 at 11:33:43PM +0300, Dan Carpenter wrote:
>> I didn't necessarily read the thread that way, but the thread was
>> long...
>
>I read the thread as saying that you sometimes get:
>
>Reviewed-by: Some Person <email@bigcompany.com>
>
>With no other comments and what does that even mean because you don't
>know who that person is and if they are good at reviewing. There isn't
>a solution to that. But since we know Marek then that doesn't really
>apply here.
Absolutely. Though I also got the impression that many won't give reviewed
by for the little stuff but keep it for more substantial cases.
> Also people were worried that companies were going to
>start
>counting Reviewed-by tags so we should discourage that.
>
>Anyway, I don't see Reviewed-by tags as a reward, only as added
>responsibility.
True but I wish we had a way to make some of our unsung heroes at the coal face rather less unsung.
>
>regards,
>dan carpenter
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names
2015-07-19 20:49 ` Dan Carpenter
2015-07-19 21:44 ` Jonathan Cameron
@ 2015-07-19 22:06 ` Marek Vasut
2015-07-20 7:00 ` Dan Carpenter
1 sibling, 1 reply; 24+ messages in thread
From: Marek Vasut @ 2015-07-19 22:06 UTC (permalink / raw)
To: Dan Carpenter
Cc: Jonathan Cameron, Stefan Wahren, devel, Fabio Estevam, linux-iio,
Greg Kroah-Hartman, Lars-Peter Clausen, Peter Meerwald,
Hartmut Knaack
On Sunday, July 19, 2015 at 10:49:47 PM, Dan Carpenter wrote:
> On Sun, Jul 19, 2015 at 11:33:43PM +0300, Dan Carpenter wrote:
> > I didn't necessarily read the thread that way, but the thread was
> > long...
>
> I read the thread as saying that you sometimes get:
>
> Reviewed-by: Some Person <email@bigcompany.com>
Hm, I'm trying to use this email as a single point-of-presence, but
maybe I should start separating reviews I do in my free time and
send my R-B and A-B from my private address ?
> With no other comments and what does that even mean because you don't
> know who that person is and if they are good at reviewing. There isn't
> a solution to that. But since we know Marek then that doesn't really
> apply here. Also people were worried that companies were going to start
> counting Reviewed-by tags so we should discourage that.
Uh, OK, I wasn't aware of this.
> Anyway, I don't see Reviewed-by tags as a reward, only as added
> responsibility.
Yeah, that's a good point. If you review code and it turns out to be crap,
then the value of your R-B and A-B decreases.
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names
2015-07-19 9:45 ` Jonathan Cameron
2015-07-19 20:33 ` Dan Carpenter
@ 2015-07-19 22:11 ` Marek Vasut
1 sibling, 0 replies; 24+ messages in thread
From: Marek Vasut @ 2015-07-19 22:11 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Stefan Wahren, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald,
Greg Kroah-Hartman, Kristina Martšenko, Fabio Estevam,
linux-iio, devel
On Sunday, July 19, 2015 at 11:45:29 AM, Jonathan Cameron wrote:
> On 18/07/15 16:38, Marek Vasut wrote:
> > On Saturday, July 18, 2015 at 02:30:40 PM, Stefan Wahren wrote:
> >> This patch series does some clean up in mxs-lradc and finally add the
> >> datasheet names for every usable channel.
> >>
> >> Changes in V2:
> >> - remove confusing i.MX28 specific comments
> >> - fix some spelling errors
> >> - fix up includes
> >> - separate channel spec for i.MX23 and i.MX28
> >>
> >> Stefan Wahren (6):
> >> iio: mxs-lradc: clarify supported devices
> >> iio: mxs-lradc: fix some spelling errors
> >> iio: mxs-lradc: add missing include
> >> iio: mxs-lradc: remove unnecessary header includes
> >> iio: mxs-lradc: reorder header includes
> >> iio: mxs-lradc: add datasheet name for every usable channel
> >>
> >> .../bindings/staging/iio/adc/mxs-lradc.txt | 2 +-
> >> drivers/staging/iio/adc/mxs-lradc.c | 122
> >>
> >> +++++++++++++------- 2 files changed, 82 insertions(+), 42 deletions(-)
> >
> > Entire series
> >
> > Reviewed-by: Marek Vasut <marex@denx.de>
>
> Thanks for looking through these.
>
> Just to let you know, there is currently a rather extended discussion going
> on (as part of a suggested topic for the kernel summit) about when
> reviewed-by tags are appropriate.
Oh, I didn't know that. I'll keep an eye on this, thanks for letting me know!
> The general feeling is they must in someway indicate some substantial work.
> Here as a result I'd say it was appropriate for patch 6 whereas an
> Acked-by would be more appropriate for the cleanups (where there is
> nothing 'interesting'). I've left these as reviewed by for this set
> though!
>
> Note to all reviewers I may also start added reviewed by tags that you
> haven't sent if I happen to feel you made a big contribution to review of
> a patch, but perhaps haven't revisited later versions. I'll probably send
> out an email about this outside of this thread at some point to get
> possible wider circulation.
The explanation is also quite good. I considered Reviewed-by to mean that
you just went through the code and don't see anything obviously wrong
or something where you disagree. Acked-by is in my opinion much stronger,
where you vouch for the code correctness yourself too.
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names
2015-07-19 22:06 ` Marek Vasut
@ 2015-07-20 7:00 ` Dan Carpenter
2015-07-20 8:16 ` Marek Vasut
0 siblings, 1 reply; 24+ messages in thread
From: Dan Carpenter @ 2015-07-20 7:00 UTC (permalink / raw)
To: Marek Vasut
Cc: Jonathan Cameron, Stefan Wahren, devel, Fabio Estevam, linux-iio,
Greg Kroah-Hartman, Lars-Peter Clausen, Peter Meerwald,
Hartmut Knaack
On Mon, Jul 20, 2015 at 12:06:11AM +0200, Marek Vasut wrote:
> On Sunday, July 19, 2015 at 10:49:47 PM, Dan Carpenter wrote:
> > On Sun, Jul 19, 2015 at 11:33:43PM +0300, Dan Carpenter wrote:
> > > I didn't necessarily read the thread that way, but the thread was
> > > long...
> >
> > I read the thread as saying that you sometimes get:
> >
> > Reviewed-by: Some Person <email@bigcompany.com>
>
> Hm, I'm trying to use this email as a single point-of-presence, but
> maybe I should start separating reviews I do in my free time and
> send my R-B and A-B from my private address ?
No no. What I was saying is that you just sent a reviewed-by with no
extra comments, if you were an unknown person that's useless but since
we know you then I think that's fine.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names
2015-07-20 7:00 ` Dan Carpenter
@ 2015-07-20 8:16 ` Marek Vasut
0 siblings, 0 replies; 24+ messages in thread
From: Marek Vasut @ 2015-07-20 8:16 UTC (permalink / raw)
To: Dan Carpenter
Cc: Jonathan Cameron, Stefan Wahren, devel, Fabio Estevam, linux-iio,
Greg Kroah-Hartman, Lars-Peter Clausen, Peter Meerwald,
Hartmut Knaack
On Monday, July 20, 2015 at 09:00:32 AM, Dan Carpenter wrote:
> On Mon, Jul 20, 2015 at 12:06:11AM +0200, Marek Vasut wrote:
> > On Sunday, July 19, 2015 at 10:49:47 PM, Dan Carpenter wrote:
> > > On Sun, Jul 19, 2015 at 11:33:43PM +0300, Dan Carpenter wrote:
> > > > I didn't necessarily read the thread that way, but the thread was
> > > > long...
> > >
> > > I read the thread as saying that you sometimes get:
> > >
> > > Reviewed-by: Some Person <email@bigcompany.com>
> >
> > Hm, I'm trying to use this email as a single point-of-presence, but
> > maybe I should start separating reviews I do in my free time and
> > send my R-B and A-B from my private address ?
>
> No no. What I was saying is that you just sent a reviewed-by with no
> extra comments, if you were an unknown person that's useless but since
> we know you then I think that's fine.
Got it, I'll keep that in mind!
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2015-07-20 8:16 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-18 12:30 [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names Stefan Wahren
2015-07-18 12:30 ` [PATCH 1/6] iio: mxs-lradc: clarify supported devices Stefan Wahren
2015-07-19 9:32 ` Jonathan Cameron
2015-07-18 12:30 ` [PATCH 2/6] iio: mxs-lradc: fix some spelling errors Stefan Wahren
2015-07-19 9:33 ` Jonathan Cameron
2015-07-18 12:30 ` [PATCH 3/6] iio: mxs-lradc: add missing include Stefan Wahren
2015-07-19 9:34 ` Jonathan Cameron
2015-07-18 12:30 ` [PATCH 4/6] iio: mxs-lradc: remove unnecessary header includes Stefan Wahren
2015-07-19 9:35 ` Jonathan Cameron
2015-07-18 12:30 ` [PATCH 5/6] iio: mxs-lradc: reorder " Stefan Wahren
2015-07-18 15:37 ` Marek Vasut
2015-07-19 9:37 ` Jonathan Cameron
2015-07-18 12:30 ` [PATCH 6/6] iio: mxs-lradc: add datasheet name for every usable channel Stefan Wahren
2015-07-19 9:40 ` Jonathan Cameron
2015-07-18 15:38 ` [PATCH V2 0/6] iio: mxs-lradc: Clean up and add datasheet names Marek Vasut
2015-07-19 9:45 ` Jonathan Cameron
2015-07-19 20:33 ` Dan Carpenter
2015-07-19 20:49 ` Dan Carpenter
2015-07-19 21:44 ` Jonathan Cameron
2015-07-19 22:06 ` Marek Vasut
2015-07-20 7:00 ` Dan Carpenter
2015-07-20 8:16 ` Marek Vasut
2015-07-19 21:08 ` Jonathan Cameron
2015-07-19 22:11 ` Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).