soc: nuvoton: Add SoC info driver for WPCM450
Jonathan Neuschäfer
maintainerPATCH v3 1/1 soc: nuvoton: Add SoC info driver for WPCM450
Add a SoC information driver for Nuvoton WPCM450 SoCs. It provides information such as the SoC revision.
Usage example:
# grep . /sys/devices/soc0/* /sys/devices/soc0/family:Nuvoton NPCM /sys/devices/soc0/revision:A3 /sys/devices/soc0/soc_id:WPCM450
Signed-off-by Jonathan Neuschäfer <[email protected]>
Reviewed-by Joel Stanley <[email protected]>
Reviewed-by Paul Menzel <[email protected]>
---
v3:
- Declare revisions array as static
- Change get_revision parameter to unsigned int
- Add Paul's R-b tag
- Add usage example
- Sort includes
v2:
- https://lore.kernel.org/lkml/[email protected]/
- Add R-b tag
- rebase on 5.18-rc1
v1:
- https://lore.kernel.org/lkml/[email protected]/
--- drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/nuvoton/Kconfig | 11 ++++ drivers/soc/nuvoton/Makefile | 2 + drivers/soc/nuvoton/wpcm450-soc.c | 90 +++++++++++++++++++++++++++++++ 5 files changed, 105 insertions(+) create mode 100644 drivers/soc/nuvoton/Kconfig create mode 100644 drivers/soc/nuvoton/Makefile create mode 100644 drivers/soc/nuvoton/wpcm450-soc.c
drivers/soc/Kconfig +1 -0
@@ -14,6 +14,7 @@ source "drivers/soc/ixp4xx/Kconfig" source "drivers/soc/litex/Kconfig" source "drivers/soc/mediatek/Kconfig" source "drivers/soc/microchip/Kconfig" +source "drivers/soc/nuvoton/Kconfig" source "drivers/soc/qcom/Kconfig" source "drivers/soc/renesas/Kconfig" source "drivers/soc/rockchip/Kconfig"
drivers/soc/Makefile +1 -0
@@ -19,6 +19,7 @@ obj-$(CONFIG_SOC_XWAY) += lantiq/ obj-$(CONFIG_LITEX_SOC_CONTROLLER) += litex/ obj-y += mediatek/ obj-y += microchip/ +obj-y += nuvoton/ obj-y += amlogic/ obj-y += qcom/ obj-y += renesas/
drivers/soc/nuvoton/Kconfig new file +11 -0
@@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0 +menuconfig WPCM450_SOC + bool "Nuvoton WPCM450 SoC driver" + default y if ARCH_WPCM450 + select SOC_BUS + help + Say Y here to compile the SoC information driver for Nuvoton + WPCM450 SoCs. + + This driver provides information such as the SoC model and + revision.
drivers/soc/nuvoton/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0-only +obj-$(CONFIG_WPCM450_SOC) += wpcm450-soc.o
drivers/soc/nuvoton/wpcm450-soc.c new file +90 -0
90 lines not on this page · raw message
--
2.35.1