Messages in this thread | | | Date | Sun, 26 Jan 2014 14:04:06 -0800 | From | Guenter Roeck <> | Subject | Re: [lm-sensors] lm90 driver no longer working on PCs in 3.13 |
| |
On 01/26/2014 01:50 PM, Guenter Roeck wrote: > On 01/26/2014 12:49 PM, Jean Delvare wrote: >> On Sun, 26 Jan 2014 12:44:38 -0800, Guenter Roeck wrote: >>> On 01/26/2014 12:13 PM, Jean Delvare wrote: >>> The regulator code changed with 3.13; the dummy regulator no longer exists, >>> and the functionality it provided is supposed to be handled automatically. >>> But that only really works on devicetree based systems and otherwise returns >>> -EPROBE_DEFER as mentioned above. >>> >>> Maybe there is some configuration option, or maybe something needs to be >>> configured from user space. I found neither. >> >> Neither would be acceptable to my eyes anyway. Things worked out of the >> box before, they should keep working out of the box. >> >>> In the first case, we should create >>> a dependency for the LM90 driver; in the latter case, we would have to make sure >>> that it is well documented (I'd grumble on that, though - it would result in >>> never ending trouble for us, having to repeatedly explain how this is now >>> supposed to work). >>> >>> Another possible fix would be to have the regulator core return -ENODEV >>> instead of -EPROBE_DEFER on non-dt systems. No idea if this would be acceptable >>> or even feasible. >> >> Well, either the regulator subsystem gets fixed (or provides a suitable >> API for drivers like lm90 and we update the lm90 driver to use it), or >> I'll just revert the problematic commit for now. This is a severe >> regression, we just can't leave things that way. >> > > Maybe your configuration has CONFIG_REGULATORS disabled. Ubuntu has it enabled. > I don't know about others. > > I agree, we may have to revert the patch. I don't think the regulator API works well > enough in non-dt systems to be able to use it in such systems. Mark's expectation > that regulator support must be disabled if regulators are not fully declared in non-dt > systems doesn't seem very useful nor really feasible. >
I think I have a better idea: Surround the regulator code, or at least its error handling, in the lm90 driver with if (IS_ENABLED(CONFIG_OF)) { }
Would that be ok ? If yes I'll submit a patch. I'll do the same in another driver I am working on.
Guenter
| |