Re: [PATCH v2 1/4] i2c: qup: add probe path for Centriq ACPI devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Austin,

On 4/5/2018 1:14 AM, Austin Christ wrote:
> 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: Austin Christ <austinwc@xxxxxxxxxxxxxx>
> ---
> v1:
> 	- Initial
> v2:
> 	- Remove whitespace error
> ---
>  drivers/i2c/busses/i2c-qup.c | 22 ++++++++++++++--------
>  1 file changed, 14 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
> index 904dfec..80af973 100644
> --- a/drivers/i2c/busses/i2c-qup.c
> +++ b/drivers/i2c/busses/i2c-qup.c
> @@ -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};
> @@ -1675,6 +1683,12 @@ static int qup_i2c_probe(struct platform_device *pdev)
>  			DEFAULT_CLK_FREQ);
>  	}
>  
> +	if (acpi_match_device(qup_i2c_acpi_match, qup->dev)) {
> +		qup->adap.algo = &qup_i2c_algo_v2;
> +		is_qup_v1 = false;
> +		goto nodma;
> +	}
> +

 What happens without the above check. Does it not get resolved below,
 when qup_i2c_req_dma fails ?

Regards,
 Sricharan

-- 
"QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux