From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755094AbcAHNqz (ORCPT ); Fri, 8 Jan 2016 08:46:55 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:16887 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751919AbcAHNqx (ORCPT ); Fri, 8 Jan 2016 08:46:53 -0500 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Fri, 08 Jan 2016 05:42:33 -0800 Message-ID: <568FBB6D.2020904@nvidia.com> Date: Fri, 8 Jan 2016 19:06:45 +0530 From: Laxman Dewangan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Mark Brown CC: Krzysztof Kozlowski , , , , , , , , , , , , , , , , , , Chaitanya Bandi Subject: Re: [rtc-linux] [PATCH 5/6] rtc: max77620: add support for max77620/max20024 RTC driver References: <1452177524-23192-1-git-send-email-ldewangan@nvidia.com> <1452177524-23192-6-git-send-email-ldewangan@nvidia.com> <568F8D7E.10500@nvidia.com> <20160108125117.GM6588@sirena.org.uk> <568FB3DD.4090503@nvidia.com> <20160108133648.GQ6588@sirena.org.uk> In-Reply-To: <20160108133648.GQ6588@sirena.org.uk> X-Originating-IP: [10.19.65.30] X-ClientProxiedBy: DRUKMAIL102.nvidia.com (10.25.59.20) To bgmail102.nvidia.com (10.25.59.11) Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 08 January 2016 07:06 PM, Mark Brown wrote: > * PGP Signed by an unknown key > > On Fri, Jan 08, 2016 at 06:34:29PM +0530, Laxman Dewangan wrote: > >> If we get the parent device, regmap handle and interrupt number from mfd >> core independent of the PMIC (MAX77620 or MAX77686), then same driver can be >> used here. >> Two way which I can think of here: > Parent device is just dev->parent, you can use dev_get_regmap() to get a > regmap given a struct device and you can use platform resources to pass > the interrupts to the children from the MFD (there's some examples, > wm831x is one). > > I think it should work with named regmap. mfd whould init regmap with name and rtc driver should ask with same name. I saw three drivers which looks same: rtc-max77620.c (new from me) and already available rtc-max77686.c, rtc-max77802.c Seems I can develop IP based rtc driver as rtc-max77xxx.c