On Fri, May 17, 2024 at 02:58:00PM +0200, Alvin Šipraga wrote: > +static int regmap_a2b_write(void *context, const void *data, size_t count) > +{ > + for (i = 0; i < count - 1; i++) { > + ret = bus->ops->write(bus, node, reg + i, d[i + 1]); > + if (ret) > + return ret; > + } Just force single_read and single_write (looks like you'll need to add the hook for the bus there). > +struct regmap *__devm_regmap_init_a2b_node(struct a2b_node *node, > + const struct regmap_config *config, > + struct lock_class_key *lock_key, > + const char *lock_name) > +{ > + return __devm_regmap_init(&node->dev, ®map_a2b, node, config, > + lock_key, lock_name); > +} > +EXPORT_SYMBOL_GPL(__devm_regmap_init_a2b_node); Should there be validation of val_bits?
Attachment:
signature.asc
Description: PGP signature
- Follow-Ups:
- Re: [PATCH 02/13] regmap: add A2B support
- From: Alvin Šipraga
- Re: [PATCH 02/13] regmap: add A2B support
- References:
- [PATCH 00/13] Analog Devices Inc. Automotive Audio Bus (A2B) support
- From: Alvin Šipraga
- [PATCH 02/13] regmap: add A2B support
- From: Alvin Šipraga
- [PATCH 00/13] Analog Devices Inc. Automotive Audio Bus (A2B) support
- Prev by Date: Re: [PATCH 08/13] clk: add AD24xx clock driver
- Next by Date: Re: [PATCH 04/13] a2b: add AD24xx I2C interface driver
- Previous by thread: [PATCH 02/13] regmap: add A2B support
- Next by thread: Re: [PATCH 02/13] regmap: add A2B support
- Index(es):