* rx51-battery.ko incompatiblity: board code vs DT
@ 2015-07-06 19:44 Pali Rohár
2015-07-07 10:41 ` Pavel Machek
2015-07-07 15:02 ` Sebastian Reichel
0 siblings, 2 replies; 4+ messages in thread
From: Pali Rohár @ 2015-07-06 19:44 UTC (permalink / raw)
To: Sebastian Reichel, Tony Lindgren, Ivaylo Dimitrov, Pavel Machek,
Aaro Koskinen
Cc: devicetree, linux-omap, linux-kernel
[-- Attachment #1: Type: Text/Plain, Size: 688 bytes --]
Hello,
now I found out that rx51-battery.ko driver register sysnode
/sys/class/power_supply/rx51-battery/ when booting with legacy board
code. But when booting DT kernel it register sysnode with different name
/sys/class/power_supply/n900-battery/
Sysfs node for DT kernel comes from Nokia N900 DTS file:
arch/arm/boot/dts/omap3-n900.dts
I would propose change which change DTS to "rx51-battery" to have it
compatible with naming which is for legacy board code. It is just
because to have compatibility and same naming scheme and also to make
existing programs to work without needing patching them.
What do you think?
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rx51-battery.ko incompatiblity: board code vs DT
2015-07-06 19:44 rx51-battery.ko incompatiblity: board code vs DT Pali Rohár
@ 2015-07-07 10:41 ` Pavel Machek
2015-07-07 15:02 ` Sebastian Reichel
1 sibling, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2015-07-07 10:41 UTC (permalink / raw)
To: Pali Rohár
Cc: Sebastian Reichel, Tony Lindgren, Ivaylo Dimitrov, Aaro Koskinen,
devicetree, linux-omap, linux-kernel
On Mon 2015-07-06 21:44:22, Pali Rohár wrote:
> Hello,
>
> now I found out that rx51-battery.ko driver register sysnode
> /sys/class/power_supply/rx51-battery/ when booting with legacy board
> code. But when booting DT kernel it register sysnode with different name
> /sys/class/power_supply/n900-battery/
>
> Sysfs node for DT kernel comes from Nokia N900 DTS file:
> arch/arm/boot/dts/omap3-n900.dts
>
> I would propose change which change DTS to "rx51-battery" to have it
> compatible with naming which is for legacy board code. It is just
> because to have compatibility and same naming scheme and also to make
> existing programs to work without needing patching them.
>
> What do you think?
Makes sense.. along with _big_ comment in the dts why we are doing
this.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rx51-battery.ko incompatiblity: board code vs DT
2015-07-06 19:44 rx51-battery.ko incompatiblity: board code vs DT Pali Rohár
2015-07-07 10:41 ` Pavel Machek
@ 2015-07-07 15:02 ` Sebastian Reichel
2015-07-07 15:15 ` Pali Rohár
1 sibling, 1 reply; 4+ messages in thread
From: Sebastian Reichel @ 2015-07-07 15:02 UTC (permalink / raw)
To: Pali Rohár
Cc: Tony Lindgren, Ivaylo Dimitrov, Pavel Machek, Aaro Koskinen,
devicetree, linux-omap, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 979 bytes --]
Hi,
On Mon, Jul 06, 2015 at 09:44:22PM +0200, Pali Rohár wrote:
> now I found out that rx51-battery.ko driver register sysnode
> /sys/class/power_supply/rx51-battery/ when booting with legacy board
> code. But when booting DT kernel it register sysnode with different name
> /sys/class/power_supply/n900-battery/
>
> Sysfs node for DT kernel comes from Nokia N900 DTS file:
> arch/arm/boot/dts/omap3-n900.dts
>
> I would propose change which change DTS to "rx51-battery" to have it
> compatible with naming which is for legacy board code. It is just
> because to have compatibility and same naming scheme and also to make
> existing programs to work without needing patching them.
>
> What do you think?
Change the driver instead (in rx51_battery_probe):
- di->bat.name = dev_name(&pdev->dev);
+ di->bat.name = "rx51-battery"
This will keep the DT ABI stable and avoid introducing the term rx51
in the device tree file.
-- Sebastian
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rx51-battery.ko incompatiblity: board code vs DT
2015-07-07 15:02 ` Sebastian Reichel
@ 2015-07-07 15:15 ` Pali Rohár
0 siblings, 0 replies; 4+ messages in thread
From: Pali Rohár @ 2015-07-07 15:15 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Tony Lindgren, Ivaylo Dimitrov, Pavel Machek, Aaro Koskinen,
devicetree, linux-omap, linux-kernel
On Tuesday 07 July 2015 17:02:30 Sebastian Reichel wrote:
> Hi,
>
> On Mon, Jul 06, 2015 at 09:44:22PM +0200, Pali Rohár wrote:
> > now I found out that rx51-battery.ko driver register sysnode
> > /sys/class/power_supply/rx51-battery/ when booting with legacy board
> > code. But when booting DT kernel it register sysnode with different name
> > /sys/class/power_supply/n900-battery/
> >
> > Sysfs node for DT kernel comes from Nokia N900 DTS file:
> > arch/arm/boot/dts/omap3-n900.dts
> >
> > I would propose change which change DTS to "rx51-battery" to have it
> > compatible with naming which is for legacy board code. It is just
> > because to have compatibility and same naming scheme and also to make
> > existing programs to work without needing patching them.
> >
> > What do you think?
>
> Change the driver instead (in rx51_battery_probe):
>
> - di->bat.name = dev_name(&pdev->dev);
> + di->bat.name = "rx51-battery"
>
> This will keep the DT ABI stable and avoid introducing the term rx51
> in the device tree file.
>
> -- Sebastian
Perfect, if it works fine can you send & apply patch?
--
Pali Rohár
pali.rohar@gmail.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-07-07 15:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-06 19:44 rx51-battery.ko incompatiblity: board code vs DT Pali Rohár
2015-07-07 10:41 ` Pavel Machek
2015-07-07 15:02 ` Sebastian Reichel
2015-07-07 15:15 ` Pali Rohár
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).