[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <X8l6xU+sVJa/+5r1@builder.lan>
Date: Thu, 3 Dec 2020 17:54:45 -0600
From: Bjorn Andersson <bjorn.andersson@...aro.org>
To: Vinod Koul <vkoul@...nel.org>
Cc: Linus Walleij <linus.walleij@...aro.org>,
linux-arm-msm@...r.kernel.org,
Raghavendra Rao Ananta <rananta@...eaurora.org>,
Andy Gross <agross@...nel.org>,
Rob Herring <robh+dt@...nel.org>, linux-gpio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Jeevan Shriram <jshriram@...eaurora.org>
Subject: Re: [PATCH 2/2] pinctrl: qcom: Add SM8350 pinctrl driver
On Thu 03 Dec 01:09 CST 2020, Vinod Koul wrote:
> diff --git a/drivers/pinctrl/qcom/pinctrl-sm8350.c b/drivers/pinctrl/qcom/pinctrl-sm8350.c
[..]
> +static const int sm8350_reserved_gpios[] = {
> + 52, 53, 54, 55, 56, 57, 58, 59, -1
> +};
Reserving these gpios here instead of in the DT means that there can
never be a platform configuration using these. Is there a good reason
for this? Or should we just mark them reserved in DT?
Regards,
Bjorn
> +
> +static const struct msm_pinctrl_soc_data sm8350_pinctrl = {
> + .pins = sm8350_pins,
> + .npins = ARRAY_SIZE(sm8350_pins),
> + .functions = sm8350_functions,
> + .nfunctions = ARRAY_SIZE(sm8350_functions),
> + .groups = sm8350_groups,
> + .ngroups = ARRAY_SIZE(sm8350_groups),
> + .reserved_gpios = sm8350_reserved_gpios,
> + .ngpios = 204,
> +};
> +
> +static int sm8350_pinctrl_probe(struct platform_device *pdev)
> +{
> + return msm_pinctrl_probe(pdev, &sm8350_pinctrl);
> +}
> +
> +static const struct of_device_id sm8350_pinctrl_of_match[] = {
> + { .compatible = "qcom,sm8350-pinctrl", },
> + { },
> +};
> +
> +static struct platform_driver sm8350_pinctrl_driver = {
> + .driver = {
> + .name = "sm8350-pinctrl",
> + .of_match_table = sm8350_pinctrl_of_match,
> + },
> + .probe = sm8350_pinctrl_probe,
> + .remove = msm_pinctrl_remove,
> +};
> +
> +static int __init sm8350_pinctrl_init(void)
> +{
> + return platform_driver_register(&sm8350_pinctrl_driver);
> +}
> +arch_initcall(sm8350_pinctrl_init);
> +
> +static void __exit sm8350_pinctrl_exit(void)
> +{
> + platform_driver_unregister(&sm8350_pinctrl_driver);
> +}
> +module_exit(sm8350_pinctrl_exit);
> +
> +MODULE_DESCRIPTION("QTI sm8350 pinctrl driver");
> +MODULE_LICENSE("GPL v2");
> +MODULE_DEVICE_TABLE(of, sm8350_pinctrl_of_match);
> --
> 2.26.2
>
Powered by blists - more mailing lists