From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] regulator: add max8925 support
Date: Wed, 23 Dec 2009 14:30:16 +0000 [thread overview]
Message-ID: <20091223143016.GD14455@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <771cded00912230139g23ea8554l866d55e16ae3ed58@mail.gmail.com>
On Wed, Dec 23, 2009 at 04:39:59AM -0500, Haojian Zhuang wrote:
> +#define MAX8925_REGULATOR_DRIVER(_name) \
> +{ \
> + .driver = { \
> + .name = "max8925-" #_name, \
> + .owner = THIS_MODULE, \
> + }, \
> + .probe = max8925_regulator_probe, \
> + .remove = __devexit_p(max8925_regulator_remove),\
> +}
> +
> +static struct platform_driver max8925_regulator_driver[] = {
> + MAX8925_REGULATOR_DRIVER(sd1),
> + MAX8925_REGULATOR_DRIVER(sd2),
> + MAX8925_REGULATOR_DRIVER(sd3),
> + MAX8925_REGULATOR_DRIVER(ldo1),
> + MAX8925_REGULATOR_DRIVER(ldo2),
Since these driver structures differ only in name there seems to be no
need to define more than one for the bucks and one for the LDOs - the
code in the driver doesn't actually seem to need it. The .id field of
the driver structure can be set to give the device numbers.
> +}
> +module_init(max8925_regulator_init);
subsys_initcall()
> +MODULE_LICENSE("GPL");
> +MODULE_AUTHOR("Haojian Zhuang <haojian.zhuang@marvell.com>");
> +MODULE_DESCRIPTION("Regulator Driver for Maxim 8925 PMIC");
> +MODULE_ALIAS("platform:max8925-regulator");
This MODULE_ALIAS won't actually work - the name doesn't match up with
the names of the drivers or the devices.
next prev parent reply other threads:[~2009-12-23 14:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-21 12:47 [PATCH 4/4] regulator: add max8925 support Haojian Zhuang
2009-12-21 18:02 ` Liam Girdwood
2009-12-23 9:39 ` Haojian Zhuang
2009-12-23 14:30 ` Mark Brown [this message]
2009-12-25 5:27 ` Haojian Zhuang
2009-12-30 12:40 ` Mark Brown
2010-01-04 15:47 ` Liam Girdwood
2010-01-05 1:36 ` Haojian Zhuang
2010-01-05 9:44 ` Mark Brown
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=20091223143016.GD14455@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--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.