From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-i2c@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Wolfram Sang <wsa@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 5/8] i2c: uapi: add macro to describe support for all SMBus transfers
Date: Sat, 9 Jan 2021 13:43:09 +0100 [thread overview]
Message-ID: <20210109124314.27466-6-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20210109124314.27466-1-wsa+renesas@sang-engineering.com>
Some I2C bus master drivers which support I2C_M_RECV_LEN do not set
the functionality bits of the now supported SMBus transfers. Add a
convenience macro to make this very simple.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
include/uapi/linux/i2c.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/uapi/linux/i2c.h b/include/uapi/linux/i2c.h
index 7786551eb177..92326ebde350 100644
--- a/include/uapi/linux/i2c.h
+++ b/include/uapi/linux/i2c.h
@@ -129,6 +129,11 @@ struct i2c_msg {
I2C_FUNC_SMBUS_I2C_BLOCK | \
I2C_FUNC_SMBUS_PEC)
+/* if I2C_M_RECV_LEN is also supported */
+#define I2C_FUNC_SMBUS_EMUL_ALL (I2C_FUNC_SMBUS_EMUL | \
+ I2C_FUNC_SMBUS_READ_BLOCK_DATA | \
+ I2C_FUNC_SMBUS_BLOCK_PROC_CALL)
+
/*
* Data for SMBus Messages
*/
--
2.29.2
next prev parent reply other threads:[~2021-01-09 12:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-09 12:43 [PATCH 0/8] i2c: improve RECV_LEN documentation & usage Wolfram Sang
2021-01-09 12:43 ` [PATCH 1/8] i2c: refactor documentation of struct i2c_msg Wolfram Sang
2021-01-09 12:43 ` [PATCH 2/8] i2c: remove licence boilerplate from main UAPI header Wolfram Sang
2021-01-09 12:43 ` [PATCH 3/8] i2c: remove licence boilerplate from i2c-dev " Wolfram Sang
2021-01-09 12:43 ` [PATCH 4/8] i2c: octeon: check correct size of maximum RECV_LEN packet Wolfram Sang
2021-01-11 9:26 ` Robert Richter
2021-01-17 11:27 ` Wolfram Sang
2021-01-09 12:43 ` Wolfram Sang [this message]
2021-01-09 12:43 ` [PATCH 6/8] i2c: algo: bit: use new macro to specifiy capabilities Wolfram Sang
2021-01-09 12:43 ` [PATCH 7/8] i2c: qup: advertise SMBus transfers using RECV_LEN Wolfram Sang
2021-01-09 12:43 ` [PATCH 8/8] i2c: s3c2410: " Wolfram Sang
2021-01-22 9:02 ` [PATCH 0/8] i2c: improve RECV_LEN documentation & usage Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210109124314.27466-6-wsa+renesas@sang-engineering.com \
--to=wsa+renesas@sang-engineering.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).