lkml.org 
[lkml]   [2016]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [rtc-linux] Re: [PATCH] rtc: max77683: avoid regmap bulk write for max77620
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

\
 
 \ /
  Last update: 2016-12-12 19:00    [W:0.108 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site