From patchwork Wed Jun 3 16:25:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyrille Pitchen X-Patchwork-Id: 480028 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 14E111401AF for ; Thu, 4 Jun 2015 02:27:42 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932112AbbFCQ1k (ORCPT ); Wed, 3 Jun 2015 12:27:40 -0400 Received: from eusmtp01.atmel.com ([212.144.249.243]:30747 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755533AbbFCQ1j (ORCPT ); Wed, 3 Jun 2015 12:27:39 -0400 Received: from tenerife.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server id 14.3.235.1; Wed, 3 Jun 2015 18:27:34 +0200 From: Cyrille Pitchen To: , , , CC: , , , , , , , , Cyrille Pitchen Subject: [PATCH v5 5/6] i2c: at91: print hardware version Date: Wed, 3 Jun 2015 18:25:21 +0200 Message-ID: <2c63907f42c492b3ad8aa503359928f72d158765.1433348016.git.cyrille.pitchen@atmel.com> X-Mailer: git-send-email 1.8.2.2 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org The probe() function now prints the hardware version of the I2C controller. Signed-off-by: Cyrille Pitchen --- drivers/i2c/busses/i2c-at91.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index 67b4f15..89a8e61 100644 --- a/drivers/i2c/busses/i2c-at91.c +++ b/drivers/i2c/busses/i2c-at91.c @@ -85,6 +85,8 @@ #define AT91_TWI_ACR_DATAL(len) ((len) & 0xff) #define AT91_TWI_ACR_DIR BIT(8) +#define AT91_TWI_VER 0x00fc /* Version Register */ + struct at91_twi_pdata { unsigned clk_max_div; unsigned clk_offset; @@ -908,7 +910,8 @@ static int at91_twi_probe(struct platform_device *pdev) return rc; } - dev_info(dev->dev, "AT91 i2c bus driver.\n"); + dev_info(dev->dev, "AT91 i2c bus driver (version: %#x).\n", + at91_twi_read(dev, AT91_TWI_VER)); return 0; }