On Fri, Nov 17, 2023 at 01:40:37PM +0100, Roger Pau Monné wrote:
> On Wed, Sep 13, 2023 at 10:35:46AM -0400, Stewart Hildebrand wrote:
> >      {
> > -        uint32_t val;
> > -
> >          val = r->read(pdev, r->offset, r->private);
> > +        val &= ~r->rw1c_mask;
> >          data = merge_result(val, data, size, offset);
> >      }
> >  
> > +    data &= ~(r->rsvdz_mask | r->ro_mask);
> > +    data |= val & r->ro_mask;
> 
> You cannot apply the register masks directly into the final value, you
> need to offset and mask them as necessary, likewise for val, see
> what's done in merge_result().

Never mind, I was wrong, there's no need to offset anything here.

Roger.

Reply via email to