[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E0D77E0F-6A04-4C5D-8821-BB185EBDC511@goldelico.com>
Date: Tue, 10 Sep 2019 21:26:03 +0200
From: "H. Nikolaus Schaller" <hns@...delico.com>
To: Adam Ford <aford173@...il.com>
Cc: Tony Lindgren <tony@...mide.com>,
André Roth <neolynx@...il.com>,
Linux-OMAP <linux-omap@...r.kernel.org>,
Discussions about the Letux Kernel
<letux-kernel@...nphoenux.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andreas Kemnade <andreas@...nade.info>,
Nishanth Menon <nm@...com>
Subject: Re: [Letux-kernel] [RFC PATCH 0/3] Enable 1GHz support on omap36xx
Hi Adam,
> Am 10.09.2019 um 20:51 schrieb H. Nikolaus Schaller <hns@...delico.com>:
>
> Hi,
>
>> Am 10.09.2019 um 20:30 schrieb Adam Ford <aford173@...il.com>:
>>
>> On Tue, Sep 10, 2019 at 11:59 AM H. Nikolaus Schaller <hns@...delico.com> wrote:
>>>
>>
>> I assumed this to be -EINVAL, but I'd be happy to be wrong.
>
> It seems that cat microvolts stringifies the int returned from reading
> the regulator voltage.
>
> Since it is initialized to -EINVAL it returns "-22" as string instead of
> converting into an errno return when reading /sys... So one step is
> missing a proper error check.
Ok, found it in regulator_uV_show().
ret = sprintf(buf, "%d\n", regulator_get_voltage_rdev(rdev));
simply prints the result into a string.
But regulator_get_voltage_rdev() (or _regulator_get_voltage() before v5.3-rc1)
may return errors like -EPROBE_DEFER or -EINVAL or whatever
rdev->desc->ops->get_voltage_sel(rdev) returns.
So this is clearly a bug in regulator_uV_show().
> But that is just a symptom that there is no call to set a good voltage.
That is the next issue to find...
BR,
Nikolaus
Powered by blists - more mailing lists