Re: [PATCH] Revert "pinctrl: devicetree: Fix dt_to_map_one_config handling of hogs"

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

 



On 07/06/18 16:44, Fabio Estevam wrote:
On Thu, Jun 7, 2018 at 12:23 PM, Richard Fitzgerald
<rf@xxxxxxxxxxxxxxxxxxxxx> wrote:

Most likely the bug that my patch fixed was masking a different
problem with the iMX system.

In imx53-qsb-common.dtsi the iomuxc pinctrl driver node has some hogs
and also has many other pinctrl configurations that are not hogs and
are used by other drivers. What I think is happening is that because of
the bug in the original dt_to_map_one_config() all the child nodes under
iomux would have been treated as hogs, including the ones that are not
hogs. So when the iomuxc driver is probed all the possible pinctrl
configurations would be applied immediately and you would see correctly
configured pin muxes even though the way they got configured was wrong.

I assume your problem is that those settings which are not hogs are not
getting set up now? That indicates that for some reason when the

No, only pinctrl_hog group is not being set up now.

individual drivers call pinctrl_get() the mappings do not get applied.
So the interesting case to debug is what happens when
dt_to_map_one_config() is called with pctldev==NULL, why are the
pinctrl mappings requested by all those drivers not mapped to the
iomuxc driver?

Which of the pinctrl configuration are not applied? Are all missing?
Or only some?

Only pinctrl_hog configuration is not taking effect.


I see the bug. If the hog node isn't a 1st level child of the pinctrl
parent node it will go around the for(;;) loop again but on the first
pass I overwrite pctldev with the result of
get_pinctrl_dev_from_of_node() so it doesn't point to the pinctrl driver
any more.

It's end of the day here, I'll do a patch tomorrow to stash the original
pctldev so it doesn't get overwritten.

Something like this should work.

1) Rename the "pctldev" argument to the function to "hog_pctldev"
2) Add a local variable
	struct pinctrl_dev *pctldev = NULL;

3) Change the if statement to:

		if (hog_pctldev && (np_pctldev == p->dev->of_node)) {
			pctrldev = hog_pctldev;
			break;
		}

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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