lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 25 Jul 2013 13:00:44 +0200
From:	Philipp Zabel <p.zabel@...gutronix.de>
To:	Mark Brown <broonie@...nel.org>
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.

Am Mittwoch, den 24.07.2013, 18:07 +0100 schrieb Mark Brown:
> 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?

Yes, I think so. Chip id is 0x61, and revision is 3 for da9063.

> > +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.

Ok, will fix that.

regards
Philipp

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ