Re: [PATCH v3 01/13] soc: samsung: pmu: Provide global function to get PMU regmap

Linus Walleij
2017-01-26T15:54:06Z

On Thu, Jan 26, 2017 at 11:22 AM, Marek Szyprowski
<m.szyprowski@samsung.com> wrote:

> syscon_regmap_lookup_by_compatible() requires to have a compatible string
> hardcoded in the client driver. This might be used, but will require to have
> (and maintain) a duplicated list of PMU compatibles in pin control driver.
> There is a little problem with exynos4212 and exynos4412, which have same
> pinctrl compatible (samsung,exynos4x12-pinctrl), but separate PMU
> compatibles

I actually used this approach with the ARM reference designs:
drivers/mtd/maps/physmap_of_versatile.c
drivers/video/fbdev/amba-clcd-versatile.c

It made sense to me, because for each compatible I anyways
needed the .data field to distinguish between the different
system controllers, because they are of course all slightly
idiomatic.

I guess in your case you can distinguish how to use the syscon
by the pinctrl compatible instead.

Oh well.

I guess I'm OK with this then. I'll try to pull it in and see what
happens.

Yours,
Linus Walleij