[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110905100015.GE30114@opensource.wolfsonmicro.com>
Date: Mon, 5 Sep 2011 11:00:15 +0100
From: Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>
To: Lars-Peter Clausen <lars@...afoo.de>
Cc: linux-kernel@...r.kernel.org,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Liam Girdwood <lrg@...com>,
Graeme Gregory <gg@...mlogic.co.uk>,
Samuel Oritz <sameo@...ux.intel.com>
Subject: Re: [PATCH 1/8] regmap: Introduce caching support
On Mon, Sep 05, 2011 at 11:55:13AM +0200, Lars-Peter Clausen wrote:
> On 09/05/2011 11:43 AM, Dimitris Papastamos wrote:
> > [...]
> >>> /**
> >>> * Default value for a register. We use an array of structs rather
> >>> * than a simple array as many modern devices have very sparse
> >>> @@ -50,9 +55,11 @@ struct reg_default {
> >>> * (eg, a clear on read interrupt status register).
> >>> *
> >>> * @max_register: Optional, specifies the maximum valid register index.
> >>> - * @reg_defaults: Power on reset values for registers (for use with
> >>> - * register cache support).
> >>> - * @num_reg_defaults: Number of elements in reg_defaults.
> >>> + *
> >>> + * @cache_type: The actual cache type.
> >>> + * @cache_defaults_raw: Power on reset values for registers (for use with
> >>> + * register cache support).
> >>> + * @num_cache_defaults_raw: Number of elements in cache_defaults_raw.
> >>> */
> >>> struct regmap_config {
> >>> int reg_bits;
> >>> @@ -64,8 +71,10 @@ struct regmap_config {
> >>> bool (*precious_reg)(struct device *dev, unsigned int reg);
> >>>
> >>> unsigned int max_register;
> >>> - struct reg_default *reg_defaults;
> >>> - int num_reg_defaults;
> >>
> >> I guess these were removed by accident due to some merge conflict as they were
> >> added just recently. It would be good if you could re-add them and if they are
> >> set initialize cache_defaults using a memdup instead of reading cache_defaults_raw.
> >>
> >>> +
> >>> + enum regcache_type cache_type;
> >>> + const void *cache_defaults_raw;
> >>> + unsigned num_cache_defaults_raw;
> >>> };
> >>>
> >>> typedef int (*regmap_hw_write)(struct device *dev, const void *data,
> >
> > I was merely renaming these.
>
> And you changed the type. We need the reg_default type register defaults for
> devices which have a sparse registers set or where the base register address is
> at a larger offset.
>
> - Lars
Aw duh, yes. Will add support to regcache to be able to use directly
the reg_defaults if they have been provided by the user without having
to derive this from cache_defaults_raw.
Thanks,
Dimitris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists