public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: rtc-linux@googlegroups.com
Cc: Venkat Reddy Talla <vreddytalla@nvidia.com>,
	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
Date: Mon, 12 Dec 2016 19:59:40 +0200	[thread overview]
Message-ID: <20161212175940.GA7302@kozik-lap> (raw)
In-Reply-To: <2080923.yQbi47FubE@amdc3058>

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

      reply	other threads:[~2016-12-12 17:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12 11:44 [PATCH] rtc: max77683: avoid regmap bulk write for max77620 Venkat Reddy Talla
2016-12-12 13:28 ` Bartlomiej Zolnierkiewicz
2016-12-12 17:59   ` Krzysztof Kozlowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161212175940.GA7302@kozik-lap \
    --to=krzk@kernel.org \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=cw00.choi@samsung.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=vreddytalla@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox