Commit 902a91a0 authored by Austin Christ's avatar Austin Christ Committed by Wolfram Sang
Browse files

i2c: qup: add probe path for Centriq ACPI devices



Add support for Qualcomm Centriq devices that are qup-v2 compatible but
do not support DMA, so nodma needs to be set.

Signed-off-by: default avatarAustin Christ <austinwc@codeaurora.org>
Reviewed-by: default avatarSricharan R <sricharan@codeaurora.org>
Reviewed-by: default avatarAndy Gross <andy.gross@linaro.org>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 6a0c0d0d
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
@@ -1648,6 +1648,14 @@ static void qup_i2c_disable_clocks(struct qup_i2c_dev *qup)
	clk_disable_unprepare(qup->pclk);
}

#if IS_ENABLED(CONFIG_ACPI)
static const struct acpi_device_id qup_i2c_acpi_match[] = {
	{ "QCOM8010"},
	{ },
};
MODULE_DEVICE_TABLE(acpi, qup_i2c_acpi_match);
#endif

static int qup_i2c_probe(struct platform_device *pdev)
{
	static const int blk_sizes[] = {4, 16, 32};
@@ -1682,6 +1690,9 @@ static int qup_i2c_probe(struct platform_device *pdev)
	} else {
		qup->adap.algo = &qup_i2c_algo_v2;
		is_qup_v1 = false;
		if (acpi_match_device(qup_i2c_acpi_match, qup->dev))
			goto nodma;
		else
			ret = qup_i2c_req_dma(qup);

		if (ret == -EPROBE_DEFER)
@@ -1959,14 +1970,6 @@ static const struct of_device_id qup_i2c_dt_match[] = {
};
MODULE_DEVICE_TABLE(of, qup_i2c_dt_match);

#if IS_ENABLED(CONFIG_ACPI)
static const struct acpi_device_id qup_i2c_acpi_match[] = {
	{ "QCOM8010"},
	{ },
};
MODULE_DEVICE_TABLE(acpi, qup_i2c_acpi_match);
#endif

static struct platform_driver qup_i2c_driver = {
	.probe  = qup_i2c_probe,
	.remove = qup_i2c_remove,