2013-07-15 14:22:55

by Otavio Salvador

[permalink] [raw]
Subject: [PATCH 1/5] ARM: dts: imx23-evk: enable USB PHY and controller

The i.MX23EVK board provides a USB port so the USB PHY and controller
need to be enabled for it to be usable.

Signed-off-by: Otavio Salvador <[email protected]>
---
arch/arm/boot/dts/imx23-evk.dts | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/imx23-evk.dts b/arch/arm/boot/dts/imx23-evk.dts
index da0588a..dc3ab45 100644
--- a/arch/arm/boot/dts/imx23-evk.dts
+++ b/arch/arm/boot/dts/imx23-evk.dts
@@ -107,6 +107,16 @@
pinctrl-0 = <&duart_pins_a>;
status = "okay";
};
+
+ usbphy0: usbphy@8007c000 {
+ status = "okay";
+ };
+ };
+ };
+
+ ahb@80080000 {
+ usb0: usb@80080000 {
+ status = "okay";
};
};

--
1.8.3.2


2013-07-15 14:23:11

by Otavio Salvador

[permalink] [raw]
Subject: [PATCH 5/5] iio: add configuration option for debug support

Signed-off-by: Otavio Salvador <[email protected]>
---
drivers/iio/Kconfig | 7 +++++++
drivers/iio/Makefile | 2 ++
2 files changed, 9 insertions(+)

diff --git a/drivers/iio/Kconfig b/drivers/iio/Kconfig
index 9af763a..d1f06f2 100644
--- a/drivers/iio/Kconfig
+++ b/drivers/iio/Kconfig
@@ -12,6 +12,13 @@ menuconfig IIO

if IIO

+config IIO_DEBUG
+ boolean "Debug support for Industrial I/O"
+ depends on DEBUG_KERNEL
+ help
+ Say "yes" to enable debug messaging (like dev_dbg and pr_debug),
+ sysfs, and debugfs support in Industrial I/O subsystem and drivers.
+
config IIO_BUFFER
bool "Enable buffer support within IIO"
help
diff --git a/drivers/iio/Makefile b/drivers/iio/Makefile
index 7a3866c..6e43e5b 100644
--- a/drivers/iio/Makefile
+++ b/drivers/iio/Makefile
@@ -2,6 +2,8 @@
# Makefile for the industrial I/O core.
#

+ccflags-$(CONFIG_IIO_DEBUG) := -DDEBUG
+
obj-$(CONFIG_IIO) += industrialio.o
industrialio-y := industrialio-core.o industrialio-event.o inkern.o
industrialio-$(CONFIG_IIO_BUFFER) += industrialio-buffer.o
--
1.8.3.2

2013-07-15 14:23:07

by Otavio Salvador

[permalink] [raw]
Subject: [PATCH 4/5] ARM: dts: imx23-olinuxino: enable Low Resolution ADC

The i.XM23 has a internal Low Resolution ADC; this enables the support
for this device.

Signed-off-by: Otavio Salvador <[email protected]>
---
arch/arm/boot/dts/imx23-olinuxino.dts | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts
index d107c4a..fc766ae 100644
--- a/arch/arm/boot/dts/imx23-olinuxino.dts
+++ b/arch/arm/boot/dts/imx23-olinuxino.dts
@@ -69,6 +69,10 @@
};

apbx@80040000 {
+ lradc@80050000 {
+ status = "okay";
+ };
+
duart: serial@80070000 {
pinctrl-names = "default";
pinctrl-0 = <&duart_pins_a>;
--
1.8.3.2

2013-07-15 14:23:03

by Otavio Salvador

[permalink] [raw]
Subject: [PATCH 3/5] ARM: dts: imx23-evk: enable Low Resolution ADC

The i.XM23 has a internal Low Resolution ADC; this enables the support
for this device.

Signed-off-by: Otavio Salvador <[email protected]>
---
arch/arm/boot/dts/imx23-evk.dts | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/imx23-evk.dts b/arch/arm/boot/dts/imx23-evk.dts
index dc3ab45..185c7c0 100644
--- a/arch/arm/boot/dts/imx23-evk.dts
+++ b/arch/arm/boot/dts/imx23-evk.dts
@@ -90,6 +90,11 @@
};

apbx@80040000 {
+ lradc@80050000 {
+ status = "okay";
+ fsl,lradc-touchscreen-wires = <4>;
+ };
+
pwm: pwm@80064000 {
pinctrl-names = "default";
pinctrl-0 = <&pwm2_pins_a>;
--
1.8.3.2

2013-07-15 14:23:00

by Otavio Salvador

[permalink] [raw]
Subject: [PATCH 2/5] ARM: mxs-lradc: Simplify mxs_lradc_trigger_init error handle

As we have a 'ret' variable with the iio_trigger_register return, this
can be used as result.

Signed-off-by: Otavio Salvador <[email protected]>
---
drivers/staging/iio/adc/mxs-lradc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
index d92c97a..6d41846 100644
--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -671,14 +671,12 @@ static int mxs_lradc_trigger_init(struct iio_dev *iio)
trig->ops = &mxs_lradc_trigger_ops;

ret = iio_trigger_register(trig);
- if (ret) {
+ if (ret)
iio_trigger_free(trig);
- return ret;
- }

iio->trig = trig;

- return 0;
+ return ret;
}

static void mxs_lradc_trigger_remove(struct iio_dev *iio)
--
1.8.3.2

2013-07-15 14:25:07

by Marek Vasut

[permalink] [raw]
Subject: Re: [PATCH 2/5] ARM: mxs-lradc: Simplify mxs_lradc_trigger_init error handle

Dear Otavio Salvador,

> As we have a 'ret' variable with the iio_trigger_register return, this
> can be used as result.
>
> Signed-off-by: Otavio Salvador <[email protected]>
> ---
> drivers/staging/iio/adc/mxs-lradc.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/iio/adc/mxs-lradc.c
> b/drivers/staging/iio/adc/mxs-lradc.c index d92c97a..6d41846 100644
> --- a/drivers/staging/iio/adc/mxs-lradc.c
> +++ b/drivers/staging/iio/adc/mxs-lradc.c
> @@ -671,14 +671,12 @@ static int mxs_lradc_trigger_init(struct iio_dev
> *iio) trig->ops = &mxs_lradc_trigger_ops;
>
> ret = iio_trigger_register(trig);
> - if (ret) {
> + if (ret)
> iio_trigger_free(trig);
> - return ret;
> - }
>
> iio->trig = trig;


You are still setting iio->trig , you dont want to do that in case of failure

> - return 0;
> + return ret;
> }
>
> static void mxs_lradc_trigger_remove(struct iio_dev *iio)

Best regards,
Marek Vasut

2013-07-15 14:38:31

by Otavio Salvador

[permalink] [raw]
Subject: Re: [PATCH 2/5] ARM: mxs-lradc: Simplify mxs_lradc_trigger_init error handle

On Mon, Jul 15, 2013 at 11:24 AM, Marek Vasut <[email protected]> wrote:
> Dear Otavio Salvador,
>
>> As we have a 'ret' variable with the iio_trigger_register return, this
>> can be used as result.
>>
>> Signed-off-by: Otavio Salvador <[email protected]>
>> ---
>> drivers/staging/iio/adc/mxs-lradc.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/staging/iio/adc/mxs-lradc.c
>> b/drivers/staging/iio/adc/mxs-lradc.c index d92c97a..6d41846 100644
>> --- a/drivers/staging/iio/adc/mxs-lradc.c
>> +++ b/drivers/staging/iio/adc/mxs-lradc.c
>> @@ -671,14 +671,12 @@ static int mxs_lradc_trigger_init(struct iio_dev
>> *iio) trig->ops = &mxs_lradc_trigger_ops;
>>
>> ret = iio_trigger_register(trig);
>> - if (ret) {
>> + if (ret)
>> iio_trigger_free(trig);
>> - return ret;
>> - }
>>
>> iio->trig = trig;
>
>
> You are still setting iio->trig , you dont want to do that in case of failure

In this case it'd end being NULL I think, wouldn't it?

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750

2013-07-15 15:39:45

by Fabio Estevam

[permalink] [raw]
Subject: Re: [PATCH 1/5] ARM: dts: imx23-evk: enable USB PHY and controller

Hi Otavio,

On Mon, Jul 15, 2013 at 11:22 AM, Otavio Salvador
<[email protected]> wrote:
> The i.MX23EVK board provides a USB port so the USB PHY and controller
> need to be enabled for it to be usable.
>
> Signed-off-by: Otavio Salvador <[email protected]>
> ---

You should have Cc'd Shawn Guo on this series.

Subject: Re: [PATCH 4/5] ARM: dts: imx23-olinuxino: enable Low Resolution ADC

On Mon, Jul 15, 2013 at 11:22 AM, Otavio Salvador
<[email protected]> wrote:
> The i.XM23 has a internal Low Resolution ADC; this enables the support
> for this device.
>
> Signed-off-by: Otavio Salvador <[email protected]>

Acked-by: Alexandre Pereira da Silva <[email protected]>

2013-07-15 16:39:15

by Otavio Salvador

[permalink] [raw]
Subject: Re: [PATCH 1/5] ARM: dts: imx23-evk: enable USB PHY and controller

On Mon, Jul 15, 2013 at 12:39 PM, Fabio Estevam <[email protected]> wrote:
> Hi Otavio,
>
> On Mon, Jul 15, 2013 at 11:22 AM, Otavio Salvador
> <[email protected]> wrote:
>> The i.MX23EVK board provides a USB port so the USB PHY and controller
>> need to be enabled for it to be usable.
>>
>> Signed-off-by: Otavio Salvador <[email protected]>
>> ---
>
> You should have Cc'd Shawn Guo on this series.

Oh; thanks for fix my mistake. I am new to kernel development :-)

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750

2013-07-15 23:01:18

by Marek Vasut

[permalink] [raw]
Subject: Re: [PATCH 2/5] ARM: mxs-lradc: Simplify mxs_lradc_trigger_init error handle

Dear Otavio Salvador,

> On Mon, Jul 15, 2013 at 11:24 AM, Marek Vasut <[email protected]> wrote:
> > Dear Otavio Salvador,
> >
> >> As we have a 'ret' variable with the iio_trigger_register return, this
> >> can be used as result.
> >>
> >> Signed-off-by: Otavio Salvador <[email protected]>
> >> ---
> >>
> >> drivers/staging/iio/adc/mxs-lradc.c | 6 ++----
> >> 1 file changed, 2 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/drivers/staging/iio/adc/mxs-lradc.c
> >> b/drivers/staging/iio/adc/mxs-lradc.c index d92c97a..6d41846 100644
> >> --- a/drivers/staging/iio/adc/mxs-lradc.c
> >> +++ b/drivers/staging/iio/adc/mxs-lradc.c
> >> @@ -671,14 +671,12 @@ static int mxs_lradc_trigger_init(struct iio_dev
> >> *iio) trig->ops = &mxs_lradc_trigger_ops;
> >>
> >> ret = iio_trigger_register(trig);
> >>
> >> - if (ret) {
> >> + if (ret)
> >>
> >> iio_trigger_free(trig);
> >>
> >> - return ret;
> >> - }
> >>
> >> iio->trig = trig;
> >
> > You are still setting iio->trig , you dont want to do that in case of
> > failure
>
> In this case it'd end being NULL I think, wouldn't it?

It won't, see the implementation in:

drivers/iio/industrialio-trigger.c

Best regards,
Marek Vasut

2013-07-16 01:30:24

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 1/5] ARM: dts: imx23-evk: enable USB PHY and controller

On Mon, Jul 15, 2013 at 01:39:13PM -0300, Otavio Salvador wrote:
> On Mon, Jul 15, 2013 at 12:39 PM, Fabio Estevam <[email protected]> wrote:
> > Hi Otavio,
> >
> > On Mon, Jul 15, 2013 at 11:22 AM, Otavio Salvador
> > <[email protected]> wrote:
> >> The i.MX23EVK board provides a USB port so the USB PHY and controller
> >> need to be enabled for it to be usable.
> >>
> >> Signed-off-by: Otavio Salvador <[email protected]>
> >> ---
> >
> > You should have Cc'd Shawn Guo on this series.
>
> Oh; thanks for fix my mistake. I am new to kernel development :-)

I'm on copy of patches 1, 3 and 4. 2 and 5 are missing?

Shawn

2013-07-16 03:42:17

by Fabio Estevam

[permalink] [raw]
Subject: Re: [PATCH 1/5] ARM: dts: imx23-evk: enable USB PHY and controller

On Mon, Jul 15, 2013 at 11:22 AM, Otavio Salvador
<[email protected]> wrote:
> The i.MX23EVK board provides a USB port so the USB PHY and controller
> need to be enabled for it to be usable.

Has this been tested? I don't see in this patch any code to enable USB power.

2013-07-16 09:58:55

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 5/5] iio: add configuration option for debug support

On 07/15/2013 03:22 PM, Otavio Salvador wrote:
> Signed-off-by: Otavio Salvador <[email protected]>
seems a sensible facility to have available.

Applied to the togreg branch of iio.git
> ---
> drivers/iio/Kconfig | 7 +++++++
> drivers/iio/Makefile | 2 ++
> 2 files changed, 9 insertions(+)
>
> diff --git a/drivers/iio/Kconfig b/drivers/iio/Kconfig
> index 9af763a..d1f06f2 100644
> --- a/drivers/iio/Kconfig
> +++ b/drivers/iio/Kconfig
> @@ -12,6 +12,13 @@ menuconfig IIO
>
> if IIO
>
> +config IIO_DEBUG
> + boolean "Debug support for Industrial I/O"
> + depends on DEBUG_KERNEL
> + help
> + Say "yes" to enable debug messaging (like dev_dbg and pr_debug),
> + sysfs, and debugfs support in Industrial I/O subsystem and drivers.
> +
> config IIO_BUFFER
> bool "Enable buffer support within IIO"
> help
> diff --git a/drivers/iio/Makefile b/drivers/iio/Makefile
> index 7a3866c..6e43e5b 100644
> --- a/drivers/iio/Makefile
> +++ b/drivers/iio/Makefile
> @@ -2,6 +2,8 @@
> # Makefile for the industrial I/O core.
> #
>
> +ccflags-$(CONFIG_IIO_DEBUG) := -DDEBUG
> +
> obj-$(CONFIG_IIO) += industrialio.o
> industrialio-y := industrialio-core.o industrialio-event.o inkern.o
> industrialio-$(CONFIG_IIO_BUFFER) += industrialio-buffer.o
>

2013-07-16 10:25:26

by Lars-Peter Clausen

[permalink] [raw]
Subject: Re: [PATCH 5/5] iio: add configuration option for debug support

On 07/16/2013 11:58 AM, Jonathan Cameron wrote:
> On 07/15/2013 03:22 PM, Otavio Salvador wrote:
>> Signed-off-by: Otavio Salvador <[email protected]>
> seems a sensible facility to have available.
>
> Applied to the togreg branch of iio.git

Can you update the Kconfig help text?

>> ---
>> drivers/iio/Kconfig | 7 +++++++
>> drivers/iio/Makefile | 2 ++
>> 2 files changed, 9 insertions(+)
>>
>> diff --git a/drivers/iio/Kconfig b/drivers/iio/Kconfig
>> index 9af763a..d1f06f2 100644
>> --- a/drivers/iio/Kconfig
>> +++ b/drivers/iio/Kconfig
>> @@ -12,6 +12,13 @@ menuconfig IIO
>>
>> if IIO
>>
>> +config IIO_DEBUG
>> + boolean "Debug support for Industrial I/O"
>> + depends on DEBUG_KERNEL
>> + help
>> + Say "yes" to enable debug messaging (like dev_dbg and pr_debug),
>> + sysfs, and debugfs support in Industrial I/O subsystem and drivers.

This has nothing to do with either sysfs or debugfs support.

>> +
>> config IIO_BUFFER
>> bool "Enable buffer support within IIO"
>> help
>> diff --git a/drivers/iio/Makefile b/drivers/iio/Makefile
>> index 7a3866c..6e43e5b 100644
>> --- a/drivers/iio/Makefile
>> +++ b/drivers/iio/Makefile
>> @@ -2,6 +2,8 @@
>> # Makefile for the industrial I/O core.
>> #
>>
>> +ccflags-$(CONFIG_IIO_DEBUG) := -DDEBUG
>> +
>> obj-$(CONFIG_IIO) += industrialio.o
>> industrialio-y := industrialio-core.o industrialio-event.o inkern.o
>> industrialio-$(CONFIG_IIO_BUFFER) += industrialio-buffer.o
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>

2013-07-16 12:01:50

by Otavio Salvador

[permalink] [raw]
Subject: Re: [PATCH 5/5] iio: add configuration option for debug support

On Tue, Jul 16, 2013 at 7:26 AM, Lars-Peter Clausen <[email protected]> wrote:
> On 07/16/2013 11:58 AM, Jonathan Cameron wrote:
>> On 07/15/2013 03:22 PM, Otavio Salvador wrote:
>>> Signed-off-by: Otavio Salvador <[email protected]>
>> seems a sensible facility to have available.
>>
>> Applied to the togreg branch of iio.git
>
> Can you update the Kconfig help text?

Sure I can. Jonathan seem to have applied it so should I send a v2 or
a new patch?

>>> ---
>>> drivers/iio/Kconfig | 7 +++++++
>>> drivers/iio/Makefile | 2 ++
>>> 2 files changed, 9 insertions(+)
>>>
>>> diff --git a/drivers/iio/Kconfig b/drivers/iio/Kconfig
>>> index 9af763a..d1f06f2 100644
>>> --- a/drivers/iio/Kconfig
>>> +++ b/drivers/iio/Kconfig
>>> @@ -12,6 +12,13 @@ menuconfig IIO
>>>
>>> if IIO
>>>
>>> +config IIO_DEBUG
>>> + boolean "Debug support for Industrial I/O"
>>> + depends on DEBUG_KERNEL
>>> + help
>>> + Say "yes" to enable debug messaging (like dev_dbg and pr_debug),
>>> + sysfs, and debugfs support in Industrial I/O subsystem and drivers.
>
> This has nothing to do with either sysfs or debugfs support.

Say "yes" to enable debug messaging (like dev_dbg and pr_debug)
support in Industrial I/O subsystem and drivers.

?

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750

2013-07-16 12:09:12

by Lars-Peter Clausen

[permalink] [raw]
Subject: Re: [PATCH 5/5] iio: add configuration option for debug support

On 07/16/2013 02:01 PM, Otavio Salvador wrote:
> On Tue, Jul 16, 2013 at 7:26 AM, Lars-Peter Clausen <[email protected]> wrote:
>> On 07/16/2013 11:58 AM, Jonathan Cameron wrote:
>>> On 07/15/2013 03:22 PM, Otavio Salvador wrote:
>>>> Signed-off-by: Otavio Salvador <[email protected]>
>>> seems a sensible facility to have available.
>>>
>>> Applied to the togreg branch of iio.git
>>
>> Can you update the Kconfig help text?
>
> Sure I can. Jonathan seem to have applied it so should I send a v2 or
> a new patch?
>

He hasn't pushed things out yet, I think a v2 will be fine.

>>>> ---
>>>> drivers/iio/Kconfig | 7 +++++++
>>>> drivers/iio/Makefile | 2 ++
>>>> 2 files changed, 9 insertions(+)
>>>>
>>>> diff --git a/drivers/iio/Kconfig b/drivers/iio/Kconfig
>>>> index 9af763a..d1f06f2 100644
>>>> --- a/drivers/iio/Kconfig
>>>> +++ b/drivers/iio/Kconfig
>>>> @@ -12,6 +12,13 @@ menuconfig IIO
>>>>
>>>> if IIO
>>>>
>>>> +config IIO_DEBUG
>>>> + boolean "Debug support for Industrial I/O"
>>>> + depends on DEBUG_KERNEL
>>>> + help
>>>> + Say "yes" to enable debug messaging (like dev_dbg and pr_debug),
>>>> + sysfs, and debugfs support in Industrial I/O subsystem and drivers.
>>
>> This has nothing to do with either sysfs or debugfs support.
>
> Say "yes" to enable debug messaging (like dev_dbg and pr_debug)
> support in Industrial I/O subsystem and drivers.
>
> ?
>
> --
> Otavio Salvador O.S. Systems
> http://www.ossystems.com.br http://projetos.ossystems.com.br
> Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
>

2013-07-16 12:24:12

by Otavio Salvador

[permalink] [raw]
Subject: Re: [PATCH 1/5] ARM: dts: imx23-evk: enable USB PHY and controller

On Tue, Jul 16, 2013 at 12:42 AM, Fabio Estevam <[email protected]> wrote:
> On Mon, Jul 15, 2013 at 11:22 AM, Otavio Salvador
> <[email protected]> wrote:
>> The i.MX23EVK board provides a USB port so the USB PHY and controller
>> need to be enabled for it to be usable.
>
> Has this been tested? I don't see in this patch any code to enable USB power.

It does, I am using it.

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750

2013-07-16 12:25:18

by Otavio Salvador

[permalink] [raw]
Subject: Re: [PATCH 1/5] ARM: dts: imx23-evk: enable USB PHY and controller

On Mon, Jul 15, 2013 at 10:30 PM, Shawn Guo <[email protected]> wrote:
> On Mon, Jul 15, 2013 at 01:39:13PM -0300, Otavio Salvador wrote:
>> On Mon, Jul 15, 2013 at 12:39 PM, Fabio Estevam <[email protected]> wrote:
>> > Hi Otavio,
>> >
>> > On Mon, Jul 15, 2013 at 11:22 AM, Otavio Salvador
>> > <[email protected]> wrote:
>> >> The i.MX23EVK board provides a USB port so the USB PHY and controller
>> >> need to be enabled for it to be usable.
>> >>
>> >> Signed-off-by: Otavio Salvador <[email protected]>
>> >> ---
>> >
>> > You should have Cc'd Shawn Guo on this series.
>>
>> Oh; thanks for fix my mistake. I am new to kernel development :-)
>
> I'm on copy of patches 1, 3 and 4. 2 and 5 are missing?

I will prepare a v2, as per Jonathan feedback and will add you in all them.

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750

2013-07-16 12:38:41

by Otavio Salvador

[permalink] [raw]
Subject: Re: [PATCH 2/5] ARM: mxs-lradc: Simplify mxs_lradc_trigger_init error handle

On Mon, Jul 15, 2013 at 8:00 PM, Marek Vasut <[email protected]> wrote:
> Dear Otavio Salvador,
>
>> On Mon, Jul 15, 2013 at 11:24 AM, Marek Vasut <[email protected]> wrote:
>> > Dear Otavio Salvador,
>> >
>> >> As we have a 'ret' variable with the iio_trigger_register return, this
>> >> can be used as result.
>> >>
>> >> Signed-off-by: Otavio Salvador <[email protected]>
>> >> ---
>> >>
>> >> drivers/staging/iio/adc/mxs-lradc.c | 6 ++----
>> >> 1 file changed, 2 insertions(+), 4 deletions(-)
>> >>
>> >> diff --git a/drivers/staging/iio/adc/mxs-lradc.c
>> >> b/drivers/staging/iio/adc/mxs-lradc.c index d92c97a..6d41846 100644
>> >> --- a/drivers/staging/iio/adc/mxs-lradc.c
>> >> +++ b/drivers/staging/iio/adc/mxs-lradc.c
>> >> @@ -671,14 +671,12 @@ static int mxs_lradc_trigger_init(struct iio_dev
>> >> *iio) trig->ops = &mxs_lradc_trigger_ops;
>> >>
>> >> ret = iio_trigger_register(trig);
>> >>
>> >> - if (ret) {
>> >> + if (ret)
>> >>
>> >> iio_trigger_free(trig);
>> >>
>> >> - return ret;
>> >> - }
>> >>
>> >> iio->trig = trig;
>> >
>> > You are still setting iio->trig , you dont want to do that in case of
>> > failure
>>
>> In this case it'd end being NULL I think, wouldn't it?
>
> It won't, see the implementation in:
>
> drivers/iio/industrialio-trigger.c

Agreed; will drop this from v2.

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750

2013-07-16 16:07:02

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 5/5] iio: add configuration option for debug support



Lars-Peter Clausen <[email protected]> wrote:
>On 07/16/2013 11:58 AM, Jonathan Cameron wrote:
>> On 07/15/2013 03:22 PM, Otavio Salvador wrote:
>>> Signed-off-by: Otavio Salvador <[email protected]>
>> seems a sensible facility to have available.
>>
>> Applied to the togreg branch of iio.git
>
>Can you update the Kconfig help text?

Good point. Will fix!
>
>>> ---
>>> drivers/iio/Kconfig | 7 +++++++
>>> drivers/iio/Makefile | 2 ++
>>> 2 files changed, 9 insertions(+)
>>>
>>> diff --git a/drivers/iio/Kconfig b/drivers/iio/Kconfig
>>> index 9af763a..d1f06f2 100644
>>> --- a/drivers/iio/Kconfig
>>> +++ b/drivers/iio/Kconfig
>>> @@ -12,6 +12,13 @@ menuconfig IIO
>>>
>>> if IIO
>>>
>>> +config IIO_DEBUG
>>> + boolean "Debug support for Industrial I/O"
>>> + depends on DEBUG_KERNEL
>>> + help
>>> + Say "yes" to enable debug messaging (like dev_dbg and pr_debug),
>>> + sysfs, and debugfs support in Industrial I/O subsystem and
>drivers.
>
>This has nothing to do with either sysfs or debugfs support.
>
>>> +
>>> config IIO_BUFFER
>>> bool "Enable buffer support within IIO"
>>> help
>>> diff --git a/drivers/iio/Makefile b/drivers/iio/Makefile
>>> index 7a3866c..6e43e5b 100644
>>> --- a/drivers/iio/Makefile
>>> +++ b/drivers/iio/Makefile
>>> @@ -2,6 +2,8 @@
>>> # Makefile for the industrial I/O core.
>>> #
>>>
>>> +ccflags-$(CONFIG_IIO_DEBUG) := -DDEBUG
>>> +
>>> obj-$(CONFIG_IIO) += industrialio.o
>>> industrialio-y := industrialio-core.o industrialio-event.o inkern.o
>>> industrialio-$(CONFIG_IIO_BUFFER) += industrialio-buffer.o
>>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-iio"
>in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

2013-07-16 16:11:16

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 5/5] iio: add configuration option for debug support



Lars-Peter Clausen <[email protected]> wrote:
>On 07/16/2013 02:01 PM, Otavio Salvador wrote:
>> On Tue, Jul 16, 2013 at 7:26 AM, Lars-Peter Clausen <[email protected]>
>wrote:
>>> On 07/16/2013 11:58 AM, Jonathan Cameron wrote:
>>>> On 07/15/2013 03:22 PM, Otavio Salvador wrote:
>>>>> Signed-off-by: Otavio Salvador <[email protected]>
>>>> seems a sensible facility to have available.
>>>>
>>>> Applied to the togreg branch of iio.git
>>>
>>> Can you update the Kconfig help text?
>>
>> Sure I can. Jonathan seem to have applied it so should I send a v2 or
>> a new patch?
>>
>
>He hasn't pushed things out yet, I think a v2 will be fine.
>

Yup a v2 is fine. Actually I regularly rebase this tree and it may eat babies! All work more or less should be against Greg's staging/staging-next tree as that is nice and non debasing.
>>>>> ---
>>>>> drivers/iio/Kconfig | 7 +++++++
>>>>> drivers/iio/Makefile | 2 ++
>>>>> 2 files changed, 9 insertions(+)
>>>>>
>>>>> diff --git a/drivers/iio/Kconfig b/drivers/iio/Kconfig
>>>>> index 9af763a..d1f06f2 100644
>>>>> --- a/drivers/iio/Kconfig
>>>>> +++ b/drivers/iio/Kconfig
>>>>> @@ -12,6 +12,13 @@ menuconfig IIO
>>>>>
>>>>> if IIO
>>>>>
>>>>> +config IIO_DEBUG
>>>>> + boolean "Debug support for Industrial I/O"
>>>>> + depends on DEBUG_KERNEL
>>>>> + help
>>>>> + Say "yes" to enable debug messaging (like dev_dbg and
>pr_debug),
>>>>> + sysfs, and debugfs support in Industrial I/O subsystem and
>drivers.
>>>
>>> This has nothing to do with either sysfs or debugfs support.
>>
>> Say "yes" to enable debug messaging (like dev_dbg and pr_debug)
>> support in Industrial I/O subsystem and drivers.
>>
>> ?
>>
>> --
>> Otavio Salvador O.S. Systems
>> http://www.ossystems.com.br http://projetos.ossystems.com.br
>> Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
>>
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.