diff mbox series

[1/3] i3c: Drop support for I2C 10 bit addresing

Message ID 20190226110003.5909-2-pgaj@cadence.com (mailing list archive)
State Superseded
Headers show
Series Drop support for I2C 10 bit devices from I3C subsystem | expand

Commit Message

Przemysław Gaj Feb. 26, 2019, 11 a.m. UTC
This patch dropps support for I2C devices with 10 bit addressing. When I2C
device with 10 bit address is defined in DT, I3C master registration fails.

Signed-off-by: Przemyslaw Gaj <pgaj@cadence.com>
---
 drivers/i3c/master.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Boris Brezillon Feb. 26, 2019, 12:11 p.m. UTC | #1
On Tue, 26 Feb 2019 11:00:01 +0000
Przemyslaw Gaj <pgaj@cadence.com> wrote:

> This patch dropps support for I2C devices with 10 bit addressing. When I2C
> device with 10 bit address is defined in DT, I3C master registration fails.
> 
> Signed-off-by: Przemyslaw Gaj <pgaj@cadence.com>
> ---
>  drivers/i3c/master.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> index 2dc628d..6c7fa4b 100644
> --- a/drivers/i3c/master.c
> +++ b/drivers/i3c/master.c
> @@ -1962,6 +1962,13 @@ of_i3c_master_add_i2c_boardinfo(struct i3c_master_controller *master,
>  	if (ret)
>  		return ret;
>  
> +    /* The I3C Specification does not clearly say I2C devices with 10-bit
> +     * address are supported. These devices can't be passed properly through
> +     * DEFSLVS command.
> +     */
> +    if (boardinfo->base.flags & I2C_CLIENT_TEN)

Please add a dev_err() here so that the user knows why it failed.

The rest of the series looks good.

> +        return -ENOTSUPP;
> +
>  	/* LVR is encoded in reg[2]. */
>  	boardinfo->lvr = reg[2];
>
diff mbox series

Patch

diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 2dc628d..6c7fa4b 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -1962,6 +1962,13 @@  of_i3c_master_add_i2c_boardinfo(struct i3c_master_controller *master,
 	if (ret)
 		return ret;
 
+    /* The I3C Specification does not clearly say I2C devices with 10-bit
+     * address are supported. These devices can't be passed properly through
+     * DEFSLVS command.
+     */
+    if (boardinfo->base.flags & I2C_CLIENT_TEN)
+        return -ENOTSUPP;
+
 	/* LVR is encoded in reg[2]. */
 	boardinfo->lvr = reg[2];