From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C454C43331 for ; Sun, 10 Nov 2019 15:05:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E0B1D20818 for ; Sun, 10 Nov 2019 15:05:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726561AbfKJPF4 (ORCPT ); Sun, 10 Nov 2019 10:05:56 -0500 Received: from sauhun.de ([88.99.104.3]:58846 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726402AbfKJPF4 (ORCPT ); Sun, 10 Nov 2019 10:05:56 -0500 Received: from localhost (p54B3382A.dip0.t-ipconnect.de [84.179.56.42]) by pokefinder.org (Postfix) with ESMTPSA id BFF662C0114; Sun, 10 Nov 2019 16:05:53 +0100 (CET) Date: Sun, 10 Nov 2019 16:05:53 +0100 From: Wolfram Sang To: Hans Verkuil Cc: linux-media@vger.kernel.org Subject: Seeking help for getting rid of i2c_clients_command() Message-ID: <20191110150553.GA8040@kunai> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="G4iJoqBmSsgzjUCe" Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Hans, I know it is 13 years since you wrote that code: ba8fc39954bf ("V4L/DVB (4270): Add tda9887-specific tuner configuration") There, you added i2c_clients_command() which looks today like this: i2c_clients_command(priv->i2c_props.adap, TUNER_SET_CONFIG, &tda9887_cfg); Now, I would like to get rid of the i2c_clients_command() API, and this is the one remaining user. While trying to convert it into a local function, I started wondering why i2c_clients_command() is used at all. Why do we need to try all devices on the bus? A few lines later we have: tuner_i2c_xfer_send(&priv->i2c_props, buffer, 4); so i2c_props.addr seems to have a valid address? Or are there multiple tuners on that bus? Can you kindly shed some light on this? Thank you! Wolfram --G4iJoqBmSsgzjUCe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl3IJ0gACgkQFA3kzBSg KbbkoA//Y3W2y44Y6A9JuOK3eNBeSlPsh3Ulr7CYd7xLcCpPI+x+TrMhTuXErf/v yUP3Nb+6QT3S/wXKfSxF055l3Ija2ZYN5jkFQ2pSxZmD031dBpFUuzjIOMI7DyHS /j2cCtf7RD+9BXiq9Ygd8AqsNAVqTk86KOrysXYaJYPf6A1ilmgxSPDDvX6B8jBC jNztxiopOvXaVuThHm36CTFgdj1otQTQ+k2BHATauj/Z/AfmZJFhyL1oPzPswJq4 iZU68K2qo2PyDR5s1R8FlumnDVGZTydVo/gvk6sLKbpRk83Ck+bBqzQTwzpWIX5o yFkSBgXdr1VuM42OBO6cJnFfrs5pvGI3pAiCN6UYWe7rX+TaCUWHr8kmCtbKu+9h JLnXJqOV6HLGIhvmE1lJLRM2lo/YHnXA39Tr3SzEN93BbDLRejwLwwEt5lSnVRqa suFjURjsBwNE3sHe5bkTnlV7O8dlorNl2ugDJF95PSQ0Er0HSsa6oQN0Ky5hVp8N XEAB9huPPwXIcuBP+qdSJLDsdgrirRN5iyyLTsD1VdLqO2OOOxUIu3aKfZp6Ni4L h82GxZMy6x0zIVRd9Jc+d39La1TpwNuvnCkHK40IQSlKN8+j9SQxbndIqEyvwrdm V3vD9YslsPC3YOGpsDmTBox/WgEJfwlYpvc5y7+RHU3v9cU7NcE= =eJGv -----END PGP SIGNATURE----- --G4iJoqBmSsgzjUCe--