Re: [PATCH V4 2/2] spmi: pmic_arb: add support for hw version 2
From: Ivan T. Ivanov
Date: Tue Feb 24 2015 - 06:01:17 EST
Hi Gilad,
One more comment :-).
On Thu, 2015-02-19 at 15:54 -0700, Gilad Avidov wrote:
<snip>
-static int pmic_arb_wait_for_done(struct spmi_controller *ctrl)
+static int pmic_arb_wait_for_done(struct spmi_controller *ctrl,
+ void __iomem *base, u8 sid, u16 addr)
{
struct spmi_pmic_arb_dev *dev = spmi_controller_get_drvdata(ctrl);
u32 status = 0;
u32 timeout = PMIC_ARB_TIMEOUT_US;
- u32 offset = PMIC_ARB_STATUS(dev->channel);
+ u32 offset = dev->ver_ops->offset(dev, sid, addr) + PMIC_ARB_STATUS;
while (timeout--) {
status = pmic_arb_base_read(dev, offset);
I see that downstream driver is using read or write base address
based on operation for which we are waiting (read_cmd/write_cmd).
Should this be reflected here?
Ivan.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/