public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Rhyland Klein <rklein@nvidia.com>
Cc: Anton Vorontsov <anton@enomsg.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Manish Badarkhe <badarkhe.manish@gmail.com>,
	Darbha Sriharsha <dsriharsha@nvidia.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [Patch V2] drivers: power: Add support for bq24735 charger
Date: Tue, 24 Sep 2013 20:31:00 +0200	[thread overview]
Message-ID: <20130924183100.GB9911@mithrandir> (raw)
In-Reply-To: <5241D62E.1060705@nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]

On Tue, Sep 24, 2013 at 02:13:02PM -0400, Rhyland Klein wrote:
> On 9/20/2013 3:53 AM, Thierry Reding wrote:
> >>>> +     name = charger_device->pdata->name;
> >>>> +     if (!name) {
> >>>> +             name = kasprintf(GFP_KERNEL, "bq24735-%s",
> >>>> +                              dev_name(&client->dev));
> >>>
> >>> Won't the device name already include bq24735 because of the driver
> >>> name?
> >>
> >> In my experience this comes up with a name like "bq24735-5-0009". Thats
> >> why I added the bq24735 in the beginning, so the name is more descriptive.
> > 
> > Yes, you're right. Perhaps in that case it's even easier to just stick
> > with a static string such as "bq24735" or "bq24735-charger". It's likely
> > to be the only device of that type in a machine. If you want to include
> > the device name, perhaps something like "%s/bq24735" (5-0009/bq24735) is
> > clearer that 5-0009 is actually the bus-specific name.
> > 
> 
> So it turns out if I try to put in a '/' or '\' they are translated to
> '!' in sysfs, so the name comes out to be '5-0009!bq24735'. Perhaps
> 'bq24735@5-0009' to still signify that the 5-009 is more of an address
> than chip name? What do you think Thierry?

I hadn't thought about that. @ looks like a better separator indeed.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-09-24 18:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19 16:18 [Patch V2] drivers: power: Add support for bq24735 charger Rhyland Klein
2013-09-19 20:27 ` Thierry Reding
2013-09-19 20:45   ` Rhyland Klein
2013-09-20  7:53     ` Thierry Reding
2013-09-20 16:21       ` Rhyland Klein
2013-09-24 18:13       ` Rhyland Klein
2013-09-24 18:31         ` Thierry Reding [this message]
2013-09-23 21:53 ` Stephen Warren
2013-09-23 22:01   ` Rhyland Klein
2013-09-23 22:05     ` Stephen Warren
2013-09-24 16:39       ` Rhyland Klein
2013-09-24 23:10         ` Stephen Warren

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=20130924183100.GB9911@mithrandir \
    --to=thierry.reding@gmail.com \
    --cc=anton@enomsg.org \
    --cc=badarkhe.manish@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dsriharsha@nvidia.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=rklein@nvidia.com \
    /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