]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mfd: bcm590xx: Add PMU ID/revision parsing function
authorArtur Weber <aweber.kernel@gmail.com>
Thu, 15 May 2025 14:16:31 +0000 (16:16 +0200)
committerLee Jones <lee@kernel.org>
Thu, 22 May 2025 09:57:00 +0000 (10:57 +0100)
commitd310cdbb4ee6285f374d4dfc32173c35f8a2273e
tree02e1db71ff6c1aab6702fbf784305f4388633874
parent6adf48a3aa316ce360e02dd10222e96da9a0eff5
mfd: bcm590xx: Add PMU ID/revision parsing function

The BCM590xx PMUs have two I2C registers for reading the PMU ID
and revision. The revision is useful for subdevice drivers, since
different revisions may have slight differences in behavior (for
example - BCM59054 has different regulator configurations for
revision A0 and A1).

Check the PMU ID register and make sure it matches the DT compatible.
Fetch the digital and analog revision from the PMUREV register
so that it can be used in subdevice drivers.

Also add some known revision values to bcm590xx.h, for convenience
when writing subdevice drivers.

Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
Reviewed-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Link: https://lore.kernel.org/r/20250515-bcm59054-v9-4-14ba0ea2ea5b@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/bcm590xx.c
include/linux/mfd/bcm590xx.h