Re: [PATCH 2/2] regulator: Add Dialog DA9063 voltage regulatorssupport.
From: Mark Brown
Date: Thu Jul 25 2013 - 14:02:14 EST
On Thu, Jul 25, 2013 at 07:35:39PM +0200, Philipp Zabel wrote:
> Am Mittwoch, den 24.07.2013, 18:29 +0100 schrieb Mark Brown:
> > This looks like it should be generic (and there is actually a
> > regmap_field API for bitfields...).
> Indeed. I'm a bit unhappy about having to split all the masks into lsb and msb
> only to have regmap_field_init combine them back into a mask, though.
> Could we perhaps change struct reg_field to contain reg and mask, and then also use
> this for the regulator_desc vsel/apply/enable/bypass_reg/mask fields?
Well, the other option is to define regmap regulator helpers for
everything where there's overlap and just do that. The helpers cover a
bunch of common things but there's going to be room for more.
Description: Digital signature