On Wed, 21 Aug 2019 at 14:41, Sylwester Nawrocki <s.nawrocki@xxxxxxxxxxx> wrote: > > On 8/21/19 14:16, Krzysztof Kozlowski wrote: > >>> I'm also inclined to have it converted to a regular driver. We already > >>> have "exynos-asv" driver matching on the chipid node (patch 3/9). > >>> The ASV patches will not be merged soon anyway, all this needs some more > >>> thought. Krzysztof, can we abandon the chipid patches for now? Your > >> > >> chipid driver is good and useful on its own. The preferred solution > >> IMHO would be to just revert "soc: samsung: Convert exynos-chipid > >> driver to use the regmap API" commit. > > > > I queued the chipid as a dependency for ASV but ASV requires the > > regmap. What would be left after reverting the regmap part? Simple > > unused printk driver? No need for such. If reverting, then let's drop > > entire driver and rework it offline. > > In fact there is now no dependency between the chipid and the ASV > driver (patch 3/9), the regmap is provided by the syscon driver/API. > I should have added "depends on REGMAP && MFD_SYSCON" to Kconfig. > Both drivers (chipid, ASV) share the registers region so the regmap > API seemed appropriate here. Indeed, ASV needs only the header + DT change... Then actually we do not need chipid driver at all. Just to print the SoC and provide sysfs entry? If this is the only purpose, then it should be a driver. > Converting the chipid code to platform driver wouldn't make sense as > it wouldn't be useful early in arch/arm/mach-exynos and we can't have > two drivers for same device (the ASV driver matches on the chipid > compatible now). There is no use case for arm/mach-exynos. This code was not resubmitted and I doubt it will be (unless now someone wants to prove I am wrong and sends it again :) ). The two-device case is indeed a problem but it is possible. Clocks are doing it with PMU driver. See CLK_OF_DECLARE_DRIVER(), although I do not remember whether it is maybe obsolete pattern (discouraged). Best regards, Krzysztof