[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130924183100.GB9911@mithrandir>
Date: Tue, 24 Sep 2013 20:31:00 +0200
From: Thierry Reding <thierry.reding@...il.com>
To: Rhyland Klein <rklein@...dia.com>
Cc: Anton Vorontsov <anton@...msg.org>,
David Woodhouse <dwmw2@...radead.org>,
Manish Badarkhe <badarkhe.manish@...il.com>,
Darbha Sriharsha <dsriharsha@...dia.com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>
Subject: Re: [Patch V2] drivers: power: Add support for bq24735 charger
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@...009' 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
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists