From patchwork Sun Jan 26 16:05:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 314191 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 808552C0040 for ; Mon, 27 Jan 2014 03:05:45 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752534AbaAZQFn (ORCPT ); Sun, 26 Jan 2014 11:05:43 -0500 Received: from 82-68-191-81.dsl.posilan.com ([82.68.191.81]:41156 "EHLO rainbowdash.ducie.codethink.co.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752515AbaAZQFn (ORCPT ); Sun, 26 Jan 2014 11:05:43 -0500 Received: from ben by rainbowdash.ducie.codethink.co.uk with local (Exim 4.82) (envelope-from ) id 1W7SDN-0005q4-KO; Sun, 26 Jan 2014 16:05:41 +0000 From: Ben Dooks To: linux-kernel@lists.codethink.co.uk Cc: Ben Dooks , Linux I2C List , Wolfram Sang Subject: [PATCH 5/6] i2c: update i2c_algorithm documentation Date: Sun, 26 Jan 2014 16:05:36 +0000 Message-Id: <1390752337-22386-6-git-send-email-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1390752337-22386-1-git-send-email-ben.dooks@codethink.co.uk> References: <1390752337-22386-1-git-send-email-ben.dooks@codethink.co.uk> Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Add some kerneldoc style documentaton to the i2c_algorithm structure, and point the master_xfer return codes at the right place in Documentation/i2c/fault_codes Signed-off-by: Ben Dooks --- Cc: Linux I2C List Cc: Wolfram Sang --- include/linux/i2c.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/include/linux/i2c.h b/include/linux/i2c.h index eff50e0..2aeb091 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -342,11 +342,25 @@ i2c_register_board_info(int busnum, struct i2c_board_info const *info, } #endif /* I2C_BOARDINFO */ -/* +/** + * struct i2c_algorithm - represent I2C transfer method + * @master_xfer: Issue a set of i2c transactions to the given I2C adapter + * defined by the msgs array, with num messages available to transfer via + * the adapter specified by adap. + * @smbus_xfer: Issue smbus transactions to the given I2C adapter. If this + * is not present, then the bus layer will try and convert the SMBus calls + * into I2C transfers instead. + * @functionality: Return the flags that this algorithm/adapter pair supports + * from the I2C_FUNC_* flags. + * * The following structs are for those who like to implement new bus drivers: * i2c_algorithm is the interface to a class of hardware solutions which can * be addressed using the same bus algorithms - i.e. bit-banging or the PCF8584 * to name two of the most common. + * + * The return codes from the @master_xfer field should indicate the type of + * error code that occured during the transfer, as documented in the kernel + * Documentation file Documentation/i2c/fault-codes. */ struct i2c_algorithm { /* If an adapter algorithm can't do I2C-level access, set master_xfer