From patchwork Tue Dec 15 00:27:57 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 67428 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nBF0S9A4018652 for ; Tue, 15 Dec 2009 00:28:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758894AbZLOA2I (ORCPT ); Mon, 14 Dec 2009 19:28:08 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758900AbZLOA2I (ORCPT ); Mon, 14 Dec 2009 19:28:08 -0500 Received: from mail.renesas.com ([202.234.163.13]:65148 "EHLO mail02.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758894AbZLOA2G (ORCPT ); Mon, 14 Dec 2009 19:28:06 -0500 X-AuditID: ac140385-00000005000002de-61-4b26d80d1024 Received: from guardian01.idc.renesas.com ([172.20.8.200]) by mail02.idc.renesas.com (sendmail) with ESMTP id nBF0RvVr015391; Tue, 15 Dec 2009 09:27:57 +0900 (JST) Received: (from root@localhost) by guardian01.idc.renesas.com with id nBF0RxAi006415; Tue, 15 Dec 2009 09:27:59 +0900 (JST) Received: from mta01.idc.renesas.com (localhost [127.0.0.1]) by mta01.idc.renesas.com with ESMTP id nBF0RvZZ023712; Tue, 15 Dec 2009 09:27:57 +0900 (JST) Received: from PG10870.renesas.com ([172.30.8.159]) by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0KUO00CHV3YLHQ@ims05.idc.renesas.com>; Tue, 15 Dec 2009 09:27:57 +0900 (JST) Date: Tue, 15 Dec 2009 09:27:57 +0900 From: Kuninori Morimoto Subject: [PATCH] sh: ms7724se: Add ak4642 support To: Paul Mundt , Mark Brown Cc: Linux-SH , Linux-ALSA Message-id: MIME-version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-type: text/plain; charset=US-ASCII User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.3 (i386-msvc-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/3.02-dev (RINDOU) (2009-06-17 Rev.4261) X-Brightmail-Tracker: AAAAAA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 4b0f0c0..5d0f70b 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c @@ -514,6 +514,13 @@ static struct platform_device *ms7724se_devices[] __initdata = { &sdhi1_cn8_device, }; +/* I2C device */ +static struct i2c_board_info i2c0_devices[] = { + { + I2C_BOARD_INFO("ak4642", 0x12), + }, +}; + #define EEPROM_OP 0xBA206000 #define EEPROM_ADR 0xBA206004 #define EEPROM_DATA 0xBA20600C @@ -575,6 +582,16 @@ extern char ms7724se_sdram_enter_end; extern char ms7724se_sdram_leave_start; extern char ms7724se_sdram_leave_end; + +static int __init arch_setup(void) +{ + /* enable I2C device */ + i2c_register_board_info(0, i2c0_devices, + ARRAY_SIZE(i2c0_devices)); + return 0; +} +arch_initcall(arch_setup); + static int __init devices_setup(void) { u16 sw = ctrl_inw(SW4140); /* select camera, monitor */