From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752429AbbCYME7 (ORCPT ); Wed, 25 Mar 2015 08:04:59 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:11380 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752190AbbCYME6 (ORCPT ); Wed, 25 Mar 2015 08:04:58 -0400 X-AuditID: cbfee61a-f79c06d000004e71-b9-5512a46868d6 From: Bartlomiej Zolnierkiewicz To: Johan Hovold Cc: Lee Jones , Samuel Ortiz , Support Opensource , Milo Kim , patches@opensource.wolfsonmicro.com, Fabio Estevam , Marek Szyprowski , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/5] mfd: Fix platform device ids to avoid probe failure Date: Wed, 25 Mar 2015 13:04:49 +0100 Message-id: <1690558.fFtM3q1TrB@amdc1032> User-Agent: KMail/4.8.4 (Linux/3.2.0-70-generic-pae; KDE/4.8.5; i686; ; ) In-reply-to: <20150325110231.GC10412@localhost> References: <1426879403-19265-1-git-send-email-b.zolnierkie@samsung.com> <2485401.Gb44YTtKCE@amdc1032> <20150325110231.GC10412@localhost> MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset=us-ascii X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrGLMWRmVeSWpSXmKPExsVy+t9jAd2MJUKhBu9eqFjM6tK1aLrRw2px /+tRRovLu+awWaw9cpfdYvmvdSwWy9/+Z7M43c1qsbf1IrMDp8eKT/oe/w73M3lsWtXJ5nHn 2h42j3knAz1eTvzN5tG3ZRWjx/Eb25k8Pm+SC+CM4rJJSc3JLEst0rdL4MqYP/U4W8FVoYrZ ncuYGxhv8nUxcnJICJhIzFi6kA3CFpO4cG89kM3FISSwiFHi2vdTLBDON0aJS63LmUGq2ASs JCa2r2LsYuTgEBFQlpjyRhAkzCxwgEni5qRsEFtYwF+i59BOdhCbRUBVYtGvt0wgNq+ApsTu TXsZQWxRAU+JndMPgNmcAvoSB2/8Y4bY1c0o8f71GmaIBkGJH5PvsUAskJfYt38qK4StJbF+ 53GmCYwCs5CUzUJSNgtJ2QJG5lWMoqkFyQXFSem5hnrFibnFpXnpesn5uZsYwbHxTGoH48oG i0OMAhyMSjy8HiJCoUKsiWXFlbmHGCU4mJVEeF8tBArxpiRWVqUW5ccXleakFh9ilOZgURLn VbJvCxESSE8sSc1OTS1ILYLJMnFwSjUwWt3/0mV2yWaKjfPkO/9k8ou+feW6aNvT33FxU5ER n4ady+eL2ltYNpxIDuRSTOZ5FjwvuWvak9XJqTo+29z2rrjLUCbxhMPyvojWWS+/wzvfb9jk +PBX1rzMmlJjf7sPD/3WJtzfNaP8+ZZXDKsDupxv2O/YKpDX5175UqPTMX3B39nn+QN4lViK MxINtZiLihMBcVySAIkCAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wednesday, March 25, 2015 12:02:31 PM Johan Hovold wrote: > On Mon, Mar 23, 2015 at 02:11:50PM +0100, Bartlomiej Zolnierkiewicz wrote: > > On Monday, March 23, 2015 11:07:18 AM Johan Hovold wrote: > > > On Fri, Mar 20, 2015 at 08:23:18PM +0100, Bartlomiej Zolnierkiewicz wrote: > > > > > > > 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. > > > > > > First of all, thanks for finding these. I obviously overlooked this > > > class of drivers when fixing the device-id generation. > > > > > > > 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. > > > > > > This is however not the right fix. Instead you should be using > > > PLATFORM_DEVID_AUTO and keep the non-zero cell-ids as is, as this will > > > allow more than one mfd-device to be registered without resorting to > > > hacks. > > > > Conversion of a driver to use PLATFORM_DEVID_AUTO changes names of > > all platform devices registered by the driver. In my patchset I just > > tried to restore the broken functionality (patch that broke it went > > in v3.19). I thought that it was the best solution for v3.19 and > > v4.0-rc4 (then PLATFORM_DEVID_AUTO conversion can be done sometime > > later, i.e. in v4.1). > > I think you're right. We should do the conversion to PLATFORM_DEVID_AUTO > later. > > I'm responding to this mail with two patches for v4.0 fixing the da9052 > driver, which is currently broken although not in the way suggested by > your v1-series, and the other drivers you identified by doing a partial > revert of commit 6e3f62f0793e ("mfd: core: Fix platform-device id > generation"). Both patches look good to me. Thank you for fixing this. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics