From patchwork Sun Jul 8 18:20:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Borleis X-Patchwork-Id: 1170021 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 4A8833FD4F for ; Sun, 8 Jul 2012 18:24:40 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Snw6k-0008K4-9C; Sun, 08 Jul 2012 18:21:22 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Snw6I-0008J2-5i for linux-arm-kernel@lists.infradead.org; Sun, 08 Jul 2012 18:20:55 +0000 Received: from gallifrey.ext.pengutronix.de ([2001:6f8:1178:4:5054:ff:fe8d:eefb] helo=localhost) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1Snw6F-000152-Ij for linux-arm-kernel@lists.infradead.org; Sun, 08 Jul 2012 20:20:51 +0200 From: Juergen Beisert Organization: Pengutronix - Linux Solutions for Science and Industry To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 09/10] MACH/Samsung/Mini2440: enable buzzer Date: Sun, 8 Jul 2012 20:20:51 +0200 User-Agent: KMail/1.9.10 References: <1341767544-17447-1-git-send-email-jbe@pengutronix.de> <1341767544-17447-10-git-send-email-jbe@pengutronix.de> In-Reply-To: <1341767544-17447-10-git-send-email-jbe@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201207082020.51220.jbe@pengutronix.de> X-SA-Exim-Connect-IP: 2001:6f8:1178:4:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: jbe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Signed-off-by: Juergen Beisert diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c index ad1d89e..8a41f03 100644 --- a/arch/arm/mach-s3c24xx/mach-mini2440.c +++ b/arch/arm/mach-s3c24xx/mach-mini2440.c @@ -592,6 +592,15 @@ static struct s3c_hwmon_pdata mini2440_adc __initdata = { .in[7] = &mini2440_adc_chcfg[7], }; +static struct platform_device mini2440_buzzer_device = { + .name = "pwm-beeper", + .id = -1, + .dev = { + .parent = &s3c_device_timer[0].dev, + .platform_data = (void *)0, /* channel 0 */ + }, +}; + static struct platform_device *mini2440_devices[] __initdata = { &s3c_device_ohci, &s3c_device_wdt, @@ -609,6 +618,8 @@ static struct platform_device *mini2440_devices[] __initdata = { &samsung_asoc_dma, &s3c_device_adc, &s3c_device_hwmon, + &s3c_device_timer[0], + &mini2440_buzzer_device, }; static void __init mini2440_map_io(void) @@ -771,6 +782,9 @@ static void __init mini2440_init(void) i2c_register_board_info(0, mini2440_i2c_devs, ARRAY_SIZE(mini2440_i2c_devs)); + /* PWM to the buzzer */ + s3c_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPB0_TOUT0); + platform_add_devices(mini2440_devices, ARRAY_SIZE(mini2440_devices)); if (features.count) /* the optional features */