Re: [PATCH 2/2] pinctrl: ocelot: fix pinconf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 14, 2022 at 1:07 AM Robert Marko <robert.marko@xxxxxxxxxx> wrote:
> On Thu, Jul 14, 2022 at 1:01 AM Colin Foster <colin.foster@xxxxxxxxxxxxxxxx> wrote:
>>
>> Hi Robert,
>>
>> On Thu, Jul 14, 2022 at 12:51:51AM +0200, Robert Marko wrote:
>> > Commit "pinctrl: ocelot: convert pinctrl to regmap" moved to using
>> > regmap_read/write, however it neglected to also carry out alignment
>> > to register stride of 4.
>> >
>> > This would cause the following error:
>> > [    1.720873] pinctrl-ocelot 6110101e0.pinctrl: pin_config_set op failed for pin 34
>> > [    1.728110] sdhci-sparx5 600800000.mmc: Error applying setting, reverse things back
>> >
>> > So, regmap_read would return -EINVAL as it was being passed address
>> > of the pin without stride, so for example pin 34 would end up being
>> > 0x22 in hex.
>> >
>> > Fix this by accouting for the stride in register address.
>>
>> Sorry for the bug. Horaitu found this as well and recently submitted
>> patches:
>>
>> https://patchwork.ozlabs.org/project/linux-gpio/patch/20220713193750.4079621-3-horatiu.vultur@xxxxxxxxxxxxx/
>>
>> The second patch in his set fixes both of these issues (reg_stride and
>> max_register).
>
>
> Yeah, I noticed his patch only after sending this.
> Sorry for the noise.

Better too many fixes than too few!

I have merged Horatiu's fixes now.

Yours,
Linus Walleij



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux