From: wsa@the-dreams.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V3] ARM: shmobile: Rework the PMIC IRQ line quirk
Date: Tue, 5 Jun 2018 11:21:51 +0200 [thread overview]
Message-ID: <20180605092151.57ezynjgf23yunkf@ninjato> (raw)
In-Reply-To: <20180605080727.ygh25rmjsrs3dmlq@verge.net.au>
Hi Marek,
On Tue, Jun 05, 2018 at 10:07:28AM +0200, Simon Horman wrote:
> On Mon, Jun 04, 2018 at 07:59:11PM +0200, Marek Vasut wrote:
> > Rather than hard-coding the quirk topology, which stopped scaling,
> > parse the information from DT. The code looks for all compatible
> > PMICs -- da9036 and da9210 -- and checks if their IRQ line is tied
> > to the same pin. If so, the code sends a matching sequence to the
> > PMIC to deassert the IRQ.
> >
> > Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> > Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> > Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > Cc: Simon Horman <horms+renesas@verge.net.au>
> > Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
>From an I2C point of view:
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Minor nits:
> > @@ -122,7 +143,13 @@ static struct notifier_block regulator_quirk_nb = {
> >
> > static int __init rcar_gen2_regulator_quirk(void)
> > {
> > - u32 mon;
> > + struct device_node *np;
> > + const struct of_device_id *id;
> > + struct regulator_quirk *quirk;
> > + struct regulator_quirk *pos;
Merge the last two lines into one?
> > + struct of_phandle_args *argsa, *argsb;
> > + u32 mon, addr;
> > + int ret;
> >
> > if (!of_machine_is_compatible("renesas,koelsch") &&
> > !of_machine_is_compatible("renesas,lager") &&
> > @@ -130,6 +157,45 @@ static int __init rcar_gen2_regulator_quirk(void)
> > !of_machine_is_compatible("renesas,gose"))
> > return -ENODEV;
> >
> > + for_each_matching_node_and_match(np, rcar_gen2_quirk_match, &id) {
> > + if (!np || !of_device_is_available(np))
Can '!np' actually happen? This is the exit condition of the for-loop,
or am I overlooking something?
Regards,
Wolfram
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180605/35898b42/attachment.sig>
next prev parent reply other threads:[~2018-06-05 9:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 17:59 [PATCH V3] ARM: shmobile: Rework the PMIC IRQ line quirk Marek Vasut
2018-06-05 8:07 ` Simon Horman
2018-06-05 9:21 ` Wolfram Sang [this message]
2018-06-05 9:57 ` Marek Vasut
2018-06-05 9:46 ` Marek Vasut
2018-06-11 9:56 ` Geert Uytterhoeven
2018-06-11 12:08 ` Marek Vasut
2018-06-11 13:03 ` Geert Uytterhoeven
2018-06-11 13:35 ` Marek Vasut
2018-06-11 13:49 ` Geert Uytterhoeven
2018-06-11 14:04 ` Marek Vasut
2018-06-11 14:10 ` Geert Uytterhoeven
2018-06-11 14:19 ` Marek Vasut
2018-06-11 14:30 ` Geert Uytterhoeven
2018-06-11 15:26 ` Marek Vasut
2018-06-13 11:28 ` Geert Uytterhoeven
2018-06-13 20:53 ` Marek Vasut
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=20180605092151.57ezynjgf23yunkf@ninjato \
--to=wsa@the-dreams.de \
--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