From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758031AbbGGPP5 (ORCPT ); Tue, 7 Jul 2015 11:15:57 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:37114 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932257AbbGGPPu (ORCPT ); Tue, 7 Jul 2015 11:15:50 -0400 Date: Tue, 7 Jul 2015 17:15:47 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Sebastian Reichel Cc: Tony Lindgren , Ivaylo Dimitrov , Pavel Machek , Aaro Koskinen , devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: rx51-battery.ko incompatiblity: board code vs DT Message-ID: <20150707151547.GN12087@pali> References: <201507062144.22911@pali> <20150707150230.GB25405@earth> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150707150230.GB25405@earth> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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