[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADBw62oh6juAqUR1-U1D73H0oeW1x0gk0XJ01h47ko_Dxy7eEQ@mail.gmail.com>
Date: Thu, 9 Apr 2020 22:13:58 +0800
From: Baolin Wang <baolin.wang7@...il.com>
To: Mark Brown <broonie@...nel.org>
Cc: Lee Jones <lee.jones@...aro.org>, Arnd Bergmann <arnd@...db.de>,
Orson Zhai <orsonzhai@...il.com>,
Chunyan Zhang <zhang.lyra@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH 1/3] mfd: syscon: Add reg_update_bits() callback support
On Thu, Apr 9, 2020 at 6:48 PM Mark Brown <broonie@...nel.org> wrote:
>
> On Thu, Apr 09, 2020 at 04:57:57PM +0800, Baolin Wang wrote:
>
> > --- a/include/linux/regmap.h
> > +++ b/include/linux/regmap.h
> > @@ -340,6 +340,8 @@ struct regmap_access_table {
> > * read operation on a bus such as SPI, I2C, etc. Most of the
> > * devices do not need this.
> > * @reg_write: Same as above for writing.
> > + * @reg_update_bits: Optional, should only be provided for devices whose update
> > + * operation cannot be represented as read and write.
> > * @fast_io: Register IO is fast. Use a spinlock instead of a mutex
> > * to perform locking. This field is ignored if custom lock/unlock
> > * functions are used (see fields lock/unlock of struct regmap_config).
> > @@ -416,6 +418,8 @@ struct regmap_config {
> >
> > int (*reg_read)(void *context, unsigned int reg, unsigned int *val);
> > int (*reg_write)(void *context, unsigned int reg, unsigned int val);
> > + int (*reg_update_bits)(void *context, unsigned int reg,
> > + unsigned int mask, unsigned int val);
>
> This is fine, we already have this operation for buses, but why is this
> munged in with the MFD patch?
Originally I want to show a example usage of the new callback, but I
can spilt them into 2 patches as you suggested. Thanks.
--
Baolin Wang
Powered by blists - more mailing lists