[PATCH] crypto: qce - Replace with stub driver
Uwe Kleine-König
u.kleine-koenig at baylibre.com
Sun Aug 2 15:20:39 PDT 2026
Hello,
On Thu, Jul 30, 2026 at 10:08:38PM -0700, Eric Biggers wrote:
> diff --git a/drivers/crypto/qce/qcrypto.c b/drivers/crypto/qce/qcrypto.c
> new file mode 100644
> index 000000000000..d526902b3060
> --- /dev/null
> +++ b/drivers/crypto/qce/qcrypto.c
> @@ -0,0 +1,43 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
> + */
> +
> +#include <linux/device.h>
> +#include <linux/interconnect.h>
> +#include <linux/module.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/platform_device.h>
<linux/platform_device.h> already makes sure that of_device_id is
available, so don't include <linux/mod_devicetable.h> which will go away
soon.
Also I wonder why/if you need <linux/device.h> here.
> +static int qce_crypto_probe(struct platform_device *pdev)
> +{
> + struct icc_path *mem_path;
> +
> + mem_path = devm_of_icc_get(&pdev->dev, "memory");
> + if (IS_ERR(mem_path))
> + return PTR_ERR(mem_path);
> +
> + return icc_set_bw(mem_path, 0, 0);
> +}
> +
> +static const struct of_device_id qce_crypto_of_match[] = {
> + { .compatible = "qcom,crypto-v5.1", },
No , before a closing } please
> + { .compatible = "qcom,crypto-v5.4", },
> + { .compatible = "qcom,qce", },
> + {}
A single space between { and } is the most usual form, please stick to
that.
> +};
> +MODULE_DEVICE_TABLE(of, qce_crypto_of_match);
> +
> +static struct platform_driver qce_crypto_driver = {
> + .probe = qce_crypto_probe,
> + .driver = {
> + .name = KBUILD_MODNAME,
> + .of_match_table = qce_crypto_of_match,
> + },
> +};
> +module_platform_driver(qce_crypto_driver);
> +
> +MODULE_LICENSE("GPL v2");
> +MODULE_DESCRIPTION("Qualcomm crypto engine stub driver");
> +MODULE_ALIAS("platform:" KBUILD_MODNAME);
> +MODULE_AUTHOR("The Linux Foundation");
Best regards
Uwe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260803/bfe77161/attachment.sig>
More information about the linux-arm-kernel
mailing list