[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130724170721.GQ9858@sirena.org.uk>
Date: Wed, 24 Jul 2013 18:07:21 +0100
From: Mark Brown <broonie@...nel.org>
To: Philipp Zabel <p.zabel@...gutronix.de>
Cc: linux-kernel@...r.kernel.org, Lee Jones <lee.jones@...aro.org>,
Krystian Garbaciak <krystian.garbaciak@...semi.com>
Subject: Re: [PATCH 1/2] mfd: Add Dialog DA9063 core driver.
On Wed, Jul 24, 2013 at 06:34:42PM +0200, Philipp Zabel wrote:
> + ret = regmap_read(da9063->regmap, DA9063_REG_CHIP_ID, &model);
> + if (ret < 0) {
> + dev_err(da9063->dev, "Cannot read chip model id.\n");
> + return -EIO;
> + }
> +
> + ret = regmap_read(da9063->regmap, DA9063_REG_CHIP_VARIANT, &revision);
> + if (ret < 0) {
> + dev_err(da9063->dev, "Cannot read chip revision id.\n");
> + return -EIO;
> + }
Is it possible to valiate these at all?
> +static int __init da9063_i2c_init(void)
> +{
> + int ret;
> +
> + ret = i2c_add_driver(&da9063_i2c_driver);
> + if (ret != 0)
> + pr_err("Failed to register da9063 I2C driver\n");
> +
> + return ret;
> +}
> +subsys_initcall(da9063_i2c_init);
You should really be able to use module_i2c_driver() for modern systems,
probe deferral should resolve the init order issues.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists