mbox series

[v7,0/2] i2c: i2c-mlxbf.c: bug fixes and new feature support

Message ID 20220927203924.22644-1-asmaa@nvidia.com
Headers show
Series i2c: i2c-mlxbf.c: bug fixes and new feature support | expand

Message

Asmaa Mnebhi Sept. 27, 2022, 8:39 p.m. UTC
Support BlueField-3 SoC in the first patch of this series and remove
the device tree support in the second patch.

What has changed from v6->v7:
- the following patches were applied to for-next so they are removed
  from this series:
  1) Support lock mechanism to avoid race condition between entities
     using the i2c bus
  2) remove IRQF_ONESHOT flag as it is no longer needed.
  3) Support multi slave functionality
- Fixed the $subject tag to "i2c: mlxbf"
- added missing check for 'ret' after allocating resources
- removed the DT binding file from the MAINTAINERS file

Asmaa Mnebhi (2):
  i2c: mlxbf: support BlueField-3 SoC
  i2c: mlxbf: remove device tree support

 .../bindings/i2c/mellanox,i2c-mlxbf.yaml      |  77 ---
 MAINTAINERS                                   |   2 +-
 drivers/i2c/busses/i2c-mlxbf.c                | 494 ++++++++++--------
 3 files changed, 281 insertions(+), 292 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml

Comments

Wolfram Sang Sept. 27, 2022, 8:46 p.m. UTC | #1
On Tue, Sep 27, 2022 at 04:39:23PM -0400, Asmaa Mnebhi wrote:
> BlueField-3 SoC has the same I2C IP logic as previous
> BlueField-1 and 2 SoCs but it has different registers' addresses.
> This is an effort to keep this driver generic accross all
> BlueField generations.
> This patch breaks down the "smbus" resource into 3 separate
> resources to enable us to use common registers' offsets for all
> BlueField SoCs:
> struct mlxbf_i2c_resource *timer;
> struct mlxbf_i2c_resource *mst;
> struct mlxbf_i2c_resource *slv;
> 
> Of course, all offsets had to be adjusted accordingly, and we took
> this chance to reorganize the macros depending on the register block
> they target.
> 
> There are only 2 registers' offsets that do not fit within this
> schema so their offsets are passed as SoC-specific parameters:
> smbus_master_rs_bytes_off
> smbus_master_fsm_off
> 
> Reviewed-by: Khalil Blaiech <kblaiech@nvidia.com>
> Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com>

Applied to for-next, thanks!
Wolfram Sang Sept. 27, 2022, 8:46 p.m. UTC | #2
On Tue, Sep 27, 2022 at 04:39:24PM -0400, Asmaa Mnebhi wrote:
> BlueField customers have to use the the BlueField firmware with
> UEFI ACPI tables so there is no need to have device tree
> support in the i2c-mlxbf.c driver. Remove the device tree
> binding documentation as well.
> 
> Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com>
> Reviewed-by: Khalil Blaiech <kblaiech@nvidia.com>

Applied to for-next, thanks!
Asmaa Mnebhi Sept. 27, 2022, 9 p.m. UTC | #3
Thank you Wolfram!

-----Original Message-----
From: Wolfram Sang <wsa+renesas@sang-engineering.com> 
Sent: Tuesday, September 27, 2022 4:47 PM
To: Asmaa Mnebhi <asmaa@nvidia.com>
Cc: linux-i2c@vger.kernel.org; linux-kernel@vger.kernel.org; Khalil Blaiech <kblaiech@nvidia.com>
Subject: Re: [PATCH v7 1/2] i2c: mlxbf: support BlueField-3 SoC

On Tue, Sep 27, 2022 at 04:39:23PM -0400, Asmaa Mnebhi wrote:
> BlueField-3 SoC has the same I2C IP logic as previous
> BlueField-1 and 2 SoCs but it has different registers' addresses.
> This is an effort to keep this driver generic accross all BlueField 
> generations.
> This patch breaks down the "smbus" resource into 3 separate resources 
> to enable us to use common registers' offsets for all BlueField SoCs:
> struct mlxbf_i2c_resource *timer;
> struct mlxbf_i2c_resource *mst;
> struct mlxbf_i2c_resource *slv;
> 
> Of course, all offsets had to be adjusted accordingly, and we took 
> this chance to reorganize the macros depending on the register block 
> they target.
> 
> There are only 2 registers' offsets that do not fit within this schema 
> so their offsets are passed as SoC-specific parameters:
> smbus_master_rs_bytes_off
> smbus_master_fsm_off
> 
> Reviewed-by: Khalil Blaiech <kblaiech@nvidia.com>
> Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com>

Applied to for-next, thanks!