lkml.org 
[lkml]   [2013]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-07-24 19:21    [W:0.093 / U:2.620 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site