From: Thierry Reding <treding@nvidia.com>
To: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: devicetree@vger.kernel.org, drinkcat@chromium.org,
Emil Velikov <emil.l.velikov@gmail.com>,
linux-kernel@vger.kernel.org, robh+dt@kernel.org,
dri-devel@lists.freedesktop.org, dan.carpenter@oracle.com
Subject: Re: [PATCH v3 3/3] drm: bridge: anx78xx: Add anx78xx driver support.
Date: Wed, 20 Apr 2016 14:56:56 +0200 [thread overview]
Message-ID: <20160420125655.GC20346@ulmo.ba.sec> (raw)
In-Reply-To: <5714C3CA.5020102@collabora.com>
[-- Attachment #1.1: Type: text/plain, Size: 1512 bytes --]
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
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <treding@nvidia.com>
To: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>, <airlied@linux.ie>,
<robh+dt@kernel.org>, <djkurtz@chromium.org>,
<drinkcat@chromium.org>, <dan.carpenter@oracle.com>,
Emil Velikov <emil.l.velikov@gmail.com>,
Rob Herring <robh@kernel.org>
Subject: Re: [PATCH v3 3/3] drm: bridge: anx78xx: Add anx78xx driver support.
Date: Wed, 20 Apr 2016 14:56:56 +0200 [thread overview]
Message-ID: <20160420125655.GC20346@ulmo.ba.sec> (raw)
In-Reply-To: <5714C3CA.5020102@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 1512 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-04-20 12:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-08 12:52 [PATCH v3 0/3] Add ANX7814 I2C bridge driver Enric Balletbo i Serra
2016-04-08 12:52 ` [PATCH v3 1/3] of: Add vendor prefix for Analogix Semiconductor Enric Balletbo i Serra
2016-04-08 12:52 ` [PATCH v3 2/3] devicetree: Add ANX7814 SlimPort transmitter binding Enric Balletbo i Serra
2016-04-08 12:52 ` [PATCH v3 3/3] drm: bridge: anx78xx: Add anx78xx driver support Enric Balletbo i Serra
2016-04-14 13:10 ` Thierry Reding
2016-04-14 13:10 ` Thierry Reding
[not found] ` <20160414131013.GA32237-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-04-14 13:42 ` Enric Balletbo i Serra
2016-04-14 13:42 ` Enric Balletbo i Serra
2016-04-14 14:06 ` Emil Velikov
[not found] ` <CACvgo50ku9FZJU4YqdFsa6_=FqeDsq2UiCZkSVTLuTKsPRf7qw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-14 14:08 ` Enric Balletbo i Serra
2016-04-14 14:08 ` Enric Balletbo i Serra
2016-04-14 14:32 ` Thierry Reding
2016-04-14 14:32 ` Thierry Reding
2016-04-18 11:23 ` Enric Balletbo i Serra
2016-04-18 11:23 ` Enric Balletbo i Serra
2016-04-20 12:56 ` Thierry Reding [this message]
2016-04-20 12:56 ` Thierry Reding
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=20160420125655.GC20346@ulmo.ba.sec \
--to=treding@nvidia.com \
--cc=dan.carpenter@oracle.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=drinkcat@chromium.org \
--cc=emil.l.velikov@gmail.com \
--cc=enric.balletbo@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.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.