From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757572AbcBCM5L (ORCPT ); Wed, 3 Feb 2016 07:57:11 -0500 Received: from lists.s-osg.org ([54.187.51.154]:53363 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756951AbcBCM4u (ORCPT ); Wed, 3 Feb 2016 07:56:50 -0500 Subject: Re: [PATCH V2 5/5] rtc: max77686: move initialisation of rtc regmap, irq chip locally To: Laxman Dewangan , lee.jones@linaro.org, alexandre.belloni@free-electrons.com, k.kozlowski@samsung.com References: <1454491848-26551-1-git-send-email-ldewangan@nvidia.com> <1454491848-26551-6-git-send-email-ldewangan@nvidia.com> From: Javier Martinez Canillas Cc: cw00.choi@samsung.com, linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com Message-ID: <56B1F90A.6030105@osg.samsung.com> Date: Wed, 3 Feb 2016 09:56:42 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <1454491848-26551-6-git-send-email-ldewangan@nvidia.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Laxman, On 02/03/2016 06:30 AM, Laxman Dewangan wrote: > To make RTC block of MAX77686/MAX77802 as independent driver, > move the registration of i2c device, regmap for register access > and irq_chip for interrupt support inside the RTC driver. > Removed the same initialisation from MFD driver. > > Having this change will allow to reuse this driver for different > PMIC/devices from Maxim Semiconductor if they kept same RTC IP on > different PMIC. Some of examples as PMIC MAX77620, MAX20024 where > same RTC IP used and hence driver for these chips will use this > driver only for RTC support. > > Suggested-by: Krzysztof Kozlowski > Signed-off-by: Laxman Dewangan > CC: Krzysztof Kozlowski > CC: Javier Martinez Canillas > [snip] > > diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c > index ab1f2cd..10984c4 100644 > --- a/drivers/rtc/rtc-max77686.c > +++ b/drivers/rtc/rtc-max77686.c > @@ -12,6 +12,7 @@ > * > */ > > +#include > #include > #include > #include > @@ -22,6 +23,9 @@ > #include > #include > > +#define MAX77686_I2C_ADDR_RTC (0x0C >> 1) > +#define INVALID_I2C_ADDR (-1) > + Maybe call it MAX77686_INVALID_I2C_ADDR for consistency? The patch looks good modulo the issues pointed out by Krzysztof, so after fixing these feel free to add: Reviewed-by: Javier Martinez Canillas Since you are going to re-spin another version, I'll wait for that to test. Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America