From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [PATCH v2 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Date: Thu, 10 Oct 2019 12:56:17 +0300 Message-ID: <20191010095617.GL13286@kadam> References: <43f48a7036e5a2991bd6bd8a7361107b27e48c54.1570699576.git.xji@analogixsemi.com> <20191010095315.GK13286@kadam> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20191010095315.GK13286@kadam> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: Xin Ji Cc: "devel@driverdev.osuosl.org" , Jernej Skrabec , Nicolas Boichat , Jonas Karlman , David Airlie , Neil Armstrong , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Andrzej Hajda , Laurent Pinchart , Daniel Vetter , Sheng Pan List-Id: dri-devel@lists.freedesktop.org On Thu, Oct 10, 2019 at 12:53:15PM +0300, Dan Carpenter wrote: > This code is *so* much nicer than before. I hope you feel good about > the changes. It makes me happy to look at this code now. > > On Thu, Oct 10, 2019 at 09:34:19AM +0000, Xin Ji wrote: > > +static int edid_read(struct anx7625_data *ctx, > > + u8 offset, u8 *pblock_buf) > > +{ > > + int ret, cnt; > > + struct device *dev = &ctx->client->dev; > > + > > + for (cnt = 0; cnt < EDID_TRY_CNT; cnt++) { ^^^^^ > > + sp_tx_aux_wr(ctx, offset); > > + /* set I2C read com 0x01 mot = 0 and read 16 bytes */ > > + ret = sp_tx_aux_rd(ctx, 0xf1); > > + > > + if (ret) { > > + sp_tx_rst_aux(ctx); > > + DRM_DEV_DEBUG_DRIVER(dev, "edid read failed, reset!\n"); > > + cnt++; ^^^^^ I mean that it's incremented twice, yeah? regards, dan carpenter