From patchwork Tue Jul 16 08:36:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13734168 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5DA7144D2B for ; Tue, 16 Jul 2024 08:36:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721119005; cv=none; b=DMaUPgVdr8d7HbQkBJ52YC5ntm7zCgBIzisLPJcT86qvwY7y7a0HYqQ+fsq+kYoOeX2g5+2uWGlNb09dQw3tgxpk0552ZZfcnoOhyDYuSfRMcTzIAkc+fruQjRXVRRwsa6xyYYhyzEj0LocIj++HXAzEJZoLF97IVXOWUva9Rd8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721119005; c=relaxed/simple; bh=m618bS4dgPRz+UEdWJwJkN4f9d8tpWxpyRZ5WRGEnT0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kYXYODVDSmJpRcFNkBhV9Q43/TglDNXmQl39/thFyYvaXc4guwSnXzAzP6w28jdDgwJjD/ZGaGwSx3KOk+IGIkT6myj+zZx/SBTNJ2iAtfUgmsFqELyCPv+G83bKJwcjmtqPCzttv45nkxqeeRNbVy60XgZxzyIZkIYol/byh0o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=Hgw/PsrY; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="Hgw/PsrY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=PBjJgSAjn3LKrCn/Md3Wv9O7ZDHj8OzgjeFry/QIc2U=; b=Hgw/Ps rY9vmY6NJu6EikKsfj3JPHNuntjS22gNr/+2oLyMJ587xEWHFUh/YPsXnuO+3QYy KUs7qVJYeFK/C/4Dqh3C2fmoq5yQiHb4nqcLPcH+UrnJViqYIrtQSILqWDlKkmK1 abh5RRS8GIwYQmIVRoraDUjxR7VAy7+fprYkB+jIsSI5N/FjbT0WndBIh8pkngY7 K2lcnSCoi5IMb/lLb8bM1tG5m8Rsy+oZc8Vxp9YTZymGpdpNLbm9N4YEHmaXvvRQ CmjJXTuUXg1w7LZ4dfrDmqzeA7Px95+B18x3nfZ0yCF36o4dF+wDK3VxRfFkbRo7 N1H8kMaXA9gflqYw== Received: (qmail 153612 invoked from network); 16 Jul 2024 10:36:34 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 16 Jul 2024 10:36:34 +0200 X-UD-Smtp-Session: l3s3148p1@9rRCPlkdzR5tKPND From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] i2c: header: remove unneeded stuff regarding i2c_algorithm Date: Tue, 16 Jul 2024 10:36:24 +0200 Message-ID: <20240716083623.7737-5-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240716083623.7737-4-wsa+renesas@sang-engineering.com> References: <20240716083623.7737-4-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The forward declaration is not needed anymore. The sentence about "following structs" became obsolete when struct i2c_algorithm became a kdoc. The paragraph about return values can go because we have this information in kdoc already. Signed-off-by: Wolfram Sang --- include/linux/i2c.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/linux/i2c.h b/include/linux/i2c.h index e9cc14b1f9a1..1e34b486f604 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -30,7 +30,6 @@ extern const struct device_type i2c_client_type; /* --- General options ------------------------------------------------ */ struct i2c_msg; -struct i2c_algorithm; struct i2c_adapter; struct i2c_client; struct i2c_driver; @@ -533,8 +532,6 @@ i2c_register_board_info(int busnum, struct i2c_board_info const *info, * @reg_slave: deprecated, use @reg_target * @unreg_slave: deprecated, use @unreg_target * - * - * 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. @@ -550,9 +547,6 @@ struct i2c_algorithm { * to NULL. If an adapter algorithm can do SMBus access, set * smbus_xfer. If set to NULL, the SMBus protocol is simulated * using common I2C messages. - * - * xfer should return the number of messages successfully - * processed, or a negative value on error */ union { int (*xfer)(struct i2c_adapter *adap, struct i2c_msg *msgs, From patchwork Tue Jul 16 08:36:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13734170 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11845178378 for ; Tue, 16 Jul 2024 08:36:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721119007; cv=none; b=YwHnxl94kiBLW32jHQ7t4FuN0swjLzoR2njiU17EiqNbrAUHD3UtsWJTv21NmNTiKazE2/9i00EceEt6/n5sANtzb22OX9f9krgaD4XzV6szHNMSskc45Sx9QHNwZFiy27TLmM87lW0/o9+ghKAvP4AA6symsO1VXbBN1ysEqAg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721119007; c=relaxed/simple; bh=B8E6UP6diPfn/BrnoeLQBTCu55NxBPnre+m7Sjdhq00=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KfmCDJ8TDA9rxcYxXve344rnvCQ801i3hcUur1mm9K7AenTGgGm6LODSUwOnL7nt4vCdpDrsLyE+/OOYsJnf4WUaDvxfvLWC+MVzzHBUIf6uZou9ZBA8CqEIzIVEAyOFKk51slga7CWjjiwzfDYO1FXGTKtPFUzcskoF/QbJVq4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=XyVrXN6J; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="XyVrXN6J" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=EIdAZlvdMfK8TFKGY0fBUKMfj/zD3Ooy0VraEJcDpuE=; b=XyVrXN 6J4HhyfFF105vYHwFMx4eeEIov/sQqkuqXbhgd6PWOwezs2FpNTJ2DUzDHNM7kaY Z5EuZP5CvoxTbESlkNjOvpZR4ePKoslctzJ2JIXQh23bfSf7MzXNQMfvdY9qNMZO 8iaZ7DEVtDz36Yta7Wg3cvLd+ers3eiWjjs6YQaXySxkQBl6a+iylJNmDCxsNj6w QAM3MryeigvxdNExCjsY2FMPV+qJxHZ1NBPmlHNXixLxBrcEjFSrtckVPgv+zuwe 9XCqrsZ2r1QbmyMidar1yX+TPRTjO285RjGPLijnSpElTbhOhzM8tV96UvkMx9xC LdeNPJlk9TOVIufQ== Received: (qmail 153636 invoked from network); 16 Jul 2024 10:36:35 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 16 Jul 2024 10:36:35 +0200 X-UD-Smtp-Session: l3s3148p1@1U9SPlkdonhtKPND From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] i2c: header: improve kdoc for i2c_algorithm Date: Tue, 16 Jul 2024 10:36:25 +0200 Message-ID: <20240716083623.7737-6-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240716083623.7737-4-wsa+renesas@sang-engineering.com> References: <20240716083623.7737-4-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reword the explanation of @xfer, the old one was confusing and mixing up terminology. Other than that, capitalize some words correctly and use full line length. Signed-off-by: Wolfram Sang --- include/linux/i2c.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 1e34b486f604..8caaa13834bf 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -511,16 +511,15 @@ i2c_register_board_info(int busnum, struct i2c_board_info const *info, #endif /* I2C_BOARDINFO */ /** - * struct i2c_algorithm - represent I2C transfer method - * @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. - * @xfer_atomic: same as @xfer. Yet, only using atomic context - * so e.g. PMICs can be accessed very late before shutdown. Optional. - * @smbus_xfer: Issue smbus transactions to the given I2C adapter. If this + * struct i2c_algorithm - represent I2C transfer methods + * @xfer: Transfer a given number of messages defined by the msgs array via + * the specified adapter. + * @xfer_atomic: Same as @xfer. Yet, only using atomic context so e.g. PMICs + * can be accessed very late before shutdown. Optional. + * @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. - * @smbus_xfer_atomic: same as @smbus_xfer. Yet, only using atomic context + * @smbus_xfer_atomic: Same as @smbus_xfer. Yet, only using atomic context * so e.g. PMICs can be accessed very late before shutdown. Optional. * @functionality: Return the flags that this algorithm/adapter pair supports * from the ``I2C_FUNC_*`` flags.