From patchwork Thu Nov 28 22:12:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 21854 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D687423FC4 for ; Thu, 28 Nov 2013 22:12:15 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id at1sf29089432iec.7 for ; Thu, 28 Nov 2013 14:12:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=y128O3eghtRat/jR2BNb0iwJxinYT7jpb2T8+rXYUbA=; b=JFGLfWkGTJqa0+UY26fiL13GcaM9KQpFSiblkCK4k5YVeDFfHjMeLNaxcefVUfJ8X2 4d5GpQD05+mvmsfK7dAwRdc5ChOLrg2kLPvWiGPCm3nZMeQQqp9sLvK7MMCPhu8NLq22 SYFrPrj4sPzHHQrhIKkrb/BjDrViVxouoH5B6wI1qzX2LwMEqJjdv6IcLdUYRL6gHgCb sV8hm2lA2sRL4Ov37KQCwGcvDvmOK0uGWP1FEnEeaLl+v9X5JqJZGpXOCrTJWEc9dynB fWp8vKTzMAK2TUI12JHJS08sp3UoEzQ02n2qQaUqMI2ltJwobC/ajVy6mdTbEvnjEpaf qCSQ== X-Gm-Message-State: ALoCoQk2caVGESomjdeIaPhbjXmyNHmDqNRo/JuP/0qfH4bjrWzAqmCyzhNajr9jO8e0LN92EDpv X-Received: by 10.182.245.197 with SMTP id xq5mr16095030obc.27.1385676735507; Thu, 28 Nov 2013 14:12:15 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.18.199 with SMTP id y7ls3586182qed.30.gmail; Thu, 28 Nov 2013 14:12:15 -0800 (PST) X-Received: by 10.58.23.33 with SMTP id j1mr67832vef.27.1385676735390; Thu, 28 Nov 2013 14:12:15 -0800 (PST) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id tq4si23497476vdc.51.2013.11.28.14.12.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Nov 2013 14:12:15 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id lc6so6260167vcb.13 for ; Thu, 28 Nov 2013 14:12:15 -0800 (PST) X-Received: by 10.220.47.10 with SMTP id l10mr61842vcf.32.1385676735143; Thu, 28 Nov 2013 14:12:15 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp43630vcz; Thu, 28 Nov 2013 14:12:14 -0800 (PST) X-Received: by 10.152.28.161 with SMTP id c1mr6701950lah.24.1385676734152; Thu, 28 Nov 2013 14:12:14 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47]) by mx.google.com with ESMTPS id kk3si21411974lbc.167.2013.11.28.14.12.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Nov 2013 14:12:14 -0800 (PST) Received-SPF: neutral (google.com: 209.85.215.47 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id ep20so6258773lab.20 for ; Thu, 28 Nov 2013 14:12:13 -0800 (PST) X-Received: by 10.112.155.70 with SMTP id vu6mr56004lbb.41.1385676733564; Thu, 28 Nov 2013 14:12:13 -0800 (PST) Received: from localhost.localdomain (c83-254-156-99.bredband.comhem.se. [83.254.156.99]) by mx.google.com with ESMTPSA id dm10sm50962025lbc.14.2013.11.28.14.12.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Nov 2013 14:12:12 -0800 (PST) From: Linus Walleij To: Wolfram Sang , linux-i2c@vger.kernel.org Cc: Linus Walleij , Lee Jones Subject: [PATCH 2/3] i2c: nomadik: remove platform data header Date: Thu, 28 Nov 2013 23:12:07 +0100 Message-Id: <1385676727-15089-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The Nomadik I2C is now configured from the device tree on all platforms using this controller. Delete the platform data header and move the definitions into the driver so it is all contained in one single file. Cc: Lee Jones Signed-off-by: Linus Walleij --- drivers/i2c/busses/i2c-nomadik.c | 24 +++++++++++++++++++++- include/linux/platform_data/i2c-nomadik.h | 34 ------------------------------- 2 files changed, 23 insertions(+), 35 deletions(-) delete mode 100644 include/linux/platform_data/i2c-nomadik.h diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index 51e61d8127cb..4443613514ee 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include @@ -104,6 +103,29 @@ /* maximum threshold value */ #define MAX_I2C_FIFO_THRESHOLD 15 +enum i2c_freq_mode { + I2C_FREQ_MODE_STANDARD, /* up to 100 Kb/s */ + I2C_FREQ_MODE_FAST, /* up to 400 Kb/s */ + I2C_FREQ_MODE_HIGH_SPEED, /* up to 3.4 Mb/s */ + I2C_FREQ_MODE_FAST_PLUS, /* up to 1 Mb/s */ +}; + +/** + * struct nmk_i2c_controller - client specific controller configuration + * @clk_freq: clock frequency for the operation mode + * @tft: Tx FIFO Threshold in bytes + * @rft: Rx FIFO Threshold in bytes + * @timeout Slave response timeout(ms) + * @sm: speed mode + */ +struct nmk_i2c_controller { + u32 clk_freq; + unsigned char tft; + unsigned char rft; + int timeout; + enum i2c_freq_mode sm; +}; + /** * struct i2c_vendor_data - per-vendor variations * @has_mtdws: variant has the MTDWS bit diff --git a/include/linux/platform_data/i2c-nomadik.h b/include/linux/platform_data/i2c-nomadik.h deleted file mode 100644 index 8681893f7b66..000000000000 --- a/include/linux/platform_data/i2c-nomadik.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2009 ST-Ericsson - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2, as - * published by the Free Software Foundation. - */ -#ifndef __PDATA_I2C_NOMADIK_H -#define __PDATA_I2C_NOMADIK_H - -enum i2c_freq_mode { - I2C_FREQ_MODE_STANDARD, /* up to 100 Kb/s */ - I2C_FREQ_MODE_FAST, /* up to 400 Kb/s */ - I2C_FREQ_MODE_HIGH_SPEED, /* up to 3.4 Mb/s */ - I2C_FREQ_MODE_FAST_PLUS, /* up to 1 Mb/s */ -}; - -/** - * struct nmk_i2c_controller - client specific controller configuration - * @clk_freq: clock frequency for the operation mode - * @tft: Tx FIFO Threshold in bytes - * @rft: Rx FIFO Threshold in bytes - * @timeout Slave response timeout(ms) - * @sm: speed mode - */ -struct nmk_i2c_controller { - u32 clk_freq; - unsigned char tft; - unsigned char rft; - int timeout; - enum i2c_freq_mode sm; -}; - -#endif /* __PDATA_I2C_NOMADIK_H */