From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [PATCH v2] soc/lapis: add machine driver Date: Tue, 6 Dec 2011 10:25:19 +0000 Message-ID: <20111206102519.GD28840@opensource.wolfsonmicro.com> References: <1322819115-15808-1-git-send-email-tomoya.rohm@gmail.com> <20111202153401.GX8245@opensource.wolfsonmicro.com> <20111205183223.GB7467@opensource.wolfsonmicro.com> <057C8CCF-453E-4DC2-8E22-3D260973D35E@cirrus.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from opensource.wolfsonmicro.com (opensource.wolfsonmicro.com [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id 5286D103B7C for ; Tue, 6 Dec 2011 11:25:23 +0100 (CET) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Tomoya MORINAGA Cc: Dimitris Papastamos , "Austin, Brian" , Lars-Peter Clausen , Mike Frysinger , "qi.wang@intel.com" , Liam Girdwood , Takashi Iwai , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" , "kok.howg.ewe@intel.com" , Daniel Mack , "yong.y.wang@intel.com" , "joel.clark@intel.com" List-Id: alsa-devel@alsa-project.org On Tue, Dec 06, 2011 at 11:37:52AM +0900, Tomoya MORINAGA wrote: > Thanks. However, i2c access code is not included in Samsung. > Though OMAP includes i2c access code like below, > omap/sdp3430.c: twl_i2c_read_u8(TWL4030_MODULE_INTBR, &pin_mux, > omap/sdp3430.c: twl_i2c_write_u8(TWL4030_MODULE_INTBR, pin_mux, > this code doesn't seem applicable for me. > Could you show best practice for i2c access of machine driver? I2C access by machine drivers is not good practice. If you must do it for some reason use the standard ASoC functions to read and write registers. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933197Ab1LFKZY (ORCPT ); Tue, 6 Dec 2011 05:25:24 -0500 Received: from opensource.wolfsonmicro.com ([80.75.67.52]:41016 "EHLO opensource.wolfsonmicro.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933052Ab1LFKZX (ORCPT ); Tue, 6 Dec 2011 05:25:23 -0500 Date: Tue, 6 Dec 2011 10:25:19 +0000 From: Mark Brown To: Tomoya MORINAGA Cc: "Austin, Brian" , Dimitris Papastamos , "alsa-devel@alsa-project.org" , Lars-Peter Clausen , Mike Frysinger , "qi.wang@intel.com" , Takashi Iwai , "linux-kernel@vger.kernel.org" , "yong.y.wang@intel.com" , "kok.howg.ewe@intel.com" , Daniel Mack , Liam Girdwood , "joel.clark@intel.com" Subject: Re: [alsa-devel] [PATCH v2] soc/lapis: add machine driver Message-ID: <20111206102519.GD28840@opensource.wolfsonmicro.com> References: <1322819115-15808-1-git-send-email-tomoya.rohm@gmail.com> <20111202153401.GX8245@opensource.wolfsonmicro.com> <20111205183223.GB7467@opensource.wolfsonmicro.com> <057C8CCF-453E-4DC2-8E22-3D260973D35E@cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Cookie: You are fairminded, just and loving. User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 06, 2011 at 11:37:52AM +0900, Tomoya MORINAGA wrote: > Thanks. However, i2c access code is not included in Samsung. > Though OMAP includes i2c access code like below, > omap/sdp3430.c: twl_i2c_read_u8(TWL4030_MODULE_INTBR, &pin_mux, > omap/sdp3430.c: twl_i2c_write_u8(TWL4030_MODULE_INTBR, pin_mux, > this code doesn't seem applicable for me. > Could you show best practice for i2c access of machine driver? I2C access by machine drivers is not good practice. If you must do it for some reason use the standard ASoC functions to read and write registers.