Commit 4eaf6f73 authored by Leilk Liu's avatar Leilk Liu Committed by Mark Brown

spi: mediatek: merge all identical compat to mtk_common_compat

This patch merge all identical compat into on mtk_common_compat
and used for all compatible soc.
Signed-off-by: default avatarLeilk Liu <leilk.liu@mediatek.com>
Reviewed-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5c5e09f6
...@@ -95,8 +95,7 @@ struct mtk_spi { ...@@ -95,8 +95,7 @@ struct mtk_spi {
const struct mtk_spi_compatible *dev_comp; const struct mtk_spi_compatible *dev_comp;
}; };
static const struct mtk_spi_compatible mt6589_compat; static const struct mtk_spi_compatible mtk_common_compat;
static const struct mtk_spi_compatible mt8135_compat;
static const struct mtk_spi_compatible mt8173_compat = { static const struct mtk_spi_compatible mt8173_compat = {
.need_pad_sel = true, .need_pad_sel = true,
.must_tx = true, .must_tx = true,
...@@ -112,9 +111,15 @@ static const struct mtk_chip_config mtk_default_chip_info = { ...@@ -112,9 +111,15 @@ static const struct mtk_chip_config mtk_default_chip_info = {
}; };
static const struct of_device_id mtk_spi_of_match[] = { static const struct of_device_id mtk_spi_of_match[] = {
{ .compatible = "mediatek,mt6589-spi", .data = (void *)&mt6589_compat }, { .compatible = "mediatek,mt6589-spi",
{ .compatible = "mediatek,mt8135-spi", .data = (void *)&mt8135_compat }, .data = (void *)&mtk_common_compat,
{ .compatible = "mediatek,mt8173-spi", .data = (void *)&mt8173_compat }, },
{ .compatible = "mediatek,mt8135-spi",
.data = (void *)&mtk_common_compat,
},
{ .compatible = "mediatek,mt8173-spi",
.data = (void *)&mt8173_compat,
},
{} {}
}; };
MODULE_DEVICE_TABLE(of, mtk_spi_of_match); MODULE_DEVICE_TABLE(of, mtk_spi_of_match);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment