From: krzk@kernel.org (Krzysztof Kozlowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/9] pinctrl: samsung: Move retention control from mach-exynos to the pinctrl driver
Date: Tue, 27 Dec 2016 17:39:49 +0200 [thread overview]
Message-ID: <20161227153949.wbxvaabawquscpsn@kozik-lap> (raw)
In-Reply-To: <5d09e29f-5796-cce6-75d5-ed5a0145092f@samsung.com>
On Tue, Dec 27, 2016 at 11:12:26AM +0100, Marek Szyprowski wrote:
> Hi Tomasz,
>
>
> On 2016-12-26 06:55, Tomasz Figa wrote:
> > 2016-12-23 21:24 GMT+09:00 Marek Szyprowski <m.szyprowski@samsung.com>:
> > > Pad retention control after suspend/resume cycle should be done from pin
> > > controller driver instead of PMU (power management unit) driver to avoid
> > > possible ordering and logical dependencies. Till now it worked fine only
> > > because PMU driver registered its sys_ops after pin controller.
> > >
> > > This patch moves pad retention control from PMU driver to Exynos pin
> > > controller driver. This is a preparation for adding new features to Exynos
> > > pin controller driver, like runtime power management and suspending
> > > individual pin controllers, which might be a part of some power domain.
> > >
> > It looks like this change will essentially break the compatibility
> > with DTBs that don't have the pmu syscon specified in pin controller
> > nodes.
> >
> > On the other hand, moving this code to where it actually belongs
> > really makes sense, so maybe we could just avoid the need of having
> > this property, by looking up the PMU manually, by hardcoded string or
> > so, if the proper property is not present?
>
> Well, once again the topic of mythical device tree compatibility appearch.
>
> There are imho following possibilities:
>
> 1. https://patchwork.kernel.org/patch/9477963/ ("Explicitly mark Samsung
> Exynos SoC bindings as unstable"), simply apply this approach and ignore
> users, who don't update their device tree blobs (are there any??).
That is not how it works. Assuming that there was this "mythical
compatibility" then you would have to wait a few moments between marking
something "to be broken" and actually breaking it. In other words, if
you wanted to silence the "breaking compatibility" folks, then the patch
above should have been sent a while ago.
> 2. Switch to syscon_regmap_lookup_by_compatible() lookup and hardcode PMU
> compatible id for all Exynos SoCs in the pin control driver. Then maybe,
> while unifying the code, switch other Exynos drivers to this approach
> and remove PMU phandles from device tree to make the code a bit more
> consistent across drivers and easier to understand.
>
> 3. Mixed approach, which combines drawbacks of both approaches. Additional
> dead code for handling mythical compatibility and harder to understand
> relations between the drivers.
>
>
> > [...]
> >
> > > diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> > > index 1baf19eecabf..b7bd2e12a269 100644
> > > --- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> > > +++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
> > > @@ -43,6 +43,10 @@ Required Properties:
> > > };
> > > };
> > >
> > > +- samsung,pmu-syscon: Phandle to the PMU system controller, to let driver
> > > + to control pad retention after system suspend/resume cycle (only for Exynos
> > > + SoC series).
> > > +
> > Ah, here it is. I think adding relevant binding documentation at the
> > beginning of the series would make it much easier for reviewers to
> > understand the change.
>
> I already pointed that patches are ordered to make the changes bisectable,
> what
> usually means that new properties are added first, before being required by
> the
> drivers.
I saw the explanation for this order and I don't have problems with it.
However you can always split to separate patch the documentation for
bindings. It won't break bisectability.
Best regards,
Krzysztof
next prev parent reply other threads:[~2016-12-27 15:39 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20161223122513epcas1p394d93d72d2d32c8910aafd1f6cc6b5e2@epcas1p3.samsung.com>
2016-12-23 12:24 ` [PATCH 0/9] Runtime PM for Exynos pin controller driver Marek Szyprowski
2016-12-23 12:24 ` [PATCH 1/9] ARM: dts: exynos: Add PMU syscon to pinctrl nodes Marek Szyprowski
2016-12-26 5:36 ` Tomasz Figa
2016-12-23 12:24 ` [PATCH 2/9] ARM: dts: exynos: Add pinctrl sleep state for 542x i2s module Marek Szyprowski
2016-12-26 5:39 ` Tomasz Figa
2016-12-23 12:24 ` [PATCH 3/9] pinctrl: samsung: Remove dead code Marek Szyprowski
2016-12-25 12:51 ` Krzysztof Kozlowski
2016-12-26 5:40 ` Tomasz Figa
2016-12-23 12:24 ` [PATCH 4/9] pinctrl: samsung: Use generic of_device_get_match_data helper Marek Szyprowski
2016-12-25 12:56 ` Krzysztof Kozlowski
2016-12-26 5:44 ` Tomasz Figa
2016-12-26 9:41 ` Krzysztof Kozlowski
2016-12-27 10:28 ` Bartlomiej Zolnierkiewicz
2016-12-23 12:24 ` [PATCH 5/9] pinctrl: samsung: Move retention control from mach-exynos to the pinctrl driver Marek Szyprowski
2016-12-25 13:42 ` Krzysztof Kozlowski
2016-12-27 10:15 ` Marek Szyprowski
2016-12-26 5:55 ` Tomasz Figa
2016-12-27 10:12 ` Marek Szyprowski
2016-12-27 15:39 ` Krzysztof Kozlowski [this message]
2016-12-30 9:19 ` Linus Walleij
2016-12-23 12:24 ` [PATCH 6/9] pinctrl: samsung: Replace syscore ops with standard platform device pm_ops Marek Szyprowski
2016-12-25 18:47 ` Krzysztof Kozlowski
2016-12-26 5:57 ` Tomasz Figa
2016-12-27 10:17 ` Marek Szyprowski
2016-12-23 12:24 ` [PATCH 7/9] pinctrl: samsung: Add property to mark pad state as suitable for power down Marek Szyprowski
2016-12-25 19:19 ` Krzysztof Kozlowski
2016-12-26 6:02 ` Tomasz Figa
2016-12-27 10:30 ` Marek Szyprowski
2016-12-27 15:33 ` Krzysztof Kozlowski
2016-12-30 9:23 ` Linus Walleij
2016-12-30 11:55 ` Marek Szyprowski
2016-12-30 15:05 ` Krzysztof Kozlowski
2016-12-23 12:24 ` [PATCH 8/9] pinctrl: samsung: Add runtime PM support Marek Szyprowski
2016-12-25 19:26 ` Krzysztof Kozlowski
2016-12-26 6:11 ` Tomasz Figa
2016-12-23 12:24 ` [PATCH 9/9] ARM: dts: exynos: Add audio power domain support to Exynos542x SoCs Marek Szyprowski
2016-12-24 10:10 ` [PATCH 0/9] Runtime PM for Exynos pin controller driver Anand Moon
2016-12-27 8:29 ` Marek Szyprowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161227153949.wbxvaabawquscpsn@kozik-lap \
--to=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox