lkml.org 
[lkml]   [2016]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V2 5/5] rtc: max77686: move initialisation of rtc regmap, irq chip locally
From
Date
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 <k.kozlowski@samsung.com>
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> CC: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> CC: Javier Martinez Canillas <javier@osg.samsung.com>
>

[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 <linux/i2c.h>
> #include <linux/slab.h>
> #include <linux/rtc.h>
> #include <linux/delay.h>
> @@ -22,6 +23,9 @@
> #include <linux/irqdomain.h>
> #include <linux/regmap.h>
>
> +#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 <javier@osg.samsung.com>

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

\
 
 \ /
  Last update: 2016-02-03 14:41    [W:0.093 / U:1.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site