From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/8] ARM: dove: create a proper PMU driver for power domains, PMU IRQs and resets
Date: Sat, 14 Feb 2015 18:09:39 +0100 [thread overview]
Message-ID: <20150214170939.GG3213@lunn.ch> (raw)
In-Reply-To: <E1YMedG-00054d-0d@rmk-PC.arm.linux.org.uk>
Hi Russell
> +static struct reset_control_ops pmu_reset_ops = {
> + .reset = pmu_reset_reset,
> + .assert = pmu_reset_assert,
> + .deassert = pmu_reset_deassert,
> +};
> +
> +static struct reset_controller_dev pmu_reset __initdata = {
> + .ops = &pmu_reset_ops,
> + .owner = THIS_MODULE,
Dumb question: Is this still needed? There have been a lot of patches
from Wolfram Sang removing similar THIS_MODULE statements.
> + * pmu {
> + * compatible = "marvell,pmu";
Is this maybe too generic? I'm sure Marvell has more than one pmu.
Maybe "marvell,dove-pmu"
> +int __init dove_init_pmu(void)
> +{
> + struct device_node *np_pmu, *np;
> + struct pmu_data *pmu;
> + int ret, parent_irq;
> +
> + /* Lookup the PMU node */
> + np_pmu = of_find_compatible_node(NULL, NULL, "marvell,pmu");
> + if (!np_pmu)
> + return 0;
> +
> + pmu = kzalloc(sizeof(*pmu), GFP_KERNEL);
> + if (!pmu)
> + return -ENOMEM;
> +
> + spin_lock_init(&pmu->lock);
> + pmu->of_node = np_pmu;
> + pmu->pmc_base = of_iomap(pmu->of_node, 0);
> + pmu->pmu_base = of_iomap(pmu->of_node, 1);
> + if (!pmu->pmc_base || !pmu->pmu_base) {
> + pr_err("%s: failed to map PMU\n", np_pmu->name);
> + iounmap(pmu->pmu_base);
> + iounmap(pmu->pmc_base);
> + kfree(pmu);
> + return -ENOMEM;
> + }
> +
> + parent_irq = irq_of_parse_and_map(pmu->of_node, 0);
> + if (!parent_irq)
> + pr_err("%s: no interrupt specified\n", np_pmu->name);
> +
Is it not fatal to be missing the interrupt? Seems like return -EINVAL
would be a good idea?
Andrew
next prev parent reply other threads:[~2015-02-14 17:09 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-14 15:26 [FOR DISCUSSION 0/8] Dove PMU support Russell King - ARM Linux
2015-02-14 15:26 ` Russell King - ARM Linux
2015-02-14 15:27 ` [PATCH 1/8] pm: domains: quieten down generic pm domains Russell King
2015-02-14 15:27 ` [PATCH 2/8] pm: domains: avoid potential oops in pm_genpd_remove_device() Russell King
2015-02-14 15:27 ` [PATCH 3/8] pm: domains: sync runtime PM status with PM domains Russell King
2015-02-15 4:24 ` Ulf Hansson
2015-02-17 18:53 ` Rafael J. Wysocki
2015-02-17 19:42 ` Alan Stern
2015-02-17 19:42 ` Russell King - ARM Linux
2015-02-18 7:02 ` Rafael J. Wysocki
2015-02-18 10:03 ` Russell King - ARM Linux
2015-02-18 15:12 ` Alan Stern
2015-02-18 15:42 ` Russell King - ARM Linux
2015-02-18 16:52 ` Rafael J. Wysocki
2015-02-18 17:26 ` Russell King - ARM Linux
2015-02-18 18:05 ` Rafael J. Wysocki
2015-03-04 19:57 ` Ulf Hansson
2015-03-04 20:11 ` Russell King - ARM Linux
2015-02-18 18:42 ` Alan Stern
2015-02-18 16:46 ` Rafael J. Wysocki
2015-02-14 15:27 ` [PATCH 4/8] ARM: dove: create a proper PMU driver for power domains, PMU IRQs and resets Russell King
2015-02-14 17:02 ` Sebastian Hesselbarth
2015-02-15 16:36 ` Russell King - ARM Linux
2015-02-16 15:58 ` Russell King - ARM Linux
2015-02-16 16:30 ` Sebastian Hesselbarth
2015-02-16 16:52 ` Russell King - ARM Linux
2015-02-16 17:54 ` Andrew Lunn
2015-02-14 17:09 ` Andrew Lunn [this message]
2015-02-15 16:26 ` Russell King - ARM Linux
2015-02-14 15:27 ` [PATCH 5/8] ARM: dt: dove: add Dove PMU DT entry to dove.dtsi Russell King
2015-02-14 15:27 ` Russell King
2015-02-14 15:27 ` [PATCH 6/8] ARM: dt: dove: wire up RTC interrupt Russell King
2015-02-14 15:27 ` Russell King
2015-02-14 15:28 ` [PATCH 7/8] ARM: dt: dove: add video decoder power domain description Russell King
2015-02-14 15:28 ` Russell King
2015-02-14 15:28 ` [PATCH 8/8] ARM: dt: dove: add GPU " Russell King
2015-02-14 15:28 ` Russell King
2015-02-14 16:49 ` [FOR DISCUSSION 0/8] Dove PMU support Andrew Lunn
2015-02-14 16:49 ` Andrew Lunn
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=20150214170939.GG3213@lunn.ch \
--to=andrew@lunn.ch \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.