From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Brendan Higgins <brendanhiggins@google.com>,
wsa@the-dreams.de, robh+dt@kernel.org, mark.rutland@arm.com,
tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com,
joel@jms.id.au, vz@mleia.com, mouse@mayc.ru, clg@kaod.org,
ryan_chen@aspeedtech.com
Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org
Subject: Re: [PATCH v9 4/5] i2c: aspeed: added driver for Aspeed I2C
Date: Fri, 02 Jun 2017 22:02:22 +1000 [thread overview]
Message-ID: <1496404942.2842.2.camel@kernel.crashing.org> (raw)
In-Reply-To: <20170602084603.30811-5-brendanhiggins@google.com>
On Fri, 2017-06-02 at 01:46 -0700, Brendan Higgins wrote:
> Added initial master support for Aspeed I2C controller. Supports
> fourteen busses present in AST24XX and AST25XX BMC SoCs by Aspeed.
>
> Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
Reviewed-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Just spotted a completely minor/tivial nit:
> +static int aspeed_i2c_master_xfer(struct i2c_adapter *adap,
> + struct i2c_msg *msgs, int num)
> +{
> + struct aspeed_i2c_bus *bus = adap->algo_data;
> + unsigned long time_left, flags;
> + int ret = 0;
> +
> + spin_lock_irqsave(&bus->lock, flags);
> + bus->cmd_err = 0;
^^^^^^^^^^^^^^^^^
This is probably unnecessary now since it's initialized further down.
> + /* If bus is busy, attempt recovery. We assume a single master
> + * environment.
> + */
> + if (readl(bus->base + ASPEED_I2C_CMD_REG) & ASPEED_I2CD_BUS_BUSY_STS) {
> + spin_unlock_irqrestore(&bus->lock, flags);
> + ret = aspeed_i2c_recover_bus(bus);
> + if (ret)
> + return ret;
> + spin_lock_irqsave(&bus->lock, flags);
> + }
> +
> + bus->cmd_err = 0;
> + bus->msgs = msgs;
> + bus->msgs_index = 0;
> + bus->msgs_count = num;
Now I'd like Andrew to give it a spin as he's currently
testing/debugging some i2c related stuff to be 100% certain it works
fine on our systems.
Thanks !
Cheers,
Ben.
next prev parent reply other threads:[~2017-06-02 12:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-02 8:45 [PATCH v9 0/5] i2c: aspeed: added driver for Aspeed I2C Brendan Higgins
2017-06-02 8:45 ` [PATCH v9 1/5] irqchip/aspeed-i2c-ic: binding docs for Aspeed I2C Interrupt Controller Brendan Higgins
[not found] ` <20170602084603.30811-1-brendanhiggins-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2017-06-02 8:46 ` [PATCH v9 2/5] irqchip/aspeed-i2c-ic: Add I2C IRQ controller for Aspeed Brendan Higgins
2017-06-02 8:46 ` Brendan Higgins
2017-06-02 9:54 ` Marc Zyngier
2017-06-02 18:29 ` Brendan Higgins
2017-06-02 8:46 ` [PATCH v9 4/5] i2c: aspeed: added driver for Aspeed I2C Brendan Higgins
2017-06-02 8:46 ` Brendan Higgins
2017-06-02 12:02 ` Benjamin Herrenschmidt [this message]
2017-06-03 1:39 ` Brendan Higgins
2017-06-02 8:46 ` [PATCH v9 3/5] i2c: aspeed: added documentation for Aspeed I2C driver Brendan Higgins
2017-06-02 8:46 ` [PATCH v9 5/5] i2c: aspeed: added slave support " Brendan Higgins
2017-06-02 12:04 ` Benjamin Herrenschmidt
2017-06-02 18:37 ` Brendan Higgins
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=1496404942.2842.2.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=brendanhiggins@google.com \
--cc=clg@kaod.org \
--cc=devicetree@vger.kernel.org \
--cc=jason@lakedaemon.net \
--cc=joel@jms.id.au \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=mouse@mayc.ru \
--cc=openbmc@lists.ozlabs.org \
--cc=robh+dt@kernel.org \
--cc=ryan_chen@aspeedtech.com \
--cc=tglx@linutronix.de \
--cc=vz@mleia.com \
--cc=wsa@the-dreams.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.