Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932366AbcLLR7s (ORCPT ); Mon, 12 Dec 2016 12:59:48 -0500 Received: from mail-wj0-f196.google.com ([209.85.210.196]:35370 "EHLO mail-wj0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932224AbcLLR7q (ORCPT ); Mon, 12 Dec 2016 12:59:46 -0500 Date: Mon, 12 Dec 2016 19:59:40 +0200 From: Krzysztof Kozlowski To: rtc-linux@googlegroups.com Cc: Venkat Reddy Talla , cw00.choi@samsung.com, krzk@kernel.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com, linux-kernel@vger.kernel.org, ldewangan@nvidia.com Subject: Re: [rtc-linux] Re: [PATCH] rtc: max77683: avoid regmap bulk write for max77620 Message-ID: <20161212175940.GA7302@kozik-lap> References: <1481543085-19540-1-git-send-email-vreddytalla@nvidia.com> <2080923.yQbi47FubE@amdc3058> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2080923.yQbi47FubE@amdc3058> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1271 Lines: 38 On Mon, Dec 12, 2016 at 02:28:11PM +0100, Bartlomiej Zolnierkiewicz wrote: > > @@ -259,6 +262,32 @@ static const struct max77686_rtc_driver_data max77802_drv_data = { > > .rtc_irq_chip = &max77802_rtc_irq_chip, > > }; > > > > +static inline int _regmap_bulk_write(struct max77686_rtc_info *info, > > rtc_regmap_bulk_write? I think max77686_regmap_bulk_write would be nice. This might still pop somewhere in the backtrace so the prefix is useful. > > > + unsigned int reg, void *val, int len) > > +{ > > Please keep arguments (except "info" one) in sync with regmap_bulk_write(): > > int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val, > size_t val_count) > > > + int ret = 0; > > + > > + if (!info->drv_data->avoid_rtc_bulk_write) { > > + /* RTC registers support sequential writing */ > > + ret = regmap_bulk_write(info->rtc_regmap, reg, val, len); > > + } else { > > + /* Power registers support register-data pair writing */ > > Hmn, maybe this can be handled be regmap_bulk_write() with proper > regmap setting (map->bus == NULL?), can anyone with more regmap > expertise comment on this? Good catch. This does not look like a property of this device driver but of the bus it is attached to. Best regards, Krzysztof