On Thu, 2 Sep 2021 10:02:16 -0700 Jonathan Lemon wrote:
On Wed, Sep 01, 2021 at 05:07:00PM -0700, Jakub Kicinski wrote:
quoted
On Mon, 30 Aug 2021 16:52:35 -0700 Jonathan Lemon wrote:
quoted
+ err = kstrtou8(buf, 0, &val);
+ if (err)
+ return err;
+ if (val > 7)
+ return -EINVAL;
+
+ reg = ((val & 0x7) << 16);
+
+ spin_lock_irqsave(&bp->lock, flags);
+ iowrite32(0, &bp->irig_out->ctrl); /* disable */
+ iowrite32(reg, &bp->irig_out->ctrl); /* change mode */
+ iowrite32(reg | IRIG_M_CTRL_ENABLE, &bp->irig_out->ctrl);
+ spin_unlock_irqrestore(&bp->lock, flags);
locking
Not sure what you mean - all register manipulations are
already done under the lock here.
I must have misread and thought it has the same problem as patch 8,
ignore, sorry.