diff mbox series

[3/4] soc: qcom: socinfo: add file with SoC info format version

Message ID 20200525164817.2938638-3-dmitry.baryshkov@linaro.org (mailing list archive)
State New, archived
Headers show
Series [1/4] soc: qcom: socinfo: add support for newer socinfo data | expand

Commit Message

Dmitry Baryshkov May 25, 2020, 4:48 p.m. UTC
To ease debugging socinfo driver for newer chips add debugfs file
returning SoC info format version.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/soc/qcom/socinfo.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Bjorn Andersson May 29, 2020, 2:37 a.m. UTC | #1
On Mon 25 May 09:48 PDT 2020, Dmitry Baryshkov wrote:

> To ease debugging socinfo driver for newer chips add debugfs file
> returning SoC info format version.
> 

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  drivers/soc/qcom/socinfo.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
> index 41f48c3447cc..5f98949c7562 100644
> --- a/drivers/soc/qcom/socinfo.c
> +++ b/drivers/soc/qcom/socinfo.c
> @@ -338,6 +338,9 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
>  
>  	qcom_socinfo->info.fmt = __le32_to_cpu(info->fmt);
>  
> +	debugfs_create_x32("info_fmt", 0400, qcom_socinfo->dbg_root,
> +			   &qcom_socinfo->info.fmt);
> +
>  	switch (qcom_socinfo->info.fmt) {
>  	case SOCINFO_VERSION(0, 15):
>  		qcom_socinfo->info.nmodem_supported = __le32_to_cpu(info->nmodem_supported);
> -- 
> 2.26.2
>
diff mbox series

Patch

diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
index 41f48c3447cc..5f98949c7562 100644
--- a/drivers/soc/qcom/socinfo.c
+++ b/drivers/soc/qcom/socinfo.c
@@ -338,6 +338,9 @@  static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
 
 	qcom_socinfo->info.fmt = __le32_to_cpu(info->fmt);
 
+	debugfs_create_x32("info_fmt", 0400, qcom_socinfo->dbg_root,
+			   &qcom_socinfo->info.fmt);
+
 	switch (qcom_socinfo->info.fmt) {
 	case SOCINFO_VERSION(0, 15):
 		qcom_socinfo->info.nmodem_supported = __le32_to_cpu(info->nmodem_supported);