Hi Andrey,
> Am 13.07.2016 um 21:28 schrieb Andrey Utkin <andrey_utkin(a)fastmail.com>:
>
> On Wed, Jul 13, 2016 at 10:18:16PM +0300, Andrey Utkin wrote:
>>>>
>>>> I see that it turned out to having to revert max current code.
>>>
>>> Yes.
>>>
>>>> Are you already working on it? If no, I may work on it again a bit later.
>>>
>>> Yes, please go ahead. I won't find time soon and you had already implemented
>>> it. Just rewrite your branch (I haven't pulled or tested it yet).
>>
>> Ok.
>
> Done.
> Appended a commit to work/andrey/leds/is31fl319x:
> "Revert aggregated max current behaviour change"
Have tested a little. I think we have broken something. The LEDs remain
dark.
One thing we also need to fix is the bindings (still talks about private led-max-current).
And I think about modifying
static int is31fl319x_microamp_to_cs(struct device *dev, u32 microamp)
{ /* invert and round down to nearest value (range check done by caller) */
const u32 max = IS31FL319X_CURRENT_MAX + IS31FL319X_CURRENT_DEFAULT
+ IS31FL319X_CURRENT_STEP - 1;
return ((max - microamp) / IS31FL319X_CURRENT_STEP) % 8;
}
The reason is if we really specify the max. LED current there should be no
limit reported on it. If it is 3 mA it is 3 mA. If it is 100 mA it is 100 mA.
So the best effort the driver can do is to take the next lower available current
limit.
Well, we still have a problem <5mA... And should probably turn off completely?
Or in that case make probing fail.
I will have to take a deeper look what is wrong, but not before tomorrow morning.
BR,
Nikolaus