Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit add117d5 authored by Pratham Pratap's avatar Pratham Pratap
Browse files

usb: phy-msm-qusb-v2: Shift the read minor revision value



This is required to read the proper minor revision value
from the nvmem.
(Documentation/devicetree/bindings/nvmem/nvmem.txt)
Nvmem has the offset limit bits set to 0 and to read the
bits 28-29 the consumers have to right shift it by 28.

Change-Id: I46962a3cffbf45e904a23417d668052582b487c0
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 8b7300fd
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -180,7 +180,11 @@ static long qfprom_read(struct device *dev, const char *name)
			err = PTR_ERR(buf);
		}
	} else {
		val = *buf;
		/*
		 * The bits are read from bit-0 to bit-29
		 * We're interested in bits 28:29
		 */
		val = (*buf >> 28) & 0x3;
		kfree(buf);
	}