From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sylwester Nawrocki Date: Mon, 08 Oct 2012 09:28:58 +0000 Subject: Re: [PATCH 10/14] media: soc-camera: support OF cameras Message-Id: <50729CDA.5030500@samsung.com> List-Id: References: <1348754853-28619-1-git-send-email-g.liakhovetski@gmx.de> <1348754853-28619-11-git-send-email-g.liakhovetski@gmx.de> <506F30E8.10206@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Guennadi Liakhovetski Cc: linux-media@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, Laurent Pinchart , Hans Verkuil , Magnus Damm , linux-sh@vger.kernel.org, Mark Brown , Stephen Warren , Arnd Bergmann , Grant Likely Hi Guennadi, On 10/08/2012 10:37 AM, Guennadi Liakhovetski wrote: >>> case BUS_NOTIFY_BOUND_DRIVER: >> >> There is no need for different handling of this event as well ? > > There is. The former is entered before the sensor I2C probe method is > called and prepares the data for probing, the latter is entered after a > successful sensor I2C probing. > >> Further, there is code like: >> >> adap = i2c_get_adapter(icl->i2c_adapter_id); >> >> which is clearly not going to work in OF case. > > It does work. See the call to soc_camera_of_i2c_ifill() under > BUS_NOTIFY_BIND_DRIVER above. In it > > icl->i2c_adapter_id = client->adapter->nr; > >> Could you clarify how it is supposed to work ? > > It is not only supposed to work, it actually does work. Does the above > explain it sufficiently? Sorry, my fault. Somehow I didn't realize there is being passed an I2C adapter already assigned by the I2C core. I confused it with some static adapter nr, which would be -1 for dt case. Apologies for wasting your time with those non-constructive questions. -- Thanks, Sylwester From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sylwester Nawrocki Subject: Re: [PATCH 10/14] media: soc-camera: support OF cameras Date: Mon, 08 Oct 2012 11:28:58 +0200 Message-ID: <50729CDA.5030500@samsung.com> References: <1348754853-28619-1-git-send-email-g.liakhovetski@gmx.de> <1348754853-28619-11-git-send-email-g.liakhovetski@gmx.de> <506F30E8.10206@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-reply-to: Sender: linux-sh-owner@vger.kernel.org To: Guennadi Liakhovetski Cc: linux-media@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, Laurent Pinchart , Hans Verkuil , Magnus Damm , linux-sh@vger.kernel.org, Mark Brown , Stephen Warren , Arnd Bergmann , Grant Likely List-Id: devicetree@vger.kernel.org Hi Guennadi, On 10/08/2012 10:37 AM, Guennadi Liakhovetski wrote: >>> case BUS_NOTIFY_BOUND_DRIVER: >> >> There is no need for different handling of this event as well ? > > There is. The former is entered before the sensor I2C probe method is > called and prepares the data for probing, the latter is entered after a > successful sensor I2C probing. > >> Further, there is code like: >> >> adap = i2c_get_adapter(icl->i2c_adapter_id); >> >> which is clearly not going to work in OF case. > > It does work. See the call to soc_camera_of_i2c_ifill() under > BUS_NOTIFY_BIND_DRIVER above. In it > > icl->i2c_adapter_id = client->adapter->nr; > >> Could you clarify how it is supposed to work ? > > It is not only supposed to work, it actually does work. Does the above > explain it sufficiently? Sorry, my fault. Somehow I didn't realize there is being passed an I2C adapter already assigned by the I2C core. I confused it with some static adapter nr, which would be -1 for dt case. Apologies for wasting your time with those non-constructive questions. -- Thanks, Sylwester