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] [day] [month] [year] [list]
Date:	Wed, 20 Apr 2016 14:56:56 +0200
From:	Thierry Reding <treding@...dia.com>
To:	Enric Balletbo i Serra <enric.balletbo@...labora.com>
CC:	<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<dri-devel@...ts.freedesktop.org>, <airlied@...ux.ie>,
	<robh+dt@...nel.org>, <djkurtz@...omium.org>,
	<drinkcat@...omium.org>, <dan.carpenter@...cle.com>,
	Emil Velikov <emil.l.velikov@...il.com>,
	Rob Herring <robh@...nel.org>
Subject: Re: [PATCH v3 3/3] drm: bridge: anx78xx: Add anx78xx driver support.

On Mon, Apr 18, 2016 at 01:23:54PM +0200, Enric Balletbo i Serra wrote:
> On 14/04/16 15:10, Thierry Reding wrote:
> > On Fri, Apr 08, 2016 at 02:52:52PM +0200, Enric Balletbo i Serra wrote:
[...]
> > > +	/* Map slave addresses of ANX7814 */
> > > +	for (i = 0; i < I2C_NUM_ADDRESSES; i++) {
> > > +		anx78xx->i2c_dummy[i] = i2c_new_dummy(client->adapter,
> > > +						anx78xx_i2c_addresses[i] >> 1);
> > > +		if (!anx78xx->i2c_dummy[i]) {
> > > +			err = -ENOMEM;
> > > +			DRM_ERROR("Failed to reserve i2c bus %02x.\n",
> > > +				  anx78xx_i2c_addresses[i]);
> > > +			goto err_unregister_i2c;
> > > +		}
> > > +
> > > +		anx78xx->map[i] = devm_regmap_init_i2c(anx78xx->i2c_dummy[i],
> > > +						       &anx78xx_regmap_config);
> > > +		if (IS_ERR(anx78xx->map[i])) {
> > > +			err = PTR_ERR(anx78xx->map[i]);
> > > +			DRM_ERROR("Failed regmap initialization %02x.\n",
> > > +				  anx78xx_i2c_addresses[i]);
> > > +			goto err_unregister_i2c;
> > > +		}
> > > +	}
> > 
> > That's quite some overhead merely to use regmap... Perhaps there's room
> > to enhance regmap-i2c to support multiple addresses for the same device?
> > 
> 
> Yes it is, guess this is also used on other drivers, so will make sense
> enhance regmap-i2c, but let me do this on a future regmap-i2c patch series
> ;)

Yes, improving this in a follow-up patch seems fine, especially since
this already seems to be a common pattern.

I'll try to take a look at v4 hopefully within the week.

Thierry

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ