lkml.org 
[lkml]   [2022]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 6/9] gpio: i8255: Migrate to gpio-regmap API
On Wed, Nov 23, 2022 at 07:42:24PM +0200, Andy Shevchenko wrote:
> On Tue, Nov 22, 2022 at 02:11:03AM -0500, William Breathitt Gray wrote:
> > +/**
> > + * struct i8255_regmap_config - Configuration for the register map of an i8255
> > + * @parent: parent device
> > + * @map: regmap for the i8255
> > + * @num_ppi: number of i8255 Programmable Peripheral Interface
> > + * @names: (optional) array of names for gpios
> > + * @domain: (optional) IRQ domain if the controller is interrupt-capable
>
> > + * Note: The regmap is expected to have cache enabled and i8255 control
> > + * registers not marked as volatile.
>
> Have you considered to catch wrong configurations by BUILD_BUG_ON() /
> static_assert() / another means of validation?

Ideally, I'd like to check for these configurations, but struct regmap
is an opaque type (the definition is in drivers/base/regmap/internal.h).
Do you know if there is some way to query a struct regmap for whether a
particular register has cache enabled or is marked as volatile?

William Breathitt Gray
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-11-27 18:20    [W:0.104 / U:3.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site