From: Guru Das Srinagesh <gurus@codeaurora.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: linux-arm-msm@vger.kernel.org,
Subbaraman Narayanamurthy <subbaram@codeaurora.org>,
David Collins <collinsd@codeaurora.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/1] nvmem: qcom-spmi-sdam: Enable multiple devices
Date: Tue, 21 Jul 2020 12:47:03 -0700 [thread overview]
Message-ID: <20200721194703.GA30565@codeaurora.org> (raw)
In-Reply-To: <b6f5edf4-2b1c-349c-d070-ac7bc76af42d@linaro.org>
On Mon, Jul 20, 2020 at 09:49:22AM +0100, Srinivas Kandagatla wrote:
>
>
> On 14/07/2020 01:01, Guru Das Srinagesh wrote:
> >Specifying the name of the nvmem device while registering it with the
> >nvmem framework has the side effect of causing the second instance of a
> >device using this driver to fail probe with the following error message:
> >
> > sysfs: cannot create duplicate filename '/bus/nvmem/devices/spmi_sdam'
> >
> >Removing the name allows the nvmem framework to assign a monotonically
> >increasing integer id to each instance of this driver automatically,
> >like so:
> >
> > /sys/bus/nvmem/devices # ls
> > nvmem0 nvmem1 nvmem2
> >
> >Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
> >---
> > drivers/nvmem/qcom-spmi-sdam.c | 4 +---
> > 1 file changed, 1 insertion(+), 3 deletions(-)
> >
> >diff --git a/drivers/nvmem/qcom-spmi-sdam.c b/drivers/nvmem/qcom-spmi-sdam.c
> >index 8682cda..6275f14 100644
> >--- a/drivers/nvmem/qcom-spmi-sdam.c
> >+++ b/drivers/nvmem/qcom-spmi-sdam.c
> >@@ -1,6 +1,6 @@
> > // SPDX-License-Identifier: GPL-2.0-only
> > /*
> >- * Copyright (c) 2017 The Linux Foundation. All rights reserved.
> >+ * Copyright (c) 2017, 2020 The Linux Foundation. All rights reserved.
> > */
> > #include <linux/device.h>
> >@@ -140,8 +140,6 @@ static int sdam_probe(struct platform_device *pdev)
> > sdam->size = val * 32;
> > sdam->sdam_config.dev = &pdev->dev;
> >- sdam->sdam_config.name = "spmi_sdam";
> >- sdam->sdam_config.id = pdev->id;
>
> Please use new flag NVMEM_DEVID_AUTO introduced in https://git.kernel.org/pub/scm/linux/kernel/git/srini/nvmem.git/commit/?h=for-next&id=93ac5fdba1eddc679e9694b64f2fa321317df988
> instead of pdev->id, which should fix the issue.
Thank you for pointing this out, I've uploaded a v2 using this flag.
Thank you.
Guru Das.
prev parent reply other threads:[~2020-07-21 19:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-14 0:01 [PATCH v1 1/1] nvmem: qcom-spmi-sdam: Enable multiple devices Guru Das Srinagesh
2020-07-20 8:49 ` Srinivas Kandagatla
2020-07-21 19:47 ` Guru Das Srinagesh [this message]
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=20200721194703.GA30565@codeaurora.org \
--to=gurus@codeaurora.org \
--cc=collinsd@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=subbaram@codeaurora.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;
as well as URLs for NNTP newsgroup(s).