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 via email to