[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CH2PR12MB389550C8CC64A53E256ACC0ED78E9@CH2PR12MB3895.namprd12.prod.outlook.com>
Date: Thu, 30 Mar 2023 21:10:50 +0000
From: Asmaa Mnebhi <asmaa@...dia.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Wolfram Sang <wsa@...nel.org>,
Khalil Blaiech <kblaiech@...dia.com>,
"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v1 1/1] i2c: mlxbf: Use readl_poll_timeout_atomic() for
polling
LGTM besides the small comment below:
> - /* Check whether the HW is idle */
> - if (WARN_ON(!mlxbf_i2c_smbus_master_wait_for_idle(priv))) {
> + /*
> + * SW must make sure that the SMBus Master GW is idle before
> starting
> + * a transaction. Accordingly, this call polls the Master FSM stop bit;
> + * it returns 0 when the bit is asserted, -ETIMEDOUT if not.
It returns 0 when the bit is cleared, -ETIMEDOUT if not.
> + */
> + ret = readl_poll_timeout_atomic(priv->mst->io + priv->chip-
> >smbus_master_fsm_off,
> + bits, !(bits &
> MLXBF_I2C_SMBUS_MASTER_FSM_STOP_MASK),
> + MLXBF_I2C_POLL_FREQ_IN_USEC,
> MLXBF_I2C_SMBUS_TIMEOUT);
> + if (WARN_ON(ret)) {
> ret = -EBUSY;
> goto out_unlock;
Powered by blists - more mailing lists