Re: [PATCH v3 2/2] ASoC: cs530x: Support for cs530x ADCs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18/06/2024 15:18, Mark Brown wrote:
On Mon, Jun 17, 2024 at 02:01:02PM -0500, Paul Handrigan wrote:

+static bool cs530x_volatile_register(struct device *dev, unsigned int reg)
+{
+	switch (reg) {
+	case CS530X_DEVID:
+	case CS530X_REVID:
+		return true;
+	default:
+		return false;
+	}
+}

Are these really volatile?  I would expect them to have no defaults so
they must be read from the device, but once read I'd expect we could
cache the values.

Otherwise this looks good.

If you mark a register non-volatile but without default, a
regcache_sync() will write it back out to the device. While that
doesn't necessarily do any harm, that depends on what these
registers do on write. Generally it makes me nervous to have
cache syncs writing to registers we don't want to write to.




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux