spi: altera: support indirect access to the registers
authorXu Yilun <yilun.xu@intel.com>
Fri, 19 Jun 2020 01:43:40 +0000 (09:43 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 19 Jun 2020 11:56:05 +0000 (12:56 +0100)
commit3820061d38156d88443d32a9a6c701d281234746
tree6a0503d3487a2f7b7b092fd96ffb61cbcbe04454
parent3c6519736eefebafdf8c82d46f64b214403b5260
spi: altera: support indirect access to the registers

This patch adds support for indirect access to the registers via parent
regmap.

The use case is, the spi master is a sub device of a Multifunction
device, which is connected to host by some indirect bus. To support this
device type, a new platform_device_id is introduced, and the driver tries
to get parent regmap for register accessing like many MFD sub device
drivers do.

Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
Signed-off-by: Wu Hao <hao.wu@intel.com>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Reviewed-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/1592531021-11412-3-git-send-email-yilun.xu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-altera.c