From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Tue, 11 Oct 2011 09:33:58 +0200 Subject: [U-Boot] [PATCH V2 05/13] i2c: Create common default i2c_set_bus_num() function In-Reply-To: <201110101426.24106.vapier@gentoo.org> References: <1318091769-30979-1-git-send-email-sbabic@denx.de> <1318239351-10835-1-git-send-email-sbabic@denx.de> <201110101426.24106.vapier@gentoo.org> Message-ID: <4E93F166.6000908@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/10/2011 08:26 PM, Mike Frysinger wrote: > On Monday 10 October 2011 13:53:48 Tabi Timur-B04825 wrote: >> On Mon, Oct 10, 2011 at 4:35 AM, Stefano Babic wrote: >>> New default, weak i2c_set_bus_num() function. >>> >>> Signed-off-by: Stefano Babic >>> Cc: Heiko Schocher >> >> I would prefer to see a new set of I2C functions that take a bus >> number as a parameter, so that we can eliminate i2c_set_bus_num() (and >> the global variable it modifies) altogether. > > i think that'd require a much larger rework of the framework and thus would be > better to do in addition to Stefano's work rather than in place of ? Right - this patch is only due to the fact that the mxc_i2c.c has no i2c_set_bus_num(), while it is present in several SOCs (not only powerpc). I see now that the pmic patches calls i2c_set_bus_num() instead of the macro I2C_SET_BUS(), that is protected in case CONFIG_I2C_MULTI_BUS is not set (I have only now discovered...). Maybe I should drop my patch and change the pmic to use this macro. Regards, Stefano -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================