From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758252AbcATHmI (ORCPT ); Wed, 20 Jan 2016 02:42:08 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34192 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751583AbcATHmA (ORCPT ); Wed, 20 Jan 2016 02:42:00 -0500 From: Peter Korsgaard To: "Yang\, Wenyou" Cc: Liam Girdwood , Mark Brown , "Rob Herring" , Pawel Moll , Mark Rutland , Ian Campbell , "Kumar Gala" , Krzysztof Kozlowski , "devicetree\@vger.kernel.org" , "Ferre\, Nicolas" , "linux-kernel\@vger.kernel.org" , Javier Martinez Canillas , Lee Jones , "linux-arm-kernel\@lists.infradead.org" Subject: Re: [PATCH v2 1/2] regulator: act8945a: add regulator driver for ACT8945A References: <1452586629-1117-1-git-send-email-wenyou.yang@atmel.com> <1452586629-1117-2-git-send-email-wenyou.yang@atmel.com> <87oacp5zl7.fsf@dell.be.48ers.dk> <87egdk39ji.fsf@dell.be.48ers.dk> <87a8o82xq3.fsf@dell.be.48ers.dk> Date: Wed, 20 Jan 2016 08:41:55 +0100 In-Reply-To: (Wenyou Yang's message of "Wed, 20 Jan 2016 07:37:36 +0000") Message-ID: <878u3kvgsc.fsf@dell.be.48ers.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Yang," == Yang, Wenyou writes: Hi, >> > The MFD sub device is registered as a platform device, the existing > act8865 >> driver is registered as an i2c_driver. How do they match? :) >> >> > Could you point out which exiting driver for me to reference. Thank you! >> >> What I'm saying is that it isn't nice that we end up with both act8865-regulator.c >> and act8954-regulator.c doing 95% the same. This can either be fixed by: >> >> - Adding act8865 support to your mfd driver (but only registering the >> regulator subdev for act8865) and changing the existing >> act8865-regulator driver to work as a mfd subdev (platform device) >> >> - Extending the act8865-regulator driver to register as a platform >> driver in ADDITION to a i2c driver so it can be used with mfd. The >> driver already uses regmap so it should only be a matter of adding the >> pdev probe/remove functions. > After think twice, I think this will complicates the act8865-regulator driver. I don't think it will add a lot of complication (E.G. basically just the platform probe/remove functions), but Ok - I'll wait and see your simplified driver. -- Venlig hilsen, Peter Korsgaard