summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2023-01-16 13:08:36 +0300
committerLee Jones <lee@kernel.org>2023-01-27 13:28:15 +0300
commit16e5d95a5c451027a2e7ef89dd146a1c6c74ca6a (patch)
treee7b0c2f3e68281f14720765e115b3df0f44ac25b /include/linux
parent206351c5c2d9906b0304c5b10d5162707d5d4bcb (diff)
downloadlinux-16e5d95a5c451027a2e7ef89dd146a1c6c74ca6a.tar.xz
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
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/intel-m10-bmc.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/mfd/intel-m10-bmc.h b/include/linux/mfd/intel-m10-bmc.h
index 0d4db5d9d5af..f418cad88e64 100644
--- a/include/linux/mfd/intel-m10-bmc.h
+++ b/include/linux/mfd/intel-m10-bmc.h
@@ -122,13 +122,25 @@
#define STAGING_FLASH_COUNT 0x17ffb000
/**
+ * struct intel_m10bmc_platform_info - Intel MAX 10 BMC platform specific information
+ * @cells: MFD cells
+ * @n_cells: MFD cells ARRAY_SIZE()
+ */
+struct intel_m10bmc_platform_info {
+ struct mfd_cell *cells;
+ int n_cells;
+};
+
+/**
* struct intel_m10bmc - Intel MAX 10 BMC parent driver data structure
* @dev: this device
* @regmap: the regmap used to access registers by m10bmc itself
+ * @info: the platform information for MAX10 BMC
*/
struct intel_m10bmc {
struct device *dev;
struct regmap *regmap;
+ const struct intel_m10bmc_platform_info *info;
};
/*