From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751150AbbCTTKc (ORCPT ); Fri, 20 Mar 2015 15:10:32 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:22558 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750990AbbCTTKb (ORCPT ); Fri, 20 Mar 2015 15:10:31 -0400 X-AuditID: cbfee61b-f79d76d0000024d6-2d-550c70a5710f From: Bartlomiej Zolnierkiewicz To: Lee Jones Cc: Samuel Ortiz , Johan Hovold , Support Opensource , Milo Kim , patches@opensource.wolfsonmicro.com, Fabio Estevam , Marek Szyprowski , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/5] mfd: Fix platform device ids to avoid probe failure Date: Fri, 20 Mar 2015 20:10:24 +0100 Message-id: <3934255.fvpITXUWu4@amdc1032> User-Agent: KMail/4.8.4 (Linux/3.2.0-70-generic-pae; KDE/4.8.5; i686; ; ) In-reply-to: <1426878127-13497-1-git-send-email-b.zolnierkie@samsung.com> References: <1426878127-13497-1-git-send-email-b.zolnierkie@samsung.com> MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset=ISO-8859-1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrKLMWRmVeSWpSXmKPExsVy+t9jAd2lBTyhBu0vBS1mdelaNN3oYbW4 //Uoo8XlXXPYLNYeuctusfzXOhaL5W//s1mc7ma12Nt6kdmB02PFJ32Pf4f7mTw2repk87hz bQ+bx7yTgR4vJ/5m8+jbsorR4/iN7UwenzfJBXBGcdmkpOZklqUW6dslcGVcf76duWCpSMXx 7ZOZGhhnCXQxcnJICJhILJlwgRHCFpO4cG89WxcjF4eQwCJGifbtS5kgnBYmifOXz7GBVLEJ WElMbF8F1MHBISKgInHujTlIDbPAfiaJjnMnmUFqhAV8JHYsfswEYrMIqEq0HP/KBFLPK6Ap MfmuLkhYVMBTYuf0A2CLOYHsuX92g9lCAh4SV7fcB2vlFRCU+DH5HguIzSwgL7Fv/1RWCFtH Yn/rNLYJjAKzkJTNQlI2C0nZAkbmVYyiqQXJBcVJ6blGesWJucWleel6yfm5mxjBkfFMegfj qgaLQ4wCHIxKPLwHSrlDhVgTy4orcw8xSnAwK4nwTk3lCRXiTUmsrEotyo8vKs1JLT7EKM3B oiTOq2TfFiIkkJ5YkpqdmlqQWgSTZeLglGpgNOg5dU8y68m90vnz7Q9+vLCZUzb23fw/fS8e VMyTeNK+4t9h+Vdfc9M3T3J4PeFAq+I/yRvHLPVe3l/8euoflff6BRHvvxgLFX4613Z/XX+o g3h/ZKZGlqmn9I45C75Lij3I9C1/vjKceb9j09IO5V9Wr9hPZDTv7LFhCUxv//1sh0iKIsvy C0osxRmJhlrMRcWJACNQo4aIAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Please get v2 instead (with corrected 'stable' mailing list address on cc:). Sorry for the noise. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics On Friday, March 20, 2015 08:02:02 PM Bartlomiej Zolnierkiewicz wrote: > Hi, > > Commit 6e3f62f0793e ("mfd: core: Fix platform-device id generation") > changed the way platform device ids are generated from mfd id base and > cell ids in mfd_add_device(). Unfortunately the change in question > breaks mfd drivers which are using mfd_add_devices() with mfd id base > equal to -1 and non-zero cell ids (used to distinguish cells with > the same name field). The result is that mfd core tries to register > platform devices with the same name which obviously fails and leads > to mfd device probe failure. > > Relevant error messages (in this case for MAX8997 PMIC driver): > > [ 0.911674] ------------[ cut here ]------------ > [ 0.911706] WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x54/0x70() > [ 0.911718] sysfs: cannot create duplicate filename '/devices/13860000.i2c/i2c-0/0-0066/max8997-led' > ... > [ 0.912382] ------------[ cut here ]------------ > [ 0.912402] WARNING: CPU: 0 PID: 1 at lib/kobject.c:240 kobject_add_internal+0x238/0x2c0() > [ 0.912411] kobject_add_internal failed for max8997-led with -EEXIST, don't try to register things with the same name in th > ... > [ 0.920721] max8997 0-0066: failed to add MFD devices -17 > [ 0.921553] max8997: probe of 0-0066 failed with error -17 > > Changing mfd_add_devices() mfd id base from -1 to 0 and at the same > time setting proper cell ids for all cells fixes the issue. > > MAX8997 PMIC fix was tested on Exynos4210 Origen board, the rest of > patches is compile tested only. > > Best regards, > -- > Bartlomiej Zolnierkiewicz > Samsung R&D Institute Poland > Samsung Electronics > > > Bartlomiej Zolnierkiewicz (5): > mfd: max8997: Fix platform device ids to avoid probe failure > mfd: da9055: Fix platform device ids to avoid probe failure > mfd: lp8788: Fix platform device ids to avoid probe failure > mfd: wm831x: Fix platform device ids to avoid probe failure > mfd: da9052: Fix platform device names > > drivers/mfd/da9052-core.c | 21 ++++-- > drivers/mfd/da9055-core.c | 21 ++++-- > drivers/mfd/lp8788.c | 10 ++- > drivers/mfd/max8997.c | 16 ++-- > drivers/mfd/wm831x-core.c | 184 +++++++++++++++++++++++++++------------------- > 5 files changed, 150 insertions(+), 102 deletions(-)