From: Bjorn Andersson <andersson@kernel.org>
To: Melody Olvera <quic_molvera@quicinc.com>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Linus Walleij <linus.walleij@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] pinctrl: qcom: Add QDU1000/QRU1000 pinctrl driver
Date: Wed, 5 Oct 2022 20:50:47 -0500 [thread overview]
Message-ID: <20221006015047.4ten7sjsth7sw6s7@baldur> (raw)
In-Reply-To: <20221001030546.28220-3-quic_molvera@quicinc.com>
On Fri, Sep 30, 2022 at 08:05:46PM -0700, Melody Olvera wrote:
[..]
> diff --git a/drivers/pinctrl/qcom/pinctrl-qdru1000.c b/drivers/pinctrl/qcom/pinctrl-qdru1000.c
> new file mode 100644
> index 000000000000..8b931ff80bb4
> --- /dev/null
> +++ b/drivers/pinctrl/qcom/pinctrl-qdru1000.c
> @@ -0,0 +1,59 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2021, The Linux Foundation. All rights reserved.
> + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
> + */
> +
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/platform_device.h>
> +#include <linux/pinctrl/pinctrl.h>
> +
> +#include "pinctrl-msm.h"
> +#include "pinctrl-qdru1000.h"
> +
> +static const struct msm_pinctrl_soc_data qdru1000_tlmm = {
> + .pins = qdru1000_pins,
> + .npins = ARRAY_SIZE(qdru1000_pins),
> + .functions = qdru1000_functions,
> + .nfunctions = ARRAY_SIZE(qdru1000_functions),
> + .groups = qdru1000_groups,
> + .ngroups = ARRAY_SIZE(qdru1000_groups),
> + .ngpios = 151,
> +};
> +
> +static int qdru1000_tlmm_probe(struct platform_device *pdev)
> +{
> + return msm_pinctrl_probe(pdev, &qdru1000_tlmm);
> +}
> +
> +static const struct of_device_id qdru1000_tlmm_of_match[] = {
> + { .compatible = "qcom,qdu1000-tlmm", },
> + { .compatible = "qcom,qru1000-tlmm", },
> + { },
> +};
> +
> +static struct platform_driver qdru1000_tlmm_driver = {
> + .driver = {
> + .name = "qdru1000-tlmm",
> + .of_match_table = qdru1000_tlmm_of_match,
> + },
> + .probe = qdru1000_tlmm_probe,
> + .remove = msm_pinctrl_remove,
> +};
> +
> +static int __init qdru1000_tlmm_init(void)
> +{
> + return platform_driver_register(&qdru1000_tlmm_driver);
> +}
> +arch_initcall(qdru1000_tlmm_init);
> +
> +static void __exit qdru1000_tlmm_exit(void)
> +{
> + platform_driver_unregister(&qdru1000_tlmm_driver);
> +}
> +module_exit(qdru1000_tlmm_exit);
> +
> +MODULE_DESCRIPTION("QTI QDRU1000 TLMM driver");
> +MODULE_LICENSE("GPL v2");
"GPL" only please.
> +MODULE_DEVICE_TABLE(of, qdru1000_tlmm_of_match);
Please add this next to qdru1000_tlmm_of_match.
> diff --git a/drivers/pinctrl/qcom/pinctrl-qdru1000.h b/drivers/pinctrl/qcom/pinctrl-qdru1000.h
I'm not able to see why this is in a header file and the commit message
doesn't give a clue. Please align with the customary form, or motivate
your choice.
[..]
> +
> +enum qdru1000_functions {
> + msm_mux_gpio,
> + msm_mux_CMO_PRI,
> + msm_mux_SI5518_INT,
> + msm_mux_atest_char_start,
> + msm_mux_atest_char_status0,
> + msm_mux_atest_char_status1,
> + msm_mux_atest_char_status2,
> + msm_mux_atest_char_status3,
For anything that denotes different pins in one function, please drop
the suffix and make this a list of functions.
[..]
> + msm_mux_qspi_data_0,
> + msm_mux_qspi_data_1,
> + msm_mux_qspi_data_2,
> + msm_mux_qspi_data_3,
> + msm_mux_qup0_se0_l0,
E.g. msm_mux_qup0_se0 is enough, giving each pin its own function means
that we need to define each pin separate in DT.
Regards,
Bjorn
next prev parent reply other threads:[~2022-10-06 1:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-01 3:05 [PATCH 0/2] Add pinctrl support for QDU1000/QRU1000 SoCs Melody Olvera
2022-10-01 3:05 ` [PATCH 1/2] dt-bindings: pinctrl: qcom: Add QDU1000 and QRU1000 pinctrl bindings Melody Olvera
2022-10-01 9:20 ` Krzysztof Kozlowski
2022-10-04 16:41 ` Melody Olvera
2022-10-03 13:24 ` Rob Herring
2022-10-01 3:05 ` [PATCH 2/2] pinctrl: qcom: Add QDU1000/QRU1000 pinctrl driver Melody Olvera
2022-10-01 7:47 ` Dmitry Baryshkov
2022-10-04 19:59 ` Melody Olvera
2022-10-01 9:22 ` Krzysztof Kozlowski
2022-10-04 20:00 ` Melody Olvera
2022-10-06 1:50 ` Bjorn Andersson [this message]
2022-10-12 18:54 ` Melody Olvera
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221006015047.4ten7sjsth7sw6s7@baldur \
--to=andersson@kernel.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_molvera@quicinc.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®