lkml.org 
[lkml]   [2015]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: rx51-battery.ko incompatiblity: board code vs DT
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-07-07 17:21    [W:0.102 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site