All of lore.kernel.org
 help / color / mirror / Atom feed
* iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_get_by_name()
@ 2014-08-21  7:29 ` Johannes Pointner
  0 siblings, 0 replies; 8+ messages in thread
From: Johannes Pointner @ 2014-08-21  7:29 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Guenter Roeck, lm-sensors

Hello,

I found out that since this patch https://lkml.org/lkml/2014/6/11/201,
which fixes the return values in this function, the ntc_thermistor
driver isn't working anymore for me.
The problem is that before the driver asked for probe deferral because
the adc driver isn't loaded at this point and now the probe fails in
the function iio_channel_get_sys and returns -ENODEV.
My question is: Who is in this case responsible to request a deferral?
The driver or the subsystem?

Thanks,
Hannes

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [lm-sensors] iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_get_b
@ 2014-08-21  7:29 ` Johannes Pointner
  0 siblings, 0 replies; 8+ messages in thread
From: Johannes Pointner @ 2014-08-21  7:29 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Guenter Roeck, lm-sensors

Hello,

I found out that since this patch https://lkml.org/lkml/2014/6/11/201,
which fixes the return values in this function, the ntc_thermistor
driver isn't working anymore for me.
The problem is that before the driver asked for probe deferral because
the adc driver isn't loaded at this point and now the probe fails in
the function iio_channel_get_sys and returns -ENODEV.
My question is: Who is in this case responsible to request a deferral?
The driver or the subsystem?

Thanks,
Hannes

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_get_by_name()
  2014-08-21  7:29 ` [lm-sensors] iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_get_b Johannes Pointner
@ 2014-08-21 13:25   ` Guenter Roeck
  -1 siblings, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2014-08-21 13:25 UTC (permalink / raw)
  To: Johannes Pointner; +Cc: Jonathan Cameron, linux-iio, lm-sensors

On Thu, Aug 21, 2014 at 09:29:56AM +0200, Johannes Pointner wrote:
> Hello,
> 
> I found out that since this patch https://lkml.org/lkml/2014/6/11/201,
> which fixes the return values in this function, the ntc_thermistor
> driver isn't working anymore for me.
> The problem is that before the driver asked for probe deferral because
> the adc driver isn't loaded at this point and now the probe fails in
> the function iio_channel_get_sys and returns -ENODEV.
> My question is: Who is in this case responsible to request a deferral?
> The driver or the subsystem?
> 
Unless I am missing something, iio_get_channel() should request probe deferral.
There is no other way for the driver to know that the adc driver is not loaded
yet.

The problem here may be that the devicetree entry for the ntc_thermistor driver
may not be correct. The above referenced patch fixes a bug in that area, and
devicetree data is now better validated.

Guenter

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [lm-sensors] iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_g
@ 2014-08-21 13:25   ` Guenter Roeck
  0 siblings, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2014-08-21 13:25 UTC (permalink / raw)
  To: Johannes Pointner; +Cc: Jonathan Cameron, linux-iio, lm-sensors

On Thu, Aug 21, 2014 at 09:29:56AM +0200, Johannes Pointner wrote:
> Hello,
> 
> I found out that since this patch https://lkml.org/lkml/2014/6/11/201,
> which fixes the return values in this function, the ntc_thermistor
> driver isn't working anymore for me.
> The problem is that before the driver asked for probe deferral because
> the adc driver isn't loaded at this point and now the probe fails in
> the function iio_channel_get_sys and returns -ENODEV.
> My question is: Who is in this case responsible to request a deferral?
> The driver or the subsystem?
> 
Unless I am missing something, iio_get_channel() should request probe deferral.
There is no other way for the driver to know that the adc driver is not loaded
yet.

The problem here may be that the devicetree entry for the ntc_thermistor driver
may not be correct. The above referenced patch fixes a bug in that area, and
devicetree data is now better validated.

Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_get_by_name()
  2014-08-21 13:25   ` [lm-sensors] iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_g Guenter Roeck
@ 2014-08-22 11:50     ` Johannes Pointner
  -1 siblings, 0 replies; 8+ messages in thread
From: Johannes Pointner @ 2014-08-22 11:50 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Jonathan Cameron, linux-iio, lm-sensors

Hello Guenter,

thank you for your quick answer.

2014-08-21 15:25 GMT+02:00 Guenter Roeck <linux@roeck-us.net>:
> On Thu, Aug 21, 2014 at 09:29:56AM +0200, Johannes Pointner wrote:
>> Hello,
>>
>> I found out that since this patch https://lkml.org/lkml/2014/6/11/201,
>> which fixes the return values in this function, the ntc_thermistor
>> driver isn't working anymore for me.
>> The problem is that before the driver asked for probe deferral because
>> the adc driver isn't loaded at this point and now the probe fails in
>> the function iio_channel_get_sys and returns -ENODEV.
>> My question is: Who is in this case responsible to request a deferral?
>> The driver or the subsystem?
>>
> Unless I am missing something, iio_get_channel() should request probe deferral.
> There is no other way for the driver to know that the adc driver is not loaded
> yet.

Yes, I missed that. In the function __of_iio_channel_get the subsystem
returns a -EPROBE_DEFER.

>
> The problem here may be that the devicetree entry for the ntc_thermistor driver
> may not be correct. The above referenced patch fixes a bug in that area, and
> devicetree data is now better validated.
>
But the problem is, that this statement:
if (np && !of_get_property(np, "io-channel-ranges", NULL))
            return NULL;
overrides the -EPROBE_DEFER. Before the fix there was a break
statement and the -EPROBE_DEFER was returned.

Do I have made a mistake in the devicetree if I put the ntc
declaration directly under the root node?

> Guenter

Thanks in advance!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [lm-sensors] iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_g
@ 2014-08-22 11:50     ` Johannes Pointner
  0 siblings, 0 replies; 8+ messages in thread
From: Johannes Pointner @ 2014-08-22 11:50 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Jonathan Cameron, linux-iio, lm-sensors

Hello Guenter,

thank you for your quick answer.

2014-08-21 15:25 GMT+02:00 Guenter Roeck <linux@roeck-us.net>:
> On Thu, Aug 21, 2014 at 09:29:56AM +0200, Johannes Pointner wrote:
>> Hello,
>>
>> I found out that since this patch https://lkml.org/lkml/2014/6/11/201,
>> which fixes the return values in this function, the ntc_thermistor
>> driver isn't working anymore for me.
>> The problem is that before the driver asked for probe deferral because
>> the adc driver isn't loaded at this point and now the probe fails in
>> the function iio_channel_get_sys and returns -ENODEV.
>> My question is: Who is in this case responsible to request a deferral?
>> The driver or the subsystem?
>>
> Unless I am missing something, iio_get_channel() should request probe deferral.
> There is no other way for the driver to know that the adc driver is not loaded
> yet.

Yes, I missed that. In the function __of_iio_channel_get the subsystem
returns a -EPROBE_DEFER.

>
> The problem here may be that the devicetree entry for the ntc_thermistor driver
> may not be correct. The above referenced patch fixes a bug in that area, and
> devicetree data is now better validated.
>
But the problem is, that this statement:
if (np && !of_get_property(np, "io-channel-ranges", NULL))
            return NULL;
overrides the -EPROBE_DEFER. Before the fix there was a break
statement and the -EPROBE_DEFER was returned.

Do I have made a mistake in the devicetree if I put the ntc
declaration directly under the root node?

> Guenter

Thanks in advance!

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_get_by_name()
  2014-08-22 11:50     ` [lm-sensors] iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_g Johannes Pointner
@ 2014-08-22 13:32       ` Guenter Roeck
  -1 siblings, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2014-08-22 13:32 UTC (permalink / raw)
  To: Johannes Pointner; +Cc: Jonathan Cameron, linux-iio, lm-sensors

On Fri, Aug 22, 2014 at 01:50:23PM +0200, Johannes Pointner wrote:
> Hello Guenter,
> 
> thank you for your quick answer.
> 
> 2014-08-21 15:25 GMT+02:00 Guenter Roeck <linux@roeck-us.net>:
> > On Thu, Aug 21, 2014 at 09:29:56AM +0200, Johannes Pointner wrote:
> >> Hello,
> >>
> >> I found out that since this patch https://lkml.org/lkml/2014/6/11/201,
> >> which fixes the return values in this function, the ntc_thermistor
> >> driver isn't working anymore for me.
> >> The problem is that before the driver asked for probe deferral because
> >> the adc driver isn't loaded at this point and now the probe fails in
> >> the function iio_channel_get_sys and returns -ENODEV.
> >> My question is: Who is in this case responsible to request a deferral?
> >> The driver or the subsystem?
> >>
> > Unless I am missing something, iio_get_channel() should request probe deferral.
> > There is no other way for the driver to know that the adc driver is not loaded
> > yet.
> 
> Yes, I missed that. In the function __of_iio_channel_get the subsystem
> returns a -EPROBE_DEFER.
> 
> >
> > The problem here may be that the devicetree entry for the ntc_thermistor driver
> > may not be correct. The above referenced patch fixes a bug in that area, and
> > devicetree data is now better validated.
> >
> But the problem is, that this statement:
> if (np && !of_get_property(np, "io-channel-ranges", NULL))
>             return NULL;
> overrides the -EPROBE_DEFER. Before the fix there was a break
> statement and the -EPROBE_DEFER was returned.
> 
I think the code further up should be

	if (!IS_ERR(chan) || PTR_ERR(chan) == -EPROBE_DEFER)
		break;

> Do I have made a mistake in the devicetree if I put the ntc
> declaration directly under the root node?
> 
No, I don't think so. I would suggest to submit a patch to fix the above.

Guenter

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [lm-sensors] iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_g
@ 2014-08-22 13:32       ` Guenter Roeck
  0 siblings, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2014-08-22 13:32 UTC (permalink / raw)
  To: Johannes Pointner; +Cc: Jonathan Cameron, linux-iio, lm-sensors

On Fri, Aug 22, 2014 at 01:50:23PM +0200, Johannes Pointner wrote:
> Hello Guenter,
> 
> thank you for your quick answer.
> 
> 2014-08-21 15:25 GMT+02:00 Guenter Roeck <linux@roeck-us.net>:
> > On Thu, Aug 21, 2014 at 09:29:56AM +0200, Johannes Pointner wrote:
> >> Hello,
> >>
> >> I found out that since this patch https://lkml.org/lkml/2014/6/11/201,
> >> which fixes the return values in this function, the ntc_thermistor
> >> driver isn't working anymore for me.
> >> The problem is that before the driver asked for probe deferral because
> >> the adc driver isn't loaded at this point and now the probe fails in
> >> the function iio_channel_get_sys and returns -ENODEV.
> >> My question is: Who is in this case responsible to request a deferral?
> >> The driver or the subsystem?
> >>
> > Unless I am missing something, iio_get_channel() should request probe deferral.
> > There is no other way for the driver to know that the adc driver is not loaded
> > yet.
> 
> Yes, I missed that. In the function __of_iio_channel_get the subsystem
> returns a -EPROBE_DEFER.
> 
> >
> > The problem here may be that the devicetree entry for the ntc_thermistor driver
> > may not be correct. The above referenced patch fixes a bug in that area, and
> > devicetree data is now better validated.
> >
> But the problem is, that this statement:
> if (np && !of_get_property(np, "io-channel-ranges", NULL))
>             return NULL;
> overrides the -EPROBE_DEFER. Before the fix there was a break
> statement and the -EPROBE_DEFER was returned.
> 
I think the code further up should be

	if (!IS_ERR(chan) || PTR_ERR(chan) = -EPROBE_DEFER)
		break;

> Do I have made a mistake in the devicetree if I put the ntc
> declaration directly under the root node?
> 
No, I don't think so. I would suggest to submit a patch to fix the above.

Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-08-22 13:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-21  7:29 iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_get_by_name() Johannes Pointner
2014-08-21  7:29 ` [lm-sensors] iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_get_b Johannes Pointner
2014-08-21 13:25 ` iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_get_by_name() Guenter Roeck
2014-08-21 13:25   ` [lm-sensors] iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_g Guenter Roeck
2014-08-22 11:50   ` iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_get_by_name() Johannes Pointner
2014-08-22 11:50     ` [lm-sensors] iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_g Johannes Pointner
2014-08-22 13:32     ` iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_get_by_name() Guenter Roeck
2014-08-22 13:32       ` [lm-sensors] iio: iio_channel_get: ntc_thermistor isn't working since patch for of_iio_channel_g Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.