mfd: intel-m10-bmc: Create m10bmc_platform_info for type specific info
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 16 Jan 2023 10:08:36 +0000 (12:08 +0200)
committerLee Jones <lee@kernel.org>
Fri, 27 Jan 2023 10:28:15 +0000 (10:28 +0000)
commit16e5d95a5c451027a2e7ef89dd146a1c6c74ca6a
treee7b0c2f3e68281f14720765e115b3df0f44ac25b
parent206351c5c2d9906b0304c5b10d5162707d5d4bcb
mfd: intel-m10-bmc: Create m10bmc_platform_info for type specific info

BMC type specific info is currently set by a switch/case block. The
size of this info is expected to grow as more dev types and features
are added which would have made the switch block bloaty.

Store type specific info into struct and place them into .driver_data
instead because it makes things a bit cleaner.

The m10bmc_type enum can be dropped as the differentiation is now
fully handled by the platform info.

The info member of struct intel_m10bmc that is added here is not used
yet in this change but its addition logically still belongs to this
change. The CSR map change that comes after this change needs to have
the info member.

Reviewed-by: Russ Weight <russell.h.weight@intel.com>
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230116100845.6153-3-ilpo.jarvinen@linux.intel.com
drivers/mfd/intel-m10-bmc.c
include/linux/mfd/intel-m10-bmc.h